Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Related Pages

# ACE_Registry::Naming_Context Class Reference

An context representation. More...

`#include <Registry.h>`

Collaboration diagram for ACE_Registry::Naming_Context:

[legend]
List of all members.

## Public Types
enum | { MAX_OBJECT_NAME_SIZE = BUFSIZ, MAX_CONTEXT_NAME_SIZE = MAXPATHLEN + 1 }
## Public Methods
| Naming_Context (void)
| Empty constructor: keys will be NULL. More...
| Naming_Context (const HKEY &key)
| Constructor: key_ will be set to <key>. More...
| ~Naming_Context (void)
| Destructor will call <Naming_Context::close>. More...
int | bind_new (const Name &name, const Object &object)
int | bind_new (const ACE_TString &name, const Object &object)
int | bind (const Name &name, const Object &object)
int | bind (const ACE_TString &name, const Object &object)
int | rebind (const Name &name, const Object &object)
| Update <object> with <name> in <this> context (Name version). More...
int | rebind (const ACE_TString &name, const Object &object)
| Update <object> with <name> in <this> context. More...
int | resolve (const Name &name, Object &object)
| Find <object> with <name> in <this> context (Name version). More...
int | resolve (const ACE_TString &name, Object &object)
| Find <object> with <name> in <this> context. More...
int | unbind (const Name &name)
| Delete object with <name> in <this> context (Name version). More...
int | unbind (const ACE_TString &name)
| Delete object with <name> in <this> context. More...
int | new_context (Naming_Context &naming_context)
| Create new <naming_context>. More...
int | bind_new_context (const Name &name, Naming_Context &naming_context, u_long persistence=REG_OPTION_NON_VOLATILE, u_long security_access=KEY_ALL_ACCESS, LPSECURITY_ATTRIBUTES security_attributes=0)
int | bind_new_context (const ACE_TString &name, Naming_Context &naming_context, u_long persistence=REG_OPTION_NON_VOLATILE, u_long security_access=KEY_ALL_ACCESS, LPSECURITY_ATTRIBUTES security_attributes=0)
| Insert <naming_context> with <name> relative to <this> context This will fail if <name> already exists. More...
int | bind_context (const Name &name, Naming_Context &naming_context, u_long persistence=REG_OPTION_NON_VOLATILE, u_long security_access=KEY_ALL_ACCESS, LPSECURITY_ATTRIBUTES security_attributes=0)
int | bind_context (const ACE_TString &name, Naming_Context &naming_context, u_long persistence=REG_OPTION_NON_VOLATILE, u_long security_access=KEY_ALL_ACCESS, LPSECURITY_ATTRIBUTES security_attributes=0)
| Insert or update <naming_context> with <name> relative to <this> context This will not fail if <name> already exists. More...
int | rebind_context (const Name &name, Naming_Context &naming_context)
| Rename <naming_context> to <name> (Name version). More...
int | rebind_context (const ACE_TString &name, Naming_Context &naming_context)
| Rename <naming_context> to <name>. More...
int | resolve_context (const Name &name, Naming_Context &naming_context, u_long security_access=KEY_ALL_ACCESS)
| Find <naming_context> with <name> in <this> context (Name version). More...
int | resolve_context (const ACE_TString &name, Naming_Context &naming_context, u_long security_access=KEY_ALL_ACCESS)
| Find <naming_context> with <name> in <this> context. More...
int | unbind_context (const Name &name)
| Remove naming_context with <name> from <this> context (Name version). More...
int | unbind_context (const ACE_TString &name)
| Remove naming_context with <name> from <this> context. More...
int | destroy (void)
| Same as <unbind_context> with <this> as naming_context. More...
int | list (u_long how_many, Binding_List &list, Binding_Iterator &iterator)
int | list (Binding_List &list)
| listing function: iterator creator This gives back a listing of all entries in <this> context. More...
int | flush (void)
| Sync content of context to disk. More...
int | close (void)
| Close the handle of the context Note: <close> does not call <flush>. More...
HKEY | key (void)
| Get key. More...
HKEY | parent (void)
| Get parent. More...
void | name (Name &name)
| Get name (Name version). More...
void | name (ACE_TString &name)
| Set name (String version). More...
ACE_TString | name (void)
| Get name (String version). More...
## Protected Methods
void | key (HKEY key)
| Set key. More...
void | parent (HKEY parent)
| Set parent. More...
void | name (const Name &name)
| Set name (Name version). More...
void | name (const ACE_TString &name)
| Set name (String version). More...
## Private Methods
| Naming_Context (const Naming_Context &rhs)
| Disallow copy constructors. More...
const Naming_Context & | operator= (const Naming_Context &rhs)
| Disallow assignment. More...
## Private Attributes
HKEY | key_
| Key for self. More...
HKEY | parent_key_
| Key for parent. More...
ACE_TString | name_
| Name of self. More...
## Friends
class | ACE_Predefined_Naming_Contexts
| Friend factory. More...

