gnuace: use list of generated files from GENERATED_DIRTY for ADDITIONAL_IDL_TARGETS
[ACE_TAO.git] / ACE / ace / Registry_Name_Space.h
blob5c830112d4c83c1375a69d4f7f23d3166cd07aaf
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file Registry_Name_Space.h
7 * @author Irfan Pyarali (irfan@cs.wustl.edu)
8 */
9 //=============================================================================
12 #ifndef ACE_REGISTRY_NAME_SPACE_H
13 #define ACE_REGISTRY_NAME_SPACE_H
14 #include /**/ "ace/pre.h"
16 #include /**/ "ace/config-all.h"
18 #if !defined (ACE_LACKS_PRAGMA_ONCE)
19 # pragma once
20 #endif /* ACE_LACKS_PRAGMA_ONCE */
22 #if (defined (ACE_WIN32) && defined (ACE_USES_WCHAR))
23 // This only works on Win32 platforms when ACE_USES_WCHAR is turned on
25 #include "ace/Registry.h"
26 #include "ace/Naming_Context.h"
27 #include "ace/Name_Space.h"
29 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
31 /**
32 * @class ACE_Registry_Name_Space
34 * @brief Interface to a Name Server Database which is maintained by
35 * the Win32 Registry. Allows to add, change, remove and
36 * resolve NameBindings.
38 * Manages a Naming Service for a registry name space which
39 * includes bindings for all contexts. All strings are stored in
40 * wide character format. A Name Binding consists of a name
41 * (that's the key), a value string. There is no type string
42 * support in this Name Space.
44 class ACE_Export ACE_Registry_Name_Space : public ACE_Name_Space
46 public:
48 /// Constructor
49 ACE_Registry_Name_Space (void);
51 /// Contacts and opens the registry on the specified server
52 ACE_Registry_Name_Space (ACE_Name_Options *name_options);
54 /// Destructor
55 ~ACE_Registry_Name_Space (void);
57 /// Contacts and opens the registry on the specified server
58 int open (ACE_Name_Options *name_options);
60 /// Bind a new name to a naming context (Wide character strings).
61 int bind (const ACE_NS_WString &name_in,
62 const ACE_NS_WString &value_in,
63 const char *type_in = "");
65 /**
66 * Overwrite the value or type of an existing name in a
67 * ACE_Name_Space or bind a new name to the context, if it didn't
68 * exist yet. (Wide character strings interface).
70 int rebind (const ACE_NS_WString &name_in,
71 const ACE_NS_WString &value_in,
72 const char *type_in = "");
74 /// Delete a name from a ACE_Name_Space (Wide character strings
75 /// Interface).
76 int unbind (const ACE_NS_WString &name_in);
78 /// Get value and type of a given name binding (Wide chars). The
79 /// caller is responsible for deleting both @a value_out and @a type_out!
80 int resolve (const ACE_NS_WString &name_in,
81 ACE_NS_WString &value_out,
82 char *&type_out);
84 /// Get a set of names matching a specified pattern (wchars). Matching
85 /// means the names must begin with the pattern string.
86 int list_names (ACE_WSTRING_SET &set_out,
87 const ACE_NS_WString &pattern_in);
89 /// Get a set of values matching a specified pattern (wchars). Matching
90 /// means the values must begin with the pattern string.
91 int list_values (ACE_WSTRING_SET &set_out,
92 const ACE_NS_WString &pattern_in);
94 /// Get a set of types matching a specified pattern (wchars). Matching
95 /// means the types must begin with the pattern string.
96 int list_types (ACE_WSTRING_SET &set_out,
97 const ACE_NS_WString &pattern_in);
99 /**
100 * Get a set of names matching a specified pattern (wchars). Matching
101 * means the names must begin with the pattern string. Returns the
102 * complete binding associated each pattern match.
104 int list_name_entries (ACE_BINDING_SET &set,
105 const ACE_NS_WString &pattern);
108 * Get a set of values matching a specified pattern (wchars). Matching
109 * means the values must begin with the pattern string. Returns the
110 * complete binding associated each pattern match.
112 int list_value_entries (ACE_BINDING_SET &set,
113 const ACE_NS_WString &pattern);
116 * Get a set of types matching a specified pattern (wchars). Matching
117 * means the types must begin with the pattern string. Returns the
118 * complete binding associated each pattern match.
120 int list_type_entries (ACE_BINDING_SET &set,
121 const ACE_NS_WString &pattern);
123 /// Dump the state of the object
124 void dump (void) const;
126 private:
128 /// current context
129 ACE_Registry::Naming_Context context_;
132 ACE_END_VERSIONED_NAMESPACE_DECL
134 #endif /* ACE_WIN32 && ACE_USES_WCHAR */
136 #include /**/ "ace/post.h"
138 #endif /* ACE_REGISTRY_NAME_SPACE_H */