Skip to content

Commit b5d795c

Browse files
starseekermpictor
authored andcommitted
brlcad svn revs 45621,45623-45627 - more work on SCLstring removal
1 parent 6ce741b commit b5d795c

20 files changed

+71
-709
lines changed

src/cldai/sdaiModel_contents.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,12 +110,12 @@ SCLP23(Model_contents)::RemoveInstance(SCLP23(DAObject_SDAI_ptr)& appInst)
110110
#if 0 // for now
111111

112112
Any_var
113-
SCLP23(Model_contents)::GetEntity_extent(const String_var& entityName)
113+
SCLP23(Model_contents)::GetEntity_extent(const std::string& entityName)
114114
{
115115
}
116116

117117
const Any_var
118-
SCLP23(Model_contents)::GetEntity_extent(const String_var& entityName) const
118+
SCLP23(Model_contents)::GetEntity_extent(const std::string& entityName) const
119119
{
120120
}
121121

src/cldai/sdaiModel_contents.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,8 @@ class SCLP23_NAME(Model_contents) : public SCLP23_NAME(Session_instance) {
182182
*/
183183
#ifdef SDAI_CPP_LATE_BINDING
184184
#if 0 // for now
185-
Any_var GetEntity_extent(const String_var& entityName);
186-
const Any_var GetEntity_extent(const String_var& entityName) const;
185+
Any_var GetEntity_extent(const std::string& entityName);
186+
const Any_var GetEntity_extent(const std::string& entityName) const;
187187
Any_var GetEntity_extent(const Entity_ptr& ep);
188188
const Any_var GetEntity_extent(const Entity_ptr& ep) const;
189189
#endif

src/clstepcore/ExpDict.cc

Lines changed: 20 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -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

19081871
const TypeDescriptor *
19091872
TypeDescriptor::IsA (const TypeDescriptor * other) const {

src/clstepcore/STEPaggregate.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@
1414

1515
/* $Id: STEPaggregate.h,v 3.0.1.6 1997/11/05 21:59:27 sauderd DP3.1 $ */
1616

17-
#ifdef __OSTORE__
18-
#include <ostore/ostore.hh> // Required to access ObjectStore Class Library
19-
#endif
20-
2117
#ifdef __O3DB__
2218
#include <OpenOODB.h>
2319
#endif
@@ -35,7 +31,7 @@ class TypeDescriptor;
3531
#include <baseType.h>
3632
#include <sdai.h>
3733
#include <STEPundefined.h>
38-
#include <scl_string.h>
34+
#include <string.h>
3935

4036
//class SCLP23(Application_instance);
4137
//#define S_ENTITY_NULL &NilSTEPentity

src/clstepcore/STEPcomplex.cc

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -730,9 +730,6 @@ STEPcomplex::Replicate()
730730
{
731731
int nameCount = 64;
732732

733-
// Don't use this syntax it makes the sun compiler think it is a cast. DAS
734-
// SCLstring **nameList = new (SCLstring *)[nameCount];
735-
736733
std::string **nameList = new std::string *[nameCount];
737734
STEPcomplex *scomp = this->head;
738735
int i = 0;

src/clstepcore/STEPundefined.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#endif
2020

2121
#include <errordesc.h>
22-
#include <scl_string.h>
22+
#include <string.h>
2323
#include <read_func.h>
2424

2525
class SCLundefined {

src/clstepcore/Select.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
#include <scl_string.h>
2+
#include <string.h>
33

44
class Select {
55
public:

src/clstepcore/scl_osschema.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
/*
77
*/
8-
#include <scl_string.h>
8+
#include <string.h>
99
#include <sdai.h>
1010

1111
#include <errordesc.h>

src/clstepcore/sdai.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@ void Application_instance_access_hook_in(void *object,
5353

5454
#include <baseType.h>
5555
#include <Str.h>
56-
#include <scl_string.h>
56+
#include <string.h>
5757
#include <errordesc.h>
5858

59-
typedef String_var Express_id;
59+
typedef std::string Express_id;
6060

6161
#ifdef __O3DB__
6262
/* OpenOODB.h must be the first include file. */

src/clstepcore/sdaiApplication_instance.cc

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -124,12 +124,7 @@ void SCLP23(Application_instance)::AddP21Comment(const char *s, int replace)
124124
{
125125
if(!p21Comment)
126126
{
127-
#ifdef __OSTORE__
128-
p21Comment = new (os_segment::of(this), SCLstring::get_os_typespec())
129-
SCLstring;
130-
#else
131127
p21Comment = new std::string;
132-
#endif
133128
}
134129
else
135130
{
@@ -151,13 +146,7 @@ SCLP23(Application_instance)::AddP21Comment(std::string &s, int replace)
151146
{
152147
if(!p21Comment)
153148
{
154-
#ifdef __OSTORE__
155-
p21Comment = new (os_segment::of(this),
156-
SCLstring::get_os_typespec())
157-
SCLstring;
158-
#else
159149
p21Comment = new std::string;
160-
#endif
161150
}
162151
else
163152
p21Comment->clear();

0 commit comments

Comments
 (0)