@@ -75,21 +75,15 @@ extern SC_CORE_EXPORT void PushPastAggr1Dim( istream & in, std::string & s, Erro
7575class SC_CORE_EXPORT STEPattribute {
7676 friend ostream & operator << ( ostream &, STEPattribute & );
7777 friend class SDAI_Application_instance ;
78- protected:
79- bool _derive;
80- bool _mustDeletePtr; // /if a member uses new to create an object in ptr
81- ErrorDescriptor _error;
82- STEPattribute * _redefAttr;
83- const AttrDescriptor * aDesc;
84- int refCount;
8578
79+ public:
8680 /* * \union ptr
87- ** You know which of these to use based on the return value of
88- ** NonRefType() - see below. BASE_TYPE is defined in baseType.h
89- ** This variable points to an appropriate member variable in the entity
90- ** class in the generated schema class library (the entity class is
91- ** inherited from SDAI_Application_instance)
92- */
81+ ** You know which of these to use based on the return value of
82+ ** NonRefType() - see below. BASE_TYPE is defined in baseType.h
83+ ** This variable points to an appropriate member variable in the entity
84+ ** class in the generated schema class library (the entity class is
85+ ** inherited from SDAI_Application_instance)
86+ */
9387 union attrUnion {
9488 SDAI_String * S; // STRING_TYPE
9589 SDAI_Integer * i; // INTEGER_TYPE (Integer is a long int)
@@ -103,6 +97,18 @@ class SC_CORE_EXPORT STEPattribute {
10397 void * p;
10498 } ptr;
10599
100+
101+ protected:
102+ bool _derive;
103+ bool _mustDeletePtr; // /if a member uses new to create an object in ptr
104+ ErrorDescriptor _error;
105+ STEPattribute * _redefAttr;
106+ public:
107+ const AttrDescriptor * aDesc;
108+
109+ protected:
110+ int refCount;
111+
106112 char SkipBadAttr ( istream & in, char * StopChars );
107113 void AddErrorInfo ();
108114 void STEPwriteError ( ostream& out, unsigned int line, const char * desc );
@@ -137,6 +143,7 @@ class SC_CORE_EXPORT STEPattribute {
137143
138144 // / return the attr value as a string
139145 string asStr ( const char * currSch = 0 ) const ;
146+ const char * asStr ( std::string &, const char * = 0 ) const ;
140147
141148 // / put the attr value in ostream
142149 void STEPwrite ( ostream & out = cout, const char * currSch = 0 );
@@ -167,11 +174,6 @@ class SC_CORE_EXPORT STEPattribute {
167174 SCLundefined * Undefined ();
168175 // /@}
169176
170- // / allows direct access to the union containing attr data (dangerous!)
171- attrUnion * Raw () {
172- return & ptr;
173- }
174-
175177 /* *
176178 * These functions allow setting the attribute value.
177179 * Attr type is verified using an assertion.
0 commit comments