forked from IfcOpenShell/IfcOpenShell
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIfcLateBoundEntity.h
More file actions
85 lines (70 loc) · 3.73 KB
/
IfcLateBoundEntity.h
File metadata and controls
85 lines (70 loc) · 3.73 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
80
81
82
83
84
85
/********************************************************************************
* *
* 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/>. *
* *
********************************************************************************/
#ifndef IFCLATEBOUNDENTITY_H
#define IFCLATEBOUNDENTITY_H
#include <string>
#include "../ifcparse/IfcUtil.h"
#include "../ifcparse/IfcWrite.h"
#include "../ifcparse/IfcWritableEntity.h"
namespace IfcParse {
// TODO: Somehow these methods should become part of IfcBaseEntity directly so
// that in the IfcFile class the distinction what entity type to be created is
// no longer necessary and weird diagonal casts when creating geometry from
// IfcLateBoundEntities are eliminated.
class IfcLateBoundEntity : public IfcUtil::IfcBaseEntity {
private:
IfcSchema::Type::Enum _type;
IfcWrite::IfcWritableEntity* writable_entity();
void invalid_argument(unsigned int i, const std::string& t);
public:
IfcLateBoundEntity(const std::string& s);
IfcLateBoundEntity(IfcAbstractEntity* e);
bool is(IfcSchema::Type::Enum v) const;
IfcSchema::Type::Enum type() const;
bool is_a(const std::string& s) const;
std::string is_a() const;
unsigned int id() const;
unsigned int getArgumentCount() const;
IfcUtil::ArgumentType getArgumentType(unsigned int i) const;
IfcSchema::Type::Enum getArgumentEntity(unsigned int i) const;
Argument* getArgument(unsigned int i) const;
const char* getArgumentName(unsigned int i) const;
unsigned getArgumentIndex(const std::string& a) const;
bool getArgumentOptionality(unsigned int i) const;
IfcEntityList::ptr get_inverse(const std::string& a);
std::vector<std::string> getAttributeNames() const;
std::vector<std::string> getInverseAttributeNames() const;
void setArgument(unsigned int i);
void setArgument(unsigned int i, int v);
void setArgument(unsigned int i, bool v);
void setArgument(unsigned int i, double v);
void setArgument(unsigned int i, const std::string& v);
void setArgument(unsigned int i, const std::vector<int>& v);
void setArgument(unsigned int i, const std::vector<double>& v);
void setArgument(unsigned int i, const std::vector<std::string>& v);
void setArgument(unsigned int i, IfcLateBoundEntity* v);
void setArgument(unsigned int i, IfcEntityList::ptr v);
std::string toString();
// TODO: Write as SWIG extension methods?
std::pair<IfcUtil::ArgumentType,Argument*> get_argument(unsigned i);
std::pair<IfcUtil::ArgumentType,Argument*> get_argument(const std::string& a);
bool is_valid();
};
}
#endif