NAME

ACE_Local_Name_Space - Maintaining accesses Local Name Server Database. Allows to add NameBindings, change them, remove them and resolve NameBindings.

SYNOPSIS


#include <ACE/ACE_Local_Name_Space_T.h>


template<class MEM_POOL, class LOCK>
class ACE_Local_Name_Space : public ACE_Name_Space
{
  public:
    ACE_Local_Name_Space (void);
    ACE_Local_Name_Space (
        ACE_Naming_Context::Context_Scope_Type scope_in,
        ACE_Name_Options *name_options
        );
    int open (ACE_Naming_Context::Context_Scope_Type scope_in);
    ~ACE_Local_Name_Space (void);
    virtual int bind (
        const ACE_WString &name,
        const ACE_WString &value,
        const char *type = ""
        );
    virtual int rebind (
        const ACE_WString &name,
        const ACE_WString &value,
        const char *type = ""
        );
    virtual int unbind (const ACE_WString &name);
    virtual int resolve (
        const ACE_WString &name,
        ACE_WString &value,
        char *&type
        );
    virtual int list_names (
        ACE_WSTRING_SET &set,
        const ACE_WString &pattern
        );
    virtual int list_values (
        ACE_WSTRING_SET &set,
        const ACE_WString &pattern
        );
    virtual int list_types (
        ACE_WSTRING_SET &set,
        const ACE_WString &pattern
        );
    virtual int list_name_entries (
        ACE_BINDING_SET &set,
        const ACE_WString &pattern
        );
    virtual int list_value_entries (
        ACE_BINDING_SET &set,
        const ACE_WString &pattern
        );
    virtual int list_type_entries (
        ACE_BINDING_SET &set,
        const ACE_WString &pattern
        );
    virtual void dump (void) const;
  private:
    int shared_bind (
        const ACE_WString &name,
        const ACE_WString &value,
        const char *type,
        int rebind
        );
    int create_manager (void);
        typedef ACE_Allocator_Adapter <ACE_Malloc <MEM_POOL, LOCK> > ALLOCATOR;
        
    ALLOCATOR *allocator_;
    ACE_Name_Space_Map <ALLOCATOR>*name_space_map_;
    ACE_Naming_Context::Context_Scope_Type ns_scope_;
    ACE_Name_Options *name_options_;
    char context_file_[MAXNAMELEN];
    LOCK lock_;
};

DESCRIPTION

Manages a Naming Service for a local name space which includes bindings for node_local and host_local naming contexts. All strings are stored in wide character format. A Name Binding consists of a name (that's the key), a value string and an optional type string (no wide chars).

Initialization and termination methods.

ACE_Local_Name_Space (void);
ACE_Local_Name_Space (
    ACE_Naming_Context::Context_Scope_Type scope_in,
    ACE_Name_Options *name_options
    );
int open (ACE_Naming_Context::Context_Scope_Type scope_in);
~ACE_Local_Name_Space (void);
virtual int bind (
    const ACE_WString &name,
    const ACE_WString &value,
    const char *type = ""
    );
virtual int rebind (
    const ACE_WString &name,
    const ACE_WString &value,
    const char *type = ""
    );
virtual int unbind (const ACE_WString &name);
virtual int resolve (
    const ACE_WString &name,
    ACE_WString &value,
    char *&type
    );
virtual int list_names (
    ACE_WSTRING_SET &set,
    const ACE_WString &pattern
    );
virtual int list_values (
    ACE_WSTRING_SET &set,
    const ACE_WString &pattern
    );
virtual int list_types (
    ACE_WSTRING_SET &set,
    const ACE_WString &pattern
    );
virtual int list_name_entries (
    ACE_BINDING_SET &set,
    const ACE_WString &pattern
    );
virtual int list_value_entries (
    ACE_BINDING_SET &set,
    const ACE_WString &pattern
    );
virtual int list_type_entries (
    ACE_BINDING_SET &set,
    const ACE_WString &pattern
    );
virtual void dump (void) const;

I just know this is going to cause problems on some platform...

    typedef ACE_Allocator_Adapter <ACE_Malloc <MEM_POOL, LOCK> > ALLOCATOR;
    
ALLOCATOR *allocator_;
ACE_Name_Space_Map <ALLOCATOR>*name_space_map_;
ACE_Naming_Context::Context_Scope_Type ns_scope_;
ACE_Name_Options *name_options_;
char context_file_[MAXNAMELEN];
LOCK lock_;

AUTHOR

Prashant Jain (pjain@cs.wustl.edu), Irfan Pyarali (irfan@wuerl.wustl.edu), and Douglas C. Schmidt (schmidt@cs.wustl.edu).

LIBRARY

ACE