rooClass
class description - source file - inheritance tree
public:
rooClass rooClass()
rooClass rooClass(void* imp)
rooClass rooClass(rooClass&)
virtual void ~rooClass()
const rooAttribute& attribute_at_position(const rooClassPosition&) const
const rooAttribute& attribute_at_position(Int_t) const
const rooAttribute& attribute_with_id(UInt_t) const
rooAttributePlusInheritedItr attributes_plus_inherited_begin()
rooAttributePlusInheritedItr attributes_plus_inherited_end()
rooInheritanceItr base_class_list_begin()
rooInheritanceItr base_class_list_end()
rooBaseClassPlusInheritedItr base_classes_plus_inherited_begin()
rooBaseClassPlusInheritedItr base_classes_plus_inherited_end()
TClass* Class()
rooAttributeItr defines_attribute_begin()
rooAttributeItr defines_attribute_end()
virtual rooMetaObjectItr defines_begin()
virtual rooMetaObjectItr defines_end()
rooRelationshipItr defines_relationship_begin()
rooRelationshipItr defines_relationship_end()
void disable_root_descent()
void enable_root_descent()
Bool_t has_base_class(const TString&) const
Bool_t has_extent() const
Bool_t has_virtual_table() const
virtual UInt_t id() const
virtual Bool_t is_class() const
Bool_t is_deleted() const
Bool_t is_internal() const
virtual Bool_t is_string_type() const
virtual TClass* IsA() const
const rooClass& latest_version() const
const rooClass& next_shape() const
Int_t number_of_attributes() const
virtual size_t operator size_t() const
Bool_t persistent_capable() const
const rooClassPosition position_in_class(const TString&) const
const rooClassPosition position_in_class(const rooAttribute&) const
const rooClass& previous_shape() const
virtual const rooMetaObject& resolve(const TString&, Int_t ver = kooLatestVersion) const
const rooAttribute& resolve_attribute(const TString&) const
const rooRelationship& resolve_relationship(const TString&) const
Bool_t root_descent_is_enabled()
Int_t shape_number() const
virtual void ShowMembers(TMemberInspector& insp, char* parent)
virtual void Streamer(TBuffer& b)
rooInheritanceItr sub_class_list_begin()
rooInheritanceItr sub_class_list_end()
virtual Int_t type_number() const
Int_t version_number() const
private:
rooAttribute* fAttribute resolve_attribute()
rooRelationship* fRelationship resolve_relationship()
rooClass* fNextShape next_shape()
rooClass* fPrevShape prev_shape()
rooClass* fLatestVersion latest_version()
rooClassPosition* fPosition position_in_class()
rooMetaObject* fMetaObject resolve()
rooClass corresponds to d_Class class
A class descriptor provides information about a class in the schema, called
its described class. The described class is actually a particular shape of a
particular version of a particular class. Because rooClass inherits from
rooScope, a class descriptor can look up or iterate through properties
defined in the scope of the described class, obtaining descriptors for the
properties in the class's scope.
______________________________________________________________________________
Obtaining a Class Descriptor.
You should never instantiate this class directly. Instead, you can obtain
a class descriptor either from the module descriptor for the top-level
module or from the module descriptor for the module in which the class is
defined:
Call the resolve_class member function of the module descriptor to look
up the class by name. Alternatively, you can call the module descriptor's
resolve_type or resolve member function and cast the result to a class
descriptor.
Call the defines_types_begin member function of the module descriptor to
get an iterator for all types in the module's scope. You can obtain type
descriptors from the iterator. Call the is_class member function of a
type descriptor to see whether it describes a class; if so, you can
safely cast it to a class descriptor.
______________________________________________________________________________
Specifying a Version.
By default, when you call the rooModule::resolve_class(),
rooModule::resolve_type, or rooModule::resolve member function of a module
descriptor, you get a class descriptor for the most recent version of the
specified class. However, an optional parameter to these member functions
allows you to specify the desired version number. When you use that
parameter, you obtain a class descriptor for the specified version of the
specified class.
______________________________________________________________________________
Specifying a Shape.
When you call the resolve_class, resolve_type, or resolve member
function of a module descriptor, you obtain a class descriptor for the most
recent shape of the specified class and version. If the class has evolved,
you can look up the previous shape by calling the class descriptor's
previous_shape member function. If you have a descriptor for an older shape,
you can call its next_shape() member function to get the descriptor for the
next shape.
d_Class is part of the ODMG standard. It describes a stand-alone
database type composed of attributes and relationships. The ODMG
class hierarchy implies that d_Relationship and d_Attribute are
disjunct, but because of Objectivity's architecture, d_Attribute
has been made an immediate base class of d_Relationship.
Classes can be looked up via hash tables in a schema module by name or
Objectivity type number. The members of a class may be iterated, or a
named member looked up in the class scope. Relationships, base
classes, and sub-classes (derived classes) of a class may be iterated.
rooClass()
default ctor., internal use only
~rooClass()
dtor. internal use only
rooInheritanceItr sub_class_list_begin()
Gets an iterator for the inheritance connections between the described
class and its child classes.
Returns:
An inheritance iterator that finds all inheritance connections in which
the described class is the parent (base class).
The returned iterator gets an inheritance descriptor for each inheritance
connection from the described class to an immediate derived class. To get
the derived class from one of these inheritance descriptors, call its
inherits_to() member function.
See also: base_class_list_begin(), sub_class_list_end()
rooInheritanceItr sub_class_list_end()
Gets an iterator representing the termination condition for iteration
through the inheritance connections between the described class and its
child classes.
Returns:
An inheritance iterator that is positioned after the last inheritance
connection between the described class and a subclass.
You can compare the iterator returned by sub_class_list_begin with the one
returned by this member function to test whether iteration has finished.
rooInheritanceItr base_class_list_begin()
Gets an iterator for the inheritance connections between the described
class and its parent classes.
Returns:
An inheritance iterator that finds all inheritance connections in which
the described class is the child (derived) class.
The returned iterator gets an inheritance descriptor for each inheritance
connection from an immediate base class to the described class. To get
the base class from one of these inheritance descriptors, call its
derives_from() member function.
See also: base_class_list_end()
rooInheritanceItr base_class_list_end()
Gets an iterator representing the termination condition for iteration
through the inheritance connections between the described class and its
parent classes.
Returns:
An inheritance iterator that is positioned after the last inheritance
connection between the described class and a base class.
You can compare the iterator returned by base_class_list_begin with the
one returned by this member function to test whether iteration has finished.
rooAttributeItr defines_attribute_begin()
Gets an iterator for the attributes defined in the described class.
Returns:
An attribute iterator that finds all immediate base classes, attributes,
and relationships in the described class.
The returned iterator finds the same descriptors as the iterator returned
by defines_begin, but it gets them typed as attribute descriptors instead
of generic descriptors.
See also: attributes_plus_inherited_begin
rooAttributeItr defines_attribute_end()
Gets an iterator representing the termination condition for iteration
through the attributes defined in the described class.
Returns:
An attribute iterator that is positioned after the last attribute
defined in the described class.
You can compare the iterator returned by defines_attribute_begin with the
one returned by this member function to test whether iteration has
finished.
rooRelationshipItr defines_relationship_begin()
Gets an iterator for the relationships defined in the described class.
Returns:
A relationship iterator that finds all relationships defined in the
described class.
See also: defines_relationship_end
rooRelationshipItr defines_relationship_end()
Gets an iterator representing the termination condition for iteration
through the relationships defined in the described class.
Returns:
A relationship iterator that is positioned after the last
relationship defined in the described class.
You can compare the iterator returned by defines_relationship_begin with
the one returned by this member function to test whether iteration has
finished.
Bool_t persistent_capable() const
Tests whether the described class is persistence-capable.
Bool_t has_extent() const
Tests whether the described class has a nonzero physical size.
Returns:
kTRUE if the described class has a nonzero physical size;
otherwise, kFALSE.
UInt_t id() const
Gets the unique ID that identifies the described class.
Returns:
The ID for the described class.
The ID for a class (or any type) is the same as its type number.
Int_t type_number() const
Gets the unique type number for the described class and version.
Returns:
The unique type number for the described class and version.
See also: shape_number()
rooMetaObjectItr defines_begin()
Gets an iterator for the properties defined in the described class.
Returns:
A descriptor iterator that finds all immediate base classes, attributes,
and relationships defined in the described class.
The returned iterator gets generic descriptors for each property defined
in the described class. An alternative to calling this member function is
to call more specific functions that find properties of some particular
kind.
See also: defines_end()
rooMetaObjectItr defines_end()
Gets an iterator representing the termination condition for iteration
through the properties defined in the described class.
Returns:
A descriptor iterator that is positioned after the last property
defined in the described class.
You can compare the iterator returned by defines_begin with the one
returned by this member function to test whether iteration has finished.
rooAttributePlusInheritedItr attributes_plus_inherited_begin()
Base classes are treated similarly to embedded class attributes.
They occupy a single "position," rather than a position for every
inherited attribute. Consider:
class base : public ooObj {
int32 x; };
class der : public base {
int32 y; };
An iteration over "der" using defines_attribute_begin() will hit two
attributes, "base" and "y," rather than three, "ooObj," "x." and "y."
To iterate with base classes flattened into inherited attributes,
use attributes_plus_inherited_begin(). When obtaining attribute
positions in that context, using rooClass::position_in_class() is more
intuitive than using rooAttribute::position(). A rooAttribute only
knows its position relative to its defining class; it can't guess what
position you care about if you're using its class somewhere in
an inheritance hierarchy.
For example, iterating "der" with attributes_plus_inherited_begin()
will visit "ooObj," "x," and "y," but not that if you call
if you call rooAttribute::position() on either "x" or "y," 1 will
be returned--an apparent conflict. That's because rooAttribute
doesn't know anything about its inheritance context. Specify that
context by calling rooClass::position_in_class("y"), and the return
value will be unique in the derived class context.
rooAttributePlusInheritedItr attributes_plus_inherited_end()
Gets an iterator representing the termination condition for iteration
through the attributes of the described class.
You can compare the iterator returned by attributes_plus_inherited_begin
with the one returned by this member function to test whether iteration
has finished.
rooBaseClassPlusInheritedItr base_classes_plus_inherited_begin()
Gets an iterator for the ancestor classes of the described class.
Returns:
A base-class iterator that finds all ancestor classes of the
described class.
rooBaseClassPlusInheritedItr base_classes_plus_inherited_end()
Gets an iterator representing the termination condition for iteration
through the ancestor classes of the described class.
Returns:
A base-class iterator that is positioned after the last ancestor
class of the described class.
You can compare the iterator returned by base_classes_plus_inherited_begin
with the one returned by this member function to test whether iteration has
finished.
Int_t number_of_attributes() const
Gets the number of attributes in the described class.
Returns:
The number of immediate base classes, attributes, and relationships
in the defined class.
The returned number does not include inherited attributes.
const rooClassPosition position_in_class(const TString& memName)
Gets the class position of the specified attribute within the
described class.
Parameters:
memName - the name of the attribute whose position is desired.
This string can be a qualified name (such as foo::base::x) to
disambiguate attributes of the same name inherited from different
base classes. You should specify a qualified name only if necessary
because it takes more time to look up a qualified name than an
unqualified one.
Returns:
A class position that gives the layout position of the specified
attribute within the described class.
const rooClassPosition position_in_class(const rooAttribute & ratr)
Gets the class position of the specified attribute within the
described class.
Parameters:
ratr - an attribute descriptor for the attribute whose position is
desired.
Returns:
A class position that gives the layout position of the specified
attribute within the described class.
Bool_t is_string_type() const
Tests whether the described class is a string class.
Returns:
kTRUE if the described class is a string class; otherwise, kFALSE.
The string classes are:
The ASCII string class ooVString
The optimized string classes ooString( N)
The Unicode string class ooUTF8String
The Smalltalk string class ooSTString
Bool_t is_internal() const
Tests whether the described class is an internal Objectivity/DB class.
Returns:
kTRUE if the described class is an internal Objectivity/DB class;
kFALSE if the described class is an application-defined class (including
an optimized string class).
Bool_t is_deleted() const
Tests whether the described class is deleted.
Returns:
kTRUE if the described class has been deleted from the schema; otherwise,
kFALSE.
Active Schema cannot delete classes. However, another application could
have deleted the class before Active Schema started. In that case, the
class description remains in the schema but is marked as deleted.
Bool_t has_base_class(const TString& clname) const
Tests whether the described class is derived from the specified base class.
Parameters:
clname - the name of the base class of interest.
Returns:
kTRUE if the described class is derived from clname;
otherwise, kFALSE.
Bool_t has_virtual_table() const
Tests whether the described class has a virtual table.
Returns:
kTRUE if the described class has a virtual table; otherwise, kFALSE.
Int_t shape_number() const
Returns the shape number for this class descriptor.
If the described shape is the original shape of the described class and
version, the shape number is identical to the type number.
See also, next_shape(), previous_shape()
Int_t version_number() const
The version_number() function returns the number of a changed class
where "schema versioning" was used rather than "schema evolution."
void enable_root_descent()
Enables access to ancestors of Objectivity/C++ persistent-object and
storage-object classes when iterating through inherited attributes or
base classes.
By default, the iterators returned by attributes_plus_inherited_begin()
and base_classes_plus_inherited_begin() treat the Objectivity/C++
persistent-object base class ooObj and the storage-object classes
ooContObj, ooDBObj, and ooFDObj as if they were root base classes,
inheriting from no other classes. You can call this member function to
override this behavior, allowing access to ancestor classes at all levels.
See also: disable_root_descent()
void disable_root_descent()
Disables access to ancestors of Objectivity/C++ persistent-object and
storage-object classes when iterating through inherited attributes or
base classes.
By default, the iterators returned by attributes_plus_inherited_begin() and
base_classes_plus_inherited_begin() treat the Objectivity/C++
persistent-object base class ooObj and the storage-object classes
ooContObj, ooDBObj, and ooFDObj as if they were root base classes,
inheriting from no other classes. You can call enable_root_descent() to
override this behavior, allowing access to ancestor classes at all levels;
after doing so, you can call this member function to disable access once
again.
See also: root_descent_is_enabled()
Bool_t root_descent_is_enabled()
Tests whether iteration through inherited attributes or base classes
includes access to ancestors of Objectivity/C++ persistent-object and
storage-object classes.
Returns kTRUE if root descent is enabled; otherwise, kFALSE.
By default, access is disabled; the iterators returned by
attributes_plus_inherited_begin() and base_classes_plus_inherited_begin()
treat the Objectivity/C++ persistent-object base class ooObj and the
storage-object classes ooContObj, ooDBObj, and ooFDObj as if they were
root base classes, inheriting from no other classes.
See also, disable_root_descent()
enable_root_descent()
Inline Functions
rooClass rooClass(void* imp)
const rooAttribute& resolve_attribute(const TString&) const
const rooRelationship& resolve_relationship(const TString&) const
size_t operator size_t() const
const rooMetaObject& resolve(const TString&, Int_t ver = kooLatestVersion) const
const rooAttribute& attribute_at_position(const rooClassPosition&) const
const rooAttribute& attribute_at_position(Int_t) const
const rooAttribute& attribute_with_id(UInt_t) const
Bool_t is_class() const
const rooClass& next_shape() const
const rooClass& previous_shape() const
const rooClass& latest_version() const
TClass* Class()
TClass* IsA() const
void ShowMembers(TMemberInspector& insp, char* parent)
void Streamer(TBuffer& b)
rooClass rooClass(rooClass&)
Author: Valeriy Onuchin 11/09/2000
ROOT page - Class index - Top of the page
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.