@@ -481,26 +481,26 @@ Schema::GenerateUseRefExpress(ostream& out) const
481481 if (count > 0 )
482482 {
483483 out << endl << " USE FROM "
484- << StrToLower (is->foreign_schema_id_ ().chars (),tmp) << endl;
484+ << StrToLower (is->foreign_schema_id_ ().c_str (),tmp) << endl;
485485 out << " (" ;
486486
487487 first_time = 1 ;
488488 for (k = 0 ; k < count; k++) // print out each USE item
489489 {
490490 if (first_time) first_time = 0 ;
491491 else out << " ," << endl << " \t " ;
492- if ( ( *(is->explicit_items_ ()))[k]->original_id_ ().is_null ( ) )
492+ if ( !(( *(is->explicit_items_ ()))[k]->original_id_ ().size () ) )
493493 { // not renamed
494- out << (*(is->explicit_items_ ()))[k]->new_id_ ().chars ();
494+ out << (*(is->explicit_items_ ()))[k]->new_id_ ().c_str ();
495495 } else { // renamed
496- out << (*(is->explicit_items_ ()))[k]->original_id_ ().chars ();
497- out << " AS " << (*(is->explicit_items_ ()))[k]->new_id_ ().chars ();
496+ out << (*(is->explicit_items_ ()))[k]->original_id_ ().c_str ();
497+ out << " AS " << (*(is->explicit_items_ ()))[k]->new_id_ ().c_str ();
498498 }
499499 }
500500 out << " );" << endl;
501501 } else if (is->all_objects_ ()) {
502502 out << endl << " USE FROM "
503- << StrToLower (is->foreign_schema_id_ ().chars (),tmp) << " ;"
503+ << StrToLower (is->foreign_schema_id_ ().c_str (),tmp) << " ;"
504504 << endl;
505505 }
506506 }
@@ -524,27 +524,27 @@ Schema::GenerateUseRefExpress(ostream& out) const
524524
525525// out << " REFERENCE FROM " << (*(is->explicit_items_()))[0]->foreign_schema_().chars() << endl;
526526 out << endl << " REFERENCE FROM "
527- << StrToLower (is->foreign_schema_id_ ().chars (),tmp) << endl;
527+ << StrToLower (is->foreign_schema_id_ ().c_str (),tmp) << endl;
528528 out << " (" ;
529529
530530 first_time = 1 ;
531531 for (k = 0 ; k < count; k++) // print out each REFERENCE item
532532 {
533533 if (first_time) first_time = 0 ;
534534 else out << " ," << endl << " \t " ;
535- if ( (*(is->explicit_items_ ()))[k]->original_id_ ().is_null ( ) )
535+ if ( (!( *(is->explicit_items_ ()))[k]->original_id_ ().size () ) )
536536 { // not renamed
537- out << (*(is->explicit_items_ ()))[k]->new_id_ ().chars ();
537+ out << (*(is->explicit_items_ ()))[k]->new_id_ ().c_str ();
538538 } else { // renamed
539- out << (*(is->explicit_items_ ()))[k]->original_id_ ().chars ();
539+ out << (*(is->explicit_items_ ()))[k]->original_id_ ().c_str ();
540540 out << " AS "
541- << (*(is->explicit_items_ ()))[k]->new_id_ ().chars ();
541+ << (*(is->explicit_items_ ()))[k]->new_id_ ().c_str ();
542542 }
543543 }
544544 out << " );" << endl;
545545 } else if (is->all_objects_ ()) {
546546 out << endl << " REFERENCE FROM "
547- << StrToLower (is->foreign_schema_id_ ().chars (),tmp) << " ;"
547+ << StrToLower (is->foreign_schema_id_ ().c_str (),tmp) << " ;"
548548 << endl;
549549 }
550550 }
@@ -903,18 +903,6 @@ Inverse_attribute::AttrExprDefStr(std::string & s) const
903903 s.append (_inverted_attr_id);
904904 return const_cast <char *>(s.c_str ());
905905}
906- /*
907- const char *
908- Inverse_attribute::GenerateExpress (SCLstring &buf) const
909- {
910- char tmp[BUFSIZ];
911- SCLstring sstr;
912- buf = AttrExprDefStr(sstr);
913- buf.Append(";\n");
914-
915- return buf.chars();
916- }
917- */
918906
919907// /////////////////////////////////////////////////////////////////////////////
920908// EnumDescriptor functions
@@ -980,7 +968,7 @@ EnumTypeDescriptor::GenerateExpress (std::string &buf) const
980968 count = _where_rules->Count ();
981969 for (i = 0 ; i < count; i++) // print out each UNIQUE rule
982970 {
983- if ( !(*(_where_rules))[i]->_label .is_undefined () )
971+ if ( !(*(_where_rules))[i]->_label .size () )
984972 all_comments = 0 ;
985973 }
986974
@@ -996,7 +984,7 @@ EnumTypeDescriptor::GenerateExpress (std::string &buf) const
996984 buf.append (" " );
997985 buf.append ( (*(_where_rules))[i]->comment_ () );
998986 }
999- if ( ! (*(_where_rules))[i]->_label .is_null () )
987+ if ( (*(_where_rules))[i]->_label .size () )
1000988 {
1001989 buf.append (" " );
1002990 buf.append ( (*(_where_rules))[i]->label_ () );
@@ -1147,7 +1135,6 @@ EntityDescriptor::GenerateExpress (std::string &buf) const
11471135// ///////
11481136
11491137 InverseAItr iai (_inverseAttr);
1150- // const char * AttrTypeName( SCLstring &buf, const char *schnm =NULL ) const;
11511138
11521139 iai.ResetItr ();
11531140 const Inverse_attribute *ia = iai.NextInverse_attribute ();
@@ -1167,7 +1154,7 @@ EntityDescriptor::GenerateExpress (std::string &buf) const
11671154 count = _uniqueness_rules->Count ();
11681155 for (i = 0 ; i < count; i++) // print out each UNIQUE rule
11691156 {
1170- if ( !(*(_uniqueness_rules))[i]->_label .is_undefined () )
1157+ if ( !(*(_uniqueness_rules))[i]->_label .size () )
11711158 all_comments = 0 ;
11721159 }
11731160
@@ -1183,7 +1170,7 @@ EntityDescriptor::GenerateExpress (std::string &buf) const
11831170 buf.append ( (*(_uniqueness_rules))[i]->comment_ () );
11841171 buf.append (" \n " );
11851172 }
1186- if ( ! (*(_uniqueness_rules))[i]->_label .is_null () )
1173+ if ( (*(_uniqueness_rules))[i]->_label .size () )
11871174 {
11881175 buf.append (" " );
11891176 buf.append ( (*(_uniqueness_rules))[i]->label_ () );
@@ -1200,7 +1187,7 @@ EntityDescriptor::GenerateExpress (std::string &buf) const
12001187 count = _where_rules->Count ();
12011188 for (i = 0 ; i < count; i++) // print out each UNIQUE rule
12021189 {
1203- if ( !(*(_where_rules))[i]->_label .is_undefined () )
1190+ if ( !(*(_where_rules))[i]->_label .size () )
12041191 all_comments = 0 ;
12051192 }
12061193
@@ -1216,7 +1203,7 @@ EntityDescriptor::GenerateExpress (std::string &buf) const
12161203 buf.append ( (*(_where_rules))[i]->comment_ () );
12171204 buf.append (" \n " );
12181205 }
1219- if ( ! (*(_where_rules))[i]->_label .is_null () )
1206+ if ( (*(_where_rules))[i]->_label .size () )
12201207 {
12211208 buf.append (" " );
12221209 buf.append ( (*(_where_rules))[i]->label_ () );
@@ -1706,7 +1693,7 @@ TypeDescriptor::GenerateExpress (std::string &buf) const
17061693 count = _where_rules->Count ();
17071694 for (i = 0 ; i < count; i++) // print out each UNIQUE rule
17081695 {
1709- if ( !(*(_where_rules))[i]->_label .is_undefined () )
1696+ if ( !(*(_where_rules))[i]->_label .size () )
17101697 all_comments = 0 ;
17111698 }
17121699
@@ -1722,7 +1709,7 @@ TypeDescriptor::GenerateExpress (std::string &buf) const
17221709 buf.append (" " );
17231710 buf.append ( (*(_where_rules))[i]->comment_ () );
17241711 }
1725- if ( ! (*(_where_rules))[i]->_label .is_null () )
1712+ if ( (*(_where_rules))[i]->_label .size () )
17261713 {
17271714 buf.append (" " );
17281715 buf.append ( (*(_where_rules))[i]->label_ () );
@@ -1880,30 +1867,6 @@ TypeDescriptor::TypeString(std::string & s) const
18801867 return const_cast <char *>(s.c_str ());
18811868
18821869}
1883- /* this works
1884- if( ( (ReferentType() != 0) || (ReferentEntity() != 0) ) && Name())
1885- {
1886- strcat(tStr, "TYPE ");
1887- strcat(tStr, Name());
1888- strcat(tStr, " = ");
1889- }
1890- if(Description())
1891- strcat(tStr, Description());
1892- if(ReferentType())
1893- {
1894- strcat(tStr, " -- ");
1895- SCLstring tmp;
1896- strcat(tStr, ReferentType()->TypeString(tmp));
1897- }
1898- else if(ReferentEntity())
1899- {
1900- strcat(tStr, " -- ");
1901- strcat(tStr, "Entity: ");
1902- strcat(tStr, ReferentEntity()->Name());
1903- }
1904- return tStr;
1905- }
1906- */
19071870
19081871const TypeDescriptor *
19091872TypeDescriptor::IsA (const TypeDescriptor * other) const {
0 commit comments