0027232: Configuration - fix mblen missing building issue on Android
[occt.git] / src / IGESDefs / IGESDefs_AttributeTable.hxx
CommitLineData
42cf5bc1 1// Created on: 1993-01-09
2// Created by: CKY / Contract Toubro-Larsen ( Arun MENON )
3// Copyright (c) 1993-1999 Matra Datavision
4// Copyright (c) 1999-2014 OPEN CASCADE SAS
5//
6// This file is part of Open CASCADE Technology software library.
7//
8// This library is free software; you can redistribute it and/or modify it under
9// the terms of the GNU Lesser General Public License version 2.1 as published
10// by the Free Software Foundation, with special exception defined in the file
11// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12// distribution for complete text of the license and disclaimer of any warranty.
13//
14// Alternatively, this file may be used under the terms of Open CASCADE
15// commercial license or contractual agreement.
16
17#ifndef _IGESDefs_AttributeTable_HeaderFile
18#define _IGESDefs_AttributeTable_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_Type.hxx>
22
23#include <TColStd_HArray2OfTransient.hxx>
24#include <IGESData_IGESEntity.hxx>
25#include <Standard_Integer.hxx>
26#include <Standard_Real.hxx>
27#include <Standard_Boolean.hxx>
28class Standard_OutOfRange;
29class Standard_NullObject;
30class IGESDefs_AttributeDef;
31class Standard_Transient;
32class TCollection_HAsciiString;
33class IGESData_IGESEntity;
34
35
36class IGESDefs_AttributeTable;
37DEFINE_STANDARD_HANDLE(IGESDefs_AttributeTable, IGESData_IGESEntity)
38
39//! defines IGES Attribute Table, Type <422> Form <0, 1>
40//! in package IGESDefs
41//! This class is used to represent an occurence of
42//! Attribute Table. This Class may be independent
43//! or dependent or pointed at by other Entities.
44class IGESDefs_AttributeTable : public IGESData_IGESEntity
45{
46
47public:
48
49
50 Standard_EXPORT IGESDefs_AttributeTable();
51
52 //! This method is used to set the fields of the class
53 //! AttributeTable
54 //! - attributes : Attribute instances, created as
55 //! (1,NbAttributes,1,NbRows)
56 //! - NbRows = 1 is a particular case (Form 0)
57 Standard_EXPORT void Init (const Handle(TColStd_HArray2OfTransient)& attributes);
58
59 //! Sets a Definition as Structure information
60 //! (works by calling InitMisc)
61 Standard_EXPORT void SetDefinition (const Handle(IGESDefs_AttributeDef)& def);
62
63 //! Return the Structure information in Directory Entry,
64 //! casted as an AttributeDef
65 Standard_EXPORT Handle(IGESDefs_AttributeDef) Definition() const;
66
67 //! returns Number of Rows. Remark that it is always 1 if Form = 0
68 //! It means that the list of Attributes (by their number, and for each
69 //! one its type and ValueCount) is repeated <NbRows> times
70 Standard_EXPORT Standard_Integer NbRows() const;
71
72 //! returns Number of Attributes
73 Standard_EXPORT Standard_Integer NbAttributes() const;
74
75 //! returns the Type of an Attribute, given its No. : it is read in the
76 //! Definition.
77 //! (1 : Integer, 2 : Real, 3 : String, 4 : Entity, 6 : Logical)
78 Standard_EXPORT Standard_Integer DataType (const Standard_Integer Atnum) const;
79
80 //! returns the Count of Value for an Attribute, given its No. :
81 //! it is read in the Definition.
82 Standard_EXPORT Standard_Integer ValueCount (const Standard_Integer Atnum) const;
83
84 Standard_EXPORT Handle(Standard_Transient) AttributeList (const Standard_Integer Attribnum, const Standard_Integer Rownum) const;
85
86 //! Returns Attribute Value <AtNum, Rownum, rank ValNum> as an Integer
87 //! Error if Indices out of Range, or no Value defined, or not an Integer
88 Standard_EXPORT Standard_Integer AttributeAsInteger (const Standard_Integer AtNum, const Standard_Integer Rownum, const Standard_Integer ValNum) const;
89
90 //! Returns Attribute Value <AtNum, Rownum, rank ValNum> as a Real
91 //! Error if Indices out of Range, or no Value defined, or not a Real
92 Standard_EXPORT Standard_Real AttributeAsReal (const Standard_Integer AtNum, const Standard_Integer Rownum, const Standard_Integer ValNum) const;
93
94 //! Returns Attribute Value <AtNum, Rownum, rank ValNum> as an Integer
95 Standard_EXPORT Handle(TCollection_HAsciiString) AttributeAsString (const Standard_Integer AtNum, const Standard_Integer Rownum, const Standard_Integer ValNum) const;
96
97 //! Returns Attribute Value <AtNum, Rownum, rank ValNum> as an Entity
98 //! Error if Indices out of Range, or no Value defined, or not an Entity
99 Standard_EXPORT Handle(IGESData_IGESEntity) AttributeAsEntity (const Standard_Integer AtNum, const Standard_Integer Rownum, const Standard_Integer ValNum) const;
100
101 //! Returns Attribute Value <AtNum, Rownum, rank ValNum> as a Boolean
102 //! Error if Indices out of Range, or no Value defined, or not a Logical
103 Standard_EXPORT Standard_Boolean AttributeAsLogical (const Standard_Integer AtNum, const Standard_Integer Rownum, const Standard_Integer ValNum) const;
104
105
106
107
92efcf78 108 DEFINE_STANDARD_RTTIEXT(IGESDefs_AttributeTable,IGESData_IGESEntity)
42cf5bc1 109
110protected:
111
112
113
114
115private:
116
117
118 Handle(TColStd_HArray2OfTransient) theAttributes;
119
120
121};
122
123
124
125
126
127
128
129#endif // _IGESDefs_AttributeTable_HeaderFile