Open CASCADE Technology  6.9.0
Public Member Functions
Standard_Type Class Reference

The class <Type> provides services to find out information about a type defined in CDL. More...

#include <Standard_Type.hxx>

Inheritance diagram for Standard_Type:
Inheritance graph
[legend]

Public Member Functions

Standard_CString Name () const
 Returns the type name of <me>. More...
 
Standard_Integer Size () const
 Returns the size of <me> in bytes. More...
 
 Standard_Type (const Standard_CString aName, const Standard_Integer aSize)
 The constructor for a imported type. More...
 
 Standard_Type (const Standard_CString aName, const Standard_Integer aSize, const Standard_Integer aNumberOfParent, const Standard_Address aAncestors)
 The constructor for a primitive. More...
 
 Standard_Type (const Standard_CString aName, const Standard_Integer aSize, const Standard_Integer aNumberOfElement, const Standard_Integer aNumberOfParent, const Standard_Address anAncestors, const Standard_Address aElements)
 The constructor for an enumeration. More...
 
 Standard_Type (const Standard_CString aName, const Standard_Integer aSize, const Standard_Integer aNumberOfParent, const Standard_Address anAncestors, const Standard_Address aFields)
 The constructor for a class. More...
 
Standard_Boolean SubType (const Handle< Standard_Type > &aOther) const
 Returns "True", if <me> is the same as <aOther>, or inherits from <aOther>. Note that multiple inheritance is not supported. More...
 
Standard_Boolean SubType (const Standard_CString theName) const
 Returns "True", if <me> or one of its ancestors has the name equal to theName. Note that multiple inheritance is not supported. More...
 
Standard_Boolean IsImported () const
 Returns "True", if the type is imported. More...
 
Standard_Boolean IsPrimitive () const
 Returns "True", if the type is a primitive. More...
 
Standard_Boolean IsEnumeration () const
 Returns "True", if the type is an "Enumeration". More...
 
Standard_Boolean IsClass () const
 Returns "True", if the type is a "Class". More...
 
Standard_Integer NumberOfParent () const
 Returns the number of direct parents of the class. More...
 
Standard_Integer NumberOfAncestor () const
 Returns the number of ancestors of the class. More...
 
void Print (Standard_OStream &s) const
 Prints on the stream <s> the name of Type. Warning: The operator "OStream& operator<< (Standard_OStream&, Handle(Standard_Type)&)" is implemented. (This operator uses the method Print) More...
 
void operator<< (Standard_OStream &s) const
 
- Public Member Functions inherited from Standard_Transient
 Standard_Transient ()
 Empty constructor. More...
 
 Standard_Transient (const Standard_Transient &)
 Copy constructor – does nothing. More...
 
Standard_Transientoperator= (const Standard_Transient &)
 Assignment operator, needed to avoid copying reference counter. More...
 
virtual ~Standard_Transient ()
 Destructor must be virtual. More...
 
virtual void Delete () const
 Memory deallocator for transient classes. More...
 
virtual const
Handle_Standard_Type & 
DynamicType () const
 Returns a type information object about this object. More...
 
Standard_Boolean IsInstance (const Handle_Standard_Type &theType) const
 Returns a true value if this is an instance of Type. More...
 
Standard_Boolean IsInstance (const Standard_CString theTypeName) const
 Returns a true value if this is an instance of TypeName. More...
 
Standard_Boolean IsKind (const Handle_Standard_Type &theType) const
 Returns true if this is an instance of Type or an instance of any class that inherits from Type. Note that multiple inheritance is not supported by OCCT RTTI mechanism. More...
 
Standard_Boolean IsKind (const Standard_CString theTypeName) const
 Returns true if this is an instance of TypeName or an instance of any class that inherits from TypeName. Note that multiple inheritance is not supported by OCCT RTTI mechanism. More...
 
virtual Handle_Standard_Transient This () const
 Returns a Handle which references this object. Must never be called to objects created in stack. More...
 
Standard_Integer GetRefCount () const
 Get the reference counter of this object. More...
 

Detailed Description

The class <Type> provides services to find out information about a type defined in CDL.

Note that multiple inheritance is not supported by the moment; the array of ancestors accepted by constructors is assumed to represent hierarchy of ancestors up to the root. However, only first element is actually used by SubType method, higher level ancestors are requested recursively.

Warning: The information given by <Type> is about the type from which it is created and not about the <Type> itself.

Constructor & Destructor Documentation

Standard_Type::Standard_Type ( const Standard_CString  aName,
const Standard_Integer  aSize 
)

The constructor for a imported type.

Standard_Type::Standard_Type ( const Standard_CString  aName,
const Standard_Integer  aSize,
const Standard_Integer  aNumberOfParent,
const Standard_Address  aAncestors 
)

The constructor for a primitive.

Standard_Type::Standard_Type ( const Standard_CString  aName,
const Standard_Integer  aSize,
const Standard_Integer  aNumberOfElement,
const Standard_Integer  aNumberOfParent,
const Standard_Address  anAncestors,
const Standard_Address  aElements 
)

The constructor for an enumeration.

Standard_Type::Standard_Type ( const Standard_CString  aName,
const Standard_Integer  aSize,
const Standard_Integer  aNumberOfParent,
const Standard_Address  anAncestors,
const Standard_Address  aFields 
)

The constructor for a class.

Member Function Documentation

Standard_Boolean Standard_Type::IsClass ( ) const

Returns "True", if the type is a "Class".

Standard_Boolean Standard_Type::IsEnumeration ( ) const

Returns "True", if the type is an "Enumeration".

Standard_Boolean Standard_Type::IsImported ( ) const

Returns "True", if the type is imported.

Standard_Boolean Standard_Type::IsPrimitive ( ) const

Returns "True", if the type is a primitive.

Standard_CString Standard_Type::Name ( ) const

Returns the type name of <me>.

Standard_Integer Standard_Type::NumberOfAncestor ( ) const

Returns the number of ancestors of the class.

Standard_Integer Standard_Type::NumberOfParent ( ) const

Returns the number of direct parents of the class.

void Standard_Type::operator<< ( Standard_OStream s) const
inline
void Standard_Type::Print ( Standard_OStream s) const

Prints on the stream <s> the name of Type. Warning: The operator "OStream& operator<< (Standard_OStream&, Handle(Standard_Type)&)" is implemented. (This operator uses the method Print)

Standard_Integer Standard_Type::Size ( ) const

Returns the size of <me> in bytes.

Standard_Boolean Standard_Type::SubType ( const Handle< Standard_Type > &  aOther) const

Returns "True", if <me> is the same as <aOther>, or inherits from <aOther>. Note that multiple inheritance is not supported.

Standard_Boolean Standard_Type::SubType ( const Standard_CString  theName) const

Returns "True", if <me> or one of its ancestors has the name equal to theName. Note that multiple inheritance is not supported.


The documentation for this class was generated from the following file: