Google

Main Page   Class Hierarchy   Compound List   File List   Compound Members   Related Pages  

sc::ClassDesc Class Reference

This class is used to contain information about classes. More...

#include <class.h>

Inheritance diagram for sc::ClassDesc:

Inheritance graph
[legend]
Collaboration diagram for sc::ClassDesc:

Collaboration graph
[legend]
List of all members.

Public Methods

 ClassDesc (const std::type_info &, const char *, int=1, const char *p=0, DescribedClass *(*ctor)()=0, DescribedClass *(*keyvalctor)(const Ref< KeyVal > &)=0, DescribedClass *(*stateinctor)(StateIn &)=0)
 ~ClassDesc ()
const ParentClassesparents () const
const char * name () const
 Returns the name of the class.

int version () const
 Returns the version number of the class.

DescribedClasscreate_described_class () const
 This member has been replaced by create().

virtual DescribedClasscreate () const
 Create an instance of DescribedClass with exact type equal to the class to which this class descriptor belongs. More...

virtual DescribedClasscreate (const Ref< KeyVal > &) const
 Create an instance of DescribedClass with exact type equal to the class to which this class descriptor belongs. More...

virtual DescribedClasscreate (StateIn &) const
 Create an instance of DescribedClass with exact type equal to the class to which this class descriptor belongs. More...


Static Public Methods

AVLMap< ClassKey, ClassDescP > & all ()
void list_all_classes ()
 Writes a list of all of the classes to ExEnv::out0().

ClassDesc * name_to_class_desc (const char *)
 Given the name of the class, return a pointer to the class descriptor.

ClassDesc * class_desc (const std::type_info &)
 Given a type_info object return a pointer to the ClassDesc.

int load_class (const char *classname)
 Attempt to dynamically load the shared object file for classname.


Friends

class ParentClasses

Detailed Description

This class is used to contain information about classes.

Each DescribedClass type has a static ClassDesc member. This member has lists of the parents, children and virtual parents for each class. The ClassDesc class also has a static member that is a list of all described classes in the system. These lists are constructed as the constructors for the static ClassDesc members for each class are called and are completed before main is entered. See The Described Class Library for more information.


Member Function Documentation

virtual DescribedClass* sc::ClassDesc::create StateIn   const [virtual]
 

Create an instance of DescribedClass with exact type equal to the class to which this class descriptor belongs.

The StateIn& constructor is used. If this constructor doesn't exist or a static function that calls it with new wasn't passed to this ClassDesc, then 0 will be returned.

virtual DescribedClass* sc::ClassDesc::create const Ref< KeyVal > &    const [virtual]
 

Create an instance of DescribedClass with exact type equal to the class to which this class descriptor belongs.

The KeyVal& constructor is used. If this constructor doesn't exist or a static function that calls it with new wasn't passed to this ClassDesc, then 0 will be returned.

virtual DescribedClass* sc::ClassDesc::create   const [virtual]
 

Create an instance of DescribedClass with exact type equal to the class to which this class descriptor belongs.

The constructor which takes no arguments is used. If this constructor doesn't exist or a static function that calls it with new wasn't given to this ClassDesc when it was created, then 0 will be returned.


The documentation for this class was generated from the following file:
Generated at Fri Jan 10 08:14:21 2003 for MPQC 2.1.3 using the documentation package Doxygen 1.2.14.