rooModule
class description - source file - inheritance tree
public:
rooModule rooModule()
rooModule rooModule(void* imp)
rooModule rooModule(rooModule&)
virtual void ~rooModule()
TClass* Class()
virtual rooMetaObjectItr defines_begin()
virtual rooMetaObjectItr defines_end()
rooTypeItr defines_types_begin()
rooTypeItr defines_types_end()
virtual UInt_t id() const
virtual Bool_t is_module() const
virtual Bool_t is_top_level() const
virtual TClass* IsA() const
Bool_t lock_schema(ULong_t)
Bool_t lock_schema(ULong_t, ULong_t)
virtual rooModuleItr named_modules_begin()
virtual rooModuleItr named_modules_end()
Int_t next_assoc_number() const
Int_t next_type_number() const
virtual const rooMetaObject& resolve(const TString&, Int_t ver = kooLatestVersion) const
const rooClass& resolve_class(const TString&, Int_t ver = kooLatestVersion) const
const rooClass& resolve_class(Int_t) const
const rooModule& resolve_module(const TString&) const
const rooType& resolve_type(const TString&) const
const rooType& resolve_type(Int_t) const
Bool_t sanitize(rooTrans&)
Int_t schema_number() const
Bool_t set_next_assoc_number(Int_t)
Bool_t set_next_type_number(Int_t)
virtual void ShowMembers(TMemberInspector& insp, char* parent)
virtual void Streamer(TBuffer& b)
const rooModule& top_level(ULong_t key = 0) const
Bool_t unlock_schema(ULong_t)
protected:
static rooModule* fgTopLevel top level module
rooMetaObject* fMetaObj resolve()
rooType* fType resolve_type()
rooClass* fClass resolve_class()
rooModule* fModule resolve_module()
See also
-
rooTopLevelModule
rooModule class corresponds to d_Module class
The class rooModule represents descriptors for modules in the schema of the
federated database. An instance of rooModule is called a module descriptor.
A module descriptor is both a descriptor and a scope. As a descriptor,
it provides information about a particular module, called its described
module. As a scope, it allows you to obtain descriptors for the entities
defined in the scope of the described module, either by looking up a
particular entity or by iterating through all entities in the module's
scope.
You should never instantiate this class directly; instead:
Call the rooModule::top_level static member function to obtain a
descriptor for the top-level module.
Call the resolve_module() member function of the top-level module's
descriptor to look up another module by name.
Call the named_modules_begin() member function of top-level module's
descriptor to get an iterator for all named modules.
d_Module is part of the ODMG standard. It describes a domain of class
descriptors in the database schema. A d_Module in Objectivity can be
the "default schema" (named "*") or a user-created "named schema."
The top level module--that is, the default schema for the federated
database--serves also as the name scope of the other modules, or named
schemas.
The function resolve_type() can be used to look up either name strings
or type numbers, matching only entries which are types, casting the
result in all cases to (const d_Type &). The function resolve_class()
can be used to look up either name strings or type numbers, matching
only entries which are classes, and casting the result in all cases to
(const d_Class &). It takes an optional second integer argument which
can be used to specify a particular version if the class was created
using the Objectivity versioning feature.
Looking up a name or type number in the top level module scope causes
all other modules to be searched as well.
rooModule()
default ctor. internal use only
~rooModule()
dtor. internal use only
rooTypeItr defines_types_begin()
Gets an iterator for the types in the scope of the described module.
Returns:
A type iterator that finds all types in the scope of the described
module.
If the described module is the top-level module, the returned iterator
finds al classes and non-class types in the schema. If not, the returned
iterator finds all classes defined in the described module.
See also: defines_types_end()
rooTypeItr defines_types_end()
Gets an iterator representing the termination condition for iteration
through the types defined in the described module's scope.
You can compare the iterator returned by defines_types_begin with the
one returned by this member function to test whether iteration has
finished.
UInt_t id() const
Gets the unique ID that identifies the described module within its scope.
rooMetaObjectItr defines_begin()
Gets an iterator for the entities in the scope of the described module.
Returns:
A descriptor iterator that finds all entities in the scope of the
described module.
If the described module is the top-level module, the returned iterator
finds all modules, classes, and non-class types in the schema. If not,
the returned iterator finds all classes defined in the described module.
The returned iterator gets generic descriptors for each entity in the
described module's scope. An alternative to calling this member
function is to call more specific functions that find entities of some
particular kind.
See also: defines_end()
rooMetaObjectItr defines_end()
Gets an iterator representing the termination condition for iteration
through the entities defined in the described module's scope.
Returns:
A descriptor iterator that is positioned after the last entity in
the described module's scope.
You can compare the iterator returned by defines_begin() with the one
returned by this member function to test whether iteration has finished.
rooModuleItr named_modules_begin()
Gets an iterator for the modules defined in the described module's scope.
Returns:
A module iterator that finds all modules defined in the described
module.
If the described module is the top-level module, the returned iterator
finds all other modules; otherwise, the returned iterator has an empty
iteration set.
See also: named_modules_end
rooModuleItr named_modules_end()
Gets an iterator representing the termination condition for iteration
through the modules defined in the described module's scope.
Returns:
A module iterator that is positioned after the last module in
the described module's scope.
You can compare the iterator returned by named_modules_begin with the
one returned by this member function to test whether iteration has
finished.
Bool_t is_module() const
Overrides the inherited member function. Indicates that this is a module
descriptor.
Bool_t is_top_level() const
Tests whether the described module is the top-level module of the
federated database.
Int_t schema_number() const
The type number that uniquely identifies this module within the
federated database schema.
Int_t next_type_number() const
Gets the next available type number for the described module.
Returns: The next available type number for the described module.
Int_t next_assoc_number() const
Gets the next available association number for the described module.
Returns:
The next available association number for the described module.
The result is the association number to be assigned to the next
relationship that is added to a class in the described module.
See also: set_next_assoc_number()
Bool_t set_next_type_number(Int_t n)
Sets the next available type number for the described module.
Parameters:
n - the new next available type number for the described module;
may not be less than the current next available type number
(which is returned by next_type_number).
Returns: kTRUE on success; kFALSE if nis lower than the current next type
number.
Most applications will not need to call this member function.
It is provided to enable an application to recreate the exact state
of another schema.
See also: next_type_number
Bool_t set_next_assoc_number(Int_t n)
Sets the next available association number for the described module.
Parameters:
n - the new next available association number for the
described module; may not be less than the current next
available association number (which is returned by
next_assoc_number).
Returns: kTRUE if successful; kFALSE if nis lower than the current next
association number.
Most applications will not need to call this member function.
It is provided to enable an application to recreate the exact state
of another schema.
See also: next_assoc_number()
Bool_t lock_schema(ULong_t key)
Locks the schema of the federated database.
1. static Bool_t lock_schema(ULong_t key);
2. static Bool_t lock_schema(ULong_t key, ULong_t oldKey);
Parameter the key with which the schema can be unlocked or accessed
in the future. oldKey- the key with which the schema was locked
previously.
Returns: kTRUE if successful; otherwise kFALSE.
The first variant locks the schema. If the schema is being locked for
/ the first time, key can be any key; if the schema was locked previously,
key must be the key with which the schema was last locked.
The second variant relocks the schema and changes the key;
oldKey must be the key with which the schema was last locked.
See also: top_level() unlock_schema()
Bool_t lock_schema(ULong_t key, ULong_t oldKey)
Locks the schema of the federated database.
1. static Bool_t lock_schema(ULong_t key);
2. static Bool_t lock_schema(ULong_t key, ULong_t oldKey);
Parameter the key with which the schema can be unlocked or accessed
in the future. oldKey- the key with which the schema was locked
previously.
Returns: kTRUE if successful; otherwise kFALSE.
The first variant locks the schema. If the schema is being locked for
/ the first time, key can be any key; if the schema was locked previously,
key must be the key with which the schema was last locked.
The second variant relocks the schema and changes the key;
oldKey must be the key with which the schema was last locked.
See also: top_level() unlock_schema()
Bool_t unlock_schema(ULong_t key)
Unlocks the schema of the federated database.
The key with which the schema was locked.
Returns: kTRUE if successful; otherwise kFASLE.
Once the schema has been unlocked, it can be accessed by any process.
The schema may be relocked, but only by a process that supplies key as
the key with which it was last locked.
See also lock_schema()
Bool_t sanitize(rooTrans & tran)
Updates the federated database schema, restoring any class descriptions
that may have become corrupted.
trans - the current transaction.
Returns: kTRUE if successful; otherwise kFALSE.
This member function is a last resort for applications that experience
inexplicable schema failure, such as a crash or inability to open or
close a container in the system database. The system database, which
contains the schema, has the identifier 1; the internal Objectivity/DB
objects that represent class descriptions in the schema are stored in
that database and, thus, have object identifiers of the form 1- n- n- n.
A problem or failure in a different application can leave these
schema objects in a corrupted state in the federated database; when that
happens, your application may be unable to open or close the container
for the corrupted objects. In that case, you can call this member
function, which restores the class descriptions in the schema. This
member function will fail if it is unable to obtain an update lock on
the schema. If the current transaction is active, this member function
repairs the federated database schema and commits the transaction.
It then restarts the transaction using the same settings that were in
effect when this member function was called. If the current transaction
is not active, this member function starts the transaction
before attempting to repair the federated database schema and commits it
after the schema has been modified.
Inline Functions
rooModule rooModule(void* imp)
const rooModule& top_level(ULong_t key = 0) const
const rooMetaObject& resolve(const TString&, Int_t ver = kooLatestVersion) const
const rooType& resolve_type(const TString&) const
const rooType& resolve_type(Int_t) const
const rooClass& resolve_class(const TString&, Int_t ver = kooLatestVersion) const
const rooClass& resolve_class(Int_t) const
const rooModule& resolve_module(const TString&) const
TClass* Class()
TClass* IsA() const
void ShowMembers(TMemberInspector& insp, char* parent)
void Streamer(TBuffer& b)
rooModule rooModule(rooModule&)
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.