Skip to content

Commit b3e5264

Browse files
committed
WARNING: more function renames
1 parent e3d5b62 commit b3e5264

13 files changed

+56
-54
lines changed

src/examples/IfcOpenHouse.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ int main(int argc, char** argv) {
258258
IfcEntityList::ptr geometrical_entities(new IfcEntityList);
259259
IfcSchema::IfcProductDefinitionShape* ground_representation = IfcGeom::tesselate(shape, 100., geometrical_entities);
260260
file.getSingle<IfcSchema::IfcSite>()->setRepresentation(ground_representation);
261-
file.AddEntities(geometrical_entities);
261+
file.addEntities(geometrical_entities);
262262
IfcSchema::IfcShapeRepresentation::list::ptr ground_reps = geometrical_entities->as<IfcSchema::IfcShapeRepresentation>();
263263
for (IfcSchema::IfcShapeRepresentation::list::it it = ground_reps->begin(); it != ground_reps->end(); ++it) {
264264
(*it)->setContextOfItems(file.getRepresentationContext("Model"));
@@ -313,9 +313,9 @@ int main(int argc, char** argv) {
313313
null,
314314
null,
315315
#ifdef USE_IFC4
316-
file.EntitiesByType<IfcSchema::IfcWallStandardCase>()->generalize(),
316+
file.entitiesByType<IfcSchema::IfcWallStandardCase>()->generalize(),
317317
#else
318-
file.EntitiesByType<IfcSchema::IfcWallStandardCase>()->as<IfcSchema::IfcRoot>(),
318+
file.entitiesByType<IfcSchema::IfcWallStandardCase>()->as<IfcSchema::IfcRoot>(),
319319
#endif
320320
layer_usage);
321321

src/examples/IfcParseExamples.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ int main(int argc, char** argv) {
4040

4141
// Lets get a list of IfcBuildingElements, this is the parent
4242
// type of things like walls, windows and doors.
43-
// EntitiesByType is a templated function and returns a
43+
// entitiesByType is a templated function and returns a
4444
// templated class that behaves like a std::vector.
4545
// Note that the return types are all typedef'ed as members of
4646
// the generated classes, ::list for the templated vector class,
@@ -54,7 +54,7 @@ int main(int argc, char** argv) {
5454
// we need to cast them to IfcWindows. Since these properties
5555
// are optional we need to make sure the properties are
5656
// defined for the window in question before accessing them.
57-
IfcBuildingElement::list::ptr elements = file.EntitiesByType<IfcBuildingElement>();
57+
IfcBuildingElement::list::ptr elements = file.entitiesByType<IfcBuildingElement>();
5858

5959
std::cout << "Found " << elements->size() << " elements in " << argv[1] << ":" << std::endl;
6060

src/examples/arbitrary_open_profile_def.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ int main(int argc, char** argv) {
116116
IfcSchema::IfcCartesianPoint::list points (new IfcTemplatedEntityList<IfcSchema::IfcCartesianPoint>());
117117
points->push(new IfcSchema::IfcCartesianPoint(std::vector<double>(coords1, coords1+2)));
118118
points->push(new IfcSchema::IfcCartesianPoint(std::vector<double>(coords2, coords2+2)));
119-
file.AddEntities(points->generalize());
119+
file.addEntities(points->generalize());
120120
IfcSchema::IfcPolyline* poly = new IfcSchema::IfcPolyline(points);
121121
file.addEntity(poly);
122122

src/examples/composite_profile_def.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ int main(int argc, char** argv) {
7979
profiles->push(p6);
8080
profiles->push(p4);
8181

82-
file.AddEntities(profiles->generalize());
82+
file.addEntities(profiles->generalize());
8383

8484
IfcSchema::IfcCompositeProfileDef* composite = new IfcSchema::IfcCompositeProfileDef(IfcSchema::IfcProfileTypeEnum::IfcProfileType_AREA, S("IFC"), profiles, null);
8585

src/examples/ellipse_pies.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ void create_testcase_for(IfcHierarchyHelper& file, const EllipsePie& pie, Ifc2x3
6262
points->push(p3);
6363
points->push(p1);
6464
points->push(p2);
65-
file.AddEntities(points->generalize());
65+
file.addEntities(points->generalize());
6666

6767

6868
Ifc2x3::IfcEllipse* ellipse = new Ifc2x3::IfcEllipse(file.addPlacement2d(), pie.r1, pie.r2);
@@ -88,7 +88,7 @@ void create_testcase_for(IfcHierarchyHelper& file, const EllipsePie& pie, Ifc2x3
8888
segments->push(s1);
8989

9090
segments->push(s2);
91-
file.AddEntities(segments->generalize());
91+
file.addEntities(segments->generalize());
9292

9393
Ifc2x3::IfcCompositeCurve* ccurve = new Ifc2x3::IfcCompositeCurve(segments, false);
9494
Ifc2x3::IfcArbitraryClosedProfileDef* profile = new Ifc2x3::IfcArbitraryClosedProfileDef(Ifc2x3::IfcProfileTypeEnum::IfcProfileType_AREA, null, ccurve);

src/ifcconvert/XmlSerializer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ void format_properties(IfcProperty::list::ptr properties, ptree& node) {
201201
void XmlSerializer::finalize() {
202202
argument_name_map.insert(std::make_pair("GlobalId", "id"));
203203

204-
IfcProject::list::ptr projects = file->EntitiesByType<IfcProject>();
204+
IfcProject::list::ptr projects = file->entitiesByType<IfcProject>();
205205
if (projects->size() != 1) {
206206
Logger::Message(Logger::LOG_ERROR, "Expected a single IfcProject");
207207
return;
@@ -234,7 +234,7 @@ void XmlSerializer::finalize() {
234234
descend(project, decomposition);
235235

236236
// Write all property sets and values as XML nodes.
237-
IfcPropertySet::list::ptr psets = file->EntitiesByType<IfcPropertySet>();
237+
IfcPropertySet::list::ptr psets = file->entitiesByType<IfcPropertySet>();
238238
for (IfcPropertySet::list::it it = psets->begin(); it != psets->end(); ++it) {
239239
IfcPropertySet* pset = *it;
240240
ptree& node = format_entity_instance(pset, properties);

src/ifcgeom/IfcGeomIterator.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ namespace IfcGeom {
110110
P unit_magnitude;
111111

112112
void initUnits() {
113-
IfcSchema::IfcProject::list::ptr projects = ifc_file->EntitiesByType<IfcSchema::IfcProject>();
113+
IfcSchema::IfcProject::list::ptr projects = ifc_file->entitiesByType<IfcSchema::IfcProject>();
114114
if (projects->size() == 1) {
115115
IfcSchema::IfcProject* project = *projects->begin();
116116
std::pair<std::string, double> length_unit = kernel.initializeUnits(project->UnitsInContext());
@@ -165,7 +165,7 @@ namespace IfcGeom {
165165
IfcSchema::IfcGeometricRepresentationContext::list::it it;
166166
IfcSchema::IfcGeometricRepresentationSubContext::list::it jt;
167167
IfcSchema::IfcGeometricRepresentationContext::list::ptr contexts =
168-
ifc_file->EntitiesByType<IfcSchema::IfcGeometricRepresentationContext>();
168+
ifc_file->entitiesByType<IfcSchema::IfcGeometricRepresentationContext>();
169169

170170
IfcSchema::IfcGeometricRepresentationContext::list::ptr filtered_contexts (new IfcSchema::IfcGeometricRepresentationContext::list);
171171

@@ -384,7 +384,7 @@ namespace IfcGeom {
384384
std::string instance_type, product_name, product_guid;
385385

386386
try {
387-
const IfcUtil::IfcBaseClass* ifc_entity = ifc_file->EntityById(id);
387+
const IfcUtil::IfcBaseClass* ifc_entity = ifc_file->entityById(id);
388388
instance_type = IfcSchema::Type::ToString(ifc_entity->type());
389389
if ( ifc_entity->is(IfcSchema::Type::IfcProduct) ) {
390390
IfcSchema::IfcProduct* ifc_product = (IfcSchema::IfcProduct*)ifc_entity;

src/ifcgeom/IfcGeomRepresentation.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ namespace IfcGeom {
147147
} catch(...) {
148148

149149
// TODO: Catch outside
150-
// Logger::Message(Logger::LOG_ERROR,"Failed to triangulate shape:",ifc_file->EntityById(_id)->entity);
150+
// Logger::Message(Logger::LOG_ERROR,"Failed to triangulate shape:",ifc_file->entityById(_id)->entity);
151151
Logger::Message(Logger::LOG_ERROR,"Failed to triangulate shape");
152152
continue;
153153
}

src/ifcparse/IfcFile.h

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -65,17 +65,19 @@ class IfcFile {
6565
IfcFile(bool create_latebound_entities = false);
6666
~IfcFile();
6767

68-
/// Returns the first entity in the file, this probably is the entity with the lowest id (EXPRESS ENTITY_INSTANCE_NAME)
68+
/// Returns the first entity in the file, this probably is the entity
69+
/// with the lowest id (EXPRESS ENTITY_INSTANCE_NAME)
6970
const_iterator begin() const;
70-
/// Returns the last entity in the file, this probably is the entity with the highes id (EXPRESS ENTITY_INSTANCE_NAME)
71+
/// Returns the last entity in the file, this probably is the entity
72+
/// with the highest id (EXPRESS ENTITY_INSTANCE_NAME)
7173
const_iterator end() const;
7274

7375
/// Returns all entities in the file that match the template argument.
7476
/// NOTE: This also returns subtypes of the requested type, for example:
7577
/// IfcWall will also return IfcWallStandardCase entities
7678
template <class T>
77-
typename T::list::ptr EntitiesByType() {
78-
IfcEntityList::ptr untyped_list = EntitiesByType(T::Class());
79+
typename T::list::ptr entitiesByType() {
80+
IfcEntityList::ptr untyped_list = entitiesByType(T::Class());
7981
if (untyped_list) {
8082
return untyped_list->as<T>();
8183
} else {
@@ -86,21 +88,21 @@ class IfcFile {
8688
/// Returns all entities in the file that match the positional argument.
8789
/// NOTE: This also returns subtypes of the requested type, for example:
8890
/// IfcWall will also return IfcWallStandardCase entities
89-
IfcEntityList::ptr EntitiesByType(IfcSchema::Type::Enum t);
91+
IfcEntityList::ptr entitiesByType(IfcSchema::Type::Enum t);
9092

9193
/// Returns all entities in the file that match the positional argument.
9294
/// NOTE: This also returns subtypes of the requested type, for example:
9395
/// IfcWall will also return IfcWallStandardCase entities
94-
IfcEntityList::ptr EntitiesByType(const std::string& t);
96+
IfcEntityList::ptr entitiesByType(const std::string& t);
9597

9698
/// Returns all entities in the file that reference the id
97-
IfcEntityList::ptr EntitiesByReference(int id);
99+
IfcEntityList::ptr entitiesByReference(int id);
98100

99101
/// Returns the entity with the specified id
100-
IfcUtil::IfcBaseClass* EntityById(int id);
102+
IfcUtil::IfcBaseClass* entityById(int id);
101103

102104
/// Returns the entity with the specified GlobalId
103-
IfcSchema::IfcRoot* EntityByGuid(const std::string& guid);
105+
IfcSchema::IfcRoot* entityByGuid(const std::string& guid);
104106

105107
/// Performs a depth-first traversal, returning all entity instance
106108
/// attributes as a flat list. NB: includes the root instance specified
@@ -117,7 +119,7 @@ class IfcFile {
117119
unsigned int FreshId() { return ++MaxId; }
118120

119121
IfcUtil::IfcBaseClass* addEntity(IfcUtil::IfcBaseClass* entity);
120-
void AddEntities(IfcEntityList::ptr es);
122+
void addEntities(IfcEntityList::ptr es);
121123

122124
void removeEntity(IfcUtil::IfcBaseClass* entity);
123125

src/ifcparse/IfcHierarchyHelper.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ class IfcHierarchyHelper : public IfcParse::IfcFile {
5858

5959
template <class T>
6060
T* getSingle() {
61-
typename T::list::ptr ts = EntitiesByType<T>();
61+
typename T::list::ptr ts = entitiesByType<T>();
6262
if (ts->size() != 1) return 0;
6363
return *ts->begin();
6464
}
@@ -79,7 +79,7 @@ class IfcHierarchyHelper : public IfcParse::IfcFile {
7979
void addRelatedObject(IfcSchema::IfcObjectDefinition* related_object,
8080
IfcSchema::IfcObjectDefinition* relating_object, IfcSchema::IfcOwnerHistory* owner_hist = 0)
8181
{
82-
typename T::list::ptr li = EntitiesByType<T>();
82+
typename T::list::ptr li = entitiesByType<T>();
8383
bool found = false;
8484
for (typename T::list::it i = li->begin(); i != li->end(); ++i) {
8585
T* rel = *i;
@@ -175,7 +175,7 @@ template <>
175175
inline void IfcHierarchyHelper::addRelatedObject <IfcSchema::IfcRelContainedInSpatialStructure> (IfcSchema::IfcObjectDefinition* related_object,
176176
IfcSchema::IfcObjectDefinition* relating_object, IfcSchema::IfcOwnerHistory* owner_hist)
177177
{
178-
IfcSchema::IfcRelContainedInSpatialStructure::list::ptr li = EntitiesByType<IfcSchema::IfcRelContainedInSpatialStructure>();
178+
IfcSchema::IfcRelContainedInSpatialStructure::list::ptr li = entitiesByType<IfcSchema::IfcRelContainedInSpatialStructure>();
179179
bool found = false;
180180
for (IfcSchema::IfcRelContainedInSpatialStructure::list::it i = li->begin(); i != li->end(); ++i) {
181181
IfcSchema::IfcRelContainedInSpatialStructure* rel = *i;

0 commit comments

Comments
 (0)