Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Code cleanup
  • Loading branch information
tpaviot committed Feb 22, 2012
commit 8595a291cb40431899b8cbd8902ec1cec3a7892c
194 changes: 0 additions & 194 deletions src/fedex_python/src/classes_misc_python.c
Original file line number Diff line number Diff line change
Expand Up @@ -226,147 +226,6 @@ isAggregateType( const Type t ) {
}


/******************************************************************
** Procedure: TYPEget_ctype
** Parameters: const Type t -- type for attribute
** Returns: a string which is the type of the data member in the c++ class
** Description: supplies the type of a data member for the c++ class
** Side Effects:
** Status: complete 1/15/90
** Changes: Modified by CD to return the appropriate types as outlined in
** "SDAI C++ Binding for PDES, Inc. Prototyping" by Stephen Clark
** Change Date: 5/22/91 CD
** Change Date: 28-Sep-1993 made entities use their real type instead of base
** class STEPentityH
******************************************************************/

const char *
TYPEget_ctype( const Type t ) {
Class_Of_Type class;
Type bt;
static char retval [BUFSIZ];


/* aggregates are based on their base type
case TYPE_ARRAY:
case TYPE_BAG:
case TYPE_LIST:
case TYPE_SET:
*/
if( isAggregateType( t ) ) {
bt = TYPEget_body( t )->base;

if( isAggregateType( bt ) ) {
return( "GenericAggregate" );
}

class = TYPEget_type( bt );

/* case TYPE_INTEGER: */
if( class == Class_Integer_Type ) {
return ( "IntAggregate" );
}

/* case TYPE_REAL:
case TYPE_NUMBER: */
if( ( class == Class_Number_Type ) || ( class == Class_Real_Type ) ) {
return ( "RealAggregate" );
}

/* case TYPE_ENTITY: */
if( class == Class_Entity_Type ) {
return( "EntityAggregate" );
}

/* case TYPE_ENUM: */
/* case TYPE_SELECT: */
if( ( class == Class_Enumeration_Type )
|| ( class == Class_Select_Type ) ) {
/*
strcpy (retval, ClassName (TYPEget_name (bt)));
*/
strcpy( retval, TYPEget_ctype( bt ) );
strcat( retval, "s" );
return ( retval );
}

/* case TYPE_LOGICAL: */
if( class == Class_Logical_Type ) {
return ( "LOGICALS" );
}

/* case TYPE_BOOLEAN: */
if( class == Class_Boolean_Type ) {
return ( "BOOLEANS" );
}

/* case TYPE_STRING: */
if( class == Class_String_Type ) {
return( "StringAggregate" );
}

/* case TYPE_BINARY: */
if( class == Class_Binary_Type ) {
return( "BinaryAggregate" );
}
}

/* the rest is for things that are not aggregates */

class = TYPEget_type( t );

/* case TYPE_LOGICAL: */
if( class == Class_Logical_Type ) {
return ( "SCLP23(LOGICAL)" );
}

/* case TYPE_BOOLEAN: */
if( class == Class_Boolean_Type ) {
return ( "SCLP23(BOOLEAN)" );
}

/* case TYPE_INTEGER: */
if( class == Class_Integer_Type ) {
return ( "SCLP23(Integer)" );
}

/* case TYPE_REAL:
case TYPE_NUMBER: */
if( ( class == Class_Number_Type ) || ( class == Class_Real_Type ) ) {
return ( "SCLP23(Real)" ) ;
}

/* case TYPE_STRING: */
if( class == Class_String_Type ) {
return ( "SCLP23(String)" );
}

/* case TYPE_BINARY: */
if( class == Class_Binary_Type ) {
return ( "SCLP23(Binary)" );
}

/* case TYPE_ENTITY: */
if( class == Class_Entity_Type ) {
strncpy( retval, TypeName( t ), BUFSIZ - 2 );
strcat( retval, "_ptr" );
return retval;
/* return ("STEPentityH"); */
}
/* case TYPE_ENUM: */
/* case TYPE_SELECT: */
if( class == Class_Enumeration_Type ) {
strncpy( retval, TypeName( t ), BUFSIZ - 2 );
strcat( retval, "_var" );
return retval;
}
if( class == Class_Select_Type ) {
return ( TypeName( t ) );
}

/* default returns undefined */
return ( "SCLundefined" );
}

/******************************************************************
** Procedure: TypeName
Expand All @@ -376,59 +235,6 @@ TYPEget_ctype( const Type t ) {
******************************************************************/
const char *
TypeName( Type t ) {
static char name [BUFSIZ];
strcpy( name, TYPE_PREFIX );
if( TYPEget_name( t ) ) {
strncat( name, FirstToUpper( TYPEget_name( t ) ), BUFSIZ - strlen( TYPE_PREFIX ) - 1 );
} else {
return TYPEget_ctype( t );
}
return name;
}

/******************************************************************
** Procedure: AccessType
** Parameters: const Type t -- type for attribute
** Returns: a string which is the type used by the access functions to
the data member in the c++ class
** Description: supplies the type for access functions in a c++ class
** Side Effects:
** Status: 3-Nov-1993 -kcm
******************************************************************/

const char *
AccessType( Type t ) {
Class_Of_Type class;
static char nm [BUFSIZ];
strncpy( nm, TypeName( t ), BUFSIZ - 4 );
if( TYPEis_entity( t ) ) {
/* if(corba_binding)
{
if (TYPEget_name (t))
strncpy (nm, FirstToUpper (TYPEget_name (t)), BUFSIZ-1);
}
*/
strcat( nm, "_ptr" );
return nm;
} else if( TYPEis_select( t ) || TYPEis_aggregate( t ) ) {
strcat( nm, "_ptr" );
return nm;
}
class = TYPEget_type( t );
if( class == Class_Enumeration_Type ) {
strncpy( nm, TypeName( t ), BUFSIZ - 2 );
strcat( nm, "_var" );
return nm;
}
if( class == Class_Logical_Type ) {
strncpy( nm, "Logical", BUFSIZ - 2 );
}

/* case TYPE_BOOLEAN: */
if( class == Class_Boolean_Type ) {
strncpy( nm, "Boolean", BUFSIZ - 2 );
}
return nm;
}

/******************************************************************
Expand Down
Loading