## Detailed Description

An context representation.

Think about a context as being similar to a directory in a file system.

## Member Enumeration Documentation

anonymous enum

  | Enumeration values:
  MAX_OBJECT_NAME_SIZE | Max sizes of names (Not too sure about this value).
  MAX_CONTEXT_NAME_SIZE | Max size of context name.

## Constructor & Destructor Documentation

ACE_Registry::Naming_Context::Naming_Context | ( | void |  | ) |

| Empty constructor: keys will be NULL.

ACE_Registry::Naming_Context::Naming_Context | ( | const HKEY & | key | ) |

| Constructor: key_ will be set to <key>.

ACE_Registry::Naming_Context::~Naming_Context | ( | void |  | ) |

| Destructor will call <Naming_Context::close>.

ACE_Registry::Naming_Context::Naming_Context | ( | const Naming_Context & | rhs | ) | `[private]`

| Disallow copy constructors.

## Member Function Documentation

int ACE_Registry::Naming_Context::bind | ( | const ACE_TString & | name,
|  | const Object & | object
| ) |

| Insert or update <object> with <name> into <this> context This will not fail if <name> already exists (String version)

int ACE_Registry::Naming_Context::bind | ( | const Name & | name,
|  | const Object & | object
| ) |

| Insert or update <object> with <name> into <this> context This will not fail if <name> already exists (Name version)

int ACE_Registry::Naming_Context::bind_context | ( | const ACE_TString & | name,
|  | Naming_Context & | naming_context,
|  | u_long | persistence = REG_OPTION_NON_VOLATILE,
|  | u_long | security_access = KEY_ALL_ACCESS,
|  | LPSECURITY_ATTRIBUTES | security_attributes = 0
| ) |

| Insert or update <naming_context> with <name> relative to <this> context This will not fail if <name> already exists.

int ACE_Registry::Naming_Context::bind_context | ( | const Name & | name,
|  | Naming_Context & | naming_context,
|  | u_long | persistence = REG_OPTION_NON_VOLATILE,
|  | u_long | security_access = KEY_ALL_ACCESS,
|  | LPSECURITY_ATTRIBUTES | security_attributes = 0
| ) |

| Insert or update <naming_context> with <name> relative to <this> context This will not fail if <name> already exists (Name version)

int ACE_Registry::Naming_Context::bind_new | ( | const ACE_TString & | name,
|  | const Object & | object
| ) |

| Insert <object> with <name> into <this> context This will fail if <name> already exists (String version)

int ACE_Registry::Naming_Context::bind_new | ( | const Name & | name,
|  | const Object & | object
| ) |

| Insert <object> with <name> into <this> context This will fail if <name> already exists (Name version)

int ACE_Registry::Naming_Context::bind_new_context | ( | const ACE_TString & | name,
|  | Naming_Context & | naming_context,
|  | u_long | persistence = REG_OPTION_NON_VOLATILE,
|  | u_long | security_access = KEY_ALL_ACCESS,
|  | LPSECURITY_ATTRIBUTES | security_attributes = 0
| ) |

| Insert <naming_context> with <name> relative to <this> context This will fail if <name> already exists.

int ACE_Registry::Naming_Context::bind_new_context | ( | const Name & | name,
|  | Naming_Context & | naming_context,
|  | u_long | persistence = REG_OPTION_NON_VOLATILE,
|  | u_long | security_access = KEY_ALL_ACCESS,
|  | LPSECURITY_ATTRIBUTES | security_attributes = 0
| ) |

| Insert <naming_context> with <name> relative to <this> context This will fail if <name> already exists (Name version)

int ACE_Registry::Naming_Context::close | ( | void |  | ) |

| Close the handle of the context Note: <close> does not call <flush>.

int ACE_Registry::Naming_Context::destroy | ( | void |  | ) |

| Same as <unbind_context> with <this> as naming_context.

int ACE_Registry::Naming_Context::flush | ( | void |  | ) |

| Sync content of context to disk.

void ACE_Registry::Naming_Context::key | ( | HKEY | key | ) | `[protected]`

| Set key.

HKEY ACE_Registry::Naming_Context::key | ( | void |  | ) |

| Get key.

int ACE_Registry::Naming_Context::list | ( | Binding_List & | list | ) |

| listing function: iterator creator This gives back a listing of all entries in <this> context.

int ACE_Registry::Naming_Context::list | ( | u_long | how_many,
|  | Binding_List & | list,
|  | Binding_Iterator & | iter
| ) |

| listing function: iterator creator This is useful when there are many objects and contexts in <this> context and you only want to look at a few entries at a time

void ACE_Registry::Naming_Context::name | ( | const ACE_TString & | name | ) | `[protected]`

| Set name (String version).

void ACE_Registry::Naming_Context::name | ( | const Name & | name | ) | `[protected]`

| Set name (Name version).

ACE_TString ACE_Registry::Naming_Context::name | ( | void |  | ) |

| Get name (String version).

void ACE_Registry::Naming_Context::name | ( | ACE_TString & | name | ) |

| Set name (String version).

void ACE_Registry::Naming_Context::name | ( | Name & | name | ) |

| Get name (Name version).

int ACE_Registry::Naming_Context::new_context | ( | Naming_Context & | naming_context | ) |

| Create new <naming_context>.

const ACE_Registry::Naming_Context & ACE_Registry::Naming_Context::operator= | ( | const Naming_Context & | rhs | ) | `[private]`

| Disallow assignment.

void ACE_Registry::Naming_Context::parent | ( | HKEY | parent | ) | `[protected]`

| Set parent.

HKEY ACE_Registry::Naming_Context::parent | ( | void |  | ) |

| Get parent.

int ACE_Registry::Naming_Context::rebind | ( | const ACE_TString & | name,
|  | const Object & | new_object
| ) |

| Update <object> with <name> in <this> context.

int ACE_Registry::Naming_Context::rebind | ( | const Name & | name,
|  | const Object & | new_object
| ) |

| Update <object> with <name> in <this> context (Name version).

int ACE_Registry::Naming_Context::rebind_context | ( | const ACE_TString & | name,
|  | Naming_Context & | new_naming_context
| ) |

| Rename <naming_context> to <name>.

int ACE_Registry::Naming_Context::rebind_context | ( | const Name & | name,
|  | Naming_Context & | new_naming_context
| ) |

| Rename <naming_context> to <name> (Name version).

int ACE_Registry::Naming_Context::resolve | ( | const ACE_TString & | name,
|  | Object & | object
| ) |

| Find <object> with <name> in <this> context.

int ACE_Registry::Naming_Context::resolve | ( | const Name & | name,
|  | Object & | object
| ) |

| Find <object> with <name> in <this> context (Name version).

int ACE_Registry::Naming_Context::resolve_context | ( | const ACE_TString & | name,
|  | Naming_Context & | naming_context,
|  | u_long | security_access = KEY_ALL_ACCESS
| ) |

| Find <naming_context> with <name> in <this> context.

int ACE_Registry::Naming_Context::resolve_context | ( | const Name & | name,
|  | Naming_Context & | naming_context,
|  | u_long | security_access = KEY_ALL_ACCESS
| ) |

| Find <naming_context> with <name> in <this> context (Name version).

int ACE_Registry::Naming_Context::unbind | ( | const ACE_TString & | name | ) |

| Delete object with <name> in <this> context.

int ACE_Registry::Naming_Context::unbind | ( | const Name & | name | ) |

| Delete object with <name> in <this> context (Name version).

int ACE_Registry::Naming_Context::unbind_context | ( | const ACE_TString & | name | ) |

| Remove naming_context with <name> from <this> context.

int ACE_Registry::Naming_Context::unbind_context | ( | const Name & | name | ) |

| Remove naming_context with <name> from <this> context (Name version).

## Friends And Related Function Documentation

friend class ACE_Predefined_Naming_Contexts`[friend]`

| Friend factory.

## Member Data Documentation

HKEY ACE_Registry::Naming_Context::key_`[private]`

| Key for self.

ACE_TString ACE_Registry::Naming_Context::name_`[private]`

| Name of self.

HKEY ACE_Registry::Naming_Context::parent_key_`[private]`

| Key for parent.

The documentation for this class was generated from the following files:

- Registry.h
- Registry.cpp