@@ -924,109 +924,3 @@ void SelectNode::STEPwrite( ostream & out ) {
924924 out << asStr ( s );
925925}
926926
927- // /////////////////////////////////////////////////////////////////////////////
928- // StringAggregate
929- // /////////////////////////////////////////////////////////////////////////////
930-
931- StringAggregate::StringAggregate () {
932- }
933-
934- StringAggregate::~StringAggregate () {
935- }
936-
937- STEPaggregate & StringAggregate::ShallowCopy ( const STEPaggregate & a ) {
938- Empty ();
939-
940- SingleLinkNode * next = a.GetHead ();
941- SingleLinkNode * copy;
942-
943- while ( next ) {
944- copy = new StringNode ( *( StringNode * )next );
945- AddNode ( copy );
946- next = next->NextNode ();
947- }
948- if ( head ) {
949- _null = 0 ;
950- } else {
951- _null = 1 ;
952- }
953- return *this ;
954-
955- }
956-
957- SingleLinkNode * StringAggregate::NewNode () {
958- return new StringNode ();
959- }
960-
961- // /////////////////////////////////////////////////////////////////////////////
962- // StringNode
963- // /////////////////////////////////////////////////////////////////////////////
964-
965- StringNode::StringNode () {
966- value = " " ;
967- }
968-
969- StringNode::~StringNode () {
970- }
971-
972- StringNode::StringNode ( StringNode & sn ) {
973- value = sn.value .c_str ();
974- }
975-
976- StringNode::StringNode ( const char * sStr ) {
977- // value is an SDAI_String (the memory is copied)
978- value = sStr ;
979- }
980-
981- SingleLinkNode * StringNode::NewNode () {
982- return new StringNode ();
983- }
984-
985- /* *
986- * non-whitespace chars following s are considered garbage and is an error.
987- * a valid value will still be assigned if it exists before the garbage.
988- */
989- Severity StringNode::StrToVal ( const char * s, ErrorDescriptor * err ) {
990- return STEPread ( s, err );
991- }
992-
993- /* *
994- * this function assumes you will check for garbage following input
995- */
996- Severity StringNode::StrToVal ( istream & in, ErrorDescriptor * err ) {
997- return value.STEPread ( in, err );
998- }
999-
1000- /* *
1001- * non-whitespace chars following s are considered garbage and is an error.
1002- * a valid value will still be assigned if it exists before the garbage.
1003- */
1004- Severity StringNode::STEPread ( const char * s, ErrorDescriptor * err ) {
1005- istringstream in ( ( char * )s );
1006-
1007- value.STEPread ( in, err );
1008- CheckRemainingInput ( in, err, " string" , " ,)" );
1009- return err->severity ();
1010- }
1011-
1012- /* *
1013- * this function assumes you will check for garbage following input
1014- */
1015- Severity StringNode::STEPread ( istream & in, ErrorDescriptor * err ) {
1016- return value.STEPread ( in, err );
1017- }
1018-
1019- const char * StringNode::asStr ( std::string & s ) {
1020- value.asStr ( s );
1021- return const_cast <char *>( s.c_str () );
1022- }
1023-
1024- const char * StringNode::STEPwrite ( std::string & s, const char * ) {
1025- value.STEPwrite ( s );
1026- return const_cast <char *>( s.c_str () );
1027- }
1028-
1029- void StringNode::STEPwrite ( ostream & out ) {
1030- value.STEPwrite ( out );
1031- }
1032-
0 commit comments