summaryrefslogtreecommitdiff
path: root/inc/Standard_Type.hxx
blob: edb168a1ca35342f7e0807cd54c3d17e9a6b4ae8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
// This file is generated by WOK (CPPExt).
// Please do not edit this file; modify original file instead.
// The copyright and license terms as defined for the original file apply to 
// this header file considered to be the "object code" form of the original source.

#ifndef _Standard_Type_HeaderFile
#define _Standard_Type_HeaderFile

#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#ifndef _Standard_DefineHandle_HeaderFile
#include <Standard_DefineHandle.hxx>
#endif
#ifndef _Handle_Standard_Type_HeaderFile
#include <Handle_Standard_Type.hxx>
#endif

#ifndef _Standard_CString_HeaderFile
#include <Standard_CString.hxx>
#endif
#ifndef _Standard_Integer_HeaderFile
#include <Standard_Integer.hxx>
#endif
#ifndef _Standard_KindOfType_HeaderFile
#include <Standard_KindOfType.hxx>
#endif
#ifndef _Standard_Address_HeaderFile
#include <Standard_Address.hxx>
#endif
#ifndef _Standard_Transient_HeaderFile
#include <Standard_Transient.hxx>
#endif
#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
#ifndef _Standard_OStream_HeaderFile
#include <Standard_OStream.hxx>
#endif
class Standard_TypeMismatch;
class Standard_NoSuchObject;
class Standard_OutOfRange;
class Standard_AncestorIterator;



//!   The class <Type> provides services to find out information <br>
//!   about a type defined in CDL. <br>
class Standard_Type : public Standard_Transient {

public:

  
//!   Returns the type name of <me>. <br>
  Standard_EXPORT     Standard_CString Name() const;
  
//!   Returns the size of <me> in bytes. <br>
  Standard_EXPORT     Standard_Integer Size() const;
  
//!   The constructor for a imported type. <br>
  Standard_EXPORT   Standard_Type(const Standard_CString aName,const Standard_Integer aSize);
  
//!   The constructor for a primitive. <br>
  Standard_EXPORT   Standard_Type(const Standard_CString aName,const Standard_Integer aSize,const Standard_Integer aNumberOfParent,const Standard_Address aAncestors);
  
//!   The constructor for an enumeration. <br>
  Standard_EXPORT   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 a class. <br>
  Standard_EXPORT   Standard_Type(const Standard_CString aName,const Standard_Integer aSize,const Standard_Integer aNumberOfParent,const Standard_Address anAncestors,const Standard_Address aFields);
  
//!   Returns "True", if <me> is the same as <aOther>, <br>
//!   or inherits from <aOther>. <br>
//!   Note that multiple inheritance is not supported. <br>
  Standard_EXPORT     Standard_Boolean SubType(const Handle(Standard_Type)& aOther) const;
  
//!   Returns "True", if <me> or one of its ancestors has the name <br>
//!   equal to theName. <br>
//!   Note that multiple inheritance is not supported. <br>
  Standard_EXPORT     Standard_Boolean SubType(const Standard_CString theName) const;
  
//!   Returns "True", if the type is imported. <br>
  Standard_EXPORT     Standard_Boolean IsImported() const;
  
//!   Returns "True", if the type is a primitive. <br>
  Standard_EXPORT     Standard_Boolean IsPrimitive() const;
  
//!   Returns "True", if the type is an "Enumeration". <br>
  Standard_EXPORT     Standard_Boolean IsEnumeration() const;
  
//!   Returns "True", if the type is a "Class". <br>
  Standard_EXPORT     Standard_Boolean IsClass() const;
  
//!   Returns the number of direct parents of the class. <br>
//! <br>
  Standard_EXPORT     Standard_Integer NumberOfParent() const;
  
//!   Returns the number of ancestors of the class. <br>
//! <br>
  Standard_EXPORT     Standard_Integer NumberOfAncestor() const;
  
//!   Prints the Information about type. <br>
  Standard_EXPORT     void ShallowDump() const;
  
//!   Prints the Information about type. <br>
  Standard_EXPORT     void ShallowDump(Standard_OStream& S) const;
  
//!   Prints on the stream <s> the name of Type. <br>
//!  Warning: <br>
//!   The operator "OStream& operator<< (Standard_OStream&, <br>
//!                                      Handle(Standard_Type)&)" <br>
//!   is implemented. (This operator uses the method Print) <br>
//! <br>
  Standard_EXPORT     void Print(Standard_OStream& s) const;
Standard_EXPORT     void operator<<(Standard_OStream& s) const  {  Print(s); }  


friend class Standard_AncestorIterator;


  DEFINE_STANDARD_RTTI(Standard_Type)

protected:




private: 

  
//!   Returns the address of the ancestors array. It can be used only by <br>
//!   AncestorIterator. <br>
  Standard_EXPORT     Standard_Address Ancestors() const;
  
//!    Just for inline. <br>
//! <br>
        void InLineDummy() const;

Standard_CString myName;
Standard_Integer mySize;
Standard_KindOfType myKind;
Standard_Integer myNumberOfParent;
Standard_Integer myNumberOfAncestor;
Standard_Address myAncestors;


};


#include <Standard_Type.lxx>



// other Inline functions and methods (like "C++: function call" methods)
inline void ShallowDump(const Handle_Standard_Type& me) {
 me->ShallowDump();
}

inline void ShallowDump(const Handle_Standard_Type& me,Standard_OStream& S) {
 me->ShallowDump(S);
}



#endif