ObjectStore C++ API Reference

os_base_class

This class is part of the ObjectStore metaobject protocol, which provides access to ObjectStore schemas. An instance of os_base_class represents a class from which another class is derived, together with the nature of the derivation (that is, virtual or nonvirtual, and private, public, or protected).

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_base_class::create()

static os_base_class &create(
      os_unsigned_int32 access,
      os_boolean is_virtual,
      os_class_type *associated_class
);
Creates an os_base_class. The arguments specify the initial values for the attributes access, is_virtual, and associated_class.

os_base_class::get_access()

int get_access() const;
Returns an enumerator describing the access to the base class members, os_base_class::Public, os_base_class::Private, or os_base_class::Protected.

os_base_class::get_class()

const os_class_type &get_class() const;
Returns a reference to a const os_class_type, the class serving as base class in the derivation represented by the specified os_base_class object.

os_class_type &get_class();
Returns a reference to a non-const os_class_type, the class serving as base class in the derivation represented by the specified os_base_class object.

os_base_class::get_offset()

os_unsigned_int32 get_offset() const;
Returns the offset in bytes to the base class from the immediately enclosing class. For virtual bases, this offset is only meaningful if the base class was obtained by a call to os_class_type::get_allocated_virtual_base_classes().

os_unsigned_int32 get_offset(const os_class_type&) const;
Returns the offset in bytes to the base class from the specified most derived class. this must be a virtual base class.

os_base_class::get_size()

os_unsigned_int32 get_size() const;
Returns the size in bytes of the base class.

os_base_class::get_virtual_base_class_pointer_offset()

os_unsigned_int32 get_virtual_base_class_pointer_offset() const;
Returns the offset of the virtual base class pointer.

os_base_class::is_virtual()

os_boolean is_virtual() const;
Returns 1 if and only if the specified base class is virtual.

os_base_class::Private

This enumerator is a possible return value from os_base_class::get_access(), indicating private access.

os_base_class::Protected

This enumerator is a possible return value from os_base_class::get_access(), indicating protected access.

os_base_class::Public

This enumerator is a possible return value from os_base_class::get_access(), indicating public access.

os_base_class::set_access()

void set_access(os_unsigned_int32);
Specifies an enumerator describing the access to the base class members, os_base_class::Public, os_base_class::Private, or os_base_class::Protected.

os_base_class::set_class()

void set_class(os_class_type &);
Specifies the class serving as base class in the derivation represented by the specified os_base_class object.

os_base_class::set_offset()

void set_offset(os_unsigned_int32);
Sets the offset in bytes of the base class from the immediately enclosing class.

os_base_class::set_virtual_base_class_no_pointer()

void set_virtual_base_class_no_pointer();
Specifies that the base class has no virtual base class pointer.

os_base_class::set_virtual_base_class_pointer_offset()

void set_virtual_base_class_pointer_offset(os_unsigned_int32);
Sets the offset of the virtual base class pointer.

os_base_class::set_virtuals_redefined()

void set_virtuals_redefined(os_boolean);
Specifies whether the base class redefines any virtual functions.

os_base_class::virtual_base_class_has_pointer()

os_boolean virtual_base_class_has_pointer() const;
Returns nonzero if the base class has a virtual base class pointer.

os_base_class::virtuals_redefined()

os_boolean virtuals_redefined() const;
Returns nonzero if the base class redefines any virtual functions.



[previous] [next]

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

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