forked from IfcOpenShell/IfcOpenShell
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIfcWritableEntity.h
More file actions
79 lines (72 loc) · 3.74 KB
/
IfcWritableEntity.h
File metadata and controls
79 lines (72 loc) · 3.74 KB
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
/********************************************************************************
* *
* This file is part of IfcOpenShell. *
* *
* IfcOpenShell is free software: you can redistribute it and/or modify *
* it under the terms of the Lesser GNU General Public License as published by *
* the Free Software Foundation, either version 3.0 of the License, or *
* (at your option) any later version. *
* *
* IfcOpenShell is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* Lesser GNU General Public License for more details. *
* *
* You should have received a copy of the Lesser GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
* *
********************************************************************************/
/********************************************************************************
* *
* This namespace provides implementations of Argument and Entity that use STL *
* containers for their datatypes and are not just lazy references to the *
* IFC-SPF file. Therefore they can be modified by the client application. *
* *
* An IfcWritableEntity can be constructed from a regular IfcParse entity to be *
* able to modify the data in existing IFC files. *
* *
********************************************************************************/
#ifndef IFCWRITABLEENTITY_H
#define IFCWRITABLEENTITY_H
#include <map>
#include "IfcUtil.h"
namespace IfcWrite {
class IfcWritableEntity : public IfcAbstractEntity {
private:
std::map<int,bool> writemask;
std::map<int,ArgumentPtr> args;
IfcSchema::Type::Enum _type;
int* _id;
bool arg_writable(int i);
void arg_writable(int i, bool b);
template <typename T> void _setArgument(int i, const T&);
public:
IfcWritableEntity(IfcSchema::Type::Enum t);
~IfcWritableEntity();
int setId(int i=-1);
IfcWritableEntity(IfcAbstractEntity* e);
IfcEntities getInverse(IfcSchema::Type::Enum c = IfcSchema::Type::ALL);
IfcEntities getInverse(IfcSchema::Type::Enum c, int i, const std::string& a);
std::string datatype();
ArgumentPtr getArgument (unsigned int i);
unsigned int getArgumentCount();
IfcSchema::Type::Enum type() const;
bool is(IfcSchema::Type::Enum v) const;
std::string toString(bool upper=false);
unsigned int id();
bool isWritable();
void setArgument(int i);
void setArgumentDerived(int i);
void setArgument(int i,bool v);
void setArgument(int i,int v);
void setArgument(int i,int v, const char* c);
void setArgument(int i,const std::string& v);
void setArgument(int i,double v);
void setArgument(int i,IfcUtil::IfcSchemaEntity v);
void setArgument(int i,IfcEntities v);
void setArgument(int i,const std::vector<double>& v);
void setArgument(int i,const std::vector<std::string>& v);
void setArgument(int i,const std::vector<int>& v);
};
}
#endif