5.2.4.2 C++ Mapping
The Names Library pseudo OMG IDL interface maps to the C++
classes shown in the following listing, which can be found in the
NamesLib.h
header file.
Two Oracle Tuxedo extensions to CORBA are included to support
scalability. Specifically, the
LNameComponent::set_id()
and
LNameComponent::set_kind()
methods raise an
OverFlow
exception if the length of the input string
exceeds MAX_LNAME_STRLEN
. This length coincides with
the maximum length of the Oracle Tuxedo object ID (OID) and
interface name. For a detailed description of the Library Name
class, see the section Names Library Interface Pseudo OMG
IDL.
const short MAX_LNAME_STRLEN = 128;
class LNameComponent {
public:
class NotSet{ };
class OverFlow{ };
static LNameComponent* create_lname_component();
void destroy();
const char* get_id() const throw (NotSet);
void set_id(const char* i) throw (OverFlow);
const char* get_kind() const throw (NotSet);
void set_kind(const char* k) throw (OverFlow);
};
class LName {
public:
class NoComponent{ };
class OverFlow{ };
class InvalidName{ };
static LName* create_lname();
void destroy();
LName* insert_component(const unsigned long i,
LNameComponent* n)
throw (NoComponent, OverFlow);
const LNameComponent* get_component(
const unsigned long i) const
throw (NoComponent);
const LNameComponent* delete_component(
const unsigned long i)
throw (NoComponent);
unsigned long num_components() const;
CORBA::Boolean equal(const LName* ln) const;
CORBA::Boolean less_than(
const LName* ln) const; // not implemented
CosNaming::Name* to_idl_form()
throw (InvalidName);
void from_idl_form(const CosNaming::Name& n);
};
Parent topic: Creating Application Factory Keys