Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

ht_registry Class Reference

#include <htreg.h>

Inheritance diagram for ht_registry:

Object List of all members.

Public Member Functions

void init ()
virtual void done ()
int create_node (const char *key, ht_registry_node_type type)
int create_subdir (const char *key)
int delete_node (const char *key)
const char * enum_next (ht_registry_data **data, ht_registry_node_type *type, const char *dir, const char *prevkey)
const char * enum_prev (ht_registry_data **data, ht_registry_node_type *type, const char *dir, const char *nextkey)
bool find_any_entry (const char *key, ht_registry_data **data, ht_registry_node_type *type)
bool find_data_entry (const char *key, ht_registry_data **data, ht_registry_node_type *type, bool follow_symlinks)
ht_registry_node_type lookup_node_type (const char *identifier)
ht_registry_node_type_descget_node_type_desc (ht_registry_node_type t, char **identifier)
ht_registry_node_type have_node_type (const char *identifier, create_empty_registry_data_func create_empty_registry_data)
ht_registry_node_type register_node_type (const char *identifier, create_empty_registry_data_func create_empty_registry_data)
int set_dword (const char *key, dword d)
int set_raw (const char *key, const void *data, UINT size)
int set_node (const char *key, ht_registry_node_type type, ht_registry_data *data)
int set_string (const char *key, const char *string)
int set_symlink (const char *key, const char *dest)
bool valid_nodename (const char *nodename)
virtual int load (ht_object_stream *f)
virtual void store (ht_object_stream *f)
virtual OBJECT_ID object_id () const
void debug_dump ()
void debug_dump_i (FILE *f, ht_tree *t, int ident)

Public Attributes

ht_streenode_types

Protected Member Functions

ht_registry_nodefind_entry_i (ht_tree **dir, const char *key, bool follow_symlinks)
ht_registry_nodefind_entry_get_node (ht_tree *dir, const char *nodename)
ht_registry_nodefind_entry_get_subdir (ht_tree *dir, const char *nodename)
ht_registry_nodefind_entry_get_data (ht_tree *dir, const char *nodename, bool follow_symlinks)
bool splitfind (const char *key, const char **name, ht_registry_node **node)

Protected Attributes

ht_registry_noderoot
UINT rec_depth

Member Function Documentation

int ht_registry::create_node const char *  key,
ht_registry_node_type  type
 

Definition at line 396 of file htreg.cc.

References ht_registry_node_type_desc::create_empty_registry_data, ht_registry_node::data, get_node_type_desc(), ht_registry_node_type, ht_registry_node::init(), NULL, splitfind(), and valid_nodename().

Referenced by RegistryFs::createFile(), and RegNodeFile::done().

int ht_registry::create_subdir const char *  key  ) 
 

Definition at line 418 of file htreg.cc.

References compare_keys_string(), ht_registry_node::data, ht_registry_node::init(), ht_stree::init(), RNT_SUBDIR, splitfind(), and valid_nodename().

Referenced by RegistryFs::makeDir().

void ht_registry::debug_dump  ) 
 

Definition at line 447 of file htreg.cc.

References ht_registry_node::data, debug_dump_i(), and root.

void ht_registry::debug_dump_i FILE *  f,
ht_tree t,
int  ident
 

Definition at line 456 of file htreg.cc.

References ht_tree::enum_next(), NULL, RNT_DWORD, RNT_RAW, RNT_STRING, RNT_SUBDIR, RNT_SYMLINK, and ht_data_string::value.

Referenced by debug_dump().

int ht_registry::delete_node const char *  key  ) 
 

Definition at line 436 of file htreg.cc.

References ht_tree::del(), and find_entry_i().

Referenced by RegistryFs::deleteFile().

void ht_registry::done  )  [virtual]
 

Reimplemented from Object.

Definition at line 387 of file htreg.cc.

References ht_stree::destroy(), ht_registry_node::done(), node_types, and root.

Referenced by done_registry(), and ht_app::load().

const char * ht_registry::enum_next ht_registry_data **  data,
ht_registry_node_type type,
const char *  dir,
const char *  prevkey
 

