#include <geometrycontext.h>
Definition at line 16 of file geometrycontext.h.
◆ ~GeometryContext()
GeometryContext::~GeometryContext |
( |
| ) |
|
This method cares for the correct deletion of the property structs. therefore it runs through the propertyMap and deletes every occuring property struct. Afterwards the bodyMap is equally treated. And finally the bodyMap and the propertyMap are deleted.
Definition at line 108 of file geometrycontext.cpp.
108 {
109 TRACE();
111 DEBUG("GeometryProperty::clear() name : " << i->second->name, MAIA_DEBUG_IO);
112 DEBUG("GeometryProperty::clear() segmentId : " << i->second->segmentId, MAIA_DEBUG_IO);
113 i->second->clear();
114 }
116
118 DEBUG("GeometryProperty::clear() name : " << i->second->name, MAIA_DEBUG_IO);
119 DEBUG("GeometryProperty::clear() noSegments : " << i->second->noSegments, MAIA_DEBUG_IO);
120 delete[] i->second->segments;
121 }
122}
geometryPropertyMap * m_geometryPropertyMap
geometryPropertyMap::const_iterator geometryPropertyIterator
bodyMap::const_iterator bodyIterator
◆ GeometryContext()
GeometryContext::GeometryContext |
( |
const MPI_Comm |
comm | ) |
|
|
inline |
◆ addProperty()
Definition at line 132 of file geometrycontext.cpp.
132 {
133 TRACE();
134
135 const pair<const MString, GeometryProperty*> mp(
p->name, p);
137}
constexpr std::underlying_type< FcCell >::type p(const FcCell property)
Converts property name to underlying integer value.
◆ clear()
void GeometryContext::clear |
( |
| ) |
|
◆ getBodies()
bodyMap GeometryContext::getBodies |
( |
| ) |
|
◆ getNoSegments()
MInt GeometryContext::getNoSegments |
( |
| ) |
const |
|
inline |
◆ getProperty()
Returns a pointer to the requested property.
Definition at line 59 of file geometrycontext.cpp.
59 {
60
64 message.append(
"GeometryContext::getProperty Property: \"");
66 message.append(
"\" not found!");
67
68
70
72 return property;
73 }
74
76
77 MBool propertyFound =
false;
79 DEBUG("GeometryContext::getProperty segmentId:" << i->second->segmentId, MAIA_DEBUG_USER1);
80 if(i->second->segmentId == segmentId) {
81 property = i->second;
82 propertyFound = true;
83 }
84 }
85
86
87
88
89 if(!propertyFound) {
92 property = i->second;
93 DEBUG("GeometryContext::getProperty :" << name << " using standard property", MAIA_DEBUG_USER1);
94 } else {
95 DEBUG("GeometryContext::getProperty :" << name << " no standard value found !", MAIA_DEBUG_USER1);
96 }
97 }
98 }
99 return property;
100}
std::pair< geometryPropertyMap::iterator, geometryPropertyMap::iterator > m_pair
const MString const MString & message
std::basic_string< char > MString
◆ init()
void GeometryContext::init |
( |
| ) |
|
Use ts function if you want to create a new property list. If you want to load properties from file use the function readPropertyFile.
Definition at line 146 of file geometrycontext.cpp.
146 {
147
148
150}
std::multimap< MString, GeometryProperty * > geometryPropertyMap
◆ mpiComm()
MPI_Comm GeometryContext::mpiComm |
( |
| ) |
const |
|
inline |
◆ noPropertySegments()
MInt GeometryContext::noPropertySegments |
( |
const MString & |
name | ) |
|
|
inline |
Definition at line 21 of file geometrycontext.h.
21 {
23 std::cerr << "GeometryContext::noPropertySegments " << name << " not found " << std::endl;
24 return 0;
25 }
27
29 for(auto& i = range.first; i != range.second; i++) {
31 }
33 }
◆ propertyExists()
Definition at line 171 of file geometrycontext.cpp.
171 {
173 return false;
174 } else {
175 return true;
176 }
177}
◆ readPropertyFile()
void GeometryContext::readPropertyFile |
( |
FileType |
fileType, |
|
|
const MChar * |
fileName |
|
) |
| |
Creates an object of the specified filetype to open the property file
Definition at line 24 of file geometrycontext.cpp.
24 {
25 TRACE();
26
27 MBool success =
false;
29 while(!success) {
30 switch(fileType) {
33 break;
36 break;
37
38
39
40
41
42
43 default:
44 break;
45 }
50 success = true;
51 }
52}
geometryAssembly * m_geometryAssembly
GeometryIOBase * m_geometryIOBase
virtual MInt segmentCount()=0
virtual geometryAssembly * readPropertyFile(MString fileName)=0
geometryPropertyMap * geometryProperties
◆ writeProperties()
void GeometryContext::writeProperties |
( |
MChar * |
fileName | ) |
|
Use ts function if you want to create a new property list. If you want to load properties from file use the function readPropertyFile.
Definition at line 159 of file geometrycontext.cpp.
159 {
160 TRACE();
161
164}
virtual void writeProperties(const MChar *, geometryPropertyMap *)
◆ m_bodyMap
bodyMap* GeometryContext::m_bodyMap |
|
private |
◆ m_geometryAssembly
◆ m_geometryIOBase
◆ m_geometryPropertyMap
◆ m_mpiComm
const MPI_Comm GeometryContext::m_mpiComm = MPI_COMM_NULL |
|
private |
◆ m_name
◆ m_noBodies
MInt GeometryContext::m_noBodies |
|
private |
◆ m_noSegments
MInt GeometryContext::m_noSegments |
|
private |
◆ m_pair
std::pair<geometryPropertyMap::iterator, geometryPropertyMap::iterator> GeometryContext::m_pair |
|
private |
The documentation for this class was generated from the following files: