0031501: Foundation Classes, Message_Printer - remove theToPutEndl argument -- prepar...
[occt.git] / src / IGESDefs / IGESDefs_GenericData.hxx
CommitLineData
42cf5bc1 1// Created on: 1993-01-09
2// Created by: CKY / Contract Toubro-Larsen (Anand NATRAJAN)
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_GenericData_HeaderFile
18#define _IGESDefs_GenericData_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_Type.hxx>
22
23#include <Standard_Integer.hxx>
24#include <TColStd_HArray1OfInteger.hxx>
25#include <TColStd_HArray1OfTransient.hxx>
26#include <IGESData_IGESEntity.hxx>
27#include <Standard_Real.hxx>
28#include <Standard_Boolean.hxx>
29class TCollection_HAsciiString;
30class Standard_DimensionMismatch;
31class Standard_OutOfRange;
32class Standard_NullObject;
33class Standard_Transient;
34class IGESData_IGESEntity;
35
36
37class IGESDefs_GenericData;
38DEFINE_STANDARD_HANDLE(IGESDefs_GenericData, IGESData_IGESEntity)
39
40//! defines IGES Generic Data, Type <406> Form <27>
41//! in package IGESDefs
42//! Used to communicate information defined by the system
43//! operator while creating the model. The information is
44//! system specific and does not map into one of the
45//! predefined properties or associativities. Properties
46//! and property values can be defined by multiple
47//! instances of this property.
48class IGESDefs_GenericData : public IGESData_IGESEntity
49{
50
51public:
52
53
54 Standard_EXPORT IGESDefs_GenericData();
55
56 //! This method is used to set the fields of the class
57 //! GenericData
58 //! - nbPropVal : Number of property values
59 //! - aName : Property Name
60 //! - allTypes : Property Types
61 //! - allValues : Property Values
62 Standard_EXPORT void Init (const Standard_Integer nbPropVal, const Handle(TCollection_HAsciiString)& aName, const Handle(TColStd_HArray1OfInteger)& allTypes, const Handle(TColStd_HArray1OfTransient)& allValues);
63
64 //! returns the number of property values
65 Standard_EXPORT Standard_Integer NbPropertyValues() const;
66
67 //! returns property name
68 Standard_EXPORT Handle(TCollection_HAsciiString) Name() const;
69
70 //! returns the number of TYPE/VALUE pairs
71 Standard_EXPORT Standard_Integer NbTypeValuePairs() const;
72
73 //! returns the Index'th property value data type
74 //! raises exception if Index <= 0 or Index > NbTypeValuePairs()
75 Standard_EXPORT Standard_Integer Type (const Standard_Integer Index) const;
76
77 //! HArray1OfInteger (length 1), HArray1OfReal (length 1) for
78 //! Integer, Real, Boolean (= Integer 0/1),
79 //! HAsciiString for String (the value itself),
80 //! IGESEntity for Entity (the value itself)
81 Standard_EXPORT Handle(Standard_Transient) Value (const Standard_Integer Index) const;
82
83 //! Returns Attribute Value <AttrNum, rank ValueNum> as an Integer
84 //! Error if Index out of Range, or not an Integer
85 Standard_EXPORT Standard_Integer ValueAsInteger (const Standard_Integer ValueNum) const;
86
87 //! Returns Attribute Value <AttrNum, rank ValueNum> as a Real
88 //! Error if Index out of Range, or not a Real
89 Standard_EXPORT Standard_Real ValueAsReal (const Standard_Integer ValueNum) const;
90
91 //! Returns Attribute Value <AttrNum, rank ValueNum> as an Integer
92 Standard_EXPORT Handle(TCollection_HAsciiString) ValueAsString (const Standard_Integer ValueNum) const;
93
94 //! Returns Attribute Value <AttrNum, rank ValueNum> as an Entity
95 //! Error if Index out of Range, or not a Entity
96 Standard_EXPORT Handle(IGESData_IGESEntity) ValueAsEntity (const Standard_Integer ValueNum) const;
97
98 //! Returns Attribute Value <AttrNum, rank ValueNum> as a Boolean
99 //! Error if Index out of Range, or not a Logical
100 Standard_EXPORT Standard_Boolean ValueAsLogical (const Standard_Integer ValueNum) const;
101
102
103
104
92efcf78 105 DEFINE_STANDARD_RTTIEXT(IGESDefs_GenericData,IGESData_IGESEntity)
42cf5bc1 106
107protected:
108
109
110
111
112private:
113
114
115 Standard_Integer theNbPropertyValues;
116 Handle(TCollection_HAsciiString) theName;
117 Handle(TColStd_HArray1OfInteger) theTypes;
118 Handle(TColStd_HArray1OfTransient) theValues;
119
120
121};
122
123
124
125
126
127
128
129#endif // _IGESDefs_GenericData_HeaderFile