ObjectStore C++ API Reference

os_array_type

class os_array_type : public os_type
This class is part of the ObjectStore metaobject protocol, which provides access to ObjectStore schemas. An instance of this class represents a C++ array type. This class is derived from os_type.

The types os_int32 and os_boolean, used throughout this manual, are each defined as a signed 32-bit integer type. The type os_unsigned_int32 is defined as an unsigned 32-bit integer type.

Programs using this class must include <ostore/ostore.hh>, followed by <ostore/coll.hh> (if used), followed by <ostore/mop.hh>.

os_array_type::create()

static os_array_type &create(
      os_unsigned_int32 number_of_elements,
      os_type *element_type
);
Creates an array type with the specified number of elements and the specified element type.

os_array_type::get_element_type()

const os_type &get_element_type() const;
Returns the type of element contained in instances of the specified array type.

os_type &get_element_type();
Returns the type of element contained in instances of the specified array type.

os_array_type::get_number_of_elements()

os_unsigned_int32 get_number_of_elements() const;
Returns the number of elements associated with the specified array type. If the number is not known, 0 is returned.

os_array_type::set_element_type()

void set_element_type(os_type &);
Specifies the type of element contained in instances of the specified array type.

os_array_type::set_number_of_elements()

void set_number_of_elements(os_unsigned_int32);
Specifies the number of elements associated with the specified array type.



[previous] [next]

Copyright © 1997 Object Design, Inc. All rights reserved.

Updated: 03/31/98 17:25:09