Skip to content

Commit e3d5b62

Browse files
committed
Rename AddEntity to addEntity
1 parent 846e881 commit e3d5b62

11 files changed

Lines changed: 113 additions & 113 deletions

src/examples/IfcOpenHouse.cpp

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -127,12 +127,12 @@ int main(int argc, char** argv) {
127127
, IfcSchema::IfcOpeningElementTypeEnum::IfcOpeningElementType_OPENING
128128
#endif
129129
);
130-
file.AddEntity(west_opening);
130+
file.addEntity(west_opening);
131131

132132
// Relate the opening element to the wall.
133133
IfcSchema::IfcRelVoidsElement* void_element = new IfcSchema::IfcRelVoidsElement(guid(), file.getSingle<IfcSchema::IfcOwnerHistory>(),
134134
null, null, south_wall, west_opening);
135-
file.AddEntity(void_element);
135+
file.addEntity(void_element);
136136

137137
// Now create an additional opening
138138
IfcSchema::IfcOpeningElement* south_opening = new IfcSchema::IfcOpeningElement(guid(), file.getSingle<IfcSchema::IfcOwnerHistory>(),
@@ -142,8 +142,8 @@ int main(int argc, char** argv) {
142142
, IfcSchema::IfcOpeningElementTypeEnum::IfcOpeningElementType_OPENING
143143
#endif
144144
);
145-
file.AddEntity(south_opening);
146-
file.AddEntity(new IfcSchema::IfcRelVoidsElement(guid(), file.getSingle<IfcSchema::IfcOwnerHistory>(), null, null, south_wall, south_opening));
145+
file.addEntity(south_opening);
146+
file.addEntity(new IfcSchema::IfcRelVoidsElement(guid(), file.getSingle<IfcSchema::IfcOwnerHistory>(), null, null, south_wall, south_opening));
147147

148148
// Create a roof element that will consist of two slabs:
149149
IfcSchema::IfcRoof* roof = new IfcSchema::IfcRoof(guid(), file.getSingle<IfcSchema::IfcOwnerHistory>(), S("Roof"), null, null,
@@ -177,7 +177,7 @@ int main(int argc, char** argv) {
177177
roof_parts->push(north_roof_part);
178178
IfcSchema::IfcRelDecomposes* roof_decomposition = new IfcSchema::IfcRelAggregates(guid(), file.getSingle<IfcSchema::IfcOwnerHistory>(),
179179
null, null, roof, roof_parts);
180-
file.AddEntity(roof_decomposition);
180+
file.addEntity(roof_decomposition);
181181

182182
file.addBuildingProduct(south_roof_part);
183183
file.addBuildingProduct(north_roof_part);
@@ -247,8 +247,8 @@ int main(int argc, char** argv) {
247247
, IfcSchema::IfcOpeningElementTypeEnum::IfcOpeningElementType_OPENING
248248
#endif
249249
);
250-
file.AddEntity(west_opening_copy);
251-
file.AddEntity(new IfcSchema::IfcRelVoidsElement(guid(), file.getSingle<IfcSchema::IfcOwnerHistory>(), null, null, west_wall, west_opening_copy));
250+
file.addEntity(west_opening_copy);
251+
file.addEntity(new IfcSchema::IfcRelVoidsElement(guid(), file.getSingle<IfcSchema::IfcOwnerHistory>(), null, null, west_wall, west_opening_copy));
252252

253253
// Up until now we have only used simple extrusions for the creation of the geometry. For the
254254
// ground mesh of the IfcSite we will use a Nurbs surface created in Open Cascade. The surface
@@ -319,11 +319,11 @@ int main(int argc, char** argv) {
319319
#endif
320320
layer_usage);
321321

322-
file.AddEntity(material);
323-
file.AddEntity(layer);
324-
file.AddEntity(layer_set);
325-
file.AddEntity(layer_usage);
326-
file.AddEntity(associates_material);
322+
file.addEntity(material);
323+
file.addEntity(layer);
324+
file.addEntity(layer_set);
325+
file.addEntity(layer_usage);
326+
file.addEntity(associates_material);
327327

328328
// In addition, another common way to represent geometry in IFC files is to use extrusions of
329329
// planar areas bounded by a polygon.
@@ -351,8 +351,8 @@ int main(int argc, char** argv) {
351351
, IfcSchema::IfcOpeningElementTypeEnum::IfcOpeningElementType_OPENING
352352
#endif
353353
);
354-
file.AddEntity(door_opening);
355-
file.AddEntity(new IfcSchema::IfcRelVoidsElement(guid(), file.getSingle<IfcSchema::IfcOwnerHistory>(), null, null, east_wall, door_opening));
354+
file.addEntity(door_opening);
355+
file.addEntity(new IfcSchema::IfcRelVoidsElement(guid(), file.getSingle<IfcSchema::IfcOwnerHistory>(), null, null, east_wall, door_opening));
356356

357357
// A single shape representation can contain multiple representiation items. This way a product
358358
// can be a composition of multiple solids. The following door will be composed of four boxes
@@ -379,7 +379,7 @@ int main(int argc, char** argv) {
379379
file.addBox(door_body, 860, 30, 2120);
380380
file.addBuildingProduct(door);
381381
file.setSurfaceColour(door->Representation(), 0.9, 0.9, 0.9);
382-
file.AddEntity(new IfcSchema::IfcRelFillsElement(guid(), file.getSingle<IfcSchema::IfcOwnerHistory>(), null, null, door_opening, door));
382+
file.addEntity(new IfcSchema::IfcRelFillsElement(guid(), file.getSingle<IfcSchema::IfcOwnerHistory>(), null, null, door_opening, door));
383383

384384
// Surface styles are assigned to representation items, hence there is no real limitation to
385385
// assign different colours within the same representation. However, some viewers have
@@ -462,7 +462,7 @@ int main(int argc, char** argv) {
462462
, IfcSchema::IfcMemberTypeEnum::IfcMemberType_MULLION
463463
#endif
464464
);
465-
file.AddEntity(frame_part);
465+
file.addEntity(frame_part);
466466
window_parts->push(frame_part);
467467
file.relatePlacements(window, frame_part);
468468
}
@@ -474,7 +474,7 @@ int main(int argc, char** argv) {
474474
, IfcSchema::IfcPlateTypeEnum::IfcPlateType_SHEET
475475
#endif
476476
);
477-
file.AddEntity(glass_part);
477+
file.addEntity(glass_part);
478478
window_parts->push(glass_part);
479479
file.relatePlacements(window, glass_part);
480480
file.setSurfaceColour(glass_part->Representation(), 0.6, 0.7, 0.75, 0.1);
@@ -483,7 +483,7 @@ int main(int argc, char** argv) {
483483
// tools will consider the window a single entity that can be selected as a whole.
484484
IfcSchema::IfcRelDecomposes* decomposition = new IfcSchema::IfcRelAggregates(guid(), file.getSingle<IfcSchema::IfcOwnerHistory>(),
485485
null, null, window, window_parts);
486-
file.AddEntity(decomposition);
486+
file.addEntity(decomposition);
487487
}
488488

489489
// Finally create a file stream for our output and write the IFC file to it.

src/examples/arbitrary_open_profile_def.cpp

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ void create_product_from_item(IfcHierarchyHelper& file, IfcSchema::IfcRepresenta
5151

5252
if (s == "GeometricSet") {
5353
IfcSchema::IfcGeometricSet* set = new IfcSchema::IfcGeometricSet(items->generalize());
54-
file.AddEntity(set);
54+
file.addEntity(set);
5555
items = IfcSchema::IfcRepresentationItem::list(new IfcTemplatedEntityList<IfcSchema::IfcRepresentationItem>());
5656
items->push(set);
5757
}
@@ -61,35 +61,35 @@ void create_product_from_item(IfcHierarchyHelper& file, IfcSchema::IfcRepresenta
6161
reps->push(rep);
6262

6363
IfcSchema::IfcProductDefinitionShape* shape = new IfcSchema::IfcProductDefinitionShape(0, 0, reps);
64-
file.AddEntity(rep);
65-
file.AddEntity(shape);
64+
file.addEntity(rep);
65+
file.addEntity(shape);
6666

6767
product->setRepresentation(shape);
6868
}
6969

7070
void create_surfaces_from_profile(IfcHierarchyHelper& file, IfcSchema::IfcProfileDef* profile) {
7171
IfcSchema::IfcSurfaceOfLinearExtrusion* extrusion = new IfcSchema::IfcSurfaceOfLinearExtrusion(profile, file.addPlacement3d(), file.addTriplet<IfcSchema::IfcDirection>(0, 0, 1), 100.);
72-
file.AddEntity(extrusion);
72+
file.addEntity(extrusion);
7373

7474
IfcSchema::IfcAxis1Placement* ax1 = new IfcSchema::IfcAxis1Placement(file.addTriplet<IfcSchema::IfcCartesianPoint>(0,100,0), file.addTriplet<IfcSchema::IfcDirection>(1,0,0));
7575
IfcSchema::IfcSurfaceOfRevolution* revolution = new IfcSchema::IfcSurfaceOfRevolution(profile, file.addPlacement3d(), ax1);
76-
file.AddEntity(ax1);
77-
file.AddEntity(revolution);
76+
file.addEntity(ax1);
77+
file.addEntity(revolution);
7878

7979
create_product_from_item(file, extrusion, "GeometricSet");
8080
create_product_from_item(file, revolution, "GeometricSet");
8181
}
8282

8383
void create_solids_from_profile(IfcHierarchyHelper& file, IfcSchema::IfcProfileDef* profile) {
8484
IfcSchema::IfcExtrudedAreaSolid* extrusion = new IfcSchema::IfcExtrudedAreaSolid(profile, file.addPlacement3d(), file.addTriplet<IfcSchema::IfcDirection>(0, 0, 1), 100.);
85-
file.AddEntity(extrusion);
85+
file.addEntity(extrusion);
8686

8787
IfcSchema::IfcAxis1Placement* ax1 = new IfcSchema::IfcAxis1Placement(file.addTriplet<IfcSchema::IfcCartesianPoint>(0,100,0), file.addTriplet<IfcSchema::IfcDirection>(1,0,0));
8888
IfcSchema::IfcRevolvedAreaSolid* revolution1 = new IfcSchema::IfcRevolvedAreaSolid(profile, file.addPlacement3d(), ax1, 360.);
8989
IfcSchema::IfcRevolvedAreaSolid* revolution2 = new IfcSchema::IfcRevolvedAreaSolid(profile, file.addPlacement3d(), ax1, 90.);
90-
file.AddEntity(ax1);
91-
file.AddEntity(revolution1);
92-
file.AddEntity(revolution2);
90+
file.addEntity(ax1);
91+
file.addEntity(revolution1);
92+
file.addEntity(revolution2);
9393

9494
create_product_from_item(file, extrusion, "SweptSolid");
9595
create_product_from_item(file, revolution1, "SweptSolid");
@@ -99,8 +99,8 @@ void create_solids_from_profile(IfcHierarchyHelper& file, IfcSchema::IfcProfileD
9999
void create_products_from_curve(IfcHierarchyHelper& file, IfcSchema::IfcBoundedCurve* curve) {
100100
IfcSchema::IfcArbitraryOpenProfileDef* open = new IfcSchema::IfcArbitraryOpenProfileDef(IfcSchema::IfcProfileTypeEnum::IfcProfileType_CURVE, null, curve);
101101
IfcSchema::IfcCenterLineProfileDef* center_line = new IfcSchema::IfcCenterLineProfileDef(IfcSchema::IfcProfileTypeEnum::IfcProfileType_AREA, null, curve, 10.);
102-
file.AddEntity(open);
103-
file.AddEntity(center_line);
102+
file.addEntity(open);
103+
file.addEntity(center_line);
104104

105105
create_surfaces_from_profile(file, open);
106106
create_solids_from_profile(file, center_line);
@@ -118,18 +118,18 @@ int main(int argc, char** argv) {
118118
points->push(new IfcSchema::IfcCartesianPoint(std::vector<double>(coords2, coords2+2)));
119119
file.AddEntities(points->generalize());
120120
IfcSchema::IfcPolyline* poly = new IfcSchema::IfcPolyline(points);
121-
file.AddEntity(poly);
121+
file.addEntity(poly);
122122

123123
create_products_from_curve(file, poly);
124124

125125
IfcSchema::IfcEllipse* ellipse = new IfcSchema::IfcEllipse(file.addPlacement2d(), 50., 25.);
126-
file.AddEntity(ellipse);
126+
file.addEntity(ellipse);
127127
IfcEntityList::ptr trim1(new IfcEntityList);
128128
IfcEntityList::ptr trim2(new IfcEntityList);
129129
trim1->push(new IfcWrite::IfcSelectHelper( 0., Ifc2x3::Type::IfcParameterValue));
130130
trim2->push(new IfcWrite::IfcSelectHelper(180., Ifc2x3::Type::IfcParameterValue));
131131
IfcSchema::IfcTrimmedCurve* trim = new IfcSchema::IfcTrimmedCurve(ellipse, trim1, trim2, true, IfcSchema::IfcTrimmingPreference::IfcTrimmingPreference_PARAMETER);
132-
file.AddEntity(trim);
132+
file.addEntity(trim);
133133

134134
create_products_from_curve(file, trim);
135135

src/examples/composite_profile_def.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,11 @@ int main(int argc, char** argv) {
6565
IfcSchema::IfcProfileTypeEnum::IfcProfileType_AREA,
6666
null, file.addPlacement2d(80.), 50.0, 25.0, 5.0, 10.0, 2.0, null);
6767

68-
file.AddEntity(p2);
69-
file.AddEntity(p3);
68+
file.addEntity(p2);
69+
file.addEntity(p3);
7070

71-
file.AddEntity(transform1);
72-
file.AddEntity(transform2);
71+
file.addEntity(transform1);
72+
file.addEntity(transform2);
7373

7474
IfcSchema::IfcDerivedProfileDef* p5 = new IfcSchema::IfcDerivedProfileDef(IfcSchema::IfcProfileTypeEnum::IfcProfileType_AREA, null, p2, transform1, null);
7575
IfcSchema::IfcDerivedProfileDef* p6 = new IfcSchema::IfcDerivedProfileDef(IfcSchema::IfcProfileTypeEnum::IfcProfileType_AREA, null, p3, transform2, null);
@@ -95,8 +95,8 @@ int main(int argc, char** argv) {
9595
IfcSchema::IfcExtrudedAreaSolid* solid = new IfcSchema::IfcExtrudedAreaSolid(composite,
9696
file.addPlacement3d(), file.addTriplet<IfcSchema::IfcDirection>(0, 0, 1), 20.0);
9797

98-
file.AddEntity(composite);
99-
file.AddEntity(solid);
98+
file.addEntity(composite);
99+
file.addEntity(solid);
100100

101101
IfcSchema::IfcRepresentation::list reps (new IfcTemplatedEntityList<IfcSchema::IfcRepresentation>());
102102
IfcSchema::IfcRepresentationItem::list items (new IfcTemplatedEntityList<IfcSchema::IfcRepresentationItem>());
@@ -107,8 +107,8 @@ int main(int argc, char** argv) {
107107
reps->push(rep);
108108

109109
IfcSchema::IfcProductDefinitionShape* shape = new IfcSchema::IfcProductDefinitionShape(0, 0, reps);
110-
file.AddEntity(rep);
111-
file.AddEntity(shape);
110+
file.addEntity(rep);
111+
file.addEntity(shape);
112112

113113
product->setRepresentation(shape);
114114

src/examples/csg_primitive.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ class Node {
127127
}
128128
my = new IfcSchema::IfcBooleanResult(o, left->serialize(file), right->serialize(file));
129129
}
130-
file.AddEntity(my);
130+
file.addEntity(my);
131131
return my;
132132
}
133133
};
@@ -181,8 +181,8 @@ int main(int argc, char** argv) {
181181
reps->push(rep);
182182

183183
IfcSchema::IfcProductDefinitionShape* shape = new IfcSchema::IfcProductDefinitionShape(0, 0, reps);
184-
file.AddEntity(rep);
185-
file.AddEntity(shape);
184+
file.addEntity(rep);
185+
file.addEntity(shape);
186186

187187
product->setRepresentation(shape);
188188

src/examples/ellipse_pies.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ void create_testcase_for(IfcHierarchyHelper& file, const EllipsePie& pie, Ifc2x3
6666

6767

6868
Ifc2x3::IfcEllipse* ellipse = new Ifc2x3::IfcEllipse(file.addPlacement2d(), pie.r1, pie.r2);
69-
file.AddEntity(ellipse);
69+
file.addEntity(ellipse);
7070
IfcEntityList::ptr trim1(new IfcEntityList);
7171
IfcEntityList::ptr trim2(new IfcEntityList);
7272
if (pref == Ifc2x3::IfcTrimmingPreference::IfcTrimmingPreference_PARAMETER) {
@@ -77,13 +77,13 @@ void create_testcase_for(IfcHierarchyHelper& file, const EllipsePie& pie, Ifc2x3
7777
trim2->push(p3);
7878
}
7979
Ifc2x3::IfcTrimmedCurve* trim = new Ifc2x3::IfcTrimmedCurve(ellipse, trim1, trim2, true, pref);
80-
file.AddEntity(trim);
80+
file.addEntity(trim);
8181

8282
Ifc2x3::IfcCompositeCurveSegment::list segments(new IfcTemplatedEntityList<Ifc2x3::IfcCompositeCurveSegment>());
8383
Ifc2x3::IfcCompositeCurveSegment* s2 = new Ifc2x3::IfcCompositeCurveSegment(Ifc2x3::IfcTransitionCode::IfcTransitionCode_CONTINUOUS, true, trim);
8484

8585
Ifc2x3::IfcPolyline* poly = new Ifc2x3::IfcPolyline(points);
86-
file.AddEntity(poly);
86+
file.addEntity(poly);
8787
Ifc2x3::IfcCompositeCurveSegment* s1 = new Ifc2x3::IfcCompositeCurveSegment(Ifc2x3::IfcTransitionCode::IfcTransitionCode_CONTINUOUS, true, poly);
8888
segments->push(s1);
8989

@@ -92,8 +92,8 @@ void create_testcase_for(IfcHierarchyHelper& file, const EllipsePie& pie, Ifc2x3
9292

9393
Ifc2x3::IfcCompositeCurve* ccurve = new Ifc2x3::IfcCompositeCurve(segments, false);
9494
Ifc2x3::IfcArbitraryClosedProfileDef* profile = new Ifc2x3::IfcArbitraryClosedProfileDef(Ifc2x3::IfcProfileTypeEnum::IfcProfileType_AREA, null, ccurve);
95-
file.AddEntity(ccurve);
96-
file.AddEntity(profile);
95+
file.addEntity(ccurve);
96+
file.addEntity(profile);
9797

9898
IfcSchema::IfcBuildingElementProxy* product = new IfcSchema::IfcBuildingElementProxy(
9999
guid(), 0, S("profile"), null, null, 0, 0, null, null);
@@ -105,7 +105,7 @@ void create_testcase_for(IfcHierarchyHelper& file, const EllipsePie& pie, Ifc2x3
105105
IfcSchema::IfcExtrudedAreaSolid* solid = new IfcSchema::IfcExtrudedAreaSolid(profile,
106106
file.addPlacement3d(), file.addTriplet<IfcSchema::IfcDirection>(0, 0, 1), 20.0);
107107

108-
file.AddEntity(solid);
108+
file.addEntity(solid);
109109

110110
IfcSchema::IfcRepresentation::list reps (new IfcTemplatedEntityList<IfcSchema::IfcRepresentation>());
111111
IfcSchema::IfcRepresentationItem::list items (new IfcTemplatedEntityList<IfcSchema::IfcRepresentationItem>());
@@ -116,8 +116,8 @@ void create_testcase_for(IfcHierarchyHelper& file, const EllipsePie& pie, Ifc2x3
116116
reps->push(rep);
117117

118118
IfcSchema::IfcProductDefinitionShape* shape = new IfcSchema::IfcProductDefinitionShape(0, 0, reps);
119-
file.AddEntity(rep);
120-
file.AddEntity(shape);
119+
file.addEntity(rep);
120+
file.addEntity(shape);
121121

122122
product->setRepresentation(shape);
123123
}

src/examples/profiles.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ void create_testcase_for(IfcSchema::IfcProfileDef::list::ptr profiles) {
6161
IfcSchema::IfcExtrudedAreaSolid* solid = new IfcSchema::IfcExtrudedAreaSolid(profile,
6262
file.addPlacement3d(), file.addTriplet<IfcSchema::IfcDirection>(0, 0, 1), 20.0);
6363

64-
file.AddEntity(profile);
65-
file.AddEntity(solid);
64+
file.addEntity(profile);
65+
file.addEntity(solid);
6666

6767
IfcSchema::IfcRepresentation::list::ptr reps (new IfcSchema::IfcRepresentation::list);
6868
IfcSchema::IfcRepresentationItem::list::ptr items (new IfcSchema::IfcRepresentationItem::list);
@@ -73,8 +73,8 @@ void create_testcase_for(IfcSchema::IfcProfileDef::list::ptr profiles) {
7373
reps->push(rep);
7474

7575
IfcSchema::IfcProductDefinitionShape* shape = new IfcSchema::IfcProductDefinitionShape(0, 0, reps);
76-
file.AddEntity(rep);
77-
file.AddEntity(shape);
76+
file.addEntity(rep);
77+
file.addEntity(shape);
7878

7979
product->setRepresentation(shape);
8080
}

src/ifcparse/IfcFile.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ class IfcFile {
116116

117117
unsigned int FreshId() { return ++MaxId; }
118118

119-
IfcUtil::IfcBaseClass* AddEntity(IfcUtil::IfcBaseClass* entity);
119+
IfcUtil::IfcBaseClass* addEntity(IfcUtil::IfcBaseClass* entity);
120120
void AddEntities(IfcEntityList::ptr es);
121121

122122
void removeEntity(IfcUtil::IfcBaseClass* entity);

0 commit comments

Comments
 (0)