[Enterprise Extensions only]

Repository::create_wstring

Overview The create_wstring operation is used to create a new WstringDef to represent a bounded wide string.
Original interface Repository Interface
Exceptions CORBA::SystemException


Intended Usage

The create_wstring operation returns a new WstringDef with the specified bound, that must be non-zero.

Note: Unbounded wide strings are represented by using the get_primitive operation to create a PrimitiveDef with a kind of CORBA::pk_wstring.

IDL Syntax

  StringDef create_wstring (in unsigned long bound);

Input parameters

bound
The bound parameter represents the bound (the maximum number of wide characters in the string) of the bounded wide string. The value must be greater than zero.

Return values

StringDef_ptr
The returned value is a pointer to a CORBA::WstringDef object with the specified bound. The memory associated with the object is owned by the caller and can be released by invoking CORBA::release.

Example

  // C++
     // assume that 'repository_ptr' has already been initialized
     CORBA::Repository * repository_ptr;
 
     // create a bounded wide string with a bound of 51
     CORBA::ULong bound_of_wstring = 51;
     CORBA::WstringDef * wstring_def_ptr;
     wstring_def_ptr = repository_ptr-> create_wstring (bound_of_wstring);