Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

AnyConfig::AcCorbaConfig Class Reference

This class implements a remote AcWriteAbleConfig using CORBA. More...

#include <AnyConfig.h>

Inheritance diagram for AnyConfig::AcCorbaConfig::

AnyConfig::AcWriteableConfig AnyConfig::AcConfiguration List of all members.

Public Methods

 AcCorbaConfig ()
 Constructor method. More...

virtual ~AcCorbaConfig ()
 Destructor method. More...

virtual bool copyTo (AcWriteableConfig *pWriteableConfig)
 Copy this configuration to another configuration. More...

virtual void display ()
 Mostly for debugging purposes, write out the configuration to stdout. More...

virtual bool getStr (const char *pKey, CString &rValue)
 Retrieve a string from the configuration for the specified key. More...

virtual bool initialize (AcConfiguration &parentConfig)
 Initialize the configuration using another, probably more primitive, parent configuration. More...

virtual bool initRequired ()
 Returns true if the derived AcConfiguration requires to be initialized. More...

virtual bool keyExists (const char *pKey)
 Check if a given key exists. More...

virtual void setStr (const char *pKey, const char *pValue)
 Set the configuration item to the passed string value. More...


Private Methods

void ConstructorInclude ()
 Method which must be called first in a constructor. More...

void DestructorInclude ()
 Method which must be called first in a destructor. More...


Private Attributes

void* _pObj

Detailed Description

This class implements a remote AcWriteAbleConfig using CORBA.


Constructor & Destructor Documentation

AnyConfig::AcCorbaConfig::AcCorbaConfig ( )
 

Constructor method.

AnyConfig::AcCorbaConfig::~AcCorbaConfig ( ) [virtual]
 

Destructor method.


Member Function Documentation

void AnyConfig::AcCorbaConfig::ConstructorInclude ( ) [private]
 

Method which must be called first in a constructor.

Reimplemented from AnyConfig::AcWriteableConfig.

void AnyConfig::AcCorbaConfig::DestructorInclude ( ) [private]
 

Method which must be called first in a destructor.

Reimplemented from AnyConfig::AcWriteableConfig.

bool AnyConfig::AcCorbaConfig::copyTo ( AcWriteableConfig * pWriteableConfig ) [virtual]
 

Copy this configuration to another configuration.

This method is specifically handy when the source configuration comes from a text file and the destination configuration is AcMemConfig, which offers much more functionality. Along the same lines, this method can be used to save an AcMemConfig in a file. If the target configuration already has filled-in items, the result of this operation is undefined. Some derived classes may end up containing a merged result of the old and the new values (AcMemConfig, AcEnvConfig), other may only contain the copied values (like AcFileConfig).

Parameters:
pWriteableConfig   A pointer to an initialized AcWriteableConfig.
return   True if the derived configuration supports copying, false otherwise.

Reimplemented from AnyConfig::AcConfiguration.

void AnyConfig::AcCorbaConfig::display ( ) [virtual]
 

Mostly for debugging purposes, write out the configuration to stdout.

Reimplemented from AnyConfig::AcConfiguration.

bool AnyConfig::AcCorbaConfig::getStr ( const char * pKey,
CString & rValue ) [virtual]
 

Retrieve a string from the configuration for the specified key.

Parameters:
pKey   The key to look for (in the current section).
rValue   Will be filled in with the value found.
Returns:
False if the key could not be located in the current section (if any).

Reimplemented from AnyConfig::AcConfiguration.

bool AnyConfig::AcCorbaConfig::initRequired ( ) [virtual]
 

Returns true if the derived AcConfiguration requires to be initialized.

See the initialize() function for the various derived classes for more details. Note that this function must return false once the initialization has been done once.

Reimplemented from AnyConfig::AcConfiguration.

bool AnyConfig::AcCorbaConfig::initialize ( AcConfiguration & parentConfig ) [virtual]
 

Initialize the configuration using another, probably more primitive, parent configuration.

To use the AcCorbaConfig class it must be initialized. Unless you also called the special AcCorbaInit() function, initializing an AcCorbaConfig will create an(other) ORB instance in your program.

Parameters:
parentConfig   The parent configuration to use. For an AcCorbaConfig this configuration must supply the following key in the currently selected section:

"CFGCORBAIOR=stringified_corba_ior"

Note that if you can supply a CORBA Name instead of a stringified IOR, if you have the CORBA Naming Service available.

Returns:
False if the initialization failed.

Reimplemented from AnyConfig::AcConfiguration.

bool AnyConfig::AcCorbaConfig::keyExists ( const char * pKey ) [virtual]
 

Check if a given key exists.

Parameters:
key   The key to look for in [the current section in] the configuration.
Returns:
True if the key exists.

Reimplemented from AnyConfig::AcConfiguration.

void AnyConfig::AcCorbaConfig::setStr ( const char * pKey,
const char * pValue ) [virtual]
 

Set the configuration item to the passed string value.

Parameters:
pKey   The item to set.
pValue   The value to set it to. This must be a valid pointer to a valid C string.

Reimplemented from AnyConfig::AcWriteableConfig.


The documentation for this class was generated from the following files:
Generated at Wed Nov 21 11:34:18 2001 for AnyConfig by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001