summaryrefslogtreecommitdiff
path: root/inc/Interface_ParamSet.hxx
blob: 6e054d269763498f563a873a88576c99f034c6df (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
// 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_ParamSet_HeaderFile
#define _Interface_ParamSet_HeaderFile

#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#ifndef _Standard_DefineHandle_HeaderFile
#include <Standard_DefineHandle.hxx>
#endif
#ifndef _Handle_Interface_ParamSet_HeaderFile
#include <Handle_Interface_ParamSet.hxx>
#endif

#ifndef _Standard_PCharacter_HeaderFile
#include <Standard_PCharacter.hxx>
#endif
#ifndef _Standard_Integer_HeaderFile
#include <Standard_Integer.hxx>
#endif
#ifndef _Handle_Interface_ParamList_HeaderFile
#include <Handle_Interface_ParamList.hxx>
#endif
#ifndef _Handle_Interface_ParamSet_HeaderFile
#include <Handle_Interface_ParamSet.hxx>
#endif
#ifndef _MMgt_TShared_HeaderFile
#include <MMgt_TShared.hxx>
#endif
#ifndef _Standard_CString_HeaderFile
#include <Standard_CString.hxx>
#endif
#ifndef _Interface_ParamType_HeaderFile
#include <Interface_ParamType.hxx>
#endif
class Interface_ParamList;
class Standard_OutOfRange;
class Interface_FileParameter;


//! Defines an ordered set of FileParameters, in a way to be <br>
//!           efficient as in memory requirement or in speed <br>
class Interface_ParamSet : public MMgt_TShared {

public:

  //! Creates an empty ParamSet, beginning at number "nst" and of <br>
//!           initial reservation "nres" : the "nres" first parameters <br>
//!           which follow "ndeb" (included) will be put in an Array <br>
//!           (a ParamList). The remainders are set in Next(s) ParamSet(s) <br>
  Standard_EXPORT   Interface_ParamSet(const Standard_Integer nres,const Standard_Integer nst = 1);
  //! Adds a parameter defined as its Value (CString and length) and <br>
//!           Type. Optionnal EntityNumber (for FileReaderData) can be given <br>
//!           Allows a better memory management than Appending a <br>
//!           complete FileParameter <br>
//!           If <lnval> < 0, <val> is assumed to be managed elsewhere : its <br>
//!           adress is stored as such. Else, <val> is copied in a locally <br>
//!           (quickly) managed Page of Characters <br>
//!           Returns new count of recorded Parameters <br>
  Standard_EXPORT     Standard_Integer Append(const Standard_CString val,const Standard_Integer lnval,const Interface_ParamType typ,const Standard_Integer nument) ;
  //! Adds a parameter at the end of the ParamSet (transparent <br>
//!           about reservation and "Next") <br>
//!           Returns new count of recorded Parameters <br>
  Standard_EXPORT     Standard_Integer Append(const Interface_FileParameter& FP) ;
  //! Returns the total count of parameters (including nexts) <br>
  Standard_EXPORT     Standard_Integer NbParams() const;
  //! Returns a parameter identified by its number <br>
  Standard_EXPORT    const Interface_FileParameter& Param(const Standard_Integer num) const;
  //! Same as above, but in order to be modified on place <br>
  Standard_EXPORT     Interface_FileParameter& ChangeParam(const Standard_Integer num) ;
  //! Changes a parameter identified by its number <br>
  Standard_EXPORT     void SetParam(const Standard_Integer num,const Interface_FileParameter& FP) ;
  //! Builds and returns the sub-list correspinding to parameters, <br>
//!           from "num" included, with count "nb" <br>
//!           If <num> and <nb> are zero, returns the whole list <br>
  Standard_EXPORT     Handle_Interface_ParamList Params(const Standard_Integer num,const Standard_Integer nb) const;
  //! Destructor (waiting for transparent memory management) <br>
  Standard_EXPORT     void Destroy() ;
~Interface_ParamSet()
{
  Destroy();
}



  DEFINE_STANDARD_RTTI(Interface_ParamSet)

protected:




private: 


Standard_PCharacter theval;
Standard_Integer thelnval;
Standard_Integer thelnres;
Standard_Integer thenbpar;
Standard_Integer themxpar;
Handle_Interface_ParamList thelist;
Handle_Interface_ParamSet thenext;


};





// other Inline functions and methods (like "C++: function call" methods)


#endif