rwsf::ConfigBindingrwsf::HandleBase
#include rwsf/cm/ConfigBinding.h
Class ConfigBinding represents a configuration binding containing three sets of information:
A map of string key-value pairs which hold simple values.
A map of string keys to ConfigBinding values which hold nested bindings.
A list of ConfigBindings which represent multiple bindings for the parent ConfigBinding object.
The first structure is used to store the actual data in the ConfigBinding tree. These are simple string values, keyed on names. They are used in the Configuration Manager to store WSDL binding information (input types, SOAP locations, and so on), among other things. They are accessed through the "simple" commands in the API.
The second structure is used to store nested children, which represent "branches" in the ConfigBinding tree. These are used in the Configuration Manager to categorize WSDL binding information (input vs. output types, operation 1's data vs. operation 2's data, and so on), among other things. They are accessed through the "nested" commands in the API.
The third structure is used to store a list of bindings which can take the place of a parent and give a third dimension to the ConfigBinding tree. Different bindings can be used to take the place of a particular node, depending on the circumstance. These are used in the ConfigurationManager to allow for multiple bindings for a particular operation (where only one is applicable, depending on the situation). They are also used by the failover mechanism to persist a list of nodes, messages, etc., where each binding has equal value, but they still must be stored in order, which a map cannot accomplish. They are accessed through the "multi" commands in the API.
ConfigBinding();
Default constructor. Creates a handle with no body.
ConfigBinding(const ConfigBinding & cb);
Copy constructor. Creates a copy of handle.
Note
The created ConfigBinding points to the same body as the given ConfigBinding.
ConfigBinding(ConfigBindingImp * imp);
Initalizes a ConfigBinding handle with the supplied body.
~ConfigBinding();
Default destructor.
ConfigBinding make();
Creates a new ConfigBinding body with a blank type.
ConfigBinding myConfigBinding = rwsf::ConfigBinding::make();
ConfigBinding make(const std::string & type);
Creates a new ConfigBinding body with given type.
ConfigBinding myConfigBinding = rwsf::ConfigBinding::make("myConfigType");
void addMultiBinding(const ConfigBinding & binding);
Appends a ConfigBinding to the multi list.
void clear();
Clears all simple, nested, and multi values from this ConfigBinding.
void clearMultiBindings();
Clears the multi list.
void clearNestedBindings();
Clears all nested ConfigBindings.
void clearSimpleBindings();
Clears all simple keys and their values.
ConfigBinding getMultiBinding(unsigned int i) const;
Returns the ConfigBinding from the multi list at the given index.
int getMultiBindingSize() const;
Returns the number of bindings in the multi list.
ConfigBinding getNestedBinding(const std::string & key) const;
Returns the nested ConfigBinding value for the given key.
std::list< std::string > getNestedKeyNames() const;
Returns a list of the nested ConfigBinding key names.
std::list< std::string > getSimpleKeyNames() const;
Returns a list of the simple key names.
std::string getSimpleValue(const std::string & key) const;
Returns the simple string value for the given key.
std::string getType() const;
Returns the type of this ConfigBinding.
void removeMultiBinding(unsigned int i);
Removes the item at the given index from the multi list.
void removeNestedBinding(const std::string & key);
Removes the nested ConfigBinding value for the given key.
void removeSimpleValue(const std::string & key);
Removes the simple value with the given key.
void setMultiBinding(unsigned int i, const ConfigBinding & binding);
Sets the ConfigBinding at the given index in the multi list.
void setNestedBinding(const std::string & key, const ConfigBinding & binding);
Sets the nested ConfigBinding value for the given key.
void setSimpleValue(const std::string & key, const std::string & value);
Sets a simple string value for the given key.
void setType(const std::string &);
Sets the type of this ConfigBinding.
ConfigBinding & operator=(const ConfigBinding & cb);
Assignment operator. Assigns the body of the given ConfigBinding to this one.
© Copyright Rogue Wave Software, Inc. All Rights Reserved. All Rights Reserved. Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. HydraExpress is a trademark of Rogue Wave Software, Inc. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.