Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

OmniEvents::RegistryKey Class Reference

Opens a windows registry key, and closed it upon destruction. More...

List of all members.

Public Methods

 RegistryKey (RegistryKey &right)
 Copy constructor, adopts ownership. More...

 RegistryKey (HKEY hkey, const char *subkey, REGSAM samDesired=KEY_QUERY_VALUE)
 Constructor, opens the key. More...

 ~RegistryKey ()
 Destructor, closes the key. More...

 operator bool () const
int setValueStr (const char *name, const char *data)
char * queryValueStr (const char *name, const int maxlen=2048) const

Private Methods

 RegistryKey ()
 No implementation. More...

 RegistryKey (HKEY hkey, bool open=true)

Private Attributes

HKEY _hkey
bool _open


Detailed Description

Opens a windows registry key, and closed it upon destruction.

Upon failure, it emits an error message and then quits. Why do I have to write this class myself??

Definition at line 86 of file daemon_windows.cc.


Constructor & Destructor Documentation

OmniEvents::RegistryKey::RegistryKey   [private]
 

No implementation.

OmniEvents::RegistryKey::RegistryKey HKEY    hkey,
bool    open = true
[inline, private]
 

Definition at line 92 of file daemon_windows.cc.

References _hkey, and _open.

OmniEvents::RegistryKey::RegistryKey RegistryKey &    right
 

Copy constructor, adopts ownership.

Definition at line 103 of file daemon_windows.cc.

OmniEvents::RegistryKey::RegistryKey HKEY    hkey,
const char *    subkey,
REGSAM    samDesired = KEY_QUERY_VALUE
 

Constructor, opens the key.

Definition at line 110 of file daemon_windows.cc.

References _hkey, and _open.

OmniEvents::RegistryKey::~RegistryKey  
 

Destructor, closes the key.

Definition at line 123 of file daemon_windows.cc.

References HERE.


Member Function Documentation

OmniEvents::RegistryKey::operator bool   const [inline]
 

Definition at line 97 of file daemon_windows.cc.

References _open.

char * OmniEvents::RegistryKey::queryValueStr const char *    name,
const int    maxlen = 2048
const
 

Definition at line 150 of file daemon_windows.cc.

References _hkey.

Referenced by OmniEvents::Service::readParameters().

int OmniEvents::RegistryKey::setValueStr const char *    name,
const char *    data
 

Definition at line 136 of file daemon_windows.cc.

References _hkey.

Referenced by OmniEvents::Service::install(), and OmniEvents::Service::writeParameters().


Member Data Documentation

HKEY OmniEvents::RegistryKey::_hkey [private]
 

Definition at line 88 of file daemon_windows.cc.

Referenced by queryValueStr(), RegistryKey(), and setValueStr().

bool OmniEvents::RegistryKey::_open [private]
 

Definition at line 89 of file daemon_windows.cc.

Referenced by operator bool(), and RegistryKey().


The documentation for this class was generated from the following file:
Generated on Fri Nov 19 17:42:37 2004 for OmniEvents by doxygen1.2.15