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
|
// 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 _Interface_EntityList_HeaderFile
#define _Interface_EntityList_HeaderFile
#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#ifndef _Standard_Macro_HeaderFile
#include <Standard_Macro.hxx>
#endif
#ifndef _Handle_Standard_Transient_HeaderFile
#include <Handle_Standard_Transient.hxx>
#endif
#ifndef _Standard_Integer_HeaderFile
#include <Standard_Integer.hxx>
#endif
#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
#ifndef _Handle_Standard_Type_HeaderFile
#include <Handle_Standard_Type.hxx>
#endif
class Standard_Transient;
class Standard_OutOfRange;
class Interface_InterfaceError;
class Standard_NullObject;
class Interface_EntityIterator;
class Standard_Type;
//! This class defines a list of Entities (Transient Objects), <br>
//! it can be used as a field of other Transient classes, with <br>
//! these features : <br>
//! - oriented to define a little list, that is, slower than an <br>
//! Array or a Map of Entities for a big count (about 100 and <br>
//! over), but faster than a Sequence <br>
//! - allows to work as a Sequence, limited to Clear, Append, <br>
//! Remove, Access to an Item identified by its rank in the list <br>
//! - space saving, compared to a Sequence, especially for little <br>
//! amounts; better than an Array for a very little amount (less <br>
//! than 10) but less good for a greater amount <br>
//! <br>
//! Works in conjunction with EntityCluster <br>
//! An EntityList gives access to a list of Entity Clusters, which <br>
//! are chained (in one sense : Single List) <br>
//! Remark : a new Item may not be Null, because this is the <br>
//! criterium used for "End of List" <br>
class Interface_EntityList {
public:
void* operator new(size_t,void* anAddress)
{
return anAddress;
}
void* operator new(size_t size)
{
return Standard::Allocate(size);
}
void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
//! Creates a List as beeing empty <br>
Standard_EXPORT Interface_EntityList();
//! Clears the List <br>
Standard_EXPORT void Clear() ;
//! Appends an Entity, that is to the END of the list <br>
//! (keeps order, but works slowerly than Add, see below) <br>
Standard_EXPORT void Append(const Handle(Standard_Transient)& ent) ;
//! Adds an Entity to the list, that is, with NO REGARD about the <br>
//! order (faster than Append if count becomes greater than 10) <br>
Standard_EXPORT void Add(const Handle(Standard_Transient)& ent) ;
//! Removes an Entity from the list, if it is there <br>
Standard_EXPORT void Remove(const Handle(Standard_Transient)& ent) ;
//! Removes an Entity from the list, given its rank <br>
Standard_EXPORT void Remove(const Standard_Integer num) ;
//! Returns True if the list is empty <br>
Standard_EXPORT Standard_Boolean IsEmpty() const;
//! Returns count of recorded Entities <br>
Standard_EXPORT Standard_Integer NbEntities() const;
//! Returns an Item given its number. Beware about the way the <br>
//! list was filled (see above, Add and Append) <br>
Standard_EXPORT const Handle_Standard_Transient& Value(const Standard_Integer num) const;
//! Returns an Item given its number. Beware about the way the <br>
//! list was filled (see above, Add and Append) <br>
Standard_EXPORT void SetValue(const Standard_Integer num,const Handle(Standard_Transient)& ent) ;
//! fills an Iterator with the content of the list <br>
//! (normal way to consult a list which has been filled with Add) <br>
Standard_EXPORT void FillIterator(Interface_EntityIterator& iter) const;
//! Returns count of Entities of a given Type (0 : none) <br>
Standard_EXPORT Standard_Integer NbTypedEntities(const Handle(Standard_Type)& atype) const;
//! Returns the Entity which is of a given type. <br>
//! If num = 0 (D), there must be ONE AND ONLY ONE <br>
//! If num > 0, returns the num-th entity of this type <br>
Standard_EXPORT Handle_Standard_Transient TypedEntity(const Handle(Standard_Type)& atype,const Standard_Integer num = 0) const;
protected:
private:
Handle_Standard_Transient theval;
};
// other Inline functions and methods (like "C++: function call" methods)
#endif
|