5.2.4.2 C++マッピング

名前ライブラリの擬似OMG IDLインタフェースは、次のリストに示すC++クラスにマッピングします。これは、NamesLib.hヘッダー・ファイルにあります。

スケーラビリティをサポートするために、CORBAに対する2つのOracle Tuxedo拡張が含まれています。具体的には、入力文字列の長さがMAX_LNAME_STRLENを超えると、LNameComponent::set_id()メソッドおよびLNameComponent::set_kind()メソッドが、OverFlow例外を生成します。この長さは、Oracle TuxedoオブジェクトID (OID)およびインタフェース名の最大長に一致します。ライブラリ名クラスの詳細は、「名前ライブラリ・インタフェースの擬似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);
};