MAIA bb96820c
Multiphysics at AIA
Loading...
Searching...
No Matches
GeometryProperty Class Reference

#include <geometryproperty.h>

Collaboration diagram for GeometryProperty:
[legend]

Public Member Functions

 GeometryProperty ()
 
 ~GeometryProperty ()
 
MInt count ()
 
MStringasString ()
 
MIntasInt ()
 
MFloatasFloat ()
 
VariableType type ()
 
void clear ()
 
MStringasString (MInt index)
 
MIntasInt (MInt index)
 
MFloatasFloat (MInt index)
 

Public Attributes

VariableType propertyType
 
MInt elements
 
MString name
 
MInt segmentId
 
MStringstringField
 
MFloatfloatField
 
MIntintField
 

Detailed Description

Definition at line 13 of file geometryproperty.h.

Constructor & Destructor Documentation

◆ GeometryProperty()

GeometryProperty::GeometryProperty ( )

Definition at line 42 of file geometryproperty.cpp.

42 {
43 DEBUG("GeometryProperty::GeometryProperty entry", MAIA_DEBUG_ALLOCATION);
44 DEBUG("GeometryProperty::GeometryProperty return", MAIA_DEBUG_ALLOCATION);
45}

◆ ~GeometryProperty()

GeometryProperty::~GeometryProperty ( )

Definition at line 13 of file geometryproperty.cpp.

13 {
14 DEBUG("GeometryProperty::~GeometryProperty entry", MAIA_DEBUG_ALLOCATION);
15
16 DEBUG("GeometryProperty::~GeometryProperty return", MAIA_DEBUG_ALLOCATION);
17}

Member Function Documentation

◆ asFloat() [1/2]

MFloat * GeometryProperty::asFloat ( )

Definition at line 68 of file geometryproperty.cpp.

68{ return floatField; }

◆ asFloat() [2/2]

MFloat * GeometryProperty::asFloat ( MInt  index)

Definition at line 90 of file geometryproperty.cpp.

90 {
91 // TRACE();
92 if(index + 1 > elements) {
93 cerr << " GeometryProperty::asFloat() Requested index out of reach! ";
94 // SX8 cannont compile with exception handling
95 // throw(" Requested index for property out of reach! ");
96 }
97 return (floatField + index);
98}

◆ asInt() [1/2]

MInt * GeometryProperty::asInt ( )

Definition at line 63 of file geometryproperty.cpp.

63 {
64 // TRACE();
65 return intField;
66}

◆ asInt() [2/2]

MInt * GeometryProperty::asInt ( MInt  index)

Definition at line 80 of file geometryproperty.cpp.

80 {
81 // TRACE();
82 if(index + 1 > elements) {
83 cerr << " GeometryProperty::asInt() Requested index out of reach! ";
84 // SX8 cannont compile with exception handling
85 // throw(" Requested index for property out of reach! ");
86 }
87 return (intField + index);
88}

◆ asString() [1/2]

MString * GeometryProperty::asString ( )

Definition at line 58 of file geometryproperty.cpp.

58 {
59 // TRACE();
60 return stringField;
61}

◆ asString() [2/2]

MString * GeometryProperty::asString ( MInt  index)

Definition at line 70 of file geometryproperty.cpp.

70 {
71 // TRACE();
72 if(index + 1 > elements) {
73 cerr << " GeometryProperty::asString() Requested index out of reach! ";
74 // SX8 cannont compile with exception handling
75 // throw(" Requested index for property out of reach! ");
76 }
77 return (stringField + index);
78}

◆ clear()

void GeometryProperty::clear ( )

Definition at line 19 of file geometryproperty.cpp.

19 {
20 TRACE();
21 switch(propertyType) {
22 case MINT: {
23 delete[] intField;
24 break;
25 }
26 case MFLOAT: {
27 delete[] floatField;
28 break;
29 }
30 case MSTRING: {
31 delete[] stringField;
32 break;
33 }
34 default: {
35 stringstream errorMessage;
36 errorMessage << "GeometryProperty::clear(): switch variable 'propertyType' with value " << propertyType
37 << " not matching any case." << endl;
38 mTerm(1, AT_, errorMessage.str());
39 }
40 }
41}
VariableType propertyType
@ MINT
Definition: enums.h:269
@ MFLOAT
Definition: enums.h:269
@ MSTRING
Definition: enums.h:269
void mTerm(const MInt errorCode, const MString &location, const MString &message)
Definition: functions.cpp:29

◆ count()

MInt GeometryProperty::count ( )

Definition at line 53 of file geometryproperty.cpp.

53 {
54 // TRACE();
55 return elements;
56}

◆ type()

VariableType GeometryProperty::type ( )

Definition at line 47 of file geometryproperty.cpp.

47 {
48 // TRACE();
49
50 return propertyType;
51}

Member Data Documentation

◆ elements

MInt GeometryProperty::elements

Definition at line 28 of file geometryproperty.h.

◆ floatField

MFloat* GeometryProperty::floatField

Definition at line 32 of file geometryproperty.h.

◆ intField

MInt* GeometryProperty::intField

Definition at line 33 of file geometryproperty.h.

◆ name

MString GeometryProperty::name

Definition at line 29 of file geometryproperty.h.

◆ propertyType

VariableType GeometryProperty::propertyType

Definition at line 27 of file geometryproperty.h.

◆ segmentId

MInt GeometryProperty::segmentId

Definition at line 30 of file geometryproperty.h.

◆ stringField

MString* GeometryProperty::stringField

Definition at line 31 of file geometryproperty.h.


The documentation for this class was generated from the following files: