Main Page   Class Hierarchy   Alphabetical List   Compound List   Compound Members  

propertyservice::PropertyControl Class Reference

#include <PropertyControl.h>

Inheritance diagram for propertyservice::PropertyControl:

propertyservice::PropertyClient propertyservice::PropertyServer List of all members.

Detailed Description

PropertyControl is a utility class that is used as a front-end for network transparent property control.

The class provides convenient means of altering the properties of a property service without the extra burden of CORBA calls.


Public Methods

 PropertyControl () throw (ORBException&)
 Create a property control that initializes the internal orb with default values.

 PropertyControl (CORBA::ORB_ptr orb)
 Initialize a property control with an already created orb.

 PropertyControl (util::List< std::string > orbParams) throw (ORBException&)
 Create a property control that fakes initialization parameters to an orb.

CORBA::ORB_ptr getOrb ()
 Get a pointer to the internal orb.

PortableServer::POA_ptr getPOA ()
 Get a pointer to the portable object adapter in the current orb.

virtual ~PropertyControl ()
 Destructor.


Static Public Methods

template<class T> util::Blob< char > * encodeProperty (const T &value) throw (util::io::IOException&, util::xml::XMLException&)
 Encode an object.

template<class T> T decodeProperty (const util::Blob< char > value) throw (util::io::IOException&, util::xml::XMLException&)
 A specialized property decoder for strings.


Protected Attributes

CORBA::ORB_ptr _pOrb
 A pointer to the internal orb.

bool _bDestroyOrb
 A flag that indicates whether the internal orb should be destroyed upon deletion of this PropertyControl.


Constructor & Destructor Documentation

propertyservice::PropertyControl::PropertyControl   throw (ORBException&)
 

Create a property control that initializes the internal orb with default values.

PropertyControl takes the responsibility for destroying the orb upon deletion. The internal orb object can be later obtained via the getOrb() method.

propertyservice::PropertyControl::PropertyControl CORBA::ORB_ptr    orb [inline]
 

Initialize a property control with an already created orb.

You remain responsible for destroying the orb.

propertyservice::PropertyControl::PropertyControl util::List< std::string >    orbParams throw (ORBException&)
 

Create a property control that fakes initialization parameters to an orb.

Use the standard format of orb parameters as if they were presented on the command line.

For an illustrative example, the following code snippet sets the host name of an name service:

 List<string> params;
 params.addElements(2,
                    "-ORBInitRef","NameService=corbaname::myhost.com");
 PropertyControl ctrl(lst);
 


Member Function Documentation

template<class T>
T propertyservice::PropertyControl::decodeProperty const util::Blob< char >    value throw (util::io::IOException&, util::xml::XMLException&) [static]
 

A specialized property decoder for strings.

Parameters:
value  a string-encoded object
Returns:
the decoded value
Exceptions:
IOException  & if the object cannot be read from a stream

template<class T>
util::Blob< char > * propertyservice::PropertyControl::encodeProperty const T &    value throw (util::io::IOException&, util::xml::XMLException&) [static]
 

Encode an object.

The encoded property is returned as a newly allocated Blob of type char. The returned blob must be deleted after usage.

Parameters:
value  an object to be encoded
Returns:
the encoded value
Exceptions:
IOException  & if the object cannot be written to a stream

CORBA::ORB_ptr propertyservice::PropertyControl::getOrb   [inline]
 

Get a pointer to the internal orb.

The internal orb may have been initialized within the PropertyControl class or externally by the user.

Returns:
a pointer to the initial orb

PortableServer::POA_ptr propertyservice::PropertyControl::getPOA  
 

Get a pointer to the portable object adapter in the current orb.

If an adapter is not yet intialized, a newly initialized one will be returned. The first call to this method initializes the POA and activates the POA manager.


The documentation for this class was generated from the following files:
Documentation generated on 11.09.2003 with Doxygen.
The documentation is copyrighted material.
Copyright © Topi Mäenpää 2003. All rights reserved.