1+ /* *******************************************************************************
2+ * *
3+ * This file is part of IfcOpenShell. *
4+ * *
5+ * IfcOpenShell is free software: you can redistribute it and/or modify *
6+ * it under the terms of the Lesser GNU General Public License as published by *
7+ * the Free Software Foundation, either version 3.0 of the License, or *
8+ * (at your option) any later version. *
9+ * *
10+ * IfcOpenShell is distributed in the hope that it will be useful, *
11+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13+ * Lesser GNU General Public License for more details. *
14+ * *
15+ * You should have received a copy of the Lesser GNU General Public License *
16+ * along with this program. If not, see <http://www.gnu.org/licenses/>. *
17+ * *
18+ ********************************************************************************/
19+
20+ /* *******************************************************************************
21+ * *
22+ * This namespace provides implementations of Argument and Entity that use STL *
23+ * containers for their datatypes and are not just lazy references to the *
24+ * IFC-SPF file. Therefore they can be modified by the client application. *
25+ * *
26+ * An IfcWritableEntity can be constructed from a regular IfcParse entity to be *
27+ * able to modify the data in existing IFC files. *
28+ * *
29+ ********************************************************************************/
30+
31+ #ifndef IFCWRITABLEENTITY_H
32+ #define IFCWRITABLEENTITY_H
33+
34+ #include " IfcUtil.h"
35+
36+ namespace IfcWrite {
37+ class IfcWritableEntity : public IfcAbstractEntity {
38+ private:
39+ std::map<int ,bool > writemask;
40+ std::map<int ,ArgumentPtr> args;
41+ Ifc2x3::Type::Enum _type;
42+ int * _id;
43+ bool arg_writable (int i);
44+ void arg_writable (int i, bool b);
45+ public:
46+ IfcWritableEntity (Ifc2x3::Type::Enum t);
47+ int setId (int i=-1 );
48+ IfcWritableEntity (IfcAbstractEntity* e);
49+ IfcEntities getInverse (Ifc2x3::Type::Enum c = Ifc2x3::Type::ALL);
50+ IfcEntities getInverse (Ifc2x3::Type::Enum c, int i, const std::string& a);
51+ std::string datatype ();
52+ ArgumentPtr getArgument (unsigned int i);
53+ unsigned int getArgumentCount ();
54+ Ifc2x3::Type::Enum type () const ;
55+ bool is (Ifc2x3::Type::Enum v) const ;
56+ std::string toString (bool upper=false );
57+ unsigned int id ();
58+ bool isWritable ();
59+ void setArgument (int i,int v);
60+ void setArgument (int i,int v, const char * c);
61+ void setArgument (int i,const Nullable<std::string>& v);
62+ void setArgument (int i,const std::string& v);
63+ void setArgument (int i,double v);
64+ void setArgument (int i,IfcUtil::IfcSchemaEntity v);
65+ void setArgument (int i,IfcEntities v);
66+ void setArgument (int i,const std::vector<double >& v);
67+ void setArgument (int i,const std::vector<std::string>& v);
68+ void setArgument (int i,const std::vector<int >& v);
69+ };
70+
71+ }
72+
73+ #endif
0 commit comments