Definition at line 494 of file htreg.cc.

References ht_registry_node::data, ht_tree::enum_next(), find_entry_i(), ht_registry_node_type, NULL, rec_depth, RNT_SUBDIR, ht_registry_node::type, and ht_data_string::value.

Referenced by RegistryFs::findFirst(), RegistryFs::findNext(), and load_pal().

const char * ht_registry::enum_prev ht_registry_data **  data,
ht_registry_node_type type,
const char *  dir,
const char *  nextkey
 

Definition at line 515 of file htreg.cc.

References ht_registry_node::data, ht_tree::enum_prev(), find_entry_i(), ht_registry_node_type, NULL, rec_depth, RNT_SUBDIR, ht_registry_node::type, and ht_data_string::value.

bool ht_registry::find_any_entry const char *  key,
ht_registry_data **  data,
ht_registry_node_type type
 

Definition at line 536 of file htreg.cc.

References ht_registry_node::data, find_entry_i(), ht_registry_node_type, rec_depth, and ht_registry_node::type.

Referenced by RegistryFs::pstat().

bool ht_registry::find_data_entry const char *  key,
ht_registry_data **  data,
ht_registry_node_type type,
bool  follow_symlinks
 

Definition at line 548 of file htreg.cc.

References ht_registry_node::data, find_entry_i(), ht_registry_node_type, rec_depth, RNT_SUBDIR, and ht_registry_node::type.

Referenced by RegistryFs::canonicalize(), get_config_dword(), get_config_string(), RegNodeFile::init(), and RegistryFs::open().

ht_registry_node * ht_registry::find_entry_get_data ht_tree dir,
const char *  nodename,
bool  follow_symlinks
[protected]
 

Definition at line 622 of file htreg.cc.

References ht_registry_node::data, find_entry_get_node(), find_entry_i(), MAX_SYMLINK_REC_DEPTH, rec_depth, RNT_SYMLINK, and ht_registry_node::type.

Referenced by find_entry_i().

ht_registry_node * ht_registry::find_entry_get_node ht_tree dir,
const char *  nodename
[protected]
 

Definition at line 589 of file htreg.cc.

References ht_tree::get(), and NULL.

Referenced by find_entry_get_data(), and find_entry_get_subdir().

ht_registry_node * ht_registry::find_entry_get_subdir ht_tree dir,
const char *  nodename
[protected]
 

Definition at line 599 of file htreg.cc.

References ht_registry_node::data, find_entry_get_node(), find_entry_i(), MAX_SYMLINK_REC_DEPTH, rec_depth, RNT_SUBDIR, RNT_SYMLINK, and ht_registry_node::type.

Referenced by find_entry_i().

ht_registry_node * ht_registry::find_entry_i ht_tree **  dir,
const char *  key,
bool  follow_symlinks
[protected]
 

Definition at line 561 of file htreg.cc.

References ht_registry_node::data, find_entry_get_data(), find_entry_get_subdir(), and root.

Referenced by delete_node(), enum_next(), enum_prev(), find_any_entry(), find_data_entry(), find_entry_get_data(), find_entry_get_subdir(), set_node(), and splitfind().

ht_registry_node_type_desc * ht_registry::get_node_type_desc ht_registry_node_type  t,
char **  identifier
 

Definition at line 655 of file htreg.cc.

References ht_stree::enum_next(), ht_registry_node_type, node_types, NULL, and ht_data_string::value.

Referenced by create_node(), get_config_dword(), and get_config_string().

ht_registry_node_type ht_registry::have_node_type const char *  identifier,
create_empty_registry_data_func  create_empty_registry_data
 

Definition at line 641 of file htreg.cc.

References create_empty_registry_data_func, ht_registry_node_type, lookup_node_type(), and register_node_type().

void ht_registry::init  ) 
 

Reimplemented from Object.

Definition at line 349 of file htreg.cc.

References compare_keys_string(), create_empty_dword(), create_empty_raw(), ht_registry_node_type_desc::create_empty_registry_data, create_empty_registry_data_func, create_empty_string(), create_empty_symlink(), ht_registry_node::data, ht_registry_node_type, ht_stree::init(), ht_registry_node::init(), ht_stree::insert(), node_types, NULL, RNT_DWORD, RNT_RAW, RNT_STRING, RNT_SUBDIR, RNT_SYMLINK, root, ht_registry_node_type_desc::type, and UINT.

int ht_registry::load ht_object_stream f  )  [virtual]
 

loads object from object stream.

Returns:
ht_stream errorcode

Reimplemented from Object.

Definition at line 648 of file htreg.cc.

References ht_layer_stream::get_error(), ht_object_stream::getObject(), node_types, and root.

ht_registry_node_type ht_registry::lookup_node_type const char *  identifier  ) 
 

Definition at line 668 of file htreg.cc.

References ht_stree::get(), ht_registry_node_type, node_types, and ht_registry_node_type_desc::type.

Referenced by have_node_type(), and load_pal().

OBJECT_ID ht_registry::object_id  )  const [virtual]
 

Returns:
unique object id.

Reimplemented from Object.

Definition at line 675 of file htreg.cc.

References ATOM_HT_REGISTRY.

ht_registry_node_type ht_registry::register_node_type const char *  identifier,
create_empty_registry_data_func  create_empty_registry_data
 

Definition at line 680 of file htreg.cc.

References ht_registry_node_type_desc::create_empty_registry_data, create_empty_registry_data_func, ht_stree::enum_next(), ht_registry_node_type, ht_stree::insert(), node_types, NULL, RNT_INVALID, and ht_registry_node_type_desc::type.

Referenced by have_node_type().

int ht_registry::set_dword const char *  key,
dword  d
 

Definition at line 707 of file htreg.cc.

References RNT_DWORD, and set_node().

int ht_registry::set_node const char *  key,
ht_registry_node_type  type,
ht_registry_data data
 

Definition at line 717 of file htreg.cc.

References ht_registry_node::data, Object::done(), find_entry_i(), ht_registry_node_type, and ht_registry_node::type.

Referenced by RegNodeFile::done(), set_dword(), set_raw(), set_string(), and set_symlink().

int ht_registry::set_raw const char *  key,
const void *  data,
UINT  size
 

Definition at line 712 of file htreg.cc.

References RNT_RAW, set_node(), size, and UINT.

int ht_registry::set_string const char *  key,
const char *  string
 

Definition at line 733 of file htreg.cc.

References RNT_STRING, set_node(), and string.

int ht_registry::set_symlink const char *  key,
const char *  dest
 

Definition at line 738 of file htreg.cc.

References RNT_SYMLINK, and set_node().

bool ht_registry::splitfind const char *  key,
const char **  name,
ht_registry_node **  node
[protected]
 

Definition at line 743 of file htreg.cc.

References find_entry_i(), RNT_SUBDIR, and ht_registry_node::type.

Referenced by create_node(), and create_subdir().

void ht_registry::store ht_object_stream f  )  [virtual]
 

stores object.

Reimplemented from Object.

Definition at line 764 of file htreg.cc.

References node_types, ht_object_stream::putObject(), and root.

bool ht_registry::valid_nodename const char *  nodename  ) 
 

Definition at line 829 of file htreg.cc.

References valid_char(), valid_nodename_chars, and valid_nodename_chars_first.

Referenced by create_node(), and create_subdir().


Member Data Documentation

ht_stree* ht_registry::node_types
 

Definition at line 168 of file htreg.h.

Referenced by done(), RegistryFs::enumFiletype(), get_node_type_desc(), init(), load(), lookup_node_type(), register_node_type(), and store().

UINT ht_registry::rec_depth [protected]
 

Definition at line 160 of file htreg.h.

Referenced by enum_next(), enum_prev(), find_any_entry(), find_data_entry(), find_entry_get_data(), and find_entry_get_subdir().

ht_registry_node* ht_registry::root [protected]
 

Definition at line 159 of file htreg.h.

Referenced by debug_dump(), done(), find_entry_i(), init(), load(), and store().


The documentation for this class was generated from the following files:
Generated on Fri May 7 21:16:02 2004 by doxygen 1.3.5