Fix errors on p21read's output for the CAX-IF file as1-oc-214.stp
This commit is contained in:
@@ -885,9 +885,7 @@ STEPattribute::is_null() const {
|
||||
return ( *( ptr.c ) == S_ENTITY_NULL );
|
||||
|
||||
case STRING_TYPE:
|
||||
// rok
|
||||
//ptr.S->clear();
|
||||
return ptr.S->empty();
|
||||
return ( *( ptr.S ) == S_STRING_NULL);
|
||||
|
||||
case BINARY_TYPE:
|
||||
ptr.b->clear();
|
||||
@@ -927,15 +925,12 @@ STEPattribute::is_null() const {
|
||||
** Returns: int -- if 0 => not equal
|
||||
** Description: evaluates the equality of two attributes
|
||||
** Side Effects: none
|
||||
** Status: stub -- needs alot of work
|
||||
******************************************************************/
|
||||
|
||||
// equality for STEPattribute
|
||||
int operator == ( STEPattribute & a1, STEPattribute & a2 ) {
|
||||
cerr << "Internal error: " << __FILE__ << ": " << __LINE__
|
||||
<< "\n" << _POC_ "\n";
|
||||
if( a1.aDesc->NonRefType() == a2.aDesc->NonRefType() ) {
|
||||
;
|
||||
if ( a1.aDesc == a2.aDesc ) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -56,32 +56,20 @@ int STEPattributeList::list_length() {
|
||||
}
|
||||
|
||||
void STEPattributeList::push( STEPattribute * a ) {
|
||||
AttrListNode * saln = new AttrListNode( a );
|
||||
AppendNode( saln );
|
||||
bool push = true;
|
||||
|
||||
// if the attribute already exists in the list, we don't push it
|
||||
// TODO: does it break anything?
|
||||
AttrListNode * a2 = ( AttrListNode * )head;
|
||||
while( a2 && push ) {
|
||||
if (*a == *(a2 -> attr)) {
|
||||
push = false;
|
||||
}
|
||||
a2 = ( AttrListNode * )( a2->next );
|
||||
}
|
||||
|
||||
if (push) {
|
||||
AttrListNode * saln = new AttrListNode( a );
|
||||
AppendNode( saln );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
STEPattributeListNode NilSTEPattributeListNode;
|
||||
|
||||
class init_NilSTEPattributeListNode
|
||||
{
|
||||
public:
|
||||
inline init_NilSTEPattributeListNode()
|
||||
{
|
||||
NilSTEPattributeListNode.tl = &NilSTEPattributeListNode;
|
||||
NilSTEPattributeListNode.ref = -1;
|
||||
}
|
||||
};
|
||||
|
||||
static init_NilSTEPattributeListNode NilSTEPattributeListNode_initializer;
|
||||
|
||||
*/
|
||||
|
||||
@@ -24,11 +24,8 @@ SCLP23( String )::operator= ( const char * s ) {
|
||||
void
|
||||
SCLP23( String )::STEPwrite( ostream & out ) const {
|
||||
const char * str = 0;
|
||||
// strings that exist but do not contain any chars should be written as '',
|
||||
// not $ --Josh L, 4/28/95
|
||||
// if (is_null ())
|
||||
if( empty() ) {
|
||||
out << "$";
|
||||
out << "\'\'";
|
||||
} else {
|
||||
out << "\'";
|
||||
str = c_str();
|
||||
@@ -46,11 +43,8 @@ SCLP23( String )::STEPwrite( ostream & out ) const {
|
||||
void
|
||||
SCLP23( String )::STEPwrite( std::string & s ) const {
|
||||
const char * str = 0;
|
||||
// null strings should be represented by '', not $ --Josh L, 4/28/95
|
||||
// if (is_null ())
|
||||
if( empty() ) {
|
||||
// s.set_null(); // this would free up space? nope
|
||||
s = "$";
|
||||
s = "\'\'";
|
||||
} else {
|
||||
s = "\'";
|
||||
str = c_str();
|
||||
|
||||
Reference in New Issue
Block a user