Skip to content

Commit 2796270

Browse files
committed
Use boost::variant for writable arguments in the IFC serializer
1 parent 14a3f80 commit 2796270

File tree

4 files changed

+251
-367
lines changed

4 files changed

+251
-367
lines changed

src/ifcconvert/ColladaSerializer.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -92,15 +92,15 @@ class ColladaSerializer : public GeometrySerializer
9292
};
9393
class DeferredObject {
9494
public:
95-
const std::string guid, name, type;
95+
std::string guid, name, type;
9696
int obj_id;
97-
const std::vector<float> matrix;
98-
const std::vector<float> vertices;
99-
const std::vector<float> normals;
100-
const std::vector<int> indices;
101-
const std::vector<int> material_ids;
102-
const std::vector<IfcGeomObjects::Material> materials;
103-
const std::vector<std::string> material_references;
97+
std::vector<float> matrix;
98+
std::vector<float> vertices;
99+
std::vector<float> normals;
100+
std::vector<int> indices;
101+
std::vector<int> material_ids;
102+
std::vector<IfcGeomObjects::Material> materials;
103+
std::vector<std::string> material_references;
104104
DeferredObject(const std::string& guid, const std::string& name, const std::string& type, int obj_id, const std::vector<float>& matrix, const std::vector<float>& vertices,
105105
const std::vector<float>& normals, const std::vector<int>& indices, const std::vector<int>& material_ids,
106106
const std::vector<IfcGeomObjects::Material>& materials, const std::vector<std::string>& material_references)

src/ifcparse/IfcWritableEntity.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,10 @@ namespace IfcWrite {
4444
int* _id;
4545
bool arg_writable(int i);
4646
void arg_writable(int i, bool b);
47+
template <typename T> void _setArgument(int i, const T&);
4748
public:
4849
IfcWritableEntity(Ifc2x3::Type::Enum t);
50+
~IfcWritableEntity();
4951
int setId(int i=-1);
5052
IfcWritableEntity(IfcAbstractEntity* e);
5153
IfcEntities getInverse(Ifc2x3::Type::Enum c = Ifc2x3::Type::ALL);

0 commit comments

Comments
 (0)