run astyle on all files. changed args to catch more files (src/*.h)
This commit is contained in:
@@ -163,7 +163,7 @@ static_inline
|
||||
void
|
||||
ERRORbuffer_messages( bool flag ) {
|
||||
#ifndef __MSVC__
|
||||
extern void ERROR_start_message_buffer( void ),
|
||||
extern void ERROR_start_message_buffer( void ),
|
||||
ERROR_flush_message_buffer( void );
|
||||
#endif
|
||||
__ERROR_buffer_errors = flag;
|
||||
|
||||
@@ -278,7 +278,7 @@ extern SCL_EXPRESS_EXPORT Express EXPRESScreate PROTO( ( void ) );
|
||||
extern SCL_EXPRESS_EXPORT void EXPRESSparse PROTO( ( Express, FILE *, char * ) );
|
||||
extern SCL_EXPRESS_EXPORT void EXPRESSinitialize PROTO( ( void ) );
|
||||
extern SCL_EXPRESS_EXPORT void EXPRESSresolve PROTO( ( Express ) );
|
||||
extern SCL_EXPRESS_EXPORT char *EXPRESSversion PROTO( ( void ) );
|
||||
extern SCL_EXPRESS_EXPORT char * EXPRESSversion PROTO( ( void ) );
|
||||
extern SCL_EXPRESS_EXPORT int EXPRESS_fail PROTO( ( Express ) );
|
||||
extern SCL_EXPRESS_EXPORT int EXPRESS_succeed PROTO( ( Express ) );
|
||||
extern void EXPRESSinit_init PROTO( ( void ) );
|
||||
|
||||
@@ -164,9 +164,9 @@ SCANnextchar( char * buffer ) {
|
||||
#endif
|
||||
buffer[0] = *( SCANcurrent++ );
|
||||
#ifdef __MSVC__
|
||||
if( !__isascii( buffer[0] ) ) {
|
||||
if( !__isascii( buffer[0] ) ) {
|
||||
#else
|
||||
if( !isascii( buffer[0] ) ) {
|
||||
if( !isascii( buffer[0] ) ) {
|
||||
#endif
|
||||
ERRORreport_with_line( ERROR_nonascii_char, yylineno,
|
||||
0xff & buffer[0] );
|
||||
|
||||
@@ -118,9 +118,9 @@ GLOBAL SCL_EXPRESS_EXPORT Linked_List LINK__l; /* for LISTcreate_with macro
|
||||
(elt) = (type)((__p)->data);
|
||||
|
||||
#define LISTdo_links(list, link) \
|
||||
{Linked_List __i = (list); \
|
||||
Link link; \
|
||||
if (__i != LIST_NULL) { \
|
||||
{Linked_List __i = (list); \
|
||||
Link link; \
|
||||
if (__i != LIST_NULL) { \
|
||||
for ((link) = __i->mark; ((link) = (link)->next) != __i->mark; ) {
|
||||
#define LISTod }}}
|
||||
|
||||
|
||||
@@ -247,7 +247,7 @@ extern SCL_EXPRESS_EXPORT Statement PCALLcreate PROTO( ( Linked_List ) );
|
||||
extern SCL_EXPRESS_EXPORT Statement RETcreate PROTO( ( Expression ) );
|
||||
extern SCL_EXPRESS_EXPORT void STMTinitialize PROTO( ( void ) );
|
||||
extern SCL_EXPRESS_EXPORT struct Scope_ * INCR_CTLcreate PROTO( ( Symbol *, Expression start,
|
||||
Expression end, Expression increment ) );
|
||||
Expression end, Expression increment ) );
|
||||
|
||||
/********************/
|
||||
/* inline functions */
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
* Warrenty - None: don't blame me if it breaks something
|
||||
*
|
||||
* In ISO C99, stdbool.h is a standard header and _Bool is a keyword, but
|
||||
* some compilers don't offer these yet. This header file is an
|
||||
* some compilers don't offer these yet. This header file is an
|
||||
* implementation of the standard ISO C99 stdbool.h header file. It checks
|
||||
* for various compiler versions and defines things that are missing in
|
||||
* those versions.
|
||||
*
|
||||
* The GNU and Watcom compilers include a stdbool.h, but the Borland
|
||||
* C/C++ 5.5.1 compiler and the Microsoft compilers do not.
|
||||
*
|
||||
*
|
||||
* See http://predef.sourceforge.net/precomp.html for compile macros.
|
||||
*/
|
||||
|
||||
@@ -31,7 +31,7 @@ typedef int _Bool;
|
||||
|
||||
/**
|
||||
* Microsoft C/C++ version 14.00.50727.762, which comes with Visual C++ 2005,
|
||||
* and version 15.00.30729.01, which comes with Visual C++ 2008, do not
|
||||
* and version 15.00.30729.01, which comes with Visual C++ 2008, do not
|
||||
* define _Bool.
|
||||
*/
|
||||
#if defined(_MSC_VER)
|
||||
@@ -44,7 +44,7 @@ typedef int _Bool;
|
||||
#ifndef __bool_true_false_are_defined
|
||||
#define bool _Bool
|
||||
#define Boolean _Bool
|
||||
#define false 0
|
||||
#define false 0
|
||||
#define true 1
|
||||
#define __bool_true_false_are_defined 1
|
||||
#endif
|
||||
|
||||
+3
-3
@@ -21,10 +21,10 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern int optind, opterr;
|
||||
extern TCHAR *optarg;
|
||||
extern int optind, opterr;
|
||||
extern TCHAR * optarg;
|
||||
|
||||
int getopt(int argc, TCHAR *argv[], TCHAR *optstring);
|
||||
int getopt( int argc, TCHAR * argv[], TCHAR * optstring );
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
# astyle --options=misc/astyle.cfg path/to/file
|
||||
|
||||
#run astyle on all files: from the scl root dir, use
|
||||
# astyle --options=misc/astyle.cfg --recursive "src/*.c" "src/*.cc" "include/*.h"
|
||||
# astyle --options=misc/astyle.cfg --recursive "src/*.c" "src/*.cc" "include/*.h" "src/*.h"
|
||||
# in the above line, the double quotes *are* necessary
|
||||
|
||||
# DO NOT run astyle on flex/bison input such as expparse.y and expscan.l!
|
||||
|
||||
@@ -14,441 +14,497 @@
|
||||
#endif
|
||||
|
||||
#ifdef PART26
|
||||
#include <corbaIncludes.h>
|
||||
// Create a corbaSchema.h file in this directory with a #include in
|
||||
#include <corbaIncludes.h>
|
||||
// Create a corbaSchema.h file in this directory with a #include in
|
||||
// it for your IDL generated schema-specific .hh file.
|
||||
#include <corbaSchema.h>
|
||||
#endif
|
||||
#include <corbaSchema.h>
|
||||
#endif
|
||||
|
||||
/* ************** TYPES */
|
||||
/* ************** TYPES */
|
||||
|
||||
////////// ENUMERATION TYPE color
|
||||
enum Color {
|
||||
Color__red,
|
||||
Color__green,
|
||||
Color__blue,
|
||||
Color__yellow,
|
||||
Color__orange,
|
||||
Color__white,
|
||||
Color__black,
|
||||
Color__brown,
|
||||
Color_unset
|
||||
Color__red,
|
||||
Color__green,
|
||||
Color__blue,
|
||||
Color__yellow,
|
||||
Color__orange,
|
||||
Color__white,
|
||||
Color__black,
|
||||
Color__brown,
|
||||
Color_unset
|
||||
};
|
||||
|
||||
class SdaiColor_var : public SCLP23(Enum) {
|
||||
class SdaiColor_var : public SCLP23( Enum ) {
|
||||
|
||||
protected:
|
||||
EnumTypeDescriptor *type;
|
||||
protected:
|
||||
EnumTypeDescriptor * type;
|
||||
|
||||
public:
|
||||
SdaiColor_var (const char * n =0, EnumTypeDescriptor *et =example_schemat_color);
|
||||
SdaiColor_var (Color e, EnumTypeDescriptor *et =example_schemat_color)
|
||||
: type(et) { set_value (e); }
|
||||
~SdaiColor_var () { }
|
||||
SdaiColor_var& operator= (const SdaiColor_var& e)
|
||||
{ set_value (e); return *this; }
|
||||
operator Color () const;
|
||||
public:
|
||||
SdaiColor_var( const char * n = 0, EnumTypeDescriptor * et = example_schemat_color );
|
||||
SdaiColor_var( Color e, EnumTypeDescriptor * et = example_schemat_color )
|
||||
: type( et ) {
|
||||
set_value( e );
|
||||
}
|
||||
~SdaiColor_var() { }
|
||||
SdaiColor_var & operator= ( const SdaiColor_var & e ) {
|
||||
set_value( e );
|
||||
return *this;
|
||||
}
|
||||
operator Color() const;
|
||||
|
||||
inline virtual const char * Name () const
|
||||
{ return type->Name(); }
|
||||
inline virtual int no_elements () const { return 8; }
|
||||
virtual const char * element_at (int n) const;
|
||||
inline virtual const char * Name() const {
|
||||
return type->Name();
|
||||
}
|
||||
inline virtual int no_elements() const {
|
||||
return 8;
|
||||
}
|
||||
virtual const char * element_at( int n ) const;
|
||||
|
||||
};
|
||||
|
||||
typedef SdaiColor_var * SdaiColor_var_ptr;
|
||||
|
||||
SCLP23(Enum) * create_SdaiColor_var ();
|
||||
SCLP23( Enum ) * create_SdaiColor_var();
|
||||
|
||||
class SdaiColor_vars : public EnumAggregate {
|
||||
|
||||
protected:
|
||||
EnumTypeDescriptor *enum_type;
|
||||
protected:
|
||||
EnumTypeDescriptor * enum_type;
|
||||
|
||||
public:
|
||||
SdaiColor_vars( EnumTypeDescriptor * =example_schemat_color);
|
||||
virtual ~SdaiColor_vars();
|
||||
virtual SingleLinkNode * NewNode()
|
||||
{ return new EnumNode (new SdaiColor_var( "", enum_type )); }
|
||||
public:
|
||||
SdaiColor_vars( EnumTypeDescriptor * = example_schemat_color );
|
||||
virtual ~SdaiColor_vars();
|
||||
virtual SingleLinkNode * NewNode() {
|
||||
return new EnumNode( new SdaiColor_var( "", enum_type ) );
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
typedef SdaiColor_vars * SdaiColor_vars_ptr;
|
||||
|
||||
STEPaggregate * create_SdaiColor_vars ();
|
||||
STEPaggregate * create_SdaiColor_vars();
|
||||
|
||||
////////// END ENUMERATION color
|
||||
|
||||
|
||||
// ***** Build the SELECT Types
|
||||
// ***** Build the SELECT Types
|
||||
|
||||
/* ************** ENTITIES */
|
||||
/* ************** ENTITIES */
|
||||
|
||||
// ***** Print Entity Classes
|
||||
// ***** Print Entity Classes
|
||||
|
||||
///////// ENTITY poly_line
|
||||
///////// ENTITY poly_line
|
||||
|
||||
extern AttrDescriptor *a_0points;
|
||||
extern AttrDescriptor * a_0points;
|
||||
|
||||
class SdaiPoly_line : public SCLP23(Application_instance) {
|
||||
class SdaiPoly_line : public SCLP23( Application_instance ) {
|
||||
|
||||
protected:
|
||||
EntityAggregate _points ; // of line
|
||||
protected:
|
||||
EntityAggregate _points ; // of line
|
||||
|
||||
public:
|
||||
public:
|
||||
|
||||
SdaiPoly_line ( );
|
||||
SdaiPoly_line (SCLP23(Application_instance) *se, int *addAttrs = 0);
|
||||
SdaiPoly_line (SdaiPoly_line& e );
|
||||
~SdaiPoly_line ();
|
||||
SdaiPoly_line( );
|
||||
SdaiPoly_line( SCLP23( Application_instance ) *se, int * addAttrs = 0 );
|
||||
SdaiPoly_line( SdaiPoly_line & e );
|
||||
~SdaiPoly_line();
|
||||
|
||||
#ifdef __O3DB__
|
||||
void oodb_reInit();
|
||||
void oodb_reInit();
|
||||
#endif
|
||||
|
||||
int opcode () { return 0 ; }
|
||||
const EntityAggregate_ptr points_() const;
|
||||
void points_ (const EntityAggregate_ptr x);
|
||||
int opcode() {
|
||||
return 0 ;
|
||||
}
|
||||
const EntityAggregate_ptr points_() const;
|
||||
void points_( const EntityAggregate_ptr x );
|
||||
|
||||
|
||||
};
|
||||
|
||||
#ifdef __O3DB__
|
||||
inline SCLP23(Application_instance_ptr)
|
||||
create_SdaiPoly_line () { return (SCLP23(Application_instance_ptr)) new SdaiPoly_line ; }
|
||||
inline SCLP23( Application_instance_ptr )
|
||||
create_SdaiPoly_line() {
|
||||
return ( SCLP23( Application_instance_ptr ) ) new SdaiPoly_line ;
|
||||
}
|
||||
#else
|
||||
inline SdaiPoly_line *
|
||||
create_SdaiPoly_line () { return new SdaiPoly_line ; }
|
||||
create_SdaiPoly_line() {
|
||||
return new SdaiPoly_line ;
|
||||
}
|
||||
#endif
|
||||
|
||||
///////// END_ENTITY poly_line
|
||||
///////// END_ENTITY poly_line
|
||||
|
||||
|
||||
///////// ENTITY shape
|
||||
///////// ENTITY shape
|
||||
|
||||
extern AttrDescriptor *a_1item_name;
|
||||
extern AttrDescriptor *a_2item_color;
|
||||
extern AttrDescriptor *a_3number_of_sides;
|
||||
extern AttrDescriptor * a_1item_name;
|
||||
extern AttrDescriptor * a_2item_color;
|
||||
extern AttrDescriptor * a_3number_of_sides;
|
||||
|
||||
class SdaiShape : public SCLP23(Application_instance) {
|
||||
class SdaiShape : public SCLP23( Application_instance ) {
|
||||
|
||||
protected:
|
||||
SCLP23(String) _item_name ;
|
||||
SdaiColor_var _item_color ; // OPTIONAL
|
||||
SCLP23(Integer) _number_of_sides ;
|
||||
public:
|
||||
protected:
|
||||
SCLP23( String ) _item_name ;
|
||||
SdaiColor_var _item_color ; // OPTIONAL
|
||||
SCLP23( Integer ) _number_of_sides ;
|
||||
public:
|
||||
|
||||
SdaiShape ( );
|
||||
SdaiShape (SCLP23(Application_instance) *se, int *addAttrs = 0);
|
||||
SdaiShape (SdaiShape& e );
|
||||
~SdaiShape ();
|
||||
SdaiShape( );
|
||||
SdaiShape( SCLP23( Application_instance ) *se, int * addAttrs = 0 );
|
||||
SdaiShape( SdaiShape & e );
|
||||
~SdaiShape();
|
||||
|
||||
#ifdef __O3DB__
|
||||
void oodb_reInit();
|
||||
void oodb_reInit();
|
||||
#endif
|
||||
|
||||
int opcode () { return 1 ; }
|
||||
const SdaiLabel item_name_() const;
|
||||
void item_name_ (const SdaiLabel x);
|
||||
int opcode() {
|
||||
return 1 ;
|
||||
}
|
||||
const SdaiLabel item_name_() const;
|
||||
void item_name_( const SdaiLabel x );
|
||||
|
||||
const SdaiColor_var item_color_() const;
|
||||
void item_color_ (const SdaiColor_var x);
|
||||
const SdaiColor_var item_color_() const;
|
||||
void item_color_( const SdaiColor_var x );
|
||||
|
||||
const SCLP23(Integer) number_of_sides_() const;
|
||||
void number_of_sides_ (const SCLP23(Integer) x);
|
||||
const SCLP23( Integer ) number_of_sides_() const;
|
||||
void number_of_sides_( const SCLP23( Integer ) x );
|
||||
|
||||
|
||||
};
|
||||
|
||||
#ifdef __O3DB__
|
||||
inline SCLP23(Application_instance_ptr)
|
||||
create_SdaiShape () { return (SCLP23(Application_instance_ptr)) new SdaiShape ; }
|
||||
inline SCLP23( Application_instance_ptr )
|
||||
create_SdaiShape() {
|
||||
return ( SCLP23( Application_instance_ptr ) ) new SdaiShape ;
|
||||
}
|
||||
#else
|
||||
inline SdaiShape *
|
||||
create_SdaiShape () { return new SdaiShape ; }
|
||||
create_SdaiShape() {
|
||||
return new SdaiShape ;
|
||||
}
|
||||
#endif
|
||||
|
||||
///////// END_ENTITY shape
|
||||
///////// END_ENTITY shape
|
||||
|
||||
|
||||
///////// ENTITY rectangle
|
||||
///////// ENTITY rectangle
|
||||
|
||||
extern AttrDescriptor *a_4height;
|
||||
extern AttrDescriptor *a_5width;
|
||||
extern AttrDescriptor * a_4height;
|
||||
extern AttrDescriptor * a_5width;
|
||||
|
||||
class SdaiRectangle : public SdaiShape {
|
||||
|
||||
protected:
|
||||
SCLP23(Real) _height ;
|
||||
SCLP23(Real) _width ;
|
||||
public:
|
||||
|
||||
SdaiRectangle ( );
|
||||
SdaiRectangle (SCLP23(Application_instance) *se, int *addAttrs = 0);
|
||||
SdaiRectangle (SdaiRectangle& e );
|
||||
~SdaiRectangle ();
|
||||
protected:
|
||||
SCLP23( Real ) _height ;
|
||||
SCLP23( Real ) _width ;
|
||||
public:
|
||||
|
||||
SdaiRectangle( );
|
||||
SdaiRectangle( SCLP23( Application_instance ) *se, int * addAttrs = 0 );
|
||||
SdaiRectangle( SdaiRectangle & e );
|
||||
~SdaiRectangle();
|
||||
|
||||
#ifdef __O3DB__
|
||||
void oodb_reInit();
|
||||
void oodb_reInit();
|
||||
#endif
|
||||
|
||||
int opcode () { return 2 ; }
|
||||
const SdaiLength_measure height_() const;
|
||||
void height_ (const SdaiLength_measure x);
|
||||
int opcode() {
|
||||
return 2 ;
|
||||
}
|
||||
const SdaiLength_measure height_() const;
|
||||
void height_( const SdaiLength_measure x );
|
||||
|
||||
const SdaiLength_measure width_() const;
|
||||
void width_ (const SdaiLength_measure x);
|
||||
const SdaiLength_measure width_() const;
|
||||
void width_( const SdaiLength_measure x );
|
||||
|
||||
/* The first parent's access functions are */
|
||||
/* above or covered by inherited functions. */
|
||||
/* The first parent's access functions are */
|
||||
/* above or covered by inherited functions. */
|
||||
|
||||
};
|
||||
|
||||
#ifdef __O3DB__
|
||||
inline SCLP23(Application_instance_ptr)
|
||||
create_SdaiRectangle () { return (SCLP23(Application_instance_ptr)) new SdaiRectangle ; }
|
||||
inline SCLP23( Application_instance_ptr )
|
||||
create_SdaiRectangle() {
|
||||
return ( SCLP23( Application_instance_ptr ) ) new SdaiRectangle ;
|
||||
}
|
||||
#else
|
||||
inline SdaiRectangle *
|
||||
create_SdaiRectangle () { return new SdaiRectangle ; }
|
||||
create_SdaiRectangle() {
|
||||
return new SdaiRectangle ;
|
||||
}
|
||||
#endif
|
||||
|
||||
///////// END_ENTITY rectangle
|
||||
///////// END_ENTITY rectangle
|
||||
|
||||
|
||||
///////// ENTITY square
|
||||
///////// ENTITY square
|
||||
|
||||
|
||||
class SdaiSquare : public SdaiRectangle {
|
||||
|
||||
protected:
|
||||
public:
|
||||
|
||||
SdaiSquare ( );
|
||||
SdaiSquare (SCLP23(Application_instance) *se, int *addAttrs = 0);
|
||||
SdaiSquare (SdaiSquare& e );
|
||||
~SdaiSquare ();
|
||||
protected:
|
||||
public:
|
||||
|
||||
SdaiSquare( );
|
||||
SdaiSquare( SCLP23( Application_instance ) *se, int * addAttrs = 0 );
|
||||
SdaiSquare( SdaiSquare & e );
|
||||
~SdaiSquare();
|
||||
|
||||
#ifdef __O3DB__
|
||||
void oodb_reInit();
|
||||
void oodb_reInit();
|
||||
#endif
|
||||
|
||||
int opcode () { return 3 ; }
|
||||
/* The first parent's access functions are */
|
||||
/* above or covered by inherited functions. */
|
||||
int opcode() {
|
||||
return 3 ;
|
||||
}
|
||||
/* The first parent's access functions are */
|
||||
/* above or covered by inherited functions. */
|
||||
|
||||
};
|
||||
|
||||
#ifdef __O3DB__
|
||||
inline SCLP23(Application_instance_ptr)
|
||||
create_SdaiSquare () { return (SCLP23(Application_instance_ptr)) new SdaiSquare ; }
|
||||
inline SCLP23( Application_instance_ptr )
|
||||
create_SdaiSquare() {
|
||||
return ( SCLP23( Application_instance_ptr ) ) new SdaiSquare ;
|
||||
}
|
||||
#else
|
||||
inline SdaiSquare *
|
||||
create_SdaiSquare () { return new SdaiSquare ; }
|
||||
create_SdaiSquare() {
|
||||
return new SdaiSquare ;
|
||||
}
|
||||
#endif
|
||||
|
||||
///////// END_ENTITY square
|
||||
///////// END_ENTITY square
|
||||
|
||||
|
||||
///////// ENTITY triangle
|
||||
///////// ENTITY triangle
|
||||
|
||||
extern AttrDescriptor *a_6side1_length;
|
||||
extern AttrDescriptor *a_7side2_length;
|
||||
extern AttrDescriptor *a_8side3_length;
|
||||
extern AttrDescriptor * a_6side1_length;
|
||||
extern AttrDescriptor * a_7side2_length;
|
||||
extern AttrDescriptor * a_8side3_length;
|
||||
|
||||
class SdaiTriangle : public SdaiShape {
|
||||
|
||||
protected:
|
||||
SCLP23(Real) _side1_length ;
|
||||
SCLP23(Real) _side2_length ;
|
||||
SCLP23(Real) _side3_length ;
|
||||
public:
|
||||
|
||||
SdaiTriangle ( );
|
||||
SdaiTriangle (SCLP23(Application_instance) *se, int *addAttrs = 0);
|
||||
SdaiTriangle (SdaiTriangle& e );
|
||||
~SdaiTriangle ();
|
||||
protected:
|
||||
SCLP23( Real ) _side1_length ;
|
||||
SCLP23( Real ) _side2_length ;
|
||||
SCLP23( Real ) _side3_length ;
|
||||
public:
|
||||
|
||||
SdaiTriangle( );
|
||||
SdaiTriangle( SCLP23( Application_instance ) *se, int * addAttrs = 0 );
|
||||
SdaiTriangle( SdaiTriangle & e );
|
||||
~SdaiTriangle();
|
||||
|
||||
#ifdef __O3DB__
|
||||
void oodb_reInit();
|
||||
void oodb_reInit();
|
||||
#endif
|
||||
|
||||
int opcode () { return 4 ; }
|
||||
const SdaiLength_measure side1_length_() const;
|
||||
void side1_length_ (const SdaiLength_measure x);
|
||||
int opcode() {
|
||||
return 4 ;
|
||||
}
|
||||
const SdaiLength_measure side1_length_() const;
|
||||
void side1_length_( const SdaiLength_measure x );
|
||||
|
||||
const SdaiLength_measure side2_length_() const;
|
||||
void side2_length_ (const SdaiLength_measure x);
|
||||
const SdaiLength_measure side2_length_() const;
|
||||
void side2_length_( const SdaiLength_measure x );
|
||||
|
||||
const SdaiLength_measure side3_length_() const;
|
||||
void side3_length_ (const SdaiLength_measure x);
|
||||
const SdaiLength_measure side3_length_() const;
|
||||
void side3_length_( const SdaiLength_measure x );
|
||||
|
||||
/* The first parent's access functions are */
|
||||
/* above or covered by inherited functions. */
|
||||
/* The first parent's access functions are */
|
||||
/* above or covered by inherited functions. */
|
||||
|
||||
};
|
||||
|
||||
#ifdef __O3DB__
|
||||
inline SCLP23(Application_instance_ptr)
|
||||
create_SdaiTriangle () { return (SCLP23(Application_instance_ptr)) new SdaiTriangle ; }
|
||||
inline SCLP23( Application_instance_ptr )
|
||||
create_SdaiTriangle() {
|
||||
return ( SCLP23( Application_instance_ptr ) ) new SdaiTriangle ;
|
||||
}
|
||||
#else
|
||||
inline SdaiTriangle *
|
||||
create_SdaiTriangle () { return new SdaiTriangle ; }
|
||||
create_SdaiTriangle() {
|
||||
return new SdaiTriangle ;
|
||||
}
|
||||
#endif
|
||||
|
||||
///////// END_ENTITY triangle
|
||||
///////// END_ENTITY triangle
|
||||
|
||||
|
||||
///////// ENTITY circle
|
||||
///////// ENTITY circle
|
||||
|
||||
extern AttrDescriptor *a_9radius;
|
||||
extern AttrDescriptor * a_9radius;
|
||||
|
||||
class SdaiCircle : public SdaiShape {
|
||||
|
||||
protected:
|
||||
SCLP23(Real) _radius ;
|
||||
public:
|
||||
|
||||
SdaiCircle ( );
|
||||
SdaiCircle (SCLP23(Application_instance) *se, int *addAttrs = 0);
|
||||
SdaiCircle (SdaiCircle& e );
|
||||
~SdaiCircle ();
|
||||
protected:
|
||||
SCLP23( Real ) _radius ;
|
||||
public:
|
||||
|
||||
SdaiCircle( );
|
||||
SdaiCircle( SCLP23( Application_instance ) *se, int * addAttrs = 0 );
|
||||
SdaiCircle( SdaiCircle & e );
|
||||
~SdaiCircle();
|
||||
|
||||
#ifdef __O3DB__
|
||||
void oodb_reInit();
|
||||
void oodb_reInit();
|
||||
#endif
|
||||
|
||||
int opcode () { return 5 ; }
|
||||
const SCLP23(Real) radius_() const;
|
||||
void radius_ (const SCLP23(Real) x);
|
||||
int opcode() {
|
||||
return 5 ;
|
||||
}
|
||||
const SCLP23( Real ) radius_() const;
|
||||
void radius_( const SCLP23( Real ) x );
|
||||
|
||||
/* The first parent's access functions are */
|
||||
/* above or covered by inherited functions. */
|
||||
/* The first parent's access functions are */
|
||||
/* above or covered by inherited functions. */
|
||||
|
||||
};
|
||||
|
||||
#ifdef __O3DB__
|
||||
inline SCLP23(Application_instance_ptr)
|
||||
create_SdaiCircle () { return (SCLP23(Application_instance_ptr)) new SdaiCircle ; }
|
||||
inline SCLP23( Application_instance_ptr )
|
||||
create_SdaiCircle() {
|
||||
return ( SCLP23( Application_instance_ptr ) ) new SdaiCircle ;
|
||||
}
|
||||
#else
|
||||
inline SdaiCircle *
|
||||
create_SdaiCircle () { return new SdaiCircle ; }
|
||||
create_SdaiCircle() {
|
||||
return new SdaiCircle ;
|
||||
}
|
||||
#endif
|
||||
|
||||
///////// END_ENTITY circle
|
||||
///////// END_ENTITY circle
|
||||
|
||||
|
||||
///////// ENTITY line
|
||||
///////// ENTITY line
|
||||
|
||||
extern AttrDescriptor *a_10end_point_one;
|
||||
extern AttrDescriptor *a_11end_point_two;
|
||||
extern AttrDescriptor * a_10end_point_one;
|
||||
extern AttrDescriptor * a_11end_point_two;
|
||||
|
||||
class SdaiLine : public SCLP23(Application_instance) {
|
||||
class SdaiLine : public SCLP23( Application_instance ) {
|
||||
|
||||
protected:
|
||||
SCLP23(Application_instance_ptr) _end_point_one ;
|
||||
SCLP23(Application_instance_ptr) _end_point_two ;
|
||||
public:
|
||||
protected:
|
||||
SCLP23( Application_instance_ptr ) _end_point_one ;
|
||||
SCLP23( Application_instance_ptr ) _end_point_two ;
|
||||
public:
|
||||
|
||||
SdaiLine ( );
|
||||
SdaiLine (SCLP23(Application_instance) *se, int *addAttrs = 0);
|
||||
SdaiLine (SdaiLine& e );
|
||||
~SdaiLine ();
|
||||
SdaiLine( );
|
||||
SdaiLine( SCLP23( Application_instance ) *se, int * addAttrs = 0 );
|
||||
SdaiLine( SdaiLine & e );
|
||||
~SdaiLine();
|
||||
|
||||
#ifdef __O3DB__
|
||||
void oodb_reInit();
|
||||
void oodb_reInit();
|
||||
#endif
|
||||
|
||||
int opcode () { return 6 ; }
|
||||
const SdaiCartesian_point_ptr end_point_one_() const;
|
||||
void end_point_one_ (const SdaiCartesian_point_ptr x);
|
||||
int opcode() {
|
||||
return 6 ;
|
||||
}
|
||||
const SdaiCartesian_point_ptr end_point_one_() const;
|
||||
void end_point_one_( const SdaiCartesian_point_ptr x );
|
||||
|
||||
const SdaiCartesian_point_ptr end_point_two_() const;
|
||||
void end_point_two_ (const SdaiCartesian_point_ptr x);
|
||||
const SdaiCartesian_point_ptr end_point_two_() const;
|
||||
void end_point_two_( const SdaiCartesian_point_ptr x );
|
||||
|
||||
|
||||
};
|
||||
|
||||
#ifdef __O3DB__
|
||||
inline SCLP23(Application_instance_ptr)
|
||||
create_SdaiLine () { return (SCLP23(Application_instance_ptr)) new SdaiLine ; }
|
||||
inline SCLP23( Application_instance_ptr )
|
||||
create_SdaiLine() {
|
||||
return ( SCLP23( Application_instance_ptr ) ) new SdaiLine ;
|
||||
}
|
||||
#else
|
||||
inline SdaiLine *
|
||||
create_SdaiLine () { return new SdaiLine ; }
|
||||
create_SdaiLine() {
|
||||
return new SdaiLine ;
|
||||
}
|
||||
#endif
|
||||
|
||||
///////// END_ENTITY line
|
||||
///////// END_ENTITY line
|
||||
|
||||
|
||||
///////// ENTITY cartesian_point
|
||||
///////// ENTITY cartesian_point
|
||||
|
||||
extern AttrDescriptor *a_12x;
|
||||
extern AttrDescriptor *a_13y;
|
||||
extern AttrDescriptor *a_14z;
|
||||
extern AttrDescriptor * a_12x;
|
||||
extern AttrDescriptor * a_13y;
|
||||
extern AttrDescriptor * a_14z;
|
||||
|
||||
class SdaiCartesian_point : public SCLP23(Application_instance) {
|
||||
class SdaiCartesian_point : public SCLP23( Application_instance ) {
|
||||
|
||||
protected:
|
||||
SCLP23(Real) _x ;
|
||||
SCLP23(Real) _y ;
|
||||
SCLP23(Real) _z ; // OPTIONAL
|
||||
public:
|
||||
protected:
|
||||
SCLP23( Real ) _x ;
|
||||
SCLP23( Real ) _y ;
|
||||
SCLP23( Real ) _z ; // OPTIONAL
|
||||
public:
|
||||
|
||||
SdaiCartesian_point ( );
|
||||
SdaiCartesian_point (SCLP23(Application_instance) *se, int *addAttrs = 0);
|
||||
SdaiCartesian_point (SdaiCartesian_point& e );
|
||||
~SdaiCartesian_point ();
|
||||
SdaiCartesian_point( );
|
||||
SdaiCartesian_point( SCLP23( Application_instance ) *se, int * addAttrs = 0 );
|
||||
SdaiCartesian_point( SdaiCartesian_point & e );
|
||||
~SdaiCartesian_point();
|
||||
|
||||
#ifdef __O3DB__
|
||||
void oodb_reInit();
|
||||
void oodb_reInit();
|
||||
#endif
|
||||
|
||||
int opcode () { return 7 ; }
|
||||
const SdaiPoint x_() const;
|
||||
void x_ (const SdaiPoint x);
|
||||
int opcode() {
|
||||
return 7 ;
|
||||
}
|
||||
const SdaiPoint x_() const;
|
||||
void x_( const SdaiPoint x );
|
||||
|
||||
const SdaiPoint y_() const;
|
||||
void y_ (const SdaiPoint x);
|
||||
const SdaiPoint y_() const;
|
||||
void y_( const SdaiPoint x );
|
||||
|
||||
const SdaiPoint z_() const;
|
||||
void z_ (const SdaiPoint x);
|
||||
const SdaiPoint z_() const;
|
||||
void z_( const SdaiPoint x );
|
||||
|
||||
|
||||
};
|
||||
|
||||
#ifdef __O3DB__
|
||||
inline SCLP23(Application_instance_ptr)
|
||||
create_SdaiCartesian_point () { return (SCLP23(Application_instance_ptr)) new SdaiCartesian_point ; }
|
||||
inline SCLP23( Application_instance_ptr )
|
||||
create_SdaiCartesian_point() {
|
||||
return ( SCLP23( Application_instance_ptr ) ) new SdaiCartesian_point ;
|
||||
}
|
||||
#else
|
||||
inline SdaiCartesian_point *
|
||||
create_SdaiCartesian_point () { return new SdaiCartesian_point ; }
|
||||
create_SdaiCartesian_point() {
|
||||
return new SdaiCartesian_point ;
|
||||
}
|
||||
#endif
|
||||
|
||||
///////// END_ENTITY cartesian_point
|
||||
///////// END_ENTITY cartesian_point
|
||||
|
||||
|
||||
// ***** generate Model related pieces
|
||||
// ***** generate Model related pieces
|
||||
|
||||
class SdaiModel_contents_example_schema : public SCLP23(Model_contents) {
|
||||
class SdaiModel_contents_example_schema : public SCLP23( Model_contents ) {
|
||||
|
||||
public:
|
||||
public:
|
||||
|
||||
SdaiModel_contents_example_schema();
|
||||
SdaiModel_contents_example_schema();
|
||||
|
||||
SdaiPoly_line__set_var SdaiPoly_line_get_extents();
|
||||
SdaiPoly_line__set_var SdaiPoly_line_get_extents();
|
||||
|
||||
SdaiShape__set_var SdaiShape_get_extents();
|
||||
SdaiShape__set_var SdaiShape_get_extents();
|
||||
|
||||
SdaiRectangle__set_var SdaiRectangle_get_extents();
|
||||
SdaiRectangle__set_var SdaiRectangle_get_extents();
|
||||
|
||||
SdaiSquare__set_var SdaiSquare_get_extents();
|
||||
SdaiSquare__set_var SdaiSquare_get_extents();
|
||||
|
||||
SdaiTriangle__set_var SdaiTriangle_get_extents();
|
||||
SdaiTriangle__set_var SdaiTriangle_get_extents();
|
||||
|
||||
SdaiCircle__set_var SdaiCircle_get_extents();
|
||||
SdaiCircle__set_var SdaiCircle_get_extents();
|
||||
|
||||
SdaiLine__set_var SdaiLine_get_extents();
|
||||
SdaiLine__set_var SdaiLine_get_extents();
|
||||
|
||||
SdaiCartesian_point__set_var SdaiCartesian_point_get_extents();
|
||||
SdaiCartesian_point__set_var SdaiCartesian_point_get_extents();
|
||||
|
||||
};
|
||||
|
||||
@@ -456,6 +512,6 @@ class SdaiModel_contents_example_schema : public SCLP23(Model_contents) {
|
||||
typedef SdaiModel_contents_example_schema * SdaiModel_contents_example_schema_ptr;
|
||||
typedef SdaiModel_contents_example_schema_ptr SdaiModel_contents_example_schema_var;
|
||||
|
||||
SCLP23(Model_contents_ptr) create_SdaiModel_contents_example_schema();
|
||||
SCLP23( Model_contents_ptr ) create_SdaiModel_contents_example_schema();
|
||||
|
||||
#endif
|
||||
|
||||
@@ -3,85 +3,85 @@
|
||||
// This file was generated by fedex_plus. You probably don't want to edit
|
||||
// it since your modifications will be lost if fedex_plus is used to
|
||||
// regenerate it.
|
||||
/* $Id$ */
|
||||
/* $Id$ */
|
||||
#include <schema.h>
|
||||
|
||||
// Schema: SdaiEXAMPLE_SCHEMA
|
||||
extern Schema * s_example_schema;
|
||||
extern Schema * s_example_schema;
|
||||
|
||||
// Types:
|
||||
class SdaiColor_vars;
|
||||
extern EnumTypeDescriptor *example_schemat_color;
|
||||
typedef SCLP23(String) SdaiLabel;
|
||||
extern TypeDescriptor *example_schemat_label;
|
||||
typedef SCLP23(Real) SdaiPoint;
|
||||
extern TypeDescriptor *example_schemat_point;
|
||||
typedef SCLP23(Real) SdaiLength_measure;
|
||||
extern TypeDescriptor *example_schemat_length_measure;
|
||||
extern EnumTypeDescriptor * example_schemat_color;
|
||||
typedef SCLP23( String ) SdaiLabel;
|
||||
extern TypeDescriptor * example_schemat_label;
|
||||
typedef SCLP23( Real ) SdaiPoint;
|
||||
extern TypeDescriptor * example_schemat_point;
|
||||
typedef SCLP23( Real ) SdaiLength_measure;
|
||||
extern TypeDescriptor * example_schemat_length_measure;
|
||||
|
||||
// Entities:
|
||||
class SdaiPoly_line;
|
||||
typedef SdaiPoly_line * SdaiPoly_lineH;
|
||||
typedef SdaiPoly_line * SdaiPoly_line_ptr;
|
||||
typedef SdaiPoly_line_ptr SdaiPoly_line_var;
|
||||
#define SdaiPoly_line__set SCLP23(DAObject__set)
|
||||
#define SdaiPoly_line__set_var SCLP23(DAObject__set_var)
|
||||
extern EntityDescriptor *example_schemae_poly_line;
|
||||
typedef SdaiPoly_line * SdaiPoly_lineH;
|
||||
typedef SdaiPoly_line * SdaiPoly_line_ptr;
|
||||
typedef SdaiPoly_line_ptr SdaiPoly_line_var;
|
||||
#define SdaiPoly_line__set SCLP23(DAObject__set)
|
||||
#define SdaiPoly_line__set_var SCLP23(DAObject__set_var)
|
||||
extern EntityDescriptor * example_schemae_poly_line;
|
||||
|
||||
class SdaiShape;
|
||||
typedef SdaiShape * SdaiShapeH;
|
||||
typedef SdaiShape * SdaiShape_ptr;
|
||||
typedef SdaiShape_ptr SdaiShape_var;
|
||||
#define SdaiShape__set SCLP23(DAObject__set)
|
||||
#define SdaiShape__set_var SCLP23(DAObject__set_var)
|
||||
extern EntityDescriptor *example_schemae_shape;
|
||||
typedef SdaiShape * SdaiShapeH;
|
||||
typedef SdaiShape * SdaiShape_ptr;
|
||||
typedef SdaiShape_ptr SdaiShape_var;
|
||||
#define SdaiShape__set SCLP23(DAObject__set)
|
||||
#define SdaiShape__set_var SCLP23(DAObject__set_var)
|
||||
extern EntityDescriptor * example_schemae_shape;
|
||||
|
||||
class SdaiRectangle;
|
||||
typedef SdaiRectangle * SdaiRectangleH;
|
||||
typedef SdaiRectangle * SdaiRectangle_ptr;
|
||||
typedef SdaiRectangle_ptr SdaiRectangle_var;
|
||||
#define SdaiRectangle__set SCLP23(DAObject__set)
|
||||
#define SdaiRectangle__set_var SCLP23(DAObject__set_var)
|
||||
extern EntityDescriptor *example_schemae_rectangle;
|
||||
typedef SdaiRectangle * SdaiRectangleH;
|
||||
typedef SdaiRectangle * SdaiRectangle_ptr;
|
||||
typedef SdaiRectangle_ptr SdaiRectangle_var;
|
||||
#define SdaiRectangle__set SCLP23(DAObject__set)
|
||||
#define SdaiRectangle__set_var SCLP23(DAObject__set_var)
|
||||
extern EntityDescriptor * example_schemae_rectangle;
|
||||
|
||||
class SdaiSquare;
|
||||
typedef SdaiSquare * SdaiSquareH;
|
||||
typedef SdaiSquare * SdaiSquare_ptr;
|
||||
typedef SdaiSquare_ptr SdaiSquare_var;
|
||||
#define SdaiSquare__set SCLP23(DAObject__set)
|
||||
#define SdaiSquare__set_var SCLP23(DAObject__set_var)
|
||||
extern EntityDescriptor *example_schemae_square;
|
||||
typedef SdaiSquare * SdaiSquareH;
|
||||
typedef SdaiSquare * SdaiSquare_ptr;
|
||||
typedef SdaiSquare_ptr SdaiSquare_var;
|
||||
#define SdaiSquare__set SCLP23(DAObject__set)
|
||||
#define SdaiSquare__set_var SCLP23(DAObject__set_var)
|
||||
extern EntityDescriptor * example_schemae_square;
|
||||
|
||||
class SdaiTriangle;
|
||||
typedef SdaiTriangle * SdaiTriangleH;
|
||||
typedef SdaiTriangle * SdaiTriangle_ptr;
|
||||
typedef SdaiTriangle_ptr SdaiTriangle_var;
|
||||
#define SdaiTriangle__set SCLP23(DAObject__set)
|
||||
#define SdaiTriangle__set_var SCLP23(DAObject__set_var)
|
||||
extern EntityDescriptor *example_schemae_triangle;
|
||||
typedef SdaiTriangle * SdaiTriangleH;
|
||||
typedef SdaiTriangle * SdaiTriangle_ptr;
|
||||
typedef SdaiTriangle_ptr SdaiTriangle_var;
|
||||
#define SdaiTriangle__set SCLP23(DAObject__set)
|
||||
#define SdaiTriangle__set_var SCLP23(DAObject__set_var)
|
||||
extern EntityDescriptor * example_schemae_triangle;
|
||||
|
||||
class SdaiCircle;
|
||||
typedef SdaiCircle * SdaiCircleH;
|
||||
typedef SdaiCircle * SdaiCircle_ptr;
|
||||
typedef SdaiCircle_ptr SdaiCircle_var;
|
||||
#define SdaiCircle__set SCLP23(DAObject__set)
|
||||
#define SdaiCircle__set_var SCLP23(DAObject__set_var)
|
||||
extern EntityDescriptor *example_schemae_circle;
|
||||
typedef SdaiCircle * SdaiCircleH;
|
||||
typedef SdaiCircle * SdaiCircle_ptr;
|
||||
typedef SdaiCircle_ptr SdaiCircle_var;
|
||||
#define SdaiCircle__set SCLP23(DAObject__set)
|
||||
#define SdaiCircle__set_var SCLP23(DAObject__set_var)
|
||||
extern EntityDescriptor * example_schemae_circle;
|
||||
|
||||
class SdaiLine;
|
||||
typedef SdaiLine * SdaiLineH;
|
||||
typedef SdaiLine * SdaiLine_ptr;
|
||||
typedef SdaiLine_ptr SdaiLine_var;
|
||||
#define SdaiLine__set SCLP23(DAObject__set)
|
||||
#define SdaiLine__set_var SCLP23(DAObject__set_var)
|
||||
extern EntityDescriptor *example_schemae_line;
|
||||
typedef SdaiLine * SdaiLineH;
|
||||
typedef SdaiLine * SdaiLine_ptr;
|
||||
typedef SdaiLine_ptr SdaiLine_var;
|
||||
#define SdaiLine__set SCLP23(DAObject__set)
|
||||
#define SdaiLine__set_var SCLP23(DAObject__set_var)
|
||||
extern EntityDescriptor * example_schemae_line;
|
||||
|
||||
class SdaiCartesian_point;
|
||||
typedef SdaiCartesian_point * SdaiCartesian_pointH;
|
||||
typedef SdaiCartesian_point * SdaiCartesian_point_ptr;
|
||||
typedef SdaiCartesian_point_ptr SdaiCartesian_point_var;
|
||||
#define SdaiCartesian_point__set SCLP23(DAObject__set)
|
||||
#define SdaiCartesian_point__set_var SCLP23(DAObject__set_var)
|
||||
extern EntityDescriptor *example_schemae_cartesian_point;
|
||||
typedef SdaiCartesian_point * SdaiCartesian_pointH;
|
||||
typedef SdaiCartesian_point * SdaiCartesian_point_ptr;
|
||||
typedef SdaiCartesian_point_ptr SdaiCartesian_point_var;
|
||||
#define SdaiCartesian_point__set SCLP23(DAObject__set)
|
||||
#define SdaiCartesian_point__set_var SCLP23(DAObject__set_var)
|
||||
extern EntityDescriptor * example_schemae_cartesian_point;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -26,13 +26,13 @@
|
||||
#include <STEPattribute.h>
|
||||
|
||||
#include <Sdaiclasses.h>
|
||||
extern void SchemaInit (Registry &);
|
||||
extern void InitSchemasAndEnts (Registry &);
|
||||
#include <SdaiEXAMPLE_SCHEMA.h>
|
||||
extern void SdaiEXAMPLE_SCHEMAInit (Registry & r);
|
||||
extern void SchemaInit( Registry & );
|
||||
extern void InitSchemasAndEnts( Registry & );
|
||||
#include <SdaiEXAMPLE_SCHEMA.h>
|
||||
extern void SdaiEXAMPLE_SCHEMAInit( Registry & r );
|
||||
|
||||
#include <complexSupport.h>
|
||||
ComplexCollect *gencomplex();
|
||||
ComplexCollect * gencomplex();
|
||||
|
||||
SCLP23(Model_contents_ptr) GetModelContents(char *schemaName);
|
||||
SCLP23( Model_contents_ptr ) GetModelContents( char * schemaName );
|
||||
#endif
|
||||
|
||||
@@ -51,7 +51,7 @@ SDAI_Application_instance__set::~SDAI_Application_instance__set() {
|
||||
}
|
||||
|
||||
void SDAI_Application_instance__set::Check( int index ) {
|
||||
SDAI_Application_instance_ptr* newbuf;
|
||||
SDAI_Application_instance_ptr * newbuf;
|
||||
|
||||
if( index >= _bufsize ) {
|
||||
_bufsize = ( index + 1 ) * 2;
|
||||
@@ -63,7 +63,7 @@ void SDAI_Application_instance__set::Check( int index ) {
|
||||
}
|
||||
|
||||
void SDAI_Application_instance__set::Insert( SDAI_Application_instance_ptr v, int index ) {
|
||||
SDAI_Application_instance_ptr* spot;
|
||||
SDAI_Application_instance_ptr * spot;
|
||||
index = ( index < 0 ) ? _count : index;
|
||||
|
||||
if( index < _count ) {
|
||||
@@ -81,7 +81,7 @@ void SDAI_Application_instance__set::Insert( SDAI_Application_instance_ptr v, in
|
||||
|
||||
void SDAI_Application_instance__set::Append( SDAI_Application_instance_ptr v ) {
|
||||
int index = _count;
|
||||
SDAI_Application_instance_ptr* spot;
|
||||
SDAI_Application_instance_ptr * spot;
|
||||
|
||||
if( index < _count ) {
|
||||
Check( _count + 1 );
|
||||
@@ -99,7 +99,7 @@ void SDAI_Application_instance__set::Append( SDAI_Application_instance_ptr v ) {
|
||||
void SDAI_Application_instance__set::Remove( int index ) {
|
||||
if( 0 <= index && index < _count ) {
|
||||
--_count;
|
||||
SDAI_Application_instance_ptr* spot = &_buf[index];
|
||||
SDAI_Application_instance_ptr * spot = &_buf[index];
|
||||
memmove( spot, spot + 1, ( _count - index )*sizeof( SDAI_Application_instance_ptr ) );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,31 +35,30 @@
|
||||
|
||||
class SDAI_Application_instance__set;
|
||||
typedef SDAI_Application_instance__set *
|
||||
SDAI_Application_instance__set_ptr;
|
||||
typedef SDAI_Application_instance__set_ptr
|
||||
SDAI_Application_instance__set_var;
|
||||
SDAI_Application_instance__set_ptr;
|
||||
typedef SDAI_Application_instance__set_ptr
|
||||
SDAI_Application_instance__set_var;
|
||||
|
||||
class SCL_DAI_EXPORT SDAI_Application_instance__set
|
||||
{
|
||||
public:
|
||||
SDAI_Application_instance__set(int = 16);
|
||||
~SDAI_Application_instance__set();
|
||||
class SCL_DAI_EXPORT SDAI_Application_instance__set {
|
||||
public:
|
||||
SDAI_Application_instance__set( int = 16 );
|
||||
~SDAI_Application_instance__set();
|
||||
|
||||
SDAI_Application_instance_ptr& operator[](int index);
|
||||
void Insert(SDAI_Application_instance_ptr, int index);
|
||||
void Append(SDAI_Application_instance_ptr);
|
||||
void Remove(int index);
|
||||
void Remove(SDAI_Application_instance_ptr);
|
||||
int Index(SDAI_Application_instance_ptr);
|
||||
SDAI_Application_instance_ptr & operator[]( int index );
|
||||
void Insert( SDAI_Application_instance_ptr, int index );
|
||||
void Append( SDAI_Application_instance_ptr );
|
||||
void Remove( int index );
|
||||
void Remove( SDAI_Application_instance_ptr );
|
||||
int Index( SDAI_Application_instance_ptr );
|
||||
|
||||
int Count();
|
||||
void Clear();
|
||||
private:
|
||||
void Check(int index);
|
||||
private:
|
||||
SDAI_Application_instance_ptr* _buf;
|
||||
int _bufsize;
|
||||
int _count;
|
||||
int Count();
|
||||
void Clear();
|
||||
private:
|
||||
void Check( int index );
|
||||
private:
|
||||
SDAI_Application_instance_ptr * _buf;
|
||||
int _bufsize;
|
||||
int _count;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -13,9 +13,9 @@
|
||||
#include <sdai.h>
|
||||
|
||||
extern Severity CheckRemainingInput( istream & in, ErrorDescriptor * err,
|
||||
const char * typeName, // used in error message
|
||||
const char * tokenList ); // e.g. ",)"
|
||||
|
||||
const char * typeName, // used in error message
|
||||
const char * tokenList ); // e.g. ",)"
|
||||
|
||||
SDAI_Binary & SDAI_Binary::operator= ( const char * s ) {
|
||||
std::string::operator= ( s );
|
||||
return *this;
|
||||
@@ -53,7 +53,7 @@ const char * SDAI_Binary::STEPwrite( std::string & s ) const {
|
||||
}
|
||||
|
||||
Severity SDAI_Binary::ReadBinary( istream & in, ErrorDescriptor * err, int AssignVal,
|
||||
int needDelims ) {
|
||||
int needDelims ) {
|
||||
if( AssignVal ) {
|
||||
clear();
|
||||
}
|
||||
@@ -160,8 +160,8 @@ Severity SDAI_Binary::STEPread( const char * s, ErrorDescriptor * err ) {
|
||||
** following.
|
||||
******************************************************************************/
|
||||
Severity SDAI_Binary::BinaryValidLevel( istream & in, ErrorDescriptor * err,
|
||||
int optional, char * tokenList,
|
||||
int needDelims, int clearError ) {
|
||||
int optional, char * tokenList,
|
||||
int needDelims, int clearError ) {
|
||||
if( clearError ) {
|
||||
err->ClearErrorMsg();
|
||||
}
|
||||
@@ -195,8 +195,8 @@ Severity SDAI_Binary::BinaryValidLevel( istream & in, ErrorDescriptor * err,
|
||||
}
|
||||
|
||||
Severity SDAI_Binary::BinaryValidLevel( const char * value, ErrorDescriptor * err,
|
||||
int optional, char * tokenList,
|
||||
int needDelims, int clearError ) {
|
||||
int optional, char * tokenList,
|
||||
int needDelims, int clearError ) {
|
||||
istringstream in( ( char * )value );
|
||||
return BinaryValidLevel( in, err, optional, tokenList,
|
||||
needDelims, clearError );
|
||||
|
||||
+27
-26
@@ -14,41 +14,42 @@
|
||||
* and is not subject to copyright.
|
||||
*/
|
||||
|
||||
class SCL_DAI_EXPORT SDAI_Binary : public std::string
|
||||
{
|
||||
public:
|
||||
class SCL_DAI_EXPORT SDAI_Binary : public std::string {
|
||||
public:
|
||||
|
||||
//constructor(s) & destructor
|
||||
SDAI_Binary (const char * str = 0, int max =0)
|
||||
: std::string (str,max) { }
|
||||
//constructor(s) & destructor
|
||||
SDAI_Binary( const char * str = 0, int max = 0 )
|
||||
: std::string( str, max ) { }
|
||||
|
||||
SDAI_Binary (const std::string& s) : std::string (s) { }
|
||||
SDAI_Binary( const std::string & s ) : std::string( s ) { }
|
||||
|
||||
|
||||
~SDAI_Binary () { }
|
||||
~SDAI_Binary() { }
|
||||
|
||||
// operators
|
||||
SDAI_Binary& operator= (const char* s);
|
||||
// operators
|
||||
SDAI_Binary & operator= ( const char * s );
|
||||
|
||||
// format for STEP
|
||||
const char * asStr () const { return c_str(); }
|
||||
void STEPwrite (ostream& out =cout) const;
|
||||
const char * STEPwrite (std::string &s) const;
|
||||
// format for STEP
|
||||
const char * asStr() const {
|
||||
return c_str();
|
||||
}
|
||||
void STEPwrite( ostream & out = cout ) const;
|
||||
const char * STEPwrite( std::string & s ) const;
|
||||
|
||||
Severity StrToVal (const char *s, ErrorDescriptor *err);
|
||||
Severity STEPread (istream& in, ErrorDescriptor *err);
|
||||
Severity STEPread (const char *s, ErrorDescriptor *err);
|
||||
Severity StrToVal( const char * s, ErrorDescriptor * err );
|
||||
Severity STEPread( istream & in, ErrorDescriptor * err );
|
||||
Severity STEPread( const char * s, ErrorDescriptor * err );
|
||||
|
||||
Severity BinaryValidLevel (const char *value, ErrorDescriptor *err,
|
||||
int optional, char *tokenList,
|
||||
int needDelims = 0, int clearError = 1);
|
||||
Severity BinaryValidLevel (istream &in, ErrorDescriptor *err,
|
||||
int optional, char *tokenList,
|
||||
int needDelims = 0, int clearError = 1);
|
||||
Severity BinaryValidLevel( const char * value, ErrorDescriptor * err,
|
||||
int optional, char * tokenList,
|
||||
int needDelims = 0, int clearError = 1 );
|
||||
Severity BinaryValidLevel( istream & in, ErrorDescriptor * err,
|
||||
int optional, char * tokenList,
|
||||
int needDelims = 0, int clearError = 1 );
|
||||
|
||||
protected:
|
||||
Severity ReadBinary(istream& in, ErrorDescriptor *err, int AssignVal = 1,
|
||||
int needDelims = 1);
|
||||
protected:
|
||||
Severity ReadBinary( istream & in, ErrorDescriptor * err, int AssignVal = 1,
|
||||
int needDelims = 1 );
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -109,7 +109,7 @@ SDAI_DAObject__set::~SDAI_DAObject__set() {
|
||||
|
||||
void SDAI_DAObject__set::Check( int index ) {
|
||||
|
||||
SDAI_DAObject_ptr* newbuf;
|
||||
SDAI_DAObject_ptr * newbuf;
|
||||
|
||||
if( index >= _bufsize ) {
|
||||
_bufsize = ( index + 1 ) * 2;
|
||||
@@ -123,7 +123,7 @@ void SDAI_DAObject__set::Check( int index ) {
|
||||
void
|
||||
SDAI_DAObject__set::Insert( SDAI_DAObject_ptr v, int index ) {
|
||||
|
||||
SDAI_DAObject_ptr* spot;
|
||||
SDAI_DAObject_ptr * spot;
|
||||
index = ( index < 0 ) ? _count : index;
|
||||
|
||||
if( index < _count ) {
|
||||
@@ -142,7 +142,7 @@ SDAI_DAObject__set::Insert( SDAI_DAObject_ptr v, int index ) {
|
||||
void SDAI_DAObject__set::Append( SDAI_DAObject_ptr v ) {
|
||||
|
||||
int index = _count;
|
||||
SDAI_DAObject_ptr* spot;
|
||||
SDAI_DAObject_ptr * spot;
|
||||
|
||||
if( index < _count ) {
|
||||
Check( _count + 1 );
|
||||
@@ -161,7 +161,7 @@ void SDAI_DAObject__set::Remove( int index ) {
|
||||
|
||||
if( 0 <= index && index < _count ) {
|
||||
--_count;
|
||||
SDAI_DAObject_ptr* spot = &_buf[index];
|
||||
SDAI_DAObject_ptr * spot = &_buf[index];
|
||||
memmove( spot, spot + 1, ( _count - index )*sizeof( SDAI_DAObject_ptr ) );
|
||||
}
|
||||
}
|
||||
|
||||
+303
-293
@@ -3,90 +3,92 @@
|
||||
|
||||
#include <scl_export.h>
|
||||
|
||||
typedef char* SDAI_DAObjectID;
|
||||
typedef char * SDAI_DAObjectID;
|
||||
|
||||
// interface PID (ISO/DIS 10303-23:1996(E) 5.3.10.1)
|
||||
// Also, CORBA POS specification, Section 5.4
|
||||
//
|
||||
// The PID class maintains the persistent object identifier for every
|
||||
// persistent object, objects of class DAObject, and objects of any class
|
||||
// derived directly or indirectly from DAObject.
|
||||
//
|
||||
// POS: The PID identifies one or more locations within a Datastore that
|
||||
// represent the persistent data of an object and generates a string
|
||||
// identifier for that data. An object must have a PID in order to store
|
||||
// its data persistently.
|
||||
//
|
||||
// interface PID (ISO/DIS 10303-23:1996(E) 5.3.10.1)
|
||||
// Also, CORBA POS specification, Section 5.4
|
||||
//
|
||||
// The PID class maintains the persistent object identifier for every
|
||||
// persistent object, objects of class DAObject, and objects of any class
|
||||
// derived directly or indirectly from DAObject.
|
||||
//
|
||||
// POS: The PID identifies one or more locations within a Datastore that
|
||||
// represent the persistent data of an object and generates a string
|
||||
// identifier for that data. An object must have a PID in order to store
|
||||
// its data persistently.
|
||||
//
|
||||
/*
|
||||
The EXPRESS ENTITY application_instance from the SDAI_data_type_schema from
|
||||
clause 10 in ISO 10303-22, shall be mapped to the C++ class
|
||||
Application_instance. The class Application_instance shall be a subtype of
|
||||
the C++ class DAObject and of the C++ class Entity_instance.
|
||||
The class DAObject is supported by the classes PID, PID_SDAI and the type
|
||||
The EXPRESS ENTITY application_instance from the SDAI_data_type_schema from
|
||||
clause 10 in ISO 10303-22, shall be mapped to the C++ class
|
||||
Application_instance. The class Application_instance shall be a subtype of
|
||||
the C++ class DAObject and of the C++ class Entity_instance.
|
||||
The class DAObject is supported by the classes PID, PID_SDAI and the type
|
||||
SDAI_DAObjectID as follows:
|
||||
*/
|
||||
|
||||
class SCL_DAI_EXPORT SDAI_PID : public SDAI_sdaiObject
|
||||
{
|
||||
public:
|
||||
class SCL_DAI_EXPORT SDAI_PID : public SDAI_sdaiObject {
|
||||
public:
|
||||
|
||||
// These are in the IDL generated code for Part 26. I will have to think about
|
||||
// These are in the IDL generated code for Part 26. I will have to think about
|
||||
// why they should be here (for Part 23). DAS
|
||||
// static PID_ptr _duplicate(PID_ptr);
|
||||
// static PID_ptr _narrow(SDAI_sdaiObject_ptr);
|
||||
// static PID_ptr _nil();
|
||||
|
||||
SDAI_String _datastore_type ;
|
||||
SDAI_String _pidstring ;
|
||||
SDAI_String _datastore_type ;
|
||||
SDAI_String _pidstring ;
|
||||
|
||||
// constructor/destructor
|
||||
SDAI_PID();
|
||||
virtual ~SDAI_PID();
|
||||
// constructor/destructor
|
||||
SDAI_PID();
|
||||
virtual ~SDAI_PID();
|
||||
|
||||
/*
|
||||
The Datestore_type attribute shall identify the type of the underlying
|
||||
datastore.
|
||||
*/
|
||||
char* Datastore_type() const { return const_cast<char *>(_datastore_type.c_str()); }
|
||||
void Datastore_type(char *x) { _datastore_type = x; }
|
||||
/*
|
||||
The Datestore_type attribute shall identify the type of the underlying
|
||||
datastore.
|
||||
*/
|
||||
char * Datastore_type() const {
|
||||
return const_cast<char *>( _datastore_type.c_str() );
|
||||
}
|
||||
void Datastore_type( char * x ) {
|
||||
_datastore_type = x;
|
||||
}
|
||||
|
||||
/*
|
||||
This function shall return a string version of the receiver.
|
||||
*/
|
||||
char* get_PIDString();
|
||||
/*
|
||||
This function shall return a string version of the receiver.
|
||||
*/
|
||||
char * get_PIDString();
|
||||
};
|
||||
|
||||
typedef SDAI_PID* SDAI_PID_ptr;
|
||||
typedef SDAI_PID * SDAI_PID_ptr;
|
||||
typedef SDAI_PID_ptr SDAI_PID_var;
|
||||
|
||||
|
||||
// interface PID_DA (ISO/DIS 10303-23:1996(E) 5.3.10.3)
|
||||
// Also, CORBA POS specification, Direct Access Protocol, Section 5.10.1
|
||||
//
|
||||
// The Direct Access Protocol supports direct access to persistent data
|
||||
// through typed attributes organized in data objects that are defined
|
||||
// in a Data Definition Language (DDL). An object using this protocol
|
||||
// whould represent its persistent data as one or more interconnected
|
||||
// data objects, For uniformity, the persistent data of an object is
|
||||
// described as a single data object; however, that data object might be
|
||||
// the root of a graph of data objects interconnected by stored data
|
||||
// object references. If an object uses multiple data objects, the
|
||||
// object traverses the graph by following stored data object references.
|
||||
//
|
||||
// The PID_DA class maintains the persistent object identifier for an
|
||||
// application DAObject.
|
||||
//
|
||||
// POS: The Persistent Identifiers (PIDs) used by the PDS_DA contain
|
||||
// an object identifier that is local to the particular PDS. This value
|
||||
// may be accessed through this extension to the CosPersistencePID
|
||||
// interface.
|
||||
//
|
||||
// interface PID_DA (ISO/DIS 10303-23:1996(E) 5.3.10.3)
|
||||
// Also, CORBA POS specification, Direct Access Protocol, Section 5.10.1
|
||||
//
|
||||
// The Direct Access Protocol supports direct access to persistent data
|
||||
// through typed attributes organized in data objects that are defined
|
||||
// in a Data Definition Language (DDL). An object using this protocol
|
||||
// whould represent its persistent data as one or more interconnected
|
||||
// data objects, For uniformity, the persistent data of an object is
|
||||
// described as a single data object; however, that data object might be
|
||||
// the root of a graph of data objects interconnected by stored data
|
||||
// object references. If an object uses multiple data objects, the
|
||||
// object traverses the graph by following stored data object references.
|
||||
//
|
||||
// The PID_DA class maintains the persistent object identifier for an
|
||||
// application DAObject.
|
||||
//
|
||||
// POS: The Persistent Identifiers (PIDs) used by the PDS_DA contain
|
||||
// an object identifier that is local to the particular PDS. This value
|
||||
// may be accessed through this extension to the CosPersistencePID
|
||||
// interface.
|
||||
//
|
||||
|
||||
class SCL_DAI_EXPORT SDAI_PID_DA: public SDAI_PID
|
||||
{
|
||||
public:
|
||||
class SCL_DAI_EXPORT SDAI_PID_DA: public SDAI_PID {
|
||||
public:
|
||||
|
||||
SDAI_String _oid ;
|
||||
SDAI_String _oid ;
|
||||
// oid (ISO/DIS 10303-23:1996(E) 5.3.10.3)
|
||||
//
|
||||
// This attribute shall set and return the string representation of the
|
||||
@@ -95,70 +97,75 @@ class SCL_DAI_EXPORT SDAI_PID_DA: public SDAI_PID
|
||||
//
|
||||
// POS: This returns the data object identifier used by this PDS for
|
||||
// the data object specified by the PID. The SDAI_DAObjectID type is
|
||||
// defined as an unbounded sequence of bytes that may be
|
||||
// defined as an unbounded sequence of bytes that may be
|
||||
// vendor-dependent.
|
||||
//
|
||||
|
||||
// constructor/destructor
|
||||
SDAI_PID_DA();
|
||||
virtual ~SDAI_PID_DA();
|
||||
// constructor/destructor
|
||||
SDAI_PID_DA();
|
||||
virtual ~SDAI_PID_DA();
|
||||
|
||||
virtual void oid (const SDAI_DAObjectID x) { _oid = x; }
|
||||
virtual SDAI_DAObjectID oid () const
|
||||
{ return const_cast<char *>(_oid.c_str()); }
|
||||
virtual void oid( const SDAI_DAObjectID x ) {
|
||||
_oid = x;
|
||||
}
|
||||
virtual SDAI_DAObjectID oid() const {
|
||||
return const_cast<char *>( _oid.c_str() );
|
||||
}
|
||||
};
|
||||
|
||||
typedef SDAI_PID_DA* SDAI_PID_DA_ptr;
|
||||
typedef SDAI_PID_DA * SDAI_PID_DA_ptr;
|
||||
typedef SDAI_PID_DA_ptr SDAI_PID_DA_var;
|
||||
|
||||
// interface PID_SDAI (ISO/DIS 10303-23:1996(E) 5.3.10.2)
|
||||
//
|
||||
// The PID_SDAI class maintains the persistent object identifier for
|
||||
// a Model_contents object.
|
||||
//
|
||||
class SCL_DAI_EXPORT SDAI_PID_SDAI : public SDAI_PID
|
||||
{
|
||||
public:
|
||||
SDAI_String _modelid ;
|
||||
// interface PID_SDAI (ISO/DIS 10303-23:1996(E) 5.3.10.2)
|
||||
//
|
||||
// The PID_SDAI class maintains the persistent object identifier for
|
||||
// a Model_contents object.
|
||||
//
|
||||
class SCL_DAI_EXPORT SDAI_PID_SDAI : public SDAI_PID {
|
||||
public:
|
||||
SDAI_String _modelid ;
|
||||
|
||||
// constructor/destructor
|
||||
SDAI_PID_SDAI();
|
||||
virtual ~SDAI_PID_SDAI();
|
||||
// constructor/destructor
|
||||
SDAI_PID_SDAI();
|
||||
virtual ~SDAI_PID_SDAI();
|
||||
|
||||
// Modelid (ISO/DIS 10303-23:1996(E) 5.3.10.3)
|
||||
//
|
||||
// This attribute shall set and return the string representation of
|
||||
// the persistent identifier of the cluster of data for the
|
||||
// the persistent identifier of the cluster of data for the
|
||||
// Model_contents referred to by this PID.
|
||||
//
|
||||
virtual void Modelid (const char * x) { _modelid = x; }
|
||||
virtual char * Modelid () const { return const_cast<char *>(_modelid.c_str()); }
|
||||
virtual void Modelid( const char * x ) {
|
||||
_modelid = x;
|
||||
}
|
||||
virtual char * Modelid() const {
|
||||
return const_cast<char *>( _modelid.c_str() );
|
||||
}
|
||||
};
|
||||
|
||||
typedef SDAI_PID_SDAI* SDAI_PID_SDAI_ptr;
|
||||
typedef SDAI_PID_SDAI * SDAI_PID_SDAI_ptr;
|
||||
typedef SDAI_PID_SDAI_ptr SDAI_PID_SDAI_var;
|
||||
|
||||
// interface DAObject (ISO/DIS 10303-23:1996(E) 5.3.10.5)
|
||||
// Also, CORBA POS Section 5.10.2, Direct Access Protocol.
|
||||
//
|
||||
// From POS: The DAObject interface provides operations that many data
|
||||
// object clients need. A Datastore implementation may provide support
|
||||
// for these operations automatically for its data objects. A data object
|
||||
// is not required to support this interface. A client can obtain access
|
||||
// to these operations by narrowing a data object reference to the
|
||||
// DAObject interface.
|
||||
//
|
||||
// interface DAObject (ISO/DIS 10303-23:1996(E) 5.3.10.5)
|
||||
// Also, CORBA POS Section 5.10.2, Direct Access Protocol.
|
||||
//
|
||||
// From POS: The DAObject interface provides operations that many data
|
||||
// object clients need. A Datastore implementation may provide support
|
||||
// for these operations automatically for its data objects. A data object
|
||||
// is not required to support this interface. A client can obtain access
|
||||
// to these operations by narrowing a data object reference to the
|
||||
// DAObject interface.
|
||||
//
|
||||
|
||||
// predefine these _ptr since they are used inside this class
|
||||
class SDAI_DAObject;
|
||||
typedef SDAI_DAObject* SDAI_DAObject_ptr;
|
||||
// predefine these _ptr since they are used inside this class
|
||||
class SDAI_DAObject;
|
||||
typedef SDAI_DAObject * SDAI_DAObject_ptr;
|
||||
typedef SDAI_DAObject_ptr SDAI_DAObject_var;
|
||||
|
||||
class SCL_DAI_EXPORT SDAI_DAObject : public SDAI_sdaiObject
|
||||
{
|
||||
public:
|
||||
class SCL_DAI_EXPORT SDAI_DAObject : public SDAI_sdaiObject {
|
||||
public:
|
||||
|
||||
SDAI_String _dado_oid;
|
||||
SDAI_String _dado_oid;
|
||||
|
||||
// dado_same (ISO/DIS 10303-23:1996(E) 5.3.10.5)
|
||||
//
|
||||
@@ -170,13 +177,13 @@ class SCL_DAI_EXPORT SDAI_DAObject : public SDAI_sdaiObject
|
||||
// identity.
|
||||
//
|
||||
|
||||
// constructor/destructor
|
||||
SDAI_DAObject();
|
||||
virtual ~SDAI_DAObject();
|
||||
// constructor/destructor
|
||||
SDAI_DAObject();
|
||||
virtual ~SDAI_DAObject();
|
||||
|
||||
Logical dado_same(SDAI_DAObject_ptr obj) {
|
||||
return LUnknown;
|
||||
}
|
||||
Logical dado_same( SDAI_DAObject_ptr obj ) {
|
||||
return LUnknown;
|
||||
}
|
||||
|
||||
// Get persistent label (ISO/DIS 10303-22:1996(E) 10.11.6)
|
||||
//
|
||||
@@ -193,33 +200,36 @@ class SCL_DAI_EXPORT SDAI_DAObject : public SDAI_sdaiObject
|
||||
// sdaiTR_NAVL The transaction is currently not available
|
||||
// sdaiTR_EAB The transaction ended abnormally
|
||||
// sdaiRP_NOPN The repository is not open
|
||||
// sdaiEI_NEXS The entity instance does not exist
|
||||
// sdaiEI_NEXS The entity instance does not exist
|
||||
// sdaiFN_NAVL This function is not supported by the implementation
|
||||
// sdaiSY_ERR An underlying system error occurred
|
||||
//
|
||||
// POS specification description: This returns the object identifier
|
||||
// for the data object. The scope of data object identifiers is
|
||||
// implementation-specific, but is not guaranteed to be global.
|
||||
//
|
||||
//
|
||||
/* jg == The return value of this function in Part 23 is PID_DA which
|
||||
seems wrong. We follow the CORBAservices specification here.
|
||||
(Persistent Object Service Specification, Section 5.10). Also
|
||||
note that the return value as described in the text above
|
||||
should be a string type.
|
||||
*/
|
||||
SDAI_DAObjectID dado_oid()
|
||||
{ return const_cast<char *>(_dado_oid.c_str()); }
|
||||
SDAI_DAObjectID dado_oid() {
|
||||
return const_cast<char *>( _dado_oid.c_str() );
|
||||
}
|
||||
|
||||
// dado_pid
|
||||
//
|
||||
// POS specification description: This returns a PID_DA for the
|
||||
// POS specification description: This returns a PID_DA for the
|
||||
// data object.
|
||||
//
|
||||
/* jg == This function is not included in Part 23 and 26. However, it is
|
||||
/* jg == This function is not included in Part 23 and 26. However, it is
|
||||
part of interface DAObject in the specification of the
|
||||
Persistent Object Service.
|
||||
Persistent Object Service.
|
||||
*/
|
||||
SDAI_PID_DA_ptr dado_pid() { return 0; }
|
||||
SDAI_PID_DA_ptr dado_pid() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// dado_remove (ISO/DIS 10303-23:1996(E) 5.3.10.5)
|
||||
//
|
||||
@@ -230,281 +240,281 @@ class SCL_DAI_EXPORT SDAI_DAObject : public SDAI_sdaiObject
|
||||
// POS specification description: This deletes the object from the
|
||||
// persistent store and deletes the in-memory data object.
|
||||
//
|
||||
void dado_remove() { }
|
||||
void dado_remove() { }
|
||||
|
||||
// dado_free (ISO/DIS 10303-23:1996(E) 5.3.10.5)
|
||||
//
|
||||
//
|
||||
// This function shall inform the implementation that it is free
|
||||
// to move the object back to the persistent store.
|
||||
//
|
||||
// POS specification description: This informs the PDS (Persistent
|
||||
//
|
||||
// POS specification description: This informs the PDS (Persistent
|
||||
// Data Service) that the data object is not required for the time
|
||||
// being, and the PDS may move it back to persistent store. The data
|
||||
// object must be preserved and must be brought back the next time it is
|
||||
// object must be preserved and must be brought back the next time it is
|
||||
// referenced. This operation is only a hint and is provided to improve
|
||||
// performance and resource usage.
|
||||
// performance and resource usage.
|
||||
//
|
||||
void dado_free() { }
|
||||
void dado_free() { }
|
||||
};
|
||||
|
||||
/*
|
||||
5.3.10.1 DAObject_SDAI
|
||||
*/
|
||||
|
||||
class SCL_DAI_EXPORT SDAI_DAObject_SDAI : public SDAI_DAObject {
|
||||
class SCL_DAI_EXPORT SDAI_DAObject_SDAI : public SDAI_DAObject {
|
||||
|
||||
public:
|
||||
SDAI_DAObject_SDAI();
|
||||
public:
|
||||
SDAI_DAObject_SDAI();
|
||||
|
||||
virtual ~SDAI_DAObject_SDAI();
|
||||
virtual ~SDAI_DAObject_SDAI();
|
||||
|
||||
/*
|
||||
5.3.10.1.1 Find entity instance SDAI-model
|
||||
*/
|
||||
/*
|
||||
5.3.10.1.1 Find entity instance SDAI-model
|
||||
*/
|
||||
|
||||
// Model_ptr Owning_model() const;
|
||||
|
||||
/*
|
||||
The Owning_model function shall implement the SDAI operation, Find
|
||||
entity instance SDAI-model.
|
||||
/*
|
||||
The Owning_model function shall implement the SDAI operation, Find
|
||||
entity instance SDAI-model.
|
||||
|
||||
The following specifies the coorespondence between each SDAI
|
||||
input/output and its equivalent specified in this Part.
|
||||
The following specifies the coorespondence between each SDAI
|
||||
input/output and its equivalent specified in this Part.
|
||||
|
||||
SDAI C++
|
||||
------ -------
|
||||
Object receiver
|
||||
Model return value
|
||||
SDAI C++
|
||||
------ -------
|
||||
Object receiver
|
||||
Model return value
|
||||
|
||||
5.3.10.1.2 Find entity instance users
|
||||
*/
|
||||
5.3.10.1.2 Find entity instance users
|
||||
*/
|
||||
|
||||
// Object__list_var FindObjectUsers(const
|
||||
// Schema_instance__list_var& aggr) const;
|
||||
// Schema_instance__list_var& aggr) const;
|
||||
|
||||
/*
|
||||
The FindObjectUsers function shall implement the SDAI operation,
|
||||
Find entity instance users.
|
||||
/*
|
||||
The FindObjectUsers function shall implement the SDAI operation,
|
||||
Find entity instance users.
|
||||
|
||||
The following specifies the coorespondence between each SDAI
|
||||
input/output and its equivalent specified in this Part.
|
||||
The following specifies the coorespondence between each SDAI
|
||||
input/output and its equivalent specified in this Part.
|
||||
|
||||
SDAI C++
|
||||
-------- --------
|
||||
Instance receiver
|
||||
Domain aggr
|
||||
Result return value
|
||||
SDAI C++
|
||||
-------- --------
|
||||
Instance receiver
|
||||
Domain aggr
|
||||
Result return value
|
||||
|
||||
5.3.10.1.3 Is same
|
||||
*/
|
||||
5.3.10.1.3 Is same
|
||||
*/
|
||||
|
||||
Logical IsSame(const SDAI_sdaiObject_ptr& otherEntity) const;
|
||||
Logical IsSame( const SDAI_sdaiObject_ptr & otherEntity ) const;
|
||||
|
||||
/*
|
||||
Function:
|
||||
The IsSame function shall determine whether the parameter otherEntity
|
||||
refers to the same instance as the receiver. This function shall
|
||||
implement the behaviour of the EXPRESS operator (:=:).
|
||||
/*
|
||||
Function:
|
||||
The IsSame function shall determine whether the parameter otherEntity
|
||||
refers to the same instance as the receiver. This function shall
|
||||
implement the behaviour of the EXPRESS operator (:=:).
|
||||
|
||||
Output:
|
||||
This function shall return TRUE if the two instances are identical.
|
||||
This function shall return FALSE if the two instances are not identical.
|
||||
This function shall return UNKNOWN if either instance is unset.
|
||||
Output:
|
||||
This function shall return TRUE if the two instances are identical.
|
||||
This function shall return FALSE if the two instances are not identical.
|
||||
This function shall return UNKNOWN if either instance is unset.
|
||||
|
||||
Possible error indicators:
|
||||
sdaiMX_NDEF // SDAI-model access not defined
|
||||
sdaiEI_NEXS // Entity instance does not exist
|
||||
sdaiTY_NDEF // Type not defined
|
||||
sdaiSY_ERR // Underlying system error
|
||||
Possible error indicators:
|
||||
sdaiMX_NDEF // SDAI-model access not defined
|
||||
sdaiEI_NEXS // Entity instance does not exist
|
||||
sdaiTY_NDEF // Type not defined
|
||||
sdaiSY_ERR // Underlying system error
|
||||
|
||||
Origin: Convenience function
|
||||
Origin: Convenience function
|
||||
|
||||
5.3.10.1.4 Get attribute
|
||||
*/
|
||||
5.3.10.1.4 Get attribute
|
||||
*/
|
||||
|
||||
#ifdef SDAI_CPP_LATE_BINDING
|
||||
Any_var GetAttr(const Attribute_ptr& attDef);
|
||||
Any_var GetAttr(const char* attName);
|
||||
Any_var GetAttr( const Attribute_ptr & attDef );
|
||||
Any_var GetAttr( const char * attName );
|
||||
#endif
|
||||
|
||||
/*
|
||||
The GetAttr functions shall implement the SDAI operation, Get attribute.
|
||||
/*
|
||||
The GetAttr functions shall implement the SDAI operation, Get attribute.
|
||||
|
||||
The following specifies the coorespondence between each SDAI
|
||||
input/output and its equivalent specified in this Part.
|
||||
The following specifies the coorespondence between each SDAI
|
||||
input/output and its equivalent specified in this Part.
|
||||
|
||||
SDAI C++
|
||||
------ ---------
|
||||
Object receiver
|
||||
Attribute attDef, attName
|
||||
Value return value
|
||||
SDAI C++
|
||||
------ ---------
|
||||
Object receiver
|
||||
Attribute attDef, attName
|
||||
Value return value
|
||||
|
||||
5.3.10.1.5 Get instance type
|
||||
*/
|
||||
5.3.10.1.5 Get instance type
|
||||
*/
|
||||
|
||||
#ifdef SDAI_CPP_LATE_BINDING
|
||||
const Entity_ptr GetInstanceType() const;
|
||||
const Entity_ptr GetInstanceType() const;
|
||||
#endif
|
||||
|
||||
/*
|
||||
Function:
|
||||
/*
|
||||
Function:
|
||||
|
||||
The GetInstanceType functions shall implement the SDAI operation,
|
||||
Get instance type.
|
||||
The GetInstanceType functions shall implement the SDAI operation,
|
||||
Get instance type.
|
||||
|
||||
The following specifies the coorespondence between each SDAI
|
||||
input/output and its equivalent specified in this Part.
|
||||
The following specifies the coorespondence between each SDAI
|
||||
input/output and its equivalent specified in this Part.
|
||||
|
||||
SDAI C++
|
||||
------ --------
|
||||
Object receiver
|
||||
Type return value
|
||||
SDAI C++
|
||||
------ --------
|
||||
Object receiver
|
||||
Type return value
|
||||
|
||||
5.3.10.1.6 Is instance of
|
||||
*/
|
||||
5.3.10.1.6 Is instance of
|
||||
*/
|
||||
|
||||
Boolean IsInstanceOf(const char* typeName) const;
|
||||
Boolean IsInstanceOf( const char * typeName ) const;
|
||||
#ifdef SDAI_CPP_LATE_BINDING
|
||||
Boolean IsInstanceOf(const Entity_ptr& otherEntity) const;
|
||||
Boolean IsInstanceOf( const Entity_ptr & otherEntity ) const;
|
||||
#endif
|
||||
|
||||
/*
|
||||
Function:
|
||||
The IsInstanceOf functions shall implement the SDAI operation Is
|
||||
instance of.
|
||||
/*
|
||||
Function:
|
||||
The IsInstanceOf functions shall implement the SDAI operation Is
|
||||
instance of.
|
||||
|
||||
The following specifies the coorespondence between each SDAI
|
||||
input/output and its equivalent specified in this Part.
|
||||
The following specifies the coorespondence between each SDAI
|
||||
input/output and its equivalent specified in this Part.
|
||||
|
||||
SDAI C++
|
||||
------ --------
|
||||
Object receiver
|
||||
Type typeName, otherEntity
|
||||
Result return value
|
||||
SDAI C++
|
||||
------ --------
|
||||
Object receiver
|
||||
Type typeName, otherEntity
|
||||
Result return value
|
||||
|
||||
5.3.10.1.7 Is kind of
|
||||
*/
|
||||
5.3.10.1.7 Is kind of
|
||||
*/
|
||||
|
||||
Boolean IsKindOf(const char* typeName) const;
|
||||
Boolean IsKindOf( const char * typeName ) const;
|
||||
#ifdef SDAI_CPP_LATE_BINDING
|
||||
Boolean IsKindOf(const Entity_ptr& theType) const;
|
||||
Boolean IsKindOf( const Entity_ptr & theType ) const;
|
||||
#endif
|
||||
|
||||
/*
|
||||
The IsKindOf functions shall implement the SDAI operation, Is kind of.
|
||||
/*
|
||||
The IsKindOf functions shall implement the SDAI operation, Is kind of.
|
||||
|
||||
The following specifies the coorespondence between each SDAI
|
||||
input/output and its equivalent specified in this Part.
|
||||
The following specifies the coorespondence between each SDAI
|
||||
input/output and its equivalent specified in this Part.
|
||||
|
||||
SDAI C++
|
||||
------ --------
|
||||
Object receiver
|
||||
Type typeName, theType
|
||||
Result return value
|
||||
SDAI C++
|
||||
------ --------
|
||||
Object receiver
|
||||
Type typeName, theType
|
||||
Result return value
|
||||
|
||||
5.3.10.1.8 Is SDAI kind of
|
||||
*/
|
||||
5.3.10.1.8 Is SDAI kind of
|
||||
*/
|
||||
|
||||
Boolean IsSDAIKindOf(const char* typeName) const;
|
||||
Boolean IsSDAIKindOf( const char * typeName ) const;
|
||||
|
||||
#ifdef SDAI_CPP_LATE_BINDING
|
||||
Boolean IsSDAIKindOf(const Entity_ptr& theType) const;
|
||||
Boolean IsSDAIKindOf( const Entity_ptr & theType ) const;
|
||||
#endif
|
||||
|
||||
/*
|
||||
The IsSDAIKindOf functions shall implement the SDAI operation,
|
||||
Is SDAI Kind Of.
|
||||
/*
|
||||
The IsSDAIKindOf functions shall implement the SDAI operation,
|
||||
Is SDAI Kind Of.
|
||||
|
||||
The following specifies the coorespondence between each SDAI
|
||||
input/output and its equivalent specified in this Part.
|
||||
The following specifies the coorespondence between each SDAI
|
||||
input/output and its equivalent specified in this Part.
|
||||
|
||||
SDAI C++
|
||||
------ --------
|
||||
Object receiver
|
||||
Type typeName, theType
|
||||
Result return value
|
||||
SDAI C++
|
||||
------ --------
|
||||
Object receiver
|
||||
Type typeName, theType
|
||||
Result return value
|
||||
|
||||
5.3.10.1.9 Test attribute
|
||||
*/
|
||||
5.3.10.1.9 Test attribute
|
||||
*/
|
||||
|
||||
#ifdef SDAI_CPP_LATE_BINDING
|
||||
Boolean TestAttr(const Attribute_ptr& attDef);
|
||||
Boolean TestAttr(const char* attName) const;
|
||||
Boolean TestAttr( const Attribute_ptr & attDef );
|
||||
Boolean TestAttr( const char * attName ) const;
|
||||
#endif
|
||||
|
||||
/*
|
||||
The TestAttr functions shall implement the SDAI operation,
|
||||
Test attribute.
|
||||
/*
|
||||
The TestAttr functions shall implement the SDAI operation,
|
||||
Test attribute.
|
||||
|
||||
The following specifies the coorespondence between each SDAI
|
||||
input/output and its equivalent specified in this Part.
|
||||
The following specifies the coorespondence between each SDAI
|
||||
input/output and its equivalent specified in this Part.
|
||||
|
||||
SDAI C++
|
||||
------ ---------
|
||||
Object receiver
|
||||
Attribute attDef, attName
|
||||
Result return value
|
||||
|
||||
5.3.10.1.10 Get instance type name
|
||||
*/
|
||||
SDAI C++
|
||||
------ ---------
|
||||
Object receiver
|
||||
Attribute attDef, attName
|
||||
Result return value
|
||||
|
||||
5.3.10.1.10 Get instance type name
|
||||
*/
|
||||
|
||||
#ifndef SDAI_CPP_LATE_BINDING
|
||||
char * GetInstanceTypeName() const;
|
||||
char * GetInstanceTypeName() const;
|
||||
#endif
|
||||
/*
|
||||
Function:
|
||||
The GetInstanceType function shall retrieve the name of the type of
|
||||
the receiver.
|
||||
/*
|
||||
Function:
|
||||
The GetInstanceType function shall retrieve the name of the type of
|
||||
the receiver.
|
||||
|
||||
Output:
|
||||
This function shall return a String which contains the name of the
|
||||
type of the receiver. The returned name shall be the name as it
|
||||
appears in the Dictionary Model.
|
||||
Output:
|
||||
This function shall return a String which contains the name of the
|
||||
type of the receiver. The returned name shall be the name as it
|
||||
appears in the Dictionary Model.
|
||||
|
||||
Possible error indicators:
|
||||
sdaiMX_NDEF // SDAI-model access not defined
|
||||
sdaiEI_NEXS // Entity instance does not exist
|
||||
sdaiSY_ERR // Underlying system error
|
||||
Possible error indicators:
|
||||
sdaiMX_NDEF // SDAI-model access not defined
|
||||
sdaiEI_NEXS // Entity instance does not exist
|
||||
sdaiSY_ERR // Underlying system error
|
||||
|
||||
Origin: Convenience function
|
||||
*/
|
||||
Origin: Convenience function
|
||||
*/
|
||||
|
||||
};
|
||||
|
||||
typedef SDAI_DAObject_SDAI* SDAI_DAObject_SDAI_ptr;
|
||||
typedef SDAI_DAObject_SDAI * SDAI_DAObject_SDAI_ptr;
|
||||
typedef SDAI_DAObject_SDAI_ptr SDAI_DAObject_SDAI_var;
|
||||
|
||||
class SCL_DAI_EXPORT SDAI_DAObject__set {
|
||||
public:
|
||||
SDAI_DAObject__set(int = 16);
|
||||
~SDAI_DAObject__set();
|
||||
public:
|
||||
SDAI_DAObject__set( int = 16 );
|
||||
~SDAI_DAObject__set();
|
||||
|
||||
SDAI_DAObject_ptr retrieve(int index);
|
||||
int is_empty();
|
||||
SDAI_DAObject_ptr retrieve( int index );
|
||||
int is_empty();
|
||||
|
||||
SDAI_DAObject_ptr& operator[](int index);
|
||||
SDAI_DAObject_ptr & operator[]( int index );
|
||||
|
||||
void Insert(SDAI_DAObject_ptr, int index);
|
||||
void Append(SDAI_DAObject_ptr);
|
||||
void Remove(int index);
|
||||
void Insert( SDAI_DAObject_ptr, int index );
|
||||
void Append( SDAI_DAObject_ptr );
|
||||
void Remove( int index );
|
||||
|
||||
int Index(SDAI_DAObject_ptr);
|
||||
int Index( SDAI_DAObject_ptr );
|
||||
|
||||
void Clear();
|
||||
int Count();
|
||||
void Clear();
|
||||
int Count();
|
||||
|
||||
private:
|
||||
void Check(int index);
|
||||
private:
|
||||
SDAI_DAObject_ptr* _buf;
|
||||
int _bufsize;
|
||||
int _count;
|
||||
private:
|
||||
void Check( int index );
|
||||
private:
|
||||
SDAI_DAObject_ptr * _buf;
|
||||
int _bufsize;
|
||||
int _count;
|
||||
|
||||
public:
|
||||
public:
|
||||
|
||||
};
|
||||
|
||||
typedef SDAI_DAObject__set* SDAI_DAObject__set_ptr;
|
||||
typedef SDAI_DAObject__set * SDAI_DAObject__set_ptr;
|
||||
typedef SDAI_DAObject__set_ptr SDAI_DAObject__set_var;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -45,13 +45,13 @@ SDAI_Entity_extent::definition_( const Entity_ptr & ep ) {
|
||||
}
|
||||
|
||||
void
|
||||
SDAI_Entity_extent::definition_name_( const SDAI_Entity_name& en ) {
|
||||
SDAI_Entity_extent::definition_name_( const SDAI_Entity_name & en ) {
|
||||
_definition_name = new char[strlen( en ) + 1];
|
||||
strncpy( _definition_name, en, strlen( en ) + 1 );
|
||||
}
|
||||
|
||||
void
|
||||
SDAI_Entity_extent::owned_by_( SDAI_Model_contents__list_var& mclv ) {
|
||||
SDAI_Entity_extent::owned_by_( SDAI_Model_contents__list_var & mclv ) {
|
||||
// _owned_by = mcp;
|
||||
}
|
||||
|
||||
@@ -92,7 +92,7 @@ SDAI_DAObject__set_var instances_() const
|
||||
*/
|
||||
|
||||
void
|
||||
SDAI_Entity_extent::AddInstance( const SDAI_DAObject_ptr& appInst ) {
|
||||
SDAI_Entity_extent::AddInstance( const SDAI_DAObject_ptr & appInst ) {
|
||||
_instances.Append( appInst );
|
||||
}
|
||||
|
||||
@@ -114,7 +114,7 @@ SDAI_Entity_extent::AddInstance( const SDAI_DAObject_ptr& appInst ) {
|
||||
|
||||
|
||||
void
|
||||
SDAI_Entity_extent::RemoveInstance( const SDAI_DAObject_ptr& appInst ) {
|
||||
SDAI_Entity_extent::RemoveInstance( const SDAI_DAObject_ptr & appInst ) {
|
||||
_instances.Remove( _instances.Index( appInst ) );
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
//#include <ModelContents.h>
|
||||
*/
|
||||
|
||||
/*
|
||||
/*
|
||||
7.3.3 Entity extent
|
||||
*/
|
||||
|
||||
@@ -18,102 +18,106 @@ class SDAI_Entity_extent;
|
||||
typedef SDAI_Entity_extent * SDAI_Entity_extent_ptr;
|
||||
typedef SDAI_Entity_extent_ptr SDAI_Entity_extent_var;
|
||||
|
||||
class SCL_DAI_EXPORT SDAI_Entity_extent : public SDAI_Session_instance {
|
||||
class SCL_DAI_EXPORT SDAI_Entity_extent : public SDAI_Session_instance {
|
||||
|
||||
friend class SDAI_Model_contents;
|
||||
/*
|
||||
NOTE - The ModelContent class is a friend so that ModelContent may add
|
||||
instances to Entity_extent instances.
|
||||
*/
|
||||
friend class SDAI_Model_contents;
|
||||
/*
|
||||
NOTE - The ModelContent class is a friend so that ModelContent may add
|
||||
instances to Entity_extent instances.
|
||||
*/
|
||||
|
||||
public: //for now
|
||||
public: //for now
|
||||
// protected:
|
||||
Entity_ptr _definition ;
|
||||
SDAI_Entity_name _definition_name ;
|
||||
SDAI_DAObject__set _instances ; // of Application_instance
|
||||
// Entity_instance__set _instances ; // of entity_instance
|
||||
// EntityAggregate _instances ; // of entity_instance
|
||||
Entity_ptr _definition ;
|
||||
SDAI_Entity_name _definition_name ;
|
||||
SDAI_DAObject__set _instances ; // of Application_instance
|
||||
// Entity_instance__set _instances ; // of entity_instance
|
||||
// EntityAggregate _instances ; // of entity_instance
|
||||
// Express in part 22 - INVERSE owned_by : sdai_model_contents FOR folders;
|
||||
SDAI_Model_contents__list _owned_by ; // ADDED in Part 22
|
||||
SDAI_Model_contents__list _owned_by ; // ADDED in Part 22
|
||||
|
||||
// private:
|
||||
SDAI_Entity_extent();
|
||||
// SDAI_Entity_extent(const SDAI_Entity_extent& ee);
|
||||
~SDAI_Entity_extent(); // not in part 23
|
||||
SDAI_Entity_extent();
|
||||
// SDAI_Entity_extent(const SDAI_Entity_extent& ee);
|
||||
~SDAI_Entity_extent(); // not in part 23
|
||||
|
||||
public:
|
||||
public:
|
||||
|
||||
SDAI_Entity_name definition_name_() const
|
||||
{ return _definition_name; }
|
||||
SDAI_Entity_name definition_name_() const {
|
||||
return _definition_name;
|
||||
}
|
||||
|
||||
const Entity_ptr definition_() const;
|
||||
const Entity_ptr definition_() const;
|
||||
#ifdef SDAI_CPP_LATE_BINDING
|
||||
// const Entity_ptr definition_() const;
|
||||
#endif
|
||||
|
||||
SDAI_DAObject__set_var instances_() { return &_instances; }
|
||||
SDAI_DAObject__set_var instances_() const
|
||||
{ return (const SDAI_DAObject__set_var)&_instances; }
|
||||
SDAI_DAObject__set_var instances_() {
|
||||
return &_instances;
|
||||
}
|
||||
SDAI_DAObject__set_var instances_() const {
|
||||
return ( const SDAI_DAObject__set_var )&_instances;
|
||||
}
|
||||
|
||||
// need to implement Model_contents__list
|
||||
const SDAI_Model_contents__list_var owned_by_() const;
|
||||
const SDAI_Model_contents__list_var owned_by_() const;
|
||||
|
||||
// static SDAI_Entity_extent_ptr
|
||||
// _duplicate(SDAI_Entity_extent_ptr eep);
|
||||
// static SDAI_Entity_extent_ptr
|
||||
// _duplicate(SDAI_Entity_extent_ptr eep);
|
||||
// static SDAI_Entity_extent_ptr _narrow(Object_ptr op);
|
||||
// static SDAI_Entity_extent_ptr _nil();
|
||||
|
||||
// private:
|
||||
void definition_(const Entity_ptr& ep);
|
||||
void definition_( const Entity_ptr & ep );
|
||||
#ifdef SDAI_CPP_LATE_BINDING
|
||||
// void definition_(const Entity_ptr& ep);
|
||||
#endif
|
||||
void definition_name_(const SDAI_Entity_name& ep);
|
||||
void owned_by_(SDAI_Model_contents__list_var& mcp);
|
||||
void definition_name_( const SDAI_Entity_name & ep );
|
||||
void owned_by_( SDAI_Model_contents__list_var & mcp );
|
||||
|
||||
/*
|
||||
7.3.3.1 SDAI operation declarations
|
||||
/*
|
||||
7.3.3.1 SDAI operation declarations
|
||||
|
||||
7.3.3.1.1 AddInstance
|
||||
*/
|
||||
7.3.3.1.1 AddInstance
|
||||
*/
|
||||
|
||||
// this is no longer in Part 23
|
||||
void AddInstance(const SDAI_DAObject_ptr& appInst);
|
||||
// this is no longer in Part 23
|
||||
void AddInstance( const SDAI_DAObject_ptr & appInst );
|
||||
|
||||
/*
|
||||
Function:
|
||||
/*
|
||||
Function:
|
||||
|
||||
The AddInstance function shall add the entity instance entity
|
||||
handle to the instances set of the receiver.
|
||||
The AddInstance function shall add the entity instance entity
|
||||
handle to the instances set of the receiver.
|
||||
|
||||
Possible error indicators:
|
||||
sdaiSS_NOPN // Session not open
|
||||
sdaiRP_NOPN // Repository not open
|
||||
sdaiMO_NEXS // SDAI-model does not exist
|
||||
sdaiMX_NRW // SDAI-model access not read-write
|
||||
sdaiSY_ERR // Underlying system error
|
||||
Possible error indicators:
|
||||
sdaiSS_NOPN // Session not open
|
||||
sdaiRP_NOPN // Repository not open
|
||||
sdaiMO_NEXS // SDAI-model does not exist
|
||||
sdaiMX_NRW // SDAI-model access not read-write
|
||||
sdaiSY_ERR // Underlying system error
|
||||
|
||||
Origin: Convenience function
|
||||
*/
|
||||
Origin: Convenience function
|
||||
*/
|
||||
|
||||
// this is no longer in Part 23
|
||||
void RemoveInstance(const SDAI_DAObject_ptr& appInst);
|
||||
// this is no longer in Part 23
|
||||
void RemoveInstance( const SDAI_DAObject_ptr & appInst );
|
||||
|
||||
/*
|
||||
7.3.3.1.2 RemoveInstance
|
||||
Function:
|
||||
The RemoveInstance function shall remove the entity instance entity
|
||||
handle from the instances set of the receiver.
|
||||
/*
|
||||
7.3.3.1.2 RemoveInstance
|
||||
Function:
|
||||
The RemoveInstance function shall remove the entity instance entity
|
||||
handle from the instances set of the receiver.
|
||||
|
||||
Possible error indicators:
|
||||
sdaiSS_NOPN // Session not open
|
||||
sdaiRP_NOPN // Repository not open
|
||||
sdaiMO_NEXS // SDAI-model does not exist
|
||||
sdaiMX_NRW // SDAI-model access not read-write
|
||||
sdaiSY_ERR // Underlying system error
|
||||
Possible error indicators:
|
||||
sdaiSS_NOPN // Session not open
|
||||
sdaiRP_NOPN // Repository not open
|
||||
sdaiMO_NEXS // SDAI-model does not exist
|
||||
sdaiMX_NRW // SDAI-model access not read-write
|
||||
sdaiSY_ERR // Underlying system error
|
||||
|
||||
Origin: Convenience function
|
||||
*/
|
||||
Origin: Convenience function
|
||||
*/
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ SDAI_Entity_extent__set::~SDAI_Entity_extent__set() {
|
||||
|
||||
void SDAI_Entity_extent__set::Check( int index ) {
|
||||
|
||||
SDAI_Entity_extent_ptr* newbuf;
|
||||
SDAI_Entity_extent_ptr * newbuf;
|
||||
|
||||
if( index >= _bufsize ) {
|
||||
_bufsize = ( index + 1 ) * 2;
|
||||
@@ -69,7 +69,7 @@ void SDAI_Entity_extent__set::Check( int index ) {
|
||||
void
|
||||
SDAI_Entity_extent__set::Insert( SDAI_Entity_extent_ptr v, int index ) {
|
||||
|
||||
SDAI_Entity_extent_ptr* spot;
|
||||
SDAI_Entity_extent_ptr * spot;
|
||||
index = ( index < 0 ) ? _count : index;
|
||||
|
||||
if( index < _count ) {
|
||||
@@ -88,7 +88,7 @@ SDAI_Entity_extent__set::Insert( SDAI_Entity_extent_ptr v, int index ) {
|
||||
void SDAI_Entity_extent__set::Append( SDAI_Entity_extent_ptr v ) {
|
||||
|
||||
int index = _count;
|
||||
SDAI_Entity_extent_ptr* spot;
|
||||
SDAI_Entity_extent_ptr * spot;
|
||||
|
||||
if( index < _count ) {
|
||||
Check( _count + 1 );
|
||||
@@ -107,7 +107,7 @@ void SDAI_Entity_extent__set::Remove( int index ) {
|
||||
|
||||
if( 0 <= index && index < _count ) {
|
||||
--_count;
|
||||
SDAI_Entity_extent_ptr* spot = &_buf[index];
|
||||
SDAI_Entity_extent_ptr * spot = &_buf[index];
|
||||
memmove( spot, spot + 1, ( _count - index )*sizeof( SDAI_Entity_extent_ptr ) );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,34 +36,34 @@
|
||||
*/
|
||||
|
||||
class SCL_DAI_EXPORT SDAI_Entity_extent__set {
|
||||
public:
|
||||
public:
|
||||
|
||||
SDAI_Entity_extent__set(int = 16);
|
||||
~SDAI_Entity_extent__set();
|
||||
SDAI_Entity_extent__set( int = 16 );
|
||||
~SDAI_Entity_extent__set();
|
||||
|
||||
SDAI_Entity_extent_ptr retrieve(int index);
|
||||
int is_empty();
|
||||
SDAI_Entity_extent_ptr retrieve( int index );
|
||||
int is_empty();
|
||||
|
||||
SDAI_Entity_extent_ptr& operator[](int index);
|
||||
SDAI_Entity_extent_ptr & operator[]( int index );
|
||||
|
||||
void Insert(SDAI_Entity_extent_ptr, int index);
|
||||
void Append(SDAI_Entity_extent_ptr);
|
||||
void Remove(int index);
|
||||
int Index(SDAI_Entity_extent_ptr);
|
||||
void Insert( SDAI_Entity_extent_ptr, int index );
|
||||
void Append( SDAI_Entity_extent_ptr );
|
||||
void Remove( int index );
|
||||
int Index( SDAI_Entity_extent_ptr );
|
||||
|
||||
void Clear();
|
||||
int Count();
|
||||
void Clear();
|
||||
int Count();
|
||||
|
||||
private:
|
||||
void Check(int index);
|
||||
private:
|
||||
SDAI_Entity_extent_ptr* _buf;
|
||||
int _bufsize;
|
||||
int _count;
|
||||
private:
|
||||
void Check( int index );
|
||||
private:
|
||||
SDAI_Entity_extent_ptr * _buf;
|
||||
int _bufsize;
|
||||
int _count;
|
||||
|
||||
};
|
||||
|
||||
typedef SDAI_Entity_extent__set* SDAI_Entity_extent__set_ptr;
|
||||
typedef SDAI_Entity_extent__set * SDAI_Entity_extent__set_ptr;
|
||||
typedef SDAI_Entity_extent__set_ptr SDAI_Entity_extent__set_var;
|
||||
|
||||
/*
|
||||
|
||||
+16
-16
@@ -26,7 +26,7 @@ SDAI_LOGICAL::SDAI_LOGICAL( Logical state ) {
|
||||
set_value( state );
|
||||
}
|
||||
|
||||
SDAI_LOGICAL::SDAI_LOGICAL( const SDAI_LOGICAL& source ) {
|
||||
SDAI_LOGICAL::SDAI_LOGICAL( const SDAI_LOGICAL & source ) {
|
||||
set_value( source.asInt() );
|
||||
}
|
||||
|
||||
@@ -86,12 +86,12 @@ SDAI_LOGICAL::operator Logical() const {
|
||||
|
||||
|
||||
|
||||
SDAI_LOGICAL & SDAI_LOGICAL::operator= ( const SDAI_LOGICAL& t ) {
|
||||
SDAI_LOGICAL & SDAI_LOGICAL::operator= ( const SDAI_LOGICAL & t ) {
|
||||
set_value( t.asInt() );
|
||||
return *this;
|
||||
}
|
||||
|
||||
SDAI_LOGICAL SDAI_LOGICAL::operator ==( const SDAI_LOGICAL& t ) const {
|
||||
SDAI_LOGICAL SDAI_LOGICAL::operator ==( const SDAI_LOGICAL & t ) const {
|
||||
if( v == t.asInt() ) {
|
||||
return LTrue ;
|
||||
}
|
||||
@@ -137,7 +137,7 @@ int SDAI_LOGICAL::set_value( const char * n ) {
|
||||
|
||||
|
||||
Severity SDAI_LOGICAL::ReadEnum( istream & in, ErrorDescriptor * err, int AssignVal,
|
||||
int needDelims ) {
|
||||
int needDelims ) {
|
||||
if( AssignVal ) {
|
||||
set_null();
|
||||
}
|
||||
@@ -271,7 +271,7 @@ SDAI_BOOLEAN::SDAI_BOOLEAN( Boolean state ) {
|
||||
set_value( state );
|
||||
}
|
||||
|
||||
SDAI_BOOLEAN::SDAI_BOOLEAN( const SDAI_BOOLEAN& source ) {
|
||||
SDAI_BOOLEAN::SDAI_BOOLEAN( const SDAI_BOOLEAN & source ) {
|
||||
set_value( source.asInt() );
|
||||
}
|
||||
|
||||
@@ -290,7 +290,7 @@ SDAI_BOOLEAN::SDAI_BOOLEAN( int i ) {
|
||||
}
|
||||
}
|
||||
|
||||
SDAI_BOOLEAN::SDAI_BOOLEAN( const SDAI_LOGICAL& val ) {
|
||||
SDAI_BOOLEAN::SDAI_BOOLEAN( const SDAI_LOGICAL & val ) {
|
||||
if( val.asInt() == LUnknown ) {
|
||||
// this should set error code sdaiVT_NVLD i.e. Invalid value type.
|
||||
v = BUnset;
|
||||
@@ -311,7 +311,7 @@ SDAI_BOOLEAN::operator Boolean() const {
|
||||
}
|
||||
}
|
||||
|
||||
SDAI_BOOLEAN & SDAI_BOOLEAN::operator= ( const SDAI_LOGICAL& t ) {
|
||||
SDAI_BOOLEAN & SDAI_BOOLEAN::operator= ( const SDAI_LOGICAL & t ) {
|
||||
set_value( t.asInt() );
|
||||
return *this;
|
||||
}
|
||||
@@ -332,7 +332,7 @@ const char * SDAI_BOOLEAN::element_at( int n ) const {
|
||||
}
|
||||
}
|
||||
|
||||
SDAI_LOGICAL SDAI_BOOLEAN::operator ==( const SDAI_LOGICAL& t ) const {
|
||||
SDAI_LOGICAL SDAI_BOOLEAN::operator ==( const SDAI_LOGICAL & t ) const {
|
||||
if( v == t.asInt() ) {
|
||||
return LTrue ;
|
||||
}
|
||||
@@ -413,7 +413,7 @@ void SDAI_Enum::DebugDisplay( ostream & out ) const {
|
||||
** true or false => non-matching delimiters are flagged as an error
|
||||
*/
|
||||
Severity SDAI_Enum::ReadEnum( istream & in, ErrorDescriptor * err, int AssignVal,
|
||||
int needDelims ) {
|
||||
int needDelims ) {
|
||||
if( AssignVal ) {
|
||||
set_null();
|
||||
}
|
||||
@@ -588,8 +588,8 @@ const char * SDAI_Enum::STEPwrite( std::string & s ) const {
|
||||
}
|
||||
|
||||
Severity SDAI_Enum::EnumValidLevel( istream & in, ErrorDescriptor * err,
|
||||
int optional, char * tokenList,
|
||||
int needDelims, int clearError ) {
|
||||
int optional, char * tokenList,
|
||||
int needDelims, int clearError ) {
|
||||
if( clearError ) {
|
||||
err->ClearErrorMsg();
|
||||
}
|
||||
@@ -625,8 +625,8 @@ Severity SDAI_Enum::EnumValidLevel( istream & in, ErrorDescriptor * err,
|
||||
}
|
||||
|
||||
Severity SDAI_Enum::EnumValidLevel( const char * value, ErrorDescriptor * err,
|
||||
int optional, char * tokenList,
|
||||
int needDelims, int clearError ) {
|
||||
int optional, char * tokenList,
|
||||
int needDelims, int clearError ) {
|
||||
istringstream in( ( char * )value );
|
||||
return EnumValidLevel( in, err, optional, tokenList, needDelims,
|
||||
clearError );
|
||||
@@ -638,7 +638,7 @@ Severity SDAI_Enum::EnumValidLevel( const char * value, ErrorDescriptor * err,
|
||||
** warning is printed and processing continues
|
||||
**
|
||||
** set_value is the same function as put
|
||||
**
|
||||
**
|
||||
** Parameter: value to be set
|
||||
** Status: ok 2.91
|
||||
** \returns: value set
|
||||
@@ -690,12 +690,12 @@ SDAI_Enum & SDAI_Enum::operator= ( const int i ) {
|
||||
return *this;
|
||||
}
|
||||
|
||||
SDAI_Enum & SDAI_Enum::operator= ( const SDAI_Enum& Senum ) {
|
||||
SDAI_Enum & SDAI_Enum::operator= ( const SDAI_Enum & Senum ) {
|
||||
put( Senum.asInt() );
|
||||
return *this;
|
||||
}
|
||||
|
||||
ostream & operator<< ( ostream & out, const SDAI_Enum& a ) {
|
||||
ostream & operator<< ( ostream & out, const SDAI_Enum & a ) {
|
||||
std::string tmp;
|
||||
out << a.asStr( tmp );
|
||||
return out;
|
||||
|
||||
+92
-84
@@ -15,59 +15,67 @@
|
||||
#include <scl_export.h>
|
||||
|
||||
class SCL_DAI_EXPORT SDAI_Enum {
|
||||
friend ostream &operator<< ( ostream&, const SDAI_Enum& );
|
||||
protected:
|
||||
int v; // integer value of enumeration instance
|
||||
// mapped to a symbolic value in the elements
|
||||
friend ostream & operator<< ( ostream &, const SDAI_Enum & );
|
||||
protected:
|
||||
int v; // integer value of enumeration instance
|
||||
// mapped to a symbolic value in the elements
|
||||
|
||||
virtual int set_value (const char * n);
|
||||
virtual int set_value (const int n);
|
||||
SDAI_Enum();
|
||||
virtual ~SDAI_Enum();
|
||||
virtual int set_value( const char * n );
|
||||
virtual int set_value( const int n );
|
||||
SDAI_Enum();
|
||||
virtual ~SDAI_Enum();
|
||||
|
||||
public:
|
||||
public:
|
||||
|
||||
void PrintContents(ostream &out = cout) const
|
||||
{ DebugDisplay(out); }
|
||||
|
||||
virtual int no_elements () const =0;
|
||||
virtual const char * Name () const =0;
|
||||
const char * get_value_at (int n) const { return element_at (n); }
|
||||
virtual const char * element_at (int n) const =0;
|
||||
void PrintContents( ostream & out = cout ) const {
|
||||
DebugDisplay( out );
|
||||
}
|
||||
|
||||
Severity EnumValidLevel(const char *value, ErrorDescriptor *err,
|
||||
int optional, char *tokenList,
|
||||
int needDelims = 0, int clearError = 1);
|
||||
virtual int no_elements() const = 0;
|
||||
virtual const char * Name() const = 0;
|
||||
const char * get_value_at( int n ) const {
|
||||
return element_at( n );
|
||||
}
|
||||
virtual const char * element_at( int n ) const = 0;
|
||||
|
||||
Severity EnumValidLevel(istream &in, ErrorDescriptor *err,
|
||||
int optional, char *tokenList,
|
||||
int needDelims = 0, int clearError = 1);
|
||||
Severity EnumValidLevel( const char * value, ErrorDescriptor * err,
|
||||
int optional, char * tokenList,
|
||||
int needDelims = 0, int clearError = 1 );
|
||||
|
||||
const int asInt () const { return v; }
|
||||
|
||||
const char * asStr (std::string& s) const;
|
||||
void STEPwrite (ostream& out = cout) const;
|
||||
const char * STEPwrite (std::string& s) const;
|
||||
Severity EnumValidLevel( istream & in, ErrorDescriptor * err,
|
||||
int optional, char * tokenList,
|
||||
int needDelims = 0, int clearError = 1 );
|
||||
|
||||
Severity StrToVal (const char * s, ErrorDescriptor *err, int optional = 1);
|
||||
Severity STEPread(istream& in, ErrorDescriptor *err, int optional = 1);
|
||||
Severity STEPread(const char *s, ErrorDescriptor *err, int optional = 1);
|
||||
const int asInt() const {
|
||||
return v;
|
||||
}
|
||||
|
||||
virtual int put (int val);
|
||||
virtual int put (const char * n);
|
||||
int is_null () const
|
||||
{ return ! (exists()); }
|
||||
void set_null() { nullify(); }
|
||||
SDAI_Enum& operator= (const int);
|
||||
SDAI_Enum& operator= (const SDAI_Enum&);
|
||||
const char * asStr( std::string & s ) const;
|
||||
void STEPwrite( ostream & out = cout ) const;
|
||||
const char * STEPwrite( std::string & s ) const;
|
||||
|
||||
virtual int exists() const;
|
||||
virtual void nullify();
|
||||
void DebugDisplay (ostream& out =cout) const;
|
||||
Severity StrToVal( const char * s, ErrorDescriptor * err, int optional = 1 );
|
||||
Severity STEPread( istream & in, ErrorDescriptor * err, int optional = 1 );
|
||||
Severity STEPread( const char * s, ErrorDescriptor * err, int optional = 1 );
|
||||
|
||||
protected:
|
||||
virtual Severity ReadEnum(istream& in, ErrorDescriptor *err,
|
||||
int AssignVal = 1, int needDelims = 1);
|
||||
virtual int put( int val );
|
||||
virtual int put( const char * n );
|
||||
int is_null() const {
|
||||
return !( exists() );
|
||||
}
|
||||
void set_null() {
|
||||
nullify();
|
||||
}
|
||||
SDAI_Enum & operator= ( const int );
|
||||
SDAI_Enum & operator= ( const SDAI_Enum & );
|
||||
|
||||
virtual int exists() const;
|
||||
virtual void nullify();
|
||||
void DebugDisplay( ostream & out = cout ) const;
|
||||
|
||||
protected:
|
||||
virtual Severity ReadEnum( istream & in, ErrorDescriptor * err,
|
||||
int AssignVal = 1, int needDelims = 1 );
|
||||
};
|
||||
|
||||
|
||||
@@ -79,64 +87,64 @@ enum Boolean { BFalse, BTrue, BUnset };
|
||||
enum Logical { LFalse, LTrue, LUnset, LUnknown };
|
||||
|
||||
class SCL_DAI_EXPORT SDAI_LOGICAL :
|
||||
public SDAI_Enum {
|
||||
public:
|
||||
const char * Name() const;
|
||||
public SDAI_Enum {
|
||||
public:
|
||||
const char * Name() const;
|
||||
|
||||
SDAI_LOGICAL (char * val =0);
|
||||
SDAI_LOGICAL (Logical state);
|
||||
SDAI_LOGICAL (const SDAI_LOGICAL& source);
|
||||
SDAI_LOGICAL (int i);
|
||||
SDAI_LOGICAL( char * val = 0 );
|
||||
SDAI_LOGICAL( Logical state );
|
||||
SDAI_LOGICAL( const SDAI_LOGICAL & source );
|
||||
SDAI_LOGICAL( int i );
|
||||
|
||||
virtual ~SDAI_LOGICAL ();
|
||||
virtual ~SDAI_LOGICAL();
|
||||
|
||||
virtual int no_elements () const;
|
||||
virtual const char * element_at (int n) const;
|
||||
virtual int no_elements() const;
|
||||
virtual const char * element_at( int n ) const;
|
||||
|
||||
operator Logical () const;
|
||||
SDAI_LOGICAL& operator=(const SDAI_LOGICAL& t);
|
||||
operator Logical() const;
|
||||
SDAI_LOGICAL & operator=( const SDAI_LOGICAL & t );
|
||||
|
||||
SDAI_LOGICAL operator==( const SDAI_LOGICAL& t ) const;
|
||||
SDAI_LOGICAL operator==( const SDAI_LOGICAL & t ) const;
|
||||
|
||||
// these 2 are redefined because LUnknown has cardinal value > LUnset
|
||||
int exists() const; // return 0 if unset otherwise return 1
|
||||
void nullify(); // change the receiver to an unset status
|
||||
// these 2 are redefined because LUnknown has cardinal value > LUnset
|
||||
int exists() const; // return 0 if unset otherwise return 1
|
||||
void nullify(); // change the receiver to an unset status
|
||||
|
||||
protected:
|
||||
virtual int set_value (const int n);
|
||||
virtual int set_value (const char * n);
|
||||
virtual Severity ReadEnum(istream& in, ErrorDescriptor *err,
|
||||
int AssignVal = 1, int needDelims = 1);
|
||||
protected:
|
||||
virtual int set_value( const int n );
|
||||
virtual int set_value( const char * n );
|
||||
virtual Severity ReadEnum( istream & in, ErrorDescriptor * err,
|
||||
int AssignVal = 1, int needDelims = 1 );
|
||||
|
||||
};
|
||||
|
||||
class SCL_DAI_EXPORT SDAI_BOOLEAN :
|
||||
public SDAI_Enum {
|
||||
public:
|
||||
const char * Name() const;
|
||||
public SDAI_Enum {
|
||||
public:
|
||||
const char * Name() const;
|
||||
|
||||
SDAI_BOOLEAN (char * val = 0);
|
||||
SDAI_BOOLEAN (Boolean state);
|
||||
SDAI_BOOLEAN (const SDAI_BOOLEAN& source);
|
||||
SDAI_BOOLEAN (int i);
|
||||
SDAI_BOOLEAN (const SDAI_LOGICAL& val);
|
||||
virtual ~SDAI_BOOLEAN ();
|
||||
SDAI_BOOLEAN( char * val = 0 );
|
||||
SDAI_BOOLEAN( Boolean state );
|
||||
SDAI_BOOLEAN( const SDAI_BOOLEAN & source );
|
||||
SDAI_BOOLEAN( int i );
|
||||
SDAI_BOOLEAN( const SDAI_LOGICAL & val );
|
||||
virtual ~SDAI_BOOLEAN();
|
||||
|
||||
virtual int no_elements () const;
|
||||
virtual const char * element_at (int n) const;
|
||||
virtual int no_elements() const;
|
||||
virtual const char * element_at( int n ) const;
|
||||
|
||||
operator Boolean() const;
|
||||
SDAI_BOOLEAN& operator=(const SDAI_LOGICAL& t);
|
||||
operator Boolean() const;
|
||||
SDAI_BOOLEAN & operator=( const SDAI_LOGICAL & t );
|
||||
|
||||
SDAI_BOOLEAN& operator=(const Boolean t);
|
||||
SDAI_LOGICAL operator==( const SDAI_LOGICAL& t ) const;
|
||||
SDAI_BOOLEAN & operator=( const Boolean t );
|
||||
SDAI_LOGICAL operator==( const SDAI_LOGICAL & t ) const;
|
||||
|
||||
};
|
||||
|
||||
static const SDAI_BOOLEAN SDAI_TRUE;
|
||||
static const SDAI_BOOLEAN SDAI_FALSE;
|
||||
static const SDAI_BOOLEAN SDAI_UNSET;
|
||||
static const SDAI_LOGICAL SDAI_UNKNOWN;
|
||||
static const SDAI_BOOLEAN SDAI_TRUE;
|
||||
static const SDAI_BOOLEAN SDAI_FALSE;
|
||||
static const SDAI_BOOLEAN SDAI_UNSET;
|
||||
static const SDAI_LOGICAL SDAI_UNKNOWN;
|
||||
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -79,12 +79,12 @@ SDAI_Model_contents::CreateEntityInstance( const char * Type ) {
|
||||
}
|
||||
|
||||
void
|
||||
SDAI_Model_contents::AddInstance( const SDAI_DAObject_SDAI_ptr& appInst ) {
|
||||
SDAI_Model_contents::AddInstance( const SDAI_DAObject_SDAI_ptr & appInst ) {
|
||||
_instances.contents_()->Append( appInst );
|
||||
}
|
||||
|
||||
void
|
||||
SDAI_Model_contents::RemoveInstance( SDAI_DAObject_SDAI_ptr& appInst ) {
|
||||
SDAI_Model_contents::RemoveInstance( SDAI_DAObject_SDAI_ptr & appInst ) {
|
||||
_instances.contents_()->Remove( _instances.contents_()->Index( appInst ) );
|
||||
}
|
||||
|
||||
|
||||
+132
-130
@@ -23,189 +23,191 @@
|
||||
//#include <SessionInstance.h>
|
||||
*/
|
||||
|
||||
// The class SDAI_Model_contents_instances shall implement convenience functions by
|
||||
// The class SDAI_Model_contents_instances shall implement convenience functions by
|
||||
// SDAI_Model_contents in this part of ISO 10303
|
||||
|
||||
class SCL_DAI_EXPORT SDAI_Model_contents_instances : public SDAI_DAObject
|
||||
{
|
||||
public:
|
||||
class SCL_DAI_EXPORT SDAI_Model_contents_instances : public SDAI_DAObject {
|
||||
public:
|
||||
|
||||
SDAI_DAObject__set _instances;
|
||||
SDAI_DAObject__set _instances;
|
||||
|
||||
SDAI_Model_contents_instances();
|
||||
virtual ~SDAI_Model_contents_instances();
|
||||
SDAI_Model_contents_instances();
|
||||
virtual ~SDAI_Model_contents_instances();
|
||||
|
||||
// This function shall return the set of DAObjects contained in
|
||||
// the receiver.
|
||||
SDAI_DAObject__set_var contents_() { return &_instances; }
|
||||
const SDAI_DAObject__set_var contents_() const
|
||||
{ return (const SDAI_DAObject__set_var) &_instances; };
|
||||
// This function shall return the set of DAObjects contained in
|
||||
// the receiver.
|
||||
SDAI_DAObject__set_var contents_() {
|
||||
return &_instances;
|
||||
}
|
||||
const SDAI_DAObject__set_var contents_() const {
|
||||
return ( const SDAI_DAObject__set_var ) &_instances;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
typedef SDAI_Model_contents_instances *
|
||||
SDAI_Model_contents_instances_ptr;
|
||||
typedef SDAI_Model_contents_instances_ptr
|
||||
SDAI_Model_contents_instances_var;
|
||||
SDAI_Model_contents_instances_ptr;
|
||||
typedef SDAI_Model_contents_instances_ptr
|
||||
SDAI_Model_contents_instances_var;
|
||||
|
||||
// Model_contents_ptr def pushed ahead of #include for Entity_extent
|
||||
//class SDAI_Model_contents;
|
||||
//typedef SDAI_Model_contents SDAI_Model_contents_ptr;
|
||||
|
||||
class SCL_DAI_EXPORT SDAI_Model_contents : public SDAI_Session_instance {
|
||||
class SCL_DAI_EXPORT SDAI_Model_contents : public SDAI_Session_instance {
|
||||
|
||||
//friend class SDAI_Model;
|
||||
|
||||
/*
|
||||
NOTE - Model is a friend so that Model may access the contents of
|
||||
the Entity_extents folders.
|
||||
/*
|
||||
NOTE - Model is a friend so that Model may access the contents of
|
||||
the Entity_extents folders.
|
||||
|
||||
DATA MEMBERS
|
||||
*/
|
||||
public:
|
||||
DATA MEMBERS
|
||||
*/
|
||||
public:
|
||||
// protected: // for now
|
||||
// contains Application_instances (i.e. STEPentities)
|
||||
SDAI_Model_contents_instances _instances;
|
||||
SDAI_Model_contents_instances _instances;
|
||||
|
||||
SDAI_Entity_extent__set _folders; // of entity_extent
|
||||
SDAI_Entity_extent__set _folders; // of entity_extent
|
||||
|
||||
SDAI_Entity_extent__set _populated_folders; // of entity_extent
|
||||
SDAI_Entity_extent__set _populated_folders; // of entity_extent
|
||||
|
||||
// EntityAggregate _instances; // of Entity_instance
|
||||
// EntityAggregate _instances; // of Entity_instance
|
||||
// EntityAggregate _folders; // of entity_extent
|
||||
// EntityAggregate _populated_folders; // of entity_extent
|
||||
|
||||
/*
|
||||
Constructor declarations
|
||||
*/
|
||||
public: // for now at least
|
||||
/*
|
||||
Constructor declarations
|
||||
*/
|
||||
public: // for now at least
|
||||
// private:
|
||||
SDAI_Model_contents();
|
||||
SDAI_Model_contents();
|
||||
// SDAI_Model_contents(const SDAI_Model_contents& mc);
|
||||
~SDAI_Model_contents();
|
||||
/*
|
||||
Access function declarations
|
||||
*/
|
||||
public:
|
||||
SDAI_Model_contents_instances_ptr instances_();
|
||||
const SDAI_Model_contents_instances_ptr instances_() const;
|
||||
~SDAI_Model_contents();
|
||||
/*
|
||||
Access function declarations
|
||||
*/
|
||||
public:
|
||||
SDAI_Model_contents_instances_ptr instances_();
|
||||
const SDAI_Model_contents_instances_ptr instances_() const;
|
||||
|
||||
SDAI_Entity_extent__set_var folders_();
|
||||
const SDAI_Entity_extent__set_var folders_() const;
|
||||
SDAI_Entity_extent__set_var folders_();
|
||||
const SDAI_Entity_extent__set_var folders_() const;
|
||||
|
||||
//Boolean TestFolders() const;
|
||||
//Boolean TestFolders() const;
|
||||
|
||||
const SDAI_Entity_extent__set_var populated_folders_() const;
|
||||
SDAI_Entity_extent__set_var populated_folders_();
|
||||
//Boolean TestPopulated_folders() const;
|
||||
const SDAI_Entity_extent__set_var populated_folders_() const;
|
||||
SDAI_Entity_extent__set_var populated_folders_();
|
||||
//Boolean TestPopulated_folders() const;
|
||||
|
||||
// static SDAI_Model_contents_ptr
|
||||
// _duplicate(SDAI_Model_contents_ptr);
|
||||
// static SDAI_Model_contents_ptr
|
||||
// _duplicate(SDAI_Model_contents_ptr);
|
||||
// static SDAI_Model_contents_ptr _narrow(Object_ptr);
|
||||
// static SDAI_Model_contents_ptr _nil();
|
||||
|
||||
SDAI_PID_DA_ptr
|
||||
get_object_pid(const SDAI_DAObject_ptr &d) const;
|
||||
SDAI_PID_DA_ptr
|
||||
get_object_pid( const SDAI_DAObject_ptr & d ) const;
|
||||
|
||||
SDAI_DAObject_ptr lookup(const SDAI_PID_DA_ptr &p) const;
|
||||
SDAI_DAObject_ptr lookup( const SDAI_PID_DA_ptr & p ) const;
|
||||
|
||||
/*
|
||||
SDAI operation declarations
|
||||
/*
|
||||
SDAI operation declarations
|
||||
|
||||
7.3.2.1 SDAI operation declarations
|
||||
7.3.2.1 SDAI operation declarations
|
||||
|
||||
7.3.2.1.1 Add instance
|
||||
*/
|
||||
7.3.2.1.1 Add instance
|
||||
*/
|
||||
// private:
|
||||
public: // for now at least
|
||||
SDAI_DAObject_ptr
|
||||
CreateEntityInstance(const char * Type);
|
||||
public: // for now at least
|
||||
SDAI_DAObject_ptr
|
||||
CreateEntityInstance( const char * Type );
|
||||
|
||||
// until we find out what this should really be in the spec
|
||||
void AddInstance(const SDAI_DAObject_SDAI_ptr& appInst);
|
||||
// until we find out what this should really be in the spec
|
||||
void AddInstance( const SDAI_DAObject_SDAI_ptr & appInst );
|
||||
// void AddInstance(const Entity_instance_ptr& entityHandle);
|
||||
//void AddInstance(EntityInstanceH& entityHandle);
|
||||
/* Function:
|
||||
The AddInstance function shall add the entity instance entity handle
|
||||
to the instances set of the receiver. This function shall add the
|
||||
entity instance entityHandle to each Entity_extent in the folders
|
||||
attribute of the receiver for which the type or a subtype of the
|
||||
type contained in the folder corresponds to the type of entityHandle.
|
||||
This function shall add the entity instance entityHandle to each
|
||||
Entity_extent in the populated_folders attribute of the receiver for
|
||||
which the type or a subtype of the type contained in the folder
|
||||
corresponds to the type of entityHandle.
|
||||
//void AddInstance(EntityInstanceH& entityHandle);
|
||||
/* Function:
|
||||
The AddInstance function shall add the entity instance entity handle
|
||||
to the instances set of the receiver. This function shall add the
|
||||
entity instance entityHandle to each Entity_extent in the folders
|
||||
attribute of the receiver for which the type or a subtype of the
|
||||
type contained in the folder corresponds to the type of entityHandle.
|
||||
This function shall add the entity instance entityHandle to each
|
||||
Entity_extent in the populated_folders attribute of the receiver for
|
||||
which the type or a subtype of the type contained in the folder
|
||||
corresponds to the type of entityHandle.
|
||||
|
||||
Possible error indicators:
|
||||
sdaiSS_NOPN // Session not open
|
||||
sdaiRP_NOPN // Repository not open
|
||||
sdaiMO_NEXS // SDAI-model does not exist
|
||||
sdaiMX_NRW // SDAI-model access not read-write
|
||||
sdaiSY_ERR // Underlying system error
|
||||
Possible error indicators:
|
||||
sdaiSS_NOPN // Session not open
|
||||
sdaiRP_NOPN // Repository not open
|
||||
sdaiMO_NEXS // SDAI-model does not exist
|
||||
sdaiMX_NRW // SDAI-model access not read-write
|
||||
sdaiSY_ERR // Underlying system error
|
||||
|
||||
Origin: Convenience function
|
||||
*/
|
||||
Origin: Convenience function
|
||||
*/
|
||||
|
||||
// until we find out what this should really be in the spec
|
||||
void RemoveInstance(SDAI_DAObject_SDAI_ptr& appInst);
|
||||
// void RemoveInstance(Entity_instance_ptr& entityHandle);
|
||||
//void RemoveInstance(EntityInstanceH& entityHandle);
|
||||
/* Function
|
||||
The RemoveInstance function shall remove the entity instance entity
|
||||
handle from the instances set of the receiver. This function shall
|
||||
remove the entity instance entityHandle from each Entity_extent in
|
||||
the folders attribute of the receiver for which the type or a
|
||||
subtype of the type contained in the folder corresponds to the
|
||||
type of entityHandle. This function shall remove the entity
|
||||
instance entityHandle from each Entity_extent in the
|
||||
populated_folders attribute of the receiver for which the type or
|
||||
a subtype of the type contained in the folder corresponds to the
|
||||
type of entityHandle.
|
||||
// until we find out what this should really be in the spec
|
||||
void RemoveInstance( SDAI_DAObject_SDAI_ptr & appInst );
|
||||
// void RemoveInstance(Entity_instance_ptr& entityHandle);
|
||||
//void RemoveInstance(EntityInstanceH& entityHandle);
|
||||
/* Function
|
||||
The RemoveInstance function shall remove the entity instance entity
|
||||
handle from the instances set of the receiver. This function shall
|
||||
remove the entity instance entityHandle from each Entity_extent in
|
||||
the folders attribute of the receiver for which the type or a
|
||||
subtype of the type contained in the folder corresponds to the
|
||||
type of entityHandle. This function shall remove the entity
|
||||
instance entityHandle from each Entity_extent in the
|
||||
populated_folders attribute of the receiver for which the type or
|
||||
a subtype of the type contained in the folder corresponds to the
|
||||
type of entityHandle.
|
||||
|
||||
Possible error indicators
|
||||
sdaiSS_NOPN // Session not open
|
||||
sdaiRP_NOPN // Repository not open
|
||||
sdaiMO_NEXS // SDAI-model does not exist
|
||||
sdaiMX_NRW // SDAI-model access not read-write
|
||||
sdaiSY_ERR // Underlying system error
|
||||
Possible error indicators
|
||||
sdaiSS_NOPN // Session not open
|
||||
sdaiRP_NOPN // Repository not open
|
||||
sdaiMO_NEXS // SDAI-model does not exist
|
||||
sdaiMX_NRW // SDAI-model access not read-write
|
||||
sdaiSY_ERR // Underlying system error
|
||||
|
||||
Origin: Convenience function
|
||||
*/
|
||||
public:
|
||||
|
||||
/*
|
||||
7.3.2.1.3 Get entity extent
|
||||
*/
|
||||
Origin: Convenience function
|
||||
*/
|
||||
public:
|
||||
|
||||
/*
|
||||
7.3.2.1.3 Get entity extent
|
||||
*/
|
||||
#ifdef SDAI_CPP_LATE_BINDING
|
||||
#if 0 // for now
|
||||
Any_var GetEntity_extent(const std::string& entityName);
|
||||
const Any_var GetEntity_extent(const std::string& entityName) const;
|
||||
Any_var GetEntity_extent(const Entity_ptr& ep);
|
||||
const Any_var GetEntity_extent(const Entity_ptr& ep) const;
|
||||
Any_var GetEntity_extent( const std::string & entityName );
|
||||
const Any_var GetEntity_extent( const std::string & entityName ) const;
|
||||
Any_var GetEntity_extent( const Entity_ptr & ep );
|
||||
const Any_var GetEntity_extent( const Entity_ptr & ep ) const;
|
||||
#endif
|
||||
/* Function:
|
||||
The GetEntity_extent function shall retrieve an entity folder from
|
||||
the folders attribute within the contents attribute of the receiver.
|
||||
This folder shall contain all of the instances of a particular type
|
||||
and its subtypes within the model. The type may be specified
|
||||
indirectly by the entityName parameter or directly by the entity.
|
||||
Subsequent access to the returned aggregate shall be restricted to
|
||||
read-only functionality.
|
||||
/* Function:
|
||||
The GetEntity_extent function shall retrieve an entity folder from
|
||||
the folders attribute within the contents attribute of the receiver.
|
||||
This folder shall contain all of the instances of a particular type
|
||||
and its subtypes within the model. The type may be specified
|
||||
indirectly by the entityName parameter or directly by the entity.
|
||||
Subsequent access to the returned aggregate shall be restricted to
|
||||
read-only functionality.
|
||||
|
||||
Output:
|
||||
This function shall return an aggregate handle used as an argument
|
||||
for subsequent SDAI function calls. Otherwise, this function shall
|
||||
return a null handle.
|
||||
Output:
|
||||
This function shall return an aggregate handle used as an argument
|
||||
for subsequent SDAI function calls. Otherwise, this function shall
|
||||
return a null handle.
|
||||
|
||||
Possible error indicators:
|
||||
sdaiSS_NOPN // Session not open
|
||||
sdaiRP_NOPN // Repository not open
|
||||
sdaiMO_NEXS // SDAI-model does not exist
|
||||
sdaiED_NDEF // Entity definition unknown in this model
|
||||
sdaiSY_ERR // Underlying system error
|
||||
Possible error indicators:
|
||||
sdaiSS_NOPN // Session not open
|
||||
sdaiRP_NOPN // Repository not open
|
||||
sdaiMO_NEXS // SDAI-model does not exist
|
||||
sdaiED_NDEF // Entity definition unknown in this model
|
||||
sdaiSY_ERR // Underlying system error
|
||||
|
||||
Origin: Convenience function
|
||||
*/
|
||||
Origin: Convenience function
|
||||
*/
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ SDAI_Model_contents__list::~SDAI_Model_contents__list() {
|
||||
|
||||
void SDAI_Model_contents__list::Check( int index ) {
|
||||
|
||||
SDAI_Model_contents_ptr* newbuf;
|
||||
SDAI_Model_contents_ptr * newbuf;
|
||||
|
||||
if( index >= _bufsize ) {
|
||||
_bufsize = ( index + 1 ) * 2;
|
||||
@@ -61,7 +61,7 @@ void SDAI_Model_contents__list::Check( int index ) {
|
||||
void
|
||||
SDAI_Model_contents__list::Insert( SDAI_Model_contents_ptr v, int index ) {
|
||||
|
||||
SDAI_Model_contents_ptr* spot;
|
||||
SDAI_Model_contents_ptr * spot;
|
||||
index = ( index < 0 ) ? _count : index;
|
||||
|
||||
if( index < _count ) {
|
||||
@@ -80,7 +80,7 @@ SDAI_Model_contents__list::Insert( SDAI_Model_contents_ptr v, int index ) {
|
||||
void SDAI_Model_contents__list::Append( SDAI_Model_contents_ptr v ) {
|
||||
|
||||
int index = _count;
|
||||
SDAI_Model_contents_ptr* spot;
|
||||
SDAI_Model_contents_ptr * spot;
|
||||
|
||||
if( index < _count ) {
|
||||
Check( _count + 1 );
|
||||
@@ -99,7 +99,7 @@ void SDAI_Model_contents__list::Remove( int index ) {
|
||||
|
||||
if( 0 <= index && index < _count ) {
|
||||
--_count;
|
||||
SDAI_Model_contents_ptr* spot = &_buf[index];
|
||||
SDAI_Model_contents_ptr * spot = &_buf[index];
|
||||
memmove( spot, spot + 1, ( _count - index )*sizeof( SDAI_Model_contents_ptr ) );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,34 +4,34 @@
|
||||
#include <scl_export.h>
|
||||
|
||||
class SCL_DAI_EXPORT SDAI_Model_contents__list {
|
||||
public:
|
||||
SDAI_Model_contents__list(int = 16);
|
||||
~SDAI_Model_contents__list();
|
||||
public:
|
||||
SDAI_Model_contents__list( int = 16 );
|
||||
~SDAI_Model_contents__list();
|
||||
|
||||
SDAI_Model_contents_ptr retrieve(int index);
|
||||
int is_empty();
|
||||
SDAI_Model_contents_ptr retrieve( int index );
|
||||
int is_empty();
|
||||
|
||||
SDAI_Model_contents_ptr& operator[](int index);
|
||||
SDAI_Model_contents_ptr & operator[]( int index );
|
||||
|
||||
void Insert(SDAI_Model_contents_ptr, int index);
|
||||
void Append(SDAI_Model_contents_ptr);
|
||||
void Remove(int index);
|
||||
int Index(SDAI_Model_contents_ptr);
|
||||
void Insert( SDAI_Model_contents_ptr, int index );
|
||||
void Append( SDAI_Model_contents_ptr );
|
||||
void Remove( int index );
|
||||
int Index( SDAI_Model_contents_ptr );
|
||||
|
||||
void Clear();
|
||||
int Count();
|
||||
void Clear();
|
||||
int Count();
|
||||
|
||||
private:
|
||||
void Check(int index);
|
||||
private:
|
||||
SDAI_Model_contents_ptr* _buf;
|
||||
int _bufsize;
|
||||
int _count;
|
||||
private:
|
||||
void Check( int index );
|
||||
private:
|
||||
SDAI_Model_contents_ptr * _buf;
|
||||
int _bufsize;
|
||||
int _count;
|
||||
};
|
||||
|
||||
typedef SDAI_Model_contents__list*
|
||||
SDAI_Model_contents__list_ptr;
|
||||
typedef SDAI_Model_contents__list_ptr
|
||||
SDAI_Model_contents__list_var;
|
||||
typedef SDAI_Model_contents__list *
|
||||
SDAI_Model_contents__list_ptr;
|
||||
typedef SDAI_Model_contents__list_ptr
|
||||
SDAI_Model_contents__list_var;
|
||||
|
||||
#endif
|
||||
|
||||
+17
-18
@@ -8,34 +8,33 @@
|
||||
|
||||
*/
|
||||
/*
|
||||
The EXPRESS ENTITY entity_instance from the SDAI_data_type_schema from
|
||||
The EXPRESS ENTITY entity_instance from the SDAI_data_type_schema from
|
||||
clause 10 in ISO 10303-22, shall be mapped to the C++ class Entity_instance.
|
||||
The class Entity_instance shall be a subtype of the C++ class Object:
|
||||
*/
|
||||
|
||||
class SCL_DAI_EXPORT SDAI_sdaiObject
|
||||
{
|
||||
public:
|
||||
SDAI_sdaiObject();
|
||||
virtual ~SDAI_sdaiObject();
|
||||
class SCL_DAI_EXPORT SDAI_sdaiObject {
|
||||
public:
|
||||
SDAI_sdaiObject();
|
||||
virtual ~SDAI_sdaiObject();
|
||||
// static Object_ptr _duplicate(Object_ptr);
|
||||
// static Object_ptr _nil();
|
||||
|
||||
#ifdef PART26
|
||||
// virtual SCLP26(Application_instance_ptr) create_TIE();
|
||||
virtual IDL_Application_instance_ptr create_TIE();
|
||||
virtual IDL_Application_instance_ptr create_TIE();
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
typedef SDAI_sdaiObject* SDAI_sdaiObject_ptr;
|
||||
typedef SDAI_sdaiObject * SDAI_sdaiObject_ptr;
|
||||
typedef SDAI_sdaiObject_ptr SDAI_sdaiObject_var;
|
||||
|
||||
/*
|
||||
The class Object shall be accessed through the handle types Object_ptr and
|
||||
Object_var. For handles to the C++ class representing a EXPRESS ENTITY data
|
||||
type A, the following implicit widening operations shall be supported:
|
||||
A_ptr to Object_ptr and A_var to Object_ptr. An implementation need not
|
||||
The class Object shall be accessed through the handle types Object_ptr and
|
||||
Object_var. For handles to the C++ class representing a EXPRESS ENTITY data
|
||||
type A, the following implicit widening operations shall be supported:
|
||||
A_ptr to Object_ptr and A_var to Object_ptr. An implementation need not
|
||||
support implicit widening of A_var to Object_var.
|
||||
|
||||
This binding shall support the following functions:
|
||||
@@ -44,20 +43,20 @@ typedef SDAI_sdaiObject_ptr SDAI_sdaiObject_var;
|
||||
//void release(Object_ptr obj);
|
||||
|
||||
/*
|
||||
The release function indicates that the caller will no longer access the
|
||||
The release function indicates that the caller will no longer access the
|
||||
reference obj.
|
||||
*/
|
||||
|
||||
//Boolean is_nil(Object_ptr obj);
|
||||
|
||||
/*
|
||||
The is_nil function shall return true if obj is a nil handle; otherwise it
|
||||
The is_nil function shall return true if obj is a nil handle; otherwise it
|
||||
returns false.
|
||||
|
||||
This binding does not specify that all base classes in the application
|
||||
schema be virtual base classes; however, it does require that no multiply
|
||||
inherited derived class contain multiple instantiations of any of its base
|
||||
classes. This requirement applies to all classes, even classes used to
|
||||
This binding does not specify that all base classes in the application
|
||||
schema be virtual base classes; however, it does require that no multiply
|
||||
inherited derived class contain multiple instantiations of any of its base
|
||||
classes. This requirement applies to all classes, even classes used to
|
||||
instantiate complex instances.
|
||||
*/
|
||||
|
||||
|
||||
@@ -5,25 +5,24 @@
|
||||
#include <scl_export.h>
|
||||
//#include <sdai.h>
|
||||
|
||||
class SCL_DAI_EXPORT SDAI_Session_instance : public SDAI_sdaiObject
|
||||
{
|
||||
class SCL_DAI_EXPORT SDAI_Session_instance : public SDAI_sdaiObject {
|
||||
|
||||
public:
|
||||
int x;
|
||||
public:
|
||||
int x;
|
||||
|
||||
SDAI_Session_instance();
|
||||
virtual ~SDAI_Session_instance();
|
||||
SDAI_Session_instance();
|
||||
virtual ~SDAI_Session_instance();
|
||||
// SDAI_Session_instance(const SDAI_Session_instance& si) {}
|
||||
|
||||
// static SDAI_Session_instance_ptr
|
||||
// _duplicate(SDAI_Session_instance_ptr sip);
|
||||
// static SDAI_Session_instance_ptr
|
||||
// _narrow(SDAI_Object_ptr o);
|
||||
// static SDAI_Session_instance_ptr
|
||||
// _duplicate(SDAI_Session_instance_ptr sip);
|
||||
// static SDAI_Session_instance_ptr
|
||||
// _narrow(SDAI_Object_ptr o);
|
||||
// static SDAI_Session_instance_ptr _nil();
|
||||
|
||||
};
|
||||
|
||||
typedef SDAI_Session_instance* SDAI_Session_instance_ptr;
|
||||
typedef SDAI_Session_instance * SDAI_Session_instance_ptr;
|
||||
typedef SDAI_Session_instance_ptr SDAI_Session_instance_var;
|
||||
|
||||
// the old names
|
||||
|
||||
@@ -45,23 +45,23 @@ Severity SDAI_String::STEPread( istream & in, ErrorDescriptor * err ) {
|
||||
in.unsetf( ios::skipws );
|
||||
|
||||
// extract the string from the inputstream
|
||||
string s = ToExpressStr(in, err);
|
||||
operator+= (s);
|
||||
string s = ToExpressStr( in, err );
|
||||
operator+= ( s );
|
||||
|
||||
// retrieve current severity
|
||||
Severity sev = err -> severity();
|
||||
|
||||
// Not missing closing quote on string value
|
||||
if (sev != SEVERITY_INPUT_ERROR && s.compare("") != 0) {
|
||||
if( sev != SEVERITY_INPUT_ERROR && s.compare( "" ) != 0 ) {
|
||||
sev = SEVERITY_NULL;
|
||||
}
|
||||
|
||||
// There was no quote
|
||||
if ( !(sev == SEVERITY_INPUT_ERROR || sev == SEVERITY_NULL) ) {
|
||||
in.flags( flags ); // set the format state back to previous settings
|
||||
clear();
|
||||
err -> GreaterSeverity( SEVERITY_INCOMPLETE );
|
||||
sev = SEVERITY_INCOMPLETE;
|
||||
if( !( sev == SEVERITY_INPUT_ERROR || sev == SEVERITY_NULL ) ) {
|
||||
in.flags( flags ); // set the format state back to previous settings
|
||||
clear();
|
||||
err -> GreaterSeverity( SEVERITY_INCOMPLETE );
|
||||
sev = SEVERITY_INCOMPLETE;
|
||||
}
|
||||
return sev;
|
||||
}
|
||||
|
||||
+17
-15
@@ -1,5 +1,5 @@
|
||||
#ifndef STEPSTRING_H
|
||||
#define STEPSTRING_H 1
|
||||
#define STEPSTRING_H 1
|
||||
|
||||
/*
|
||||
* NIST STEP Core Class Library
|
||||
@@ -14,25 +14,27 @@
|
||||
#include <scl_export.h>
|
||||
|
||||
class SCL_DAI_EXPORT SDAI_String : public std::string {
|
||||
public:
|
||||
public:
|
||||
|
||||
//constructor(s) & destructor
|
||||
SDAI_String (const char * str = 0, int max =0) : std::string (str,max) { }
|
||||
SDAI_String (const std::string& s) : std::string (s) { }
|
||||
SDAI_String (const SDAI_String& s) : std::string (s) { }
|
||||
~SDAI_String () { }
|
||||
//constructor(s) & destructor
|
||||
SDAI_String( const char * str = 0, int max = 0 ) : std::string( str, max ) { }
|
||||
SDAI_String( const std::string & s ) : std::string( s ) { }
|
||||
SDAI_String( const SDAI_String & s ) : std::string( s ) { }
|
||||
~SDAI_String() { }
|
||||
|
||||
// operators
|
||||
SDAI_String& operator= (const char* s);
|
||||
SDAI_String & operator= ( const char * s );
|
||||
|
||||
// format for STEP
|
||||
const char* asStr(std::string& s) const { return s.c_str(); }
|
||||
void STEPwrite (ostream& out =cout) const;
|
||||
void STEPwrite (std::string &s) const;
|
||||
// format for STEP
|
||||
const char * asStr( std::string & s ) const {
|
||||
return s.c_str();
|
||||
}
|
||||
void STEPwrite( ostream & out = cout ) const;
|
||||
void STEPwrite( std::string & s ) const;
|
||||
|
||||
Severity StrToVal (const char *s);
|
||||
Severity STEPread (istream& in, ErrorDescriptor *err);
|
||||
Severity STEPread (const char *s, ErrorDescriptor *err);
|
||||
Severity StrToVal( const char * s );
|
||||
Severity STEPread( istream & in, ErrorDescriptor * err );
|
||||
Severity STEPread( const char * s, ErrorDescriptor * err );
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
+42
-44
@@ -75,12 +75,12 @@ STEPfile::ReadHeader( istream & in ) {
|
||||
std::string cmtStr;
|
||||
|
||||
InstMgr * im = new InstMgr;
|
||||
SDAI_Application_instance* obj;
|
||||
#ifdef __MSVC__
|
||||
Severity objsev = SEVERITY_NULL;
|
||||
#else
|
||||
__attribute__( ( unused ) ) Severity objsev = SEVERITY_NULL;
|
||||
#endif
|
||||
SDAI_Application_instance * obj;
|
||||
#ifdef __MSVC__
|
||||
Severity objsev = SEVERITY_NULL;
|
||||
#else
|
||||
__attribute__( ( unused ) ) Severity objsev = SEVERITY_NULL;
|
||||
#endif
|
||||
|
||||
int endsec = 0;
|
||||
int userDefined = 0;
|
||||
@@ -166,7 +166,7 @@ STEPfile::ReadHeader( istream & in ) {
|
||||
keywd << "\'.\n\tdata lost: " << strbuf << "\n";
|
||||
_error.GreaterSeverity( SEVERITY_WARNING );
|
||||
} else { //not ENTITY_NULL
|
||||
//read the header instance
|
||||
//read the header instance
|
||||
|
||||
//check obj's Error Descriptor
|
||||
objsev = AppendEntityErrorMsg( &( obj->Error() ) );
|
||||
@@ -214,7 +214,7 @@ Severity
|
||||
STEPfile::HeaderVerifyInstances( InstMgr * im ) {
|
||||
int err = 0;
|
||||
int fileid;
|
||||
SDAI_Application_instance* obj;
|
||||
SDAI_Application_instance * obj;
|
||||
|
||||
//check File_Name
|
||||
fileid = HeaderId( "File_Name" );
|
||||
@@ -262,16 +262,16 @@ STEPfile::HeaderDefaultFileName() {
|
||||
fn->name_( "" );
|
||||
fn->time_stamp_( "" );
|
||||
tmp->StrToVal( "", &_error,
|
||||
fn->attributes[2].
|
||||
aDesc -> DomainType(),
|
||||
_headerInstances );
|
||||
fn->author_(tmp);
|
||||
fn->attributes[2].
|
||||
aDesc -> DomainType(),
|
||||
_headerInstances );
|
||||
fn->author_( tmp );
|
||||
|
||||
tmp->StrToVal( "", &_error,
|
||||
fn->attributes[3].
|
||||
aDesc -> DomainType(),
|
||||
_headerInstances );
|
||||
fn->organization_(tmp);
|
||||
fn->organization_( tmp );
|
||||
|
||||
fn->preprocessor_version_( "" );
|
||||
fn->originating_system_( "" );
|
||||
@@ -299,10 +299,10 @@ STEPfile::HeaderDefaultFileSchema() {
|
||||
StringAggregate_ptr tmp = new StringAggregate;
|
||||
|
||||
tmp->StrToVal( "", &_error,
|
||||
fs->attributes[0].
|
||||
aDesc -> DomainType(),
|
||||
_headerInstances );
|
||||
fs->schema_identifiers_(tmp);
|
||||
fs->attributes[0].
|
||||
aDesc -> DomainType(),
|
||||
_headerInstances );
|
||||
fs->schema_identifiers_( tmp );
|
||||
|
||||
fs->STEPfile_id = HeaderId( "File_Schema" );
|
||||
|
||||
@@ -332,8 +332,8 @@ header section entites. The file id numbers are important.
|
||||
***************************/
|
||||
void
|
||||
STEPfile::HeaderMergeInstances( InstMgr * im ) {
|
||||
SDAI_Application_instance* se = 0;
|
||||
SDAI_Application_instance* from = 0;
|
||||
SDAI_Application_instance * se = 0;
|
||||
SDAI_Application_instance * from = 0;
|
||||
|
||||
int idnum;
|
||||
|
||||
@@ -1323,7 +1323,7 @@ STEPfile::CreateInstance( istream & in, ostream & out ) {
|
||||
int fileid = -1;
|
||||
SDAI_Application_instance_ptr * scopelist = 0;
|
||||
|
||||
SDAI_Application_instance* obj;
|
||||
SDAI_Application_instance * obj;
|
||||
ErrorDescriptor result;
|
||||
// Sent down to CreateSubSuperInstance() to receive error info
|
||||
|
||||
@@ -1501,7 +1501,7 @@ STEPfile::CreateScopeInstances( istream & in, SDAI_Application_instance_ptr ** s
|
||||
in.putback( c );
|
||||
*scopelist = new SDAI_Application_instance_ptr [i];
|
||||
while( i > 0 ) {
|
||||
*scopelist [i-1] = inscope [i];
|
||||
*scopelist [i - 1] = inscope [i];
|
||||
i--;
|
||||
}
|
||||
|
||||
@@ -1760,7 +1760,7 @@ STEPfile::ReadInstance( istream & in, ostream & out, std::string & cmtStr,
|
||||
|
||||
char c;
|
||||
int fileid;
|
||||
SDAI_Application_instance* obj = ENTITY_NULL;
|
||||
SDAI_Application_instance * obj = ENTITY_NULL;
|
||||
int idIncrNum = FileIdIncr();
|
||||
|
||||
ReadComment( in, cmtStr );
|
||||
@@ -1869,7 +1869,7 @@ STEPfile::ReadInstance( istream & in, ostream & out, std::string & cmtStr,
|
||||
if( userDefined ) {
|
||||
SkipInstance( in, tmpbuf );
|
||||
out << "WARNING: #" << fileid <<
|
||||
". Ignoring User defined entity."<< endl << " data lost: !"
|
||||
". Ignoring User defined entity." << endl << " data lost: !"
|
||||
<< objnm << tmpbuf << endl;
|
||||
++_warningCount;
|
||||
return ENTITY_NULL;
|
||||
@@ -1965,17 +1965,17 @@ BUG: doesn't check to see if the backup command works.
|
||||
void
|
||||
STEPfile::MakeBackupFile() {
|
||||
std::string bckup = FileName();
|
||||
bckup.append(".bak");
|
||||
bckup.append( ".bak" );
|
||||
|
||||
std::fstream f(FileName().c_str(), std::fstream::in|std::fstream::binary);
|
||||
std::fstream f( FileName().c_str(), std::fstream::in | std::fstream::binary );
|
||||
f << std::noskipws;
|
||||
std::istream_iterator<unsigned char> begin(f);
|
||||
std::istream_iterator<unsigned char> begin( f );
|
||||
std::istream_iterator<unsigned char> end;
|
||||
|
||||
std::fstream f2(bckup.c_str(), std::fstream::out|std::fstream::trunc|std::fstream::binary);
|
||||
std::ostream_iterator<char> begin2(f2);
|
||||
std::fstream f2( bckup.c_str(), std::fstream::out | std::fstream::trunc | std::fstream::binary );
|
||||
std::ostream_iterator<char> begin2( f2 );
|
||||
|
||||
copy(begin, end, begin2);
|
||||
copy( begin, end, begin2 );
|
||||
|
||||
_error.AppendToDetailMsg( "Making backup file: " );
|
||||
_error.AppendToDetailMsg( bckup.c_str() );
|
||||
@@ -2084,7 +2084,7 @@ The header section entities must be numbered in the following manner:
|
||||
int STEPfile::HeaderId( const std::string name ) {
|
||||
std::string tmp = name;
|
||||
|
||||
std::transform(tmp.begin(), tmp.end(), tmp.begin(), ::toupper);
|
||||
std::transform( tmp.begin(), tmp.end(), tmp.begin(), ::toupper );
|
||||
|
||||
if( tmp == "FILE_DESCRIPTION" ) {
|
||||
return 1;
|
||||
@@ -2109,7 +2109,7 @@ STEPfile::WriteHeader( ostream & out ) {
|
||||
WriteHeaderInstanceFileSchema( out );
|
||||
|
||||
// Write the rest of the header instances
|
||||
SDAI_Application_instance* se;
|
||||
SDAI_Application_instance * se;
|
||||
int n = _headerInstances->InstanceCount();
|
||||
for( int i = 0; i < n; ++i ) {
|
||||
se = _headerInstances->GetMgrNode( i ) ->GetApplication_instance();
|
||||
@@ -2127,7 +2127,7 @@ STEPfile::WriteHeader( ostream & out ) {
|
||||
/***************************
|
||||
***************************/
|
||||
void
|
||||
STEPfile::WriteHeaderInstance( SDAI_Application_instance* obj, ostream & out ) {
|
||||
STEPfile::WriteHeaderInstance( SDAI_Application_instance * obj, ostream & out ) {
|
||||
std::string tmp;
|
||||
if( !obj->P21Comment().empty() ) {
|
||||
out << obj->P21Comment();
|
||||
@@ -2148,7 +2148,7 @@ STEPfile::WriteHeaderInstance( SDAI_Application_instance* obj, ostream & out ) {
|
||||
void
|
||||
STEPfile::WriteHeaderInstanceFileName( ostream & out ) {
|
||||
// Get the FileName instance from _headerInstances
|
||||
SDAI_Application_instance *se = 0;
|
||||
SDAI_Application_instance * se = 0;
|
||||
se = _headerInstances->GetApplication_instance( "File_Name" );
|
||||
if( se == ENTITY_NULL ) {
|
||||
se = ( SDAI_Application_instance * )HeaderDefaultFileName();
|
||||
@@ -2175,7 +2175,7 @@ STEPfile::WriteHeaderInstanceFileName( ostream & out ) {
|
||||
|
||||
void STEPfile::WriteHeaderInstanceFileDescription( ostream & out ) {
|
||||
// Get the FileDescription instance from _headerInstances
|
||||
SDAI_Application_instance *se = 0;
|
||||
SDAI_Application_instance * se = 0;
|
||||
se = _headerInstances->GetApplication_instance( "File_Description" );
|
||||
if( se == ENTITY_NULL ) {
|
||||
se = ( SDAI_Application_instance * )HeaderDefaultFileDescription();
|
||||
@@ -2185,7 +2185,7 @@ void STEPfile::WriteHeaderInstanceFileDescription( ostream & out ) {
|
||||
}
|
||||
|
||||
void STEPfile::WriteHeaderInstanceFileSchema( ostream & out ) {
|
||||
SDAI_Application_instance *se = 0;
|
||||
SDAI_Application_instance * se = 0;
|
||||
|
||||
// Get the FileName instance from _headerInstances
|
||||
se = _headerInstances->GetApplication_instance( "File_Schema" );
|
||||
@@ -2204,8 +2204,7 @@ void STEPfile::WriteData( ostream & out, int writeComments ) {
|
||||
out << "DATA;\n";
|
||||
|
||||
int n = instances().InstanceCount();
|
||||
for( int i = 0; i < n; ++i )
|
||||
{
|
||||
for( int i = 0; i < n; ++i ) {
|
||||
instances().GetMgrNode( i )->GetApplication_instance()->STEPwrite( out, currSch.c_str(), writeComments );
|
||||
}
|
||||
|
||||
@@ -2218,8 +2217,7 @@ void STEPfile::WriteData( ostream & out, int writeComments ) {
|
||||
void STEPfile::WriteValuePairsData( ostream & out, int writeComments, int mixedCase ) {
|
||||
std::string currSch = schemaName();
|
||||
int n = instances().InstanceCount();
|
||||
for( int i = 0; i < n; ++i )
|
||||
{
|
||||
for( int i = 0; i < n; ++i ) {
|
||||
instances().GetMgrNode( i )->GetApplication_instance()->WriteValuePairs( out, currSch.c_str(), writeComments, mixedCase );
|
||||
}
|
||||
}
|
||||
@@ -2230,11 +2228,11 @@ Severity STEPfile::AppendFile( istream * in, bool useTechCor ) {
|
||||
|
||||
SetFileIdIncrement();
|
||||
int total_insts = 0, valid_insts = 0;
|
||||
#ifdef __MSVC__
|
||||
int exchange_file = -1;
|
||||
#else
|
||||
#ifdef __MSVC__
|
||||
int exchange_file = -1;
|
||||
#else
|
||||
__attribute__( ( unused ) ) int exchange_file = -1;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
ReadTokenSeparator( *in );
|
||||
std::string keywd = GetKeyword( *in, "; #", _error );
|
||||
@@ -2414,7 +2412,7 @@ Severity STEPfile::WriteWorkingFile( ostream & out, int clearError, int writeCom
|
||||
|
||||
/******************************************************/
|
||||
Severity STEPfile::WriteWorkingFile( const std::string filename, int clearError,
|
||||
int writeComments ) {
|
||||
int writeComments ) {
|
||||
if( clearError ) {
|
||||
_error.ClearErrorMsg();
|
||||
}
|
||||
|
||||
+141
-120
@@ -34,181 +34,202 @@ enum FileTypeCode {
|
||||
VERSION_CURRENT = 1,
|
||||
WORKING_SESSION = 2,
|
||||
OLD_WORKING_SESSION = 3
|
||||
};
|
||||
};
|
||||
|
||||
class SCL_EDITOR_EXPORT STEPfile
|
||||
{
|
||||
protected:
|
||||
//data members
|
||||
class SCL_EDITOR_EXPORT STEPfile {
|
||||
protected:
|
||||
//data members
|
||||
|
||||
InstMgr& _instances;
|
||||
Registry& _reg;
|
||||
InstMgr & _instances;
|
||||
Registry & _reg;
|
||||
|
||||
InstMgr & instances () { return _instances; }
|
||||
Registry & reg () { return _reg; }
|
||||
int _fileIdIncr; //Increment value to be added to FileId Numbers on input
|
||||
InstMgr & instances() {
|
||||
return _instances;
|
||||
}
|
||||
Registry & reg() {
|
||||
return _reg;
|
||||
}
|
||||
int _fileIdIncr; //Increment value to be added to FileId Numbers on input
|
||||
|
||||
//header information
|
||||
InstMgr* _headerInstances;
|
||||
Registry *_headerRegistry;
|
||||
|
||||
int _headerId; //STEPfile_id given to SDAI_Application_instance from header section
|
||||
InstMgr * _headerInstances;
|
||||
Registry * _headerRegistry;
|
||||
|
||||
int _headerId; //STEPfile_id given to SDAI_Application_instance from header section
|
||||
|
||||
//file information
|
||||
DirObj* _currentDir;
|
||||
std::string _fileName;
|
||||
DirObj * _currentDir;
|
||||
std::string _fileName;
|
||||
|
||||
//error information
|
||||
ErrorDescriptor _error;
|
||||
ErrorDescriptor _error;
|
||||
|
||||
// new errors
|
||||
int _entsNotCreated; // num entities not created in first pass
|
||||
int _entsInvalid; // num entities that had invalid attr values
|
||||
int _entsIncomplete; // num entities that had missing attr values
|
||||
// (includes entities that had invalid values
|
||||
// for required attrs)
|
||||
int _entsWarning; // num entities that may have had problems
|
||||
// with attrs - reported as an attr user msg
|
||||
// new errors
|
||||
int _entsNotCreated; // num entities not created in first pass
|
||||
int _entsInvalid; // num entities that had invalid attr values
|
||||
int _entsIncomplete; // num entities that had missing attr values
|
||||
// (includes entities that had invalid values
|
||||
// for required attrs)
|
||||
int _entsWarning; // num entities that may have had problems
|
||||
// with attrs - reported as an attr user msg
|
||||
|
||||
// old errors
|
||||
int _errorCount;
|
||||
int _warningCount;
|
||||
// old errors
|
||||
int _errorCount;
|
||||
int _warningCount;
|
||||
|
||||
int _maxErrorCount;
|
||||
int _maxErrorCount;
|
||||
|
||||
bool _strict; ///< If false, "missing and required" attributes are replaced with a generic value when file is read
|
||||
bool _strict; ///< If false, "missing and required" attributes are replaced with a generic value when file is read
|
||||
|
||||
protected:
|
||||
|
||||
protected:
|
||||
|
||||
//file type information
|
||||
FileTypeCode _fileType;
|
||||
char ENTITY_NAME_DELIM;
|
||||
char* FILE_DELIM;
|
||||
char* END_FILE_DELIM;
|
||||
|
||||
FileTypeCode _fileType;
|
||||
char ENTITY_NAME_DELIM;
|
||||
char * FILE_DELIM;
|
||||
char * END_FILE_DELIM;
|
||||
|
||||
//public member functions
|
||||
public:
|
||||
public:
|
||||
|
||||
//public access to member variables
|
||||
//header information
|
||||
InstMgr* HeaderInstances() { return _headerInstances; }
|
||||
const Registry *HeaderRegistry() { return _headerRegistry; }
|
||||
InstMgr * HeaderInstances() {
|
||||
return _headerInstances;
|
||||
}
|
||||
const Registry * HeaderRegistry() {
|
||||
return _headerRegistry;
|
||||
}
|
||||
// to create header instances
|
||||
SDAI_Application_instance* HeaderDefaultFileName();
|
||||
SDAI_Application_instance* HeaderDefaultFileDescription();
|
||||
SDAI_Application_instance* HeaderDefaultFileSchema();
|
||||
SDAI_Application_instance * HeaderDefaultFileName();
|
||||
SDAI_Application_instance * HeaderDefaultFileDescription();
|
||||
SDAI_Application_instance * HeaderDefaultFileSchema();
|
||||
|
||||
//file information
|
||||
const std::string FileName() const { return _fileName; }
|
||||
const std::string SetFileName (const std::string name = "");
|
||||
const std::string TruncFileName (const std::string name) const;
|
||||
const std::string FileName() const {
|
||||
return _fileName;
|
||||
}
|
||||
const std::string SetFileName( const std::string name = "" );
|
||||
const std::string TruncFileName( const std::string name ) const;
|
||||
|
||||
//error information
|
||||
ErrorDescriptor& Error() /* const */ { return _error; }
|
||||
int ErrorCount() const { return _errorCount; }
|
||||
int WarningCount() const { return _warningCount; }
|
||||
Severity AppendEntityErrorMsg (ErrorDescriptor *e);
|
||||
|
||||
ErrorDescriptor & Error() { /* const */
|
||||
return _error;
|
||||
}
|
||||
int ErrorCount() const {
|
||||
return _errorCount;
|
||||
}
|
||||
int WarningCount() const {
|
||||
return _warningCount;
|
||||
}
|
||||
Severity AppendEntityErrorMsg( ErrorDescriptor * e );
|
||||
|
||||
//version information
|
||||
FileTypeCode FileType() const { return _fileType; }
|
||||
void FileType (FileTypeCode ft) { _fileType = ft; }
|
||||
int SetFileType (FileTypeCode ft = VERSION_CURRENT);
|
||||
|
||||
//Reading and Writing
|
||||
Severity ReadExchangeFile (const std::string filename = "", bool useTechCor = true );
|
||||
Severity AppendExchangeFile (const std::string filename = "", bool useTechCor = true );
|
||||
FileTypeCode FileType() const {
|
||||
return _fileType;
|
||||
}
|
||||
void FileType( FileTypeCode ft ) {
|
||||
_fileType = ft;
|
||||
}
|
||||
int SetFileType( FileTypeCode ft = VERSION_CURRENT );
|
||||
|
||||
Severity ReadWorkingFile (const std::string filename = "", bool useTechCor = true );
|
||||
Severity AppendWorkingFile (const std::string filename = "", bool useTechCor = true );
|
||||
//Reading and Writing
|
||||
Severity ReadExchangeFile( const std::string filename = "", bool useTechCor = true );
|
||||
Severity AppendExchangeFile( const std::string filename = "", bool useTechCor = true );
|
||||
|
||||
Severity AppendFile (istream* in, bool useTechCor = true ) ;
|
||||
Severity ReadWorkingFile( const std::string filename = "", bool useTechCor = true );
|
||||
Severity AppendWorkingFile( const std::string filename = "", bool useTechCor = true );
|
||||
|
||||
Severity WriteExchangeFile (ostream& out, int validate =1,
|
||||
int clearError = 1, int writeComments = 1);
|
||||
Severity WriteExchangeFile (const std::string filename = "", int validate =1,
|
||||
int clearError = 1, int writeComments = 1);
|
||||
Severity WriteValuePairsFile(ostream& out, int validate =1,
|
||||
int clearError =1,
|
||||
int writeComments = 1, int mixedCase = 1);
|
||||
Severity AppendFile( istream * in, bool useTechCor = true ) ;
|
||||
|
||||
Severity WriteWorkingFile (ostream& out, int clearError = 1,
|
||||
int writeComments = 1);
|
||||
Severity WriteWorkingFile (const std::string filename = "", int clearError = 1,
|
||||
int writeComments = 1);
|
||||
Severity WriteExchangeFile( ostream & out, int validate = 1,
|
||||
int clearError = 1, int writeComments = 1 );
|
||||
Severity WriteExchangeFile( const std::string filename = "", int validate = 1,
|
||||
int clearError = 1, int writeComments = 1 );
|
||||
Severity WriteValuePairsFile( ostream & out, int validate = 1,
|
||||
int clearError = 1,
|
||||
int writeComments = 1, int mixedCase = 1 );
|
||||
|
||||
stateEnum EntityWfState(char c);
|
||||
|
||||
void Renumber ();
|
||||
Severity WriteWorkingFile( ostream & out, int clearError = 1,
|
||||
int writeComments = 1 );
|
||||
Severity WriteWorkingFile( const std::string filename = "", int clearError = 1,
|
||||
int writeComments = 1 );
|
||||
|
||||
stateEnum EntityWfState( char c );
|
||||
|
||||
void Renumber();
|
||||
|
||||
//constructors
|
||||
STEPfile (Registry& r, InstMgr& i, const std::string filename = "", bool strict = true );
|
||||
virtual ~STEPfile();
|
||||
STEPfile( Registry & r, InstMgr & i, const std::string filename = "", bool strict = true );
|
||||
virtual ~STEPfile();
|
||||
|
||||
protected:
|
||||
protected:
|
||||
//member functions
|
||||
const std::string schemaName(); // returns and copies out schema name from header instances
|
||||
const std::string schemaName(); // returns and copies out schema name from header instances
|
||||
//called by ReadExchangeFile
|
||||
istream* OpenInputFile (const std::string filename = "");
|
||||
void CloseInputFile(istream* in);
|
||||
|
||||
Severity ReadHeader(istream& in);
|
||||
istream * OpenInputFile( const std::string filename = "" );
|
||||
void CloseInputFile( istream * in );
|
||||
|
||||
Severity HeaderVerifyInstances(InstMgr* im);
|
||||
void HeaderMergeInstances(InstMgr* im);
|
||||
|
||||
int HeaderId (int increment =1);
|
||||
int HeaderId (const std::string name);
|
||||
Severity ReadHeader( istream & in );
|
||||
|
||||
int ReadData1 (istream& in); // first pass to create instances
|
||||
Severity HeaderVerifyInstances( InstMgr * im );
|
||||
void HeaderMergeInstances( InstMgr * im );
|
||||
|
||||
int HeaderId( int increment = 1 );
|
||||
int HeaderId( const std::string name );
|
||||
|
||||
int ReadData1( istream & in ); // first pass to create instances
|
||||
// second pass to read instances
|
||||
int ReadData2 (istream& in, bool useTechCor = true );
|
||||
int ReadData2( istream & in, bool useTechCor = true );
|
||||
|
||||
// obsolete
|
||||
int ReadWorkingData1 (istream& in);
|
||||
int ReadWorkingData2 (istream& in, bool useTechCor = true );
|
||||
int ReadWorkingData1( istream & in );
|
||||
int ReadWorkingData2( istream & in, bool useTechCor = true );
|
||||
|
||||
void ReadRestOfFile(istream& in);
|
||||
void ReadRestOfFile( istream & in );
|
||||
|
||||
// create instance - used by ReadData1()
|
||||
SDAI_Application_instance * CreateInstance(istream& in, ostream& out);
|
||||
SDAI_Application_instance * CreateInstance( istream & in, ostream & out );
|
||||
// create complex instance - used by CreateInstance()
|
||||
SDAI_Application_instance * CreateSubSuperInstance(istream& in, int fileid,
|
||||
ErrorDescriptor &);
|
||||
SDAI_Application_instance * CreateSubSuperInstance( istream & in, int fileid,
|
||||
ErrorDescriptor & );
|
||||
|
||||
// read the instance - used by ReadData2()
|
||||
SDAI_Application_instance * ReadInstance(istream& in, ostream& out,
|
||||
std::string &cmtStr, bool useTechCor = true );
|
||||
SDAI_Application_instance * ReadInstance( istream & in, ostream & out,
|
||||
std::string & cmtStr, bool useTechCor = true );
|
||||
|
||||
// reading scopes are still incomplete
|
||||
// these functions are stubs
|
||||
Severity CreateScopeInstances(istream& in, SDAI_Application_instance_ptr ** scopelist);
|
||||
Severity ReadScopeInstances(istream& in);
|
||||
// reading scopes are still incomplete
|
||||
// these functions are stubs
|
||||
Severity CreateScopeInstances( istream & in, SDAI_Application_instance_ptr ** scopelist );
|
||||
Severity ReadScopeInstances( istream & in );
|
||||
// Severity ReadSubSuperInstance(istream& in);
|
||||
|
||||
int FindDataSection (istream& in);
|
||||
int FindHeaderSection (istream& in);
|
||||
int FindDataSection( istream & in );
|
||||
int FindHeaderSection( istream & in );
|
||||
|
||||
// writing working session files
|
||||
void WriteWorkingData(ostream& out, int writeComments = 1);
|
||||
void WriteWorkingData( ostream & out, int writeComments = 1 );
|
||||
|
||||
//called by WriteExchangeFile
|
||||
ofstream* OpenOutputFile(const std::string filename = "");
|
||||
void CloseOutputFile(ostream* out);
|
||||
ofstream * OpenOutputFile( const std::string filename = "" );
|
||||
void CloseOutputFile( ostream * out );
|
||||
|
||||
void WriteHeader (ostream& out);
|
||||
void WriteHeaderInstance (SDAI_Application_instance *obj, ostream& out);
|
||||
void WriteHeaderInstanceFileName (ostream& out);
|
||||
void WriteHeaderInstanceFileDescription (ostream& out);
|
||||
void WriteHeaderInstanceFileSchema (ostream& out);
|
||||
void WriteHeader( ostream & out );
|
||||
void WriteHeaderInstance( SDAI_Application_instance * obj, ostream & out );
|
||||
void WriteHeaderInstanceFileName( ostream & out );
|
||||
void WriteHeaderInstanceFileDescription( ostream & out );
|
||||
void WriteHeaderInstanceFileSchema( ostream & out );
|
||||
|
||||
void WriteData (ostream& out, int writeComments = 1);
|
||||
void WriteValuePairsData(ostream& out, int writeComments = 1,
|
||||
int mixedCase = 1);
|
||||
|
||||
int IncrementFileId (int fileid);
|
||||
int FileIdIncr() { return _fileIdIncr; }
|
||||
void SetFileIdIncrement ();
|
||||
void MakeBackupFile();
|
||||
void WriteData( ostream & out, int writeComments = 1 );
|
||||
void WriteValuePairsData( ostream & out, int writeComments = 1,
|
||||
int mixedCase = 1 );
|
||||
|
||||
int IncrementFileId( int fileid );
|
||||
int FileIdIncr() {
|
||||
return _fileIdIncr;
|
||||
}
|
||||
void SetFileIdIncrement();
|
||||
void MakeBackupFile();
|
||||
|
||||
// void ReadWhiteSpace(istream& in);
|
||||
};
|
||||
|
||||
@@ -28,8 +28,7 @@ STEPfile::STEPfile( Registry & r, InstMgr & i, const std::string filename, bool
|
||||
_instances( i ), _reg( r ), _fileIdIncr( 0 ), _headerId( 0 ),
|
||||
_entsNotCreated( 0 ), _entsInvalid( 0 ), _entsIncomplete( 0 ),
|
||||
_entsWarning( 0 ), _errorCount( 0 ), _warningCount( 0 ),
|
||||
_maxErrorCount( 5000 ), _strict(strict)
|
||||
{
|
||||
_maxErrorCount( 5000 ), _strict( strict ) {
|
||||
SetFileType( VERSION_CURRENT );
|
||||
SetFileIdIncrement();
|
||||
_currentDir = new DirObj( "" );
|
||||
@@ -92,11 +91,11 @@ const std::string STEPfile::TruncFileName( const std::string filename ) const {
|
||||
#else
|
||||
char slash = '/';
|
||||
#endif
|
||||
size_t l = filename.find_last_of(slash);
|
||||
size_t l = filename.find_last_of( slash );
|
||||
if( l == std::string::npos ) {
|
||||
return filename;
|
||||
} else {
|
||||
return filename.substr(l);
|
||||
return filename.substr( l );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -258,7 +257,7 @@ void STEPfile::SetFileIdIncrement() {
|
||||
if( instances().MaxFileId() < 0 ) {
|
||||
_fileIdIncr = 0;
|
||||
} else _fileIdIncr =
|
||||
( int )( ( ceil( ( ( instances().MaxFileId() + 99.0 ) / 1000.0 ) ) + 1.0 ) * 1000.0 );
|
||||
( int )( ( ceil( ( ( instances().MaxFileId() + 99.0 ) / 1000.0 ) ) + 1.0 ) * 1000.0 );
|
||||
}
|
||||
|
||||
|
||||
@@ -272,7 +271,7 @@ const std::string STEPfile::schemaName() {
|
||||
SdaiFile_schema * fs;
|
||||
std::string schName;
|
||||
STEPnode * n;
|
||||
|
||||
|
||||
if( _headerInstances == NULL ) {
|
||||
return schName;
|
||||
}
|
||||
@@ -297,13 +296,13 @@ const std::string STEPfile::schemaName() {
|
||||
schName.clear();
|
||||
return schName;
|
||||
}
|
||||
if( schName[ schName.length()-1 ] == '\'' ) {
|
||||
schName = schName.substr(1,schName.length()-2);
|
||||
if( schName[ schName.length() - 1 ] == '\'' ) {
|
||||
schName = schName.substr( 1, schName.length() - 2 );
|
||||
} else {
|
||||
_error.AppendToUserMsg( "In STEPfile::schemaName: schName was truncated." );
|
||||
_error.GreaterSeverity( SEVERITY_WARNING );
|
||||
|
||||
schName = schName.substr(1,schName.length()-1);
|
||||
|
||||
schName = schName.substr( 1, schName.length() - 1 );
|
||||
}
|
||||
return schName;
|
||||
}
|
||||
|
||||
+468
-468
File diff suppressed because it is too large
Load Diff
+114
-90
@@ -13,84 +13,92 @@
|
||||
|
||||
///////// ENTITY section_language
|
||||
|
||||
extern SCL_EDITOR_EXPORT AttrDescriptor *a_0section;
|
||||
extern SCL_EDITOR_EXPORT AttrDescriptor *a_1default_language;
|
||||
extern SCL_EDITOR_EXPORT AttrDescriptor * a_0section;
|
||||
extern SCL_EDITOR_EXPORT AttrDescriptor * a_1default_language;
|
||||
|
||||
class SCL_EDITOR_EXPORT SdaiSection_language : public SDAI_Application_instance {
|
||||
protected:
|
||||
protected:
|
||||
SDAI_String _section ; // OPTIONAL
|
||||
SDAI_String _default_language ;
|
||||
public:
|
||||
public:
|
||||
|
||||
SdaiSection_language ( );
|
||||
SdaiSection_language (SDAI_Application_instance *se, int *addAttrs = 0);
|
||||
SdaiSection_language (SdaiSection_language& e );
|
||||
~SdaiSection_language ();
|
||||
SdaiSection_language( );
|
||||
SdaiSection_language( SDAI_Application_instance * se, int * addAttrs = 0 );
|
||||
SdaiSection_language( SdaiSection_language & e );
|
||||
~SdaiSection_language();
|
||||
|
||||
int opcode () { return 0 ; }
|
||||
int opcode() {
|
||||
return 0 ;
|
||||
}
|
||||
const SdaiSection_name section_() const;
|
||||
void section_ (const SdaiSection_name x);
|
||||
void section_( const SdaiSection_name x );
|
||||
|
||||
const SdaiLanguage_name default_language_() const;
|
||||
void default_language_ (const SdaiLanguage_name x);
|
||||
void default_language_( const SdaiLanguage_name x );
|
||||
|
||||
};
|
||||
|
||||
inline SdaiSection_language *
|
||||
create_SdaiSection_language () { return new SdaiSection_language ; }
|
||||
create_SdaiSection_language() {
|
||||
return new SdaiSection_language ;
|
||||
}
|
||||
|
||||
///////// END_ENTITY section_language
|
||||
|
||||
|
||||
///////// ENTITY file_population
|
||||
|
||||
extern SCL_EDITOR_EXPORT AttrDescriptor *a_2governing_schema;
|
||||
extern SCL_EDITOR_EXPORT AttrDescriptor *a_3determination_method;
|
||||
extern SCL_EDITOR_EXPORT AttrDescriptor *a_4governed_sections;
|
||||
extern SCL_EDITOR_EXPORT AttrDescriptor * a_2governing_schema;
|
||||
extern SCL_EDITOR_EXPORT AttrDescriptor * a_3determination_method;
|
||||
extern SCL_EDITOR_EXPORT AttrDescriptor * a_4governed_sections;
|
||||
|
||||
class SCL_EDITOR_EXPORT SdaiFile_population : public SDAI_Application_instance {
|
||||
protected:
|
||||
protected:
|
||||
SDAI_String _governing_schema ;
|
||||
SDAI_String _determination_method ;
|
||||
StringAggregate _governed_sections ; // OPTIONAL // of section_name
|
||||
|
||||
public:
|
||||
public:
|
||||
|
||||
SdaiFile_population ( );
|
||||
SdaiFile_population (SDAI_Application_instance *se, int *addAttrs = 0);
|
||||
SdaiFile_population (SdaiFile_population& e );
|
||||
~SdaiFile_population ();
|
||||
SdaiFile_population( );
|
||||
SdaiFile_population( SDAI_Application_instance * se, int * addAttrs = 0 );
|
||||
SdaiFile_population( SdaiFile_population & e );
|
||||
~SdaiFile_population();
|
||||
|
||||
int opcode () { return 1 ; }
|
||||
int opcode() {
|
||||
return 1 ;
|
||||
}
|
||||
const SdaiSchema_name governing_schema_() const;
|
||||
void governing_schema_ (const SdaiSchema_name x);
|
||||
void governing_schema_( const SdaiSchema_name x );
|
||||
|
||||
const SdaiExchange_structure_identifier determination_method_() const;
|
||||
void determination_method_ (const SdaiExchange_structure_identifier x);
|
||||
void determination_method_( const SdaiExchange_structure_identifier x );
|
||||
|
||||
const StringAggregate_ptr governed_sections_() const;
|
||||
void governed_sections_ (const StringAggregate_ptr x);
|
||||
void governed_sections_( const StringAggregate_ptr x );
|
||||
|
||||
};
|
||||
|
||||
inline SdaiFile_population *
|
||||
create_SdaiFile_population () { return new SdaiFile_population ; }
|
||||
create_SdaiFile_population() {
|
||||
return new SdaiFile_population ;
|
||||
}
|
||||
|
||||
///////// END_ENTITY file_population
|
||||
|
||||
|
||||
///////// ENTITY file_name
|
||||
|
||||
extern AttrDescriptor *a_5name;
|
||||
extern AttrDescriptor *a_6time_stamp;
|
||||
extern AttrDescriptor *a_7author;
|
||||
extern AttrDescriptor *a_8organization;
|
||||
extern AttrDescriptor *a_9preprocessor_version;
|
||||
extern AttrDescriptor *a_10originating_system;
|
||||
extern AttrDescriptor *a_11authorization;
|
||||
extern AttrDescriptor * a_5name;
|
||||
extern AttrDescriptor * a_6time_stamp;
|
||||
extern AttrDescriptor * a_7author;
|
||||
extern AttrDescriptor * a_8organization;
|
||||
extern AttrDescriptor * a_9preprocessor_version;
|
||||
extern AttrDescriptor * a_10originating_system;
|
||||
extern AttrDescriptor * a_11authorization;
|
||||
|
||||
class SCL_EDITOR_EXPORT SdaiFile_name : public SDAI_Application_instance {
|
||||
protected:
|
||||
protected:
|
||||
SDAI_String _name ;
|
||||
SDAI_String _time_stamp ;
|
||||
StringAggregate _author ;
|
||||
@@ -98,129 +106,145 @@ class SCL_EDITOR_EXPORT SdaiFile_name : public SDAI_Application_instance {
|
||||
SDAI_String _preprocessor_version ;
|
||||
SDAI_String _originating_system ;
|
||||
SDAI_String _authorization ;
|
||||
public:
|
||||
public:
|
||||
|
||||
SdaiFile_name ( );
|
||||
SdaiFile_name (SDAI_Application_instance *se, int *addAttrs = 0);
|
||||
SdaiFile_name (SdaiFile_name& e );
|
||||
~SdaiFile_name ();
|
||||
SdaiFile_name( );
|
||||
SdaiFile_name( SDAI_Application_instance * se, int * addAttrs = 0 );
|
||||
SdaiFile_name( SdaiFile_name & e );
|
||||
~SdaiFile_name();
|
||||
|
||||
int opcode () { return 2 ; }
|
||||
int opcode() {
|
||||
return 2 ;
|
||||
}
|
||||
const SDAI_String name_() const;
|
||||
void name_ (const SDAI_String x);
|
||||
void name_( const SDAI_String x );
|
||||
|
||||
const SdaiTime_stamp_text time_stamp_() const;
|
||||
void time_stamp_ (const SdaiTime_stamp_text x);
|
||||
void time_stamp_( const SdaiTime_stamp_text x );
|
||||
|
||||
const StringAggregate_ptr author_() const;
|
||||
void author_ (const StringAggregate_ptr x);
|
||||
void author_( const StringAggregate_ptr x );
|
||||
|
||||
const StringAggregate_ptr organization_() const;
|
||||
void organization_ (const StringAggregate_ptr x);
|
||||
void organization_( const StringAggregate_ptr x );
|
||||
|
||||
const SDAI_String preprocessor_version_() const;
|
||||
void preprocessor_version_ (const SDAI_String x);
|
||||
void preprocessor_version_( const SDAI_String x );
|
||||
|
||||
const SDAI_String originating_system_() const;
|
||||
void originating_system_ (const SDAI_String x);
|
||||
void originating_system_( const SDAI_String x );
|
||||
|
||||
const SDAI_String authorization_() const;
|
||||
void authorization_ (const SDAI_String x);
|
||||
void authorization_( const SDAI_String x );
|
||||
|
||||
};
|
||||
|
||||
inline SdaiFile_name *
|
||||
create_SdaiFile_name () { return new SdaiFile_name ; }
|
||||
create_SdaiFile_name() {
|
||||
return new SdaiFile_name ;
|
||||
}
|
||||
|
||||
///////// END_ENTITY file_name
|
||||
|
||||
|
||||
///////// ENTITY section_context
|
||||
|
||||
extern SCL_EDITOR_EXPORT AttrDescriptor *a_12section;
|
||||
extern SCL_EDITOR_EXPORT AttrDescriptor *a_13context_identifiers;
|
||||
extern SCL_EDITOR_EXPORT AttrDescriptor * a_12section;
|
||||
extern SCL_EDITOR_EXPORT AttrDescriptor * a_13context_identifiers;
|
||||
|
||||
class SCL_EDITOR_EXPORT SdaiSection_context : public SDAI_Application_instance {
|
||||
protected:
|
||||
protected:
|
||||
SDAI_String _section ; // OPTIONAL
|
||||
StringAggregate _context_identifiers ; // of context_name
|
||||
|
||||
public:
|
||||
public:
|
||||
|
||||
SdaiSection_context ( );
|
||||
SdaiSection_context (SDAI_Application_instance *se, int *addAttrs = 0);
|
||||
SdaiSection_context (SdaiSection_context& e );
|
||||
~SdaiSection_context ();
|
||||
SdaiSection_context( );
|
||||
SdaiSection_context( SDAI_Application_instance * se, int * addAttrs = 0 );
|
||||
SdaiSection_context( SdaiSection_context & e );
|
||||
~SdaiSection_context();
|
||||
|
||||
int opcode () { return 3 ; }
|
||||
int opcode() {
|
||||
return 3 ;
|
||||
}
|
||||
const SdaiSection_name section_() const;
|
||||
void section_ (const SdaiSection_name x);
|
||||
void section_( const SdaiSection_name x );
|
||||
|
||||
const StringAggregate_ptr context_identifiers_() const;
|
||||
void context_identifiers_ (const StringAggregate_ptr x);
|
||||
void context_identifiers_( const StringAggregate_ptr x );
|
||||
|
||||
};
|
||||
|
||||
inline SdaiSection_context *
|
||||
create_SdaiSection_context () { return new SdaiSection_context ; }
|
||||
create_SdaiSection_context() {
|
||||
return new SdaiSection_context ;
|
||||
}
|
||||
|
||||
///////// END_ENTITY section_context
|
||||
|
||||
|
||||
///////// ENTITY file_description
|
||||
|
||||
extern SCL_EDITOR_EXPORT AttrDescriptor *a_14description;
|
||||
extern SCL_EDITOR_EXPORT AttrDescriptor *a_15implementation_level;
|
||||
extern SCL_EDITOR_EXPORT AttrDescriptor * a_14description;
|
||||
extern SCL_EDITOR_EXPORT AttrDescriptor * a_15implementation_level;
|
||||
|
||||
class SCL_EDITOR_EXPORT SdaiFile_description : public SDAI_Application_instance {
|
||||
protected:
|
||||
protected:
|
||||
StringAggregate _description ;
|
||||
SDAI_String _implementation_level ;
|
||||
public:
|
||||
public:
|
||||
|
||||
SdaiFile_description ( );
|
||||
SdaiFile_description (SDAI_Application_instance *se, int *addAttrs = 0);
|
||||
SdaiFile_description (SdaiFile_description& e );
|
||||
~SdaiFile_description ();
|
||||
SdaiFile_description( );
|
||||
SdaiFile_description( SDAI_Application_instance * se, int * addAttrs = 0 );
|
||||
SdaiFile_description( SdaiFile_description & e );
|
||||
~SdaiFile_description();
|
||||
|
||||
int opcode () { return 4 ; }
|
||||
int opcode() {
|
||||
return 4 ;
|
||||
}
|
||||
const StringAggregate_ptr description_() const;
|
||||
void description_ (const StringAggregate_ptr x);
|
||||
void description_( const StringAggregate_ptr x );
|
||||
|
||||
const SDAI_String implementation_level_() const;
|
||||
void implementation_level_ (const SDAI_String x);
|
||||
void implementation_level_( const SDAI_String x );
|
||||
|
||||
};
|
||||
|
||||
inline SdaiFile_description *
|
||||
create_SdaiFile_description () { return new SdaiFile_description ; }
|
||||
create_SdaiFile_description() {
|
||||
return new SdaiFile_description ;
|
||||
}
|
||||
|
||||
///////// END_ENTITY file_description
|
||||
|
||||
|
||||
///////// ENTITY file_schema
|
||||
|
||||
extern SCL_EDITOR_EXPORT AttrDescriptor *a_16schema_identifiers;
|
||||
extern SCL_EDITOR_EXPORT AttrDescriptor * a_16schema_identifiers;
|
||||
|
||||
class SCL_EDITOR_EXPORT SdaiFile_schema : public SDAI_Application_instance {
|
||||
protected:
|
||||
protected:
|
||||
StringAggregate _schema_identifiers ; // of schema_name
|
||||
|
||||
public:
|
||||
public:
|
||||
|
||||
SdaiFile_schema ( );
|
||||
SdaiFile_schema (SDAI_Application_instance *se, int *addAttrs = 0);
|
||||
SdaiFile_schema (SdaiFile_schema& e );
|
||||
~SdaiFile_schema ();
|
||||
SdaiFile_schema( );
|
||||
SdaiFile_schema( SDAI_Application_instance * se, int * addAttrs = 0 );
|
||||
SdaiFile_schema( SdaiFile_schema & e );
|
||||
~SdaiFile_schema();
|
||||
|
||||
int opcode () { return 5 ; }
|
||||
int opcode() {
|
||||
return 5 ;
|
||||
}
|
||||
const StringAggregate_ptr schema_identifiers_() const;
|
||||
void schema_identifiers_ (const StringAggregate_ptr x);
|
||||
void schema_identifiers_( const StringAggregate_ptr x );
|
||||
|
||||
};
|
||||
|
||||
inline SdaiFile_schema *
|
||||
create_SdaiFile_schema () { return new SdaiFile_schema ; }
|
||||
create_SdaiFile_schema() {
|
||||
return new SdaiFile_schema ;
|
||||
}
|
||||
|
||||
///////// END_ENTITY file_schema
|
||||
|
||||
@@ -229,20 +253,20 @@ create_SdaiFile_schema () { return new SdaiFile_schema ; }
|
||||
|
||||
class SCL_EDITOR_EXPORT SdaiModel_contents_header_section_schema : public SDAI_Model_contents {
|
||||
|
||||
public:
|
||||
SdaiModel_contents_header_section_schema();
|
||||
public:
|
||||
SdaiModel_contents_header_section_schema();
|
||||
|
||||
SdaiSection_language__set_var SdaiSection_language_get_extents();
|
||||
SdaiSection_language__set_var SdaiSection_language_get_extents();
|
||||
|
||||
SdaiFile_population__set_var SdaiFile_population_get_extents();
|
||||
SdaiFile_population__set_var SdaiFile_population_get_extents();
|
||||
|
||||
SdaiFile_name__set_var SdaiFile_name_get_extents();
|
||||
SdaiFile_name__set_var SdaiFile_name_get_extents();
|
||||
|
||||
SdaiSection_context__set_var SdaiSection_context_get_extents();
|
||||
SdaiSection_context__set_var SdaiSection_context_get_extents();
|
||||
|
||||
SdaiFile_description__set_var SdaiFile_description_get_extents();
|
||||
SdaiFile_description__set_var SdaiFile_description_get_extents();
|
||||
|
||||
SdaiFile_schema__set_var SdaiFile_schema_get_extents();
|
||||
SdaiFile_schema__set_var SdaiFile_schema_get_extents();
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -6,86 +6,86 @@
|
||||
|
||||
#include <SdaiHeaderSchema.h>
|
||||
|
||||
void HeaderInitSchemasAndEnts (Registry & reg) {
|
||||
void HeaderInitSchemasAndEnts( Registry & reg ) {
|
||||
Uniqueness_rule_ptr ur;
|
||||
// Schema: SdaiHEADER_SECTION_SCHEMA
|
||||
s_header_section_schema = new Schema("Header_Section_Schema");
|
||||
s_header_section_schema->AssignModelContentsCreator(
|
||||
(ModelContentsCreator) create_SdaiModel_contents_header_section_schema);
|
||||
reg.AddSchema (*s_header_section_schema);
|
||||
// Schema: SdaiHEADER_SECTION_SCHEMA
|
||||
s_header_section_schema = new Schema( "Header_Section_Schema" );
|
||||
s_header_section_schema->AssignModelContentsCreator(
|
||||
( ModelContentsCreator ) create_SdaiModel_contents_header_section_schema );
|
||||
reg.AddSchema( *s_header_section_schema );
|
||||
|
||||
// ***** Initialize the Types
|
||||
header_section_schemat_time_stamp_text = new TypeDescriptor (
|
||||
"Time_Stamp_Text", // Name
|
||||
sdaiSTRING, // FundamentalType
|
||||
s_header_section_schema, // Originating Schema
|
||||
"STRING (256)"); // Description
|
||||
s_header_section_schema->AddType(header_section_schemat_time_stamp_text);
|
||||
header_section_schemat_section_name = new TypeDescriptor (
|
||||
"Section_Name", // Name
|
||||
REFERENCE_TYPE, // FundamentalType
|
||||
s_header_section_schema, // Originating Schema
|
||||
"exchange_structure_identifier"); // Description
|
||||
s_header_section_schema->AddType(header_section_schemat_section_name);
|
||||
header_section_schemat_context_name = new TypeDescriptor (
|
||||
"Context_Name", // Name
|
||||
sdaiSTRING, // FundamentalType
|
||||
s_header_section_schema, // Originating Schema
|
||||
"STRING"); // Description
|
||||
s_header_section_schema->AddType(header_section_schemat_context_name);
|
||||
header_section_schemat_schema_name = new TypeDescriptor (
|
||||
"Schema_Name", // Name
|
||||
sdaiSTRING, // FundamentalType
|
||||
s_header_section_schema, // Originating Schema
|
||||
"STRING (1024)"); // Description
|
||||
s_header_section_schema->AddType(header_section_schemat_schema_name);
|
||||
header_section_schemat_language_name = new TypeDescriptor (
|
||||
"Language_Name", // Name
|
||||
REFERENCE_TYPE, // FundamentalType
|
||||
s_header_section_schema, // Originating Schema
|
||||
"exchange_structure_identifier"); // Description
|
||||
s_header_section_schema->AddType(header_section_schemat_language_name);
|
||||
header_section_schemat_exchange_structure_identifier = new TypeDescriptor (
|
||||
"Exchange_Structure_Identifier", // Name
|
||||
sdaiSTRING, // FundamentalType
|
||||
s_header_section_schema, // Originating Schema
|
||||
"STRING"); // Description
|
||||
s_header_section_schema->AddType(header_section_schemat_exchange_structure_identifier);
|
||||
// ***** Initialize the Types
|
||||
header_section_schemat_time_stamp_text = new TypeDescriptor(
|
||||
"Time_Stamp_Text", // Name
|
||||
sdaiSTRING, // FundamentalType
|
||||
s_header_section_schema, // Originating Schema
|
||||
"STRING (256)" ); // Description
|
||||
s_header_section_schema->AddType( header_section_schemat_time_stamp_text );
|
||||
header_section_schemat_section_name = new TypeDescriptor(
|
||||
"Section_Name", // Name
|
||||
REFERENCE_TYPE, // FundamentalType
|
||||
s_header_section_schema, // Originating Schema
|
||||
"exchange_structure_identifier" ); // Description
|
||||
s_header_section_schema->AddType( header_section_schemat_section_name );
|
||||
header_section_schemat_context_name = new TypeDescriptor(
|
||||
"Context_Name", // Name
|
||||
sdaiSTRING, // FundamentalType
|
||||
s_header_section_schema, // Originating Schema
|
||||
"STRING" ); // Description
|
||||
s_header_section_schema->AddType( header_section_schemat_context_name );
|
||||
header_section_schemat_schema_name = new TypeDescriptor(
|
||||
"Schema_Name", // Name
|
||||
sdaiSTRING, // FundamentalType
|
||||
s_header_section_schema, // Originating Schema
|
||||
"STRING (1024)" ); // Description
|
||||
s_header_section_schema->AddType( header_section_schemat_schema_name );
|
||||
header_section_schemat_language_name = new TypeDescriptor(
|
||||
"Language_Name", // Name
|
||||
REFERENCE_TYPE, // FundamentalType
|
||||
s_header_section_schema, // Originating Schema
|
||||
"exchange_structure_identifier" ); // Description
|
||||
s_header_section_schema->AddType( header_section_schemat_language_name );
|
||||
header_section_schemat_exchange_structure_identifier = new TypeDescriptor(
|
||||
"Exchange_Structure_Identifier", // Name
|
||||
sdaiSTRING, // FundamentalType
|
||||
s_header_section_schema, // Originating Schema
|
||||
"STRING" ); // Description
|
||||
s_header_section_schema->AddType( header_section_schemat_exchange_structure_identifier );
|
||||
|
||||
// ***** Initialize the Entities
|
||||
header_section_schemae_section_language = new EntityDescriptor(
|
||||
"Section_Language", s_header_section_schema, LFalse, LFalse,
|
||||
(Creator) create_SdaiSection_language );
|
||||
s_header_section_schema->AddEntity(header_section_schemae_section_language);
|
||||
header_section_schemae_section_language->_uniqueness_rules = new Uniqueness_rule__set;
|
||||
ur = new Uniqueness_rule("UR1 : section;\n");
|
||||
header_section_schemae_section_language->_uniqueness_rules->Append(ur);
|
||||
header_section_schemae_file_population = new EntityDescriptor(
|
||||
"File_Population", s_header_section_schema, LFalse, LFalse,
|
||||
(Creator) create_SdaiFile_population );
|
||||
s_header_section_schema->AddEntity(header_section_schemae_file_population);
|
||||
header_section_schemae_file_name = new EntityDescriptor(
|
||||
"File_Name", s_header_section_schema, LFalse, LFalse,
|
||||
(Creator) create_SdaiFile_name );
|
||||
s_header_section_schema->AddEntity(header_section_schemae_file_name);
|
||||
header_section_schemae_section_context = new EntityDescriptor(
|
||||
"Section_Context", s_header_section_schema, LFalse, LFalse,
|
||||
(Creator) create_SdaiSection_context );
|
||||
s_header_section_schema->AddEntity(header_section_schemae_section_context);
|
||||
header_section_schemae_section_context->_uniqueness_rules = new Uniqueness_rule__set;
|
||||
ur = new Uniqueness_rule("UR1 : section;\n");
|
||||
header_section_schemae_section_context->_uniqueness_rules->Append(ur);
|
||||
header_section_schemae_file_description = new EntityDescriptor(
|
||||
"File_Description", s_header_section_schema, LFalse, LFalse,
|
||||
(Creator) create_SdaiFile_description );
|
||||
s_header_section_schema->AddEntity(header_section_schemae_file_description);
|
||||
header_section_schemae_file_schema = new EntityDescriptor(
|
||||
"File_Schema", s_header_section_schema, LFalse, LFalse,
|
||||
(Creator) create_SdaiFile_schema );
|
||||
s_header_section_schema->AddEntity(header_section_schemae_file_schema);
|
||||
// ***** Initialize the Entities
|
||||
header_section_schemae_section_language = new EntityDescriptor(
|
||||
"Section_Language", s_header_section_schema, LFalse, LFalse,
|
||||
( Creator ) create_SdaiSection_language );
|
||||
s_header_section_schema->AddEntity( header_section_schemae_section_language );
|
||||
header_section_schemae_section_language->_uniqueness_rules = new Uniqueness_rule__set;
|
||||
ur = new Uniqueness_rule( "UR1 : section;\n" );
|
||||
header_section_schemae_section_language->_uniqueness_rules->Append( ur );
|
||||
header_section_schemae_file_population = new EntityDescriptor(
|
||||
"File_Population", s_header_section_schema, LFalse, LFalse,
|
||||
( Creator ) create_SdaiFile_population );
|
||||
s_header_section_schema->AddEntity( header_section_schemae_file_population );
|
||||
header_section_schemae_file_name = new EntityDescriptor(
|
||||
"File_Name", s_header_section_schema, LFalse, LFalse,
|
||||
( Creator ) create_SdaiFile_name );
|
||||
s_header_section_schema->AddEntity( header_section_schemae_file_name );
|
||||
header_section_schemae_section_context = new EntityDescriptor(
|
||||
"Section_Context", s_header_section_schema, LFalse, LFalse,
|
||||
( Creator ) create_SdaiSection_context );
|
||||
s_header_section_schema->AddEntity( header_section_schemae_section_context );
|
||||
header_section_schemae_section_context->_uniqueness_rules = new Uniqueness_rule__set;
|
||||
ur = new Uniqueness_rule( "UR1 : section;\n" );
|
||||
header_section_schemae_section_context->_uniqueness_rules->Append( ur );
|
||||
header_section_schemae_file_description = new EntityDescriptor(
|
||||
"File_Description", s_header_section_schema, LFalse, LFalse,
|
||||
( Creator ) create_SdaiFile_description );
|
||||
s_header_section_schema->AddEntity( header_section_schemae_file_description );
|
||||
header_section_schemae_file_schema = new EntityDescriptor(
|
||||
"File_Schema", s_header_section_schema, LFalse, LFalse,
|
||||
( Creator ) create_SdaiFile_schema );
|
||||
s_header_section_schema->AddEntity( header_section_schemae_file_schema );
|
||||
|
||||
//////////////// USE statements
|
||||
//////////////// REFERENCE statements
|
||||
//////////////// USE statements
|
||||
//////////////// REFERENCE statements
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -7,69 +7,69 @@
|
||||
#include <scl_export.h>
|
||||
|
||||
// Schema: SdaiHEADER_SECTION_SCHEMA
|
||||
extern SCL_EDITOR_EXPORT Schema * s_header_section_schema;
|
||||
extern SCL_EDITOR_EXPORT Schema * s_header_section_schema;
|
||||
|
||||
// Types:
|
||||
typedef SDAI_String SdaiTime_stamp_text;
|
||||
extern SCL_EDITOR_EXPORT TypeDescriptor *header_section_schemat_time_stamp_text;
|
||||
extern SCL_EDITOR_EXPORT TypeDescriptor * header_section_schemat_time_stamp_text;
|
||||
typedef SDAI_String SdaiSection_name;
|
||||
extern SCL_EDITOR_EXPORT TypeDescriptor *header_section_schemat_section_name;
|
||||
extern SCL_EDITOR_EXPORT TypeDescriptor * header_section_schemat_section_name;
|
||||
typedef SDAI_String SdaiContext_name;
|
||||
extern SCL_EDITOR_EXPORT TypeDescriptor *header_section_schemat_context_name;
|
||||
extern SCL_EDITOR_EXPORT TypeDescriptor * header_section_schemat_context_name;
|
||||
typedef SDAI_String SdaiSchema_name;
|
||||
extern SCL_EDITOR_EXPORT TypeDescriptor *header_section_schemat_schema_name;
|
||||
extern SCL_EDITOR_EXPORT TypeDescriptor * header_section_schemat_schema_name;
|
||||
typedef SDAI_String SdaiLanguage_name;
|
||||
extern SCL_EDITOR_EXPORT TypeDescriptor *header_section_schemat_language_name;
|
||||
extern SCL_EDITOR_EXPORT TypeDescriptor * header_section_schemat_language_name;
|
||||
typedef SDAI_String SdaiExchange_structure_identifier;
|
||||
extern SCL_EDITOR_EXPORT TypeDescriptor *header_section_schemat_exchange_structure_identifier;
|
||||
extern SCL_EDITOR_EXPORT TypeDescriptor * header_section_schemat_exchange_structure_identifier;
|
||||
|
||||
// Entities:
|
||||
class SdaiSection_language;
|
||||
typedef SdaiSection_language * SdaiSection_languageH;
|
||||
typedef SdaiSection_language * SdaiSection_language_ptr;
|
||||
typedef SdaiSection_language * SdaiSection_languageH;
|
||||
typedef SdaiSection_language * SdaiSection_language_ptr;
|
||||
typedef SdaiSection_language_ptr SdaiSection_language_var;
|
||||
#define SdaiSection_language__set SDAI_DAObject__set
|
||||
#define SdaiSection_language__set_var SDAI_DAObject__set_var
|
||||
extern SCL_EDITOR_EXPORT EntityDescriptor *header_section_schemae_section_language;
|
||||
extern SCL_EDITOR_EXPORT EntityDescriptor * header_section_schemae_section_language;
|
||||
|
||||
class SdaiFile_population;
|
||||
typedef SdaiFile_population * SdaiFile_populationH;
|
||||
typedef SdaiFile_population * SdaiFile_population_ptr;
|
||||
typedef SdaiFile_population * SdaiFile_populationH;
|
||||
typedef SdaiFile_population * SdaiFile_population_ptr;
|
||||
typedef SdaiFile_population_ptr SdaiFile_population_var;
|
||||
#define SdaiFile_population__set SDAI_DAObject__set
|
||||
#define SdaiFile_population__set_var SDAI_DAObject__set_var
|
||||
extern SCL_EDITOR_EXPORT EntityDescriptor *header_section_schemae_file_population;
|
||||
extern SCL_EDITOR_EXPORT EntityDescriptor * header_section_schemae_file_population;
|
||||
|
||||
class SdaiFile_name;
|
||||
typedef SdaiFile_name * SdaiFile_nameH;
|
||||
typedef SdaiFile_name * SdaiFile_name_ptr;
|
||||
typedef SdaiFile_name * SdaiFile_nameH;
|
||||
typedef SdaiFile_name * SdaiFile_name_ptr;
|
||||
typedef SdaiFile_name_ptr SdaiFile_name_var;
|
||||
#define SdaiFile_name__set SDAI_DAObject__set
|
||||
#define SdaiFile_name__set_var SDAI_DAObject__set_var
|
||||
extern SCL_EDITOR_EXPORT EntityDescriptor *header_section_schemae_file_name;
|
||||
extern SCL_EDITOR_EXPORT EntityDescriptor * header_section_schemae_file_name;
|
||||
|
||||
class SdaiSection_context;
|
||||
typedef SdaiSection_context * SdaiSection_contextH;
|
||||
typedef SdaiSection_context * SdaiSection_context_ptr;
|
||||
typedef SdaiSection_context * SdaiSection_contextH;
|
||||
typedef SdaiSection_context * SdaiSection_context_ptr;
|
||||
typedef SdaiSection_context_ptr SdaiSection_context_var;
|
||||
#define SdaiSection_context__set SDAI_DAObject__set
|
||||
#define SdaiSection_context__set_var SDAI_DAObject__set_var
|
||||
extern SCL_EDITOR_EXPORT EntityDescriptor *header_section_schemae_section_context;
|
||||
extern SCL_EDITOR_EXPORT EntityDescriptor * header_section_schemae_section_context;
|
||||
|
||||
class SdaiFile_description;
|
||||
typedef SdaiFile_description * SdaiFile_descriptionH;
|
||||
typedef SdaiFile_description * SdaiFile_description_ptr;
|
||||
typedef SdaiFile_description * SdaiFile_descriptionH;
|
||||
typedef SdaiFile_description * SdaiFile_description_ptr;
|
||||
typedef SdaiFile_description_ptr SdaiFile_description_var;
|
||||
#define SdaiFile_description__set SDAI_DAObject__set
|
||||
#define SdaiFile_description__set_var SDAI_DAObject__set_var
|
||||
extern SCL_EDITOR_EXPORT EntityDescriptor *header_section_schemae_file_description;
|
||||
extern SCL_EDITOR_EXPORT EntityDescriptor * header_section_schemae_file_description;
|
||||
|
||||
class SdaiFile_schema;
|
||||
typedef SdaiFile_schema * SdaiFile_schemaH;
|
||||
typedef SdaiFile_schema * SdaiFile_schema_ptr;
|
||||
typedef SdaiFile_schema * SdaiFile_schemaH;
|
||||
typedef SdaiFile_schema * SdaiFile_schema_ptr;
|
||||
typedef SdaiFile_schema_ptr SdaiFile_schema_var;
|
||||
#define SdaiFile_schema__set SDAI_DAObject__set
|
||||
#define SdaiFile_schema__set_var SDAI_DAObject__set_var
|
||||
extern SCL_EDITOR_EXPORT EntityDescriptor *header_section_schemae_file_schema;
|
||||
extern SCL_EDITOR_EXPORT EntityDescriptor * header_section_schemae_file_schema;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -9,177 +9,176 @@
|
||||
#include <STEPattribute.h>
|
||||
#include <SdaiHeaderSchema.h>
|
||||
|
||||
void SdaiHEADER_SECTION_SCHEMAInit (Registry& reg)
|
||||
{
|
||||
header_section_schemat_time_stamp_text->ReferentType(t_sdaiSTRING);
|
||||
reg.AddType (*header_section_schemat_time_stamp_text);
|
||||
header_section_schemat_section_name->ReferentType(header_section_schemat_exchange_structure_identifier);
|
||||
reg.AddType (*header_section_schemat_section_name);
|
||||
header_section_schemat_context_name->ReferentType(t_sdaiSTRING);
|
||||
reg.AddType (*header_section_schemat_context_name);
|
||||
header_section_schemat_schema_name->ReferentType(t_sdaiSTRING);
|
||||
reg.AddType (*header_section_schemat_schema_name);
|
||||
header_section_schemat_language_name->ReferentType(header_section_schemat_exchange_structure_identifier);
|
||||
reg.AddType (*header_section_schemat_language_name);
|
||||
header_section_schemat_exchange_structure_identifier->ReferentType(t_sdaiSTRING);
|
||||
reg.AddType (*header_section_schemat_exchange_structure_identifier);
|
||||
void SdaiHEADER_SECTION_SCHEMAInit( Registry & reg ) {
|
||||
header_section_schemat_time_stamp_text->ReferentType( t_sdaiSTRING );
|
||||
reg.AddType( *header_section_schemat_time_stamp_text );
|
||||
header_section_schemat_section_name->ReferentType( header_section_schemat_exchange_structure_identifier );
|
||||
reg.AddType( *header_section_schemat_section_name );
|
||||
header_section_schemat_context_name->ReferentType( t_sdaiSTRING );
|
||||
reg.AddType( *header_section_schemat_context_name );
|
||||
header_section_schemat_schema_name->ReferentType( t_sdaiSTRING );
|
||||
reg.AddType( *header_section_schemat_schema_name );
|
||||
header_section_schemat_language_name->ReferentType( header_section_schemat_exchange_structure_identifier );
|
||||
reg.AddType( *header_section_schemat_language_name );
|
||||
header_section_schemat_exchange_structure_identifier->ReferentType( t_sdaiSTRING );
|
||||
reg.AddType( *header_section_schemat_exchange_structure_identifier );
|
||||
|
||||
///////// ENTITY section_language
|
||||
|
||||
a_0section =
|
||||
new AttrDescriptor("section",header_section_schemat_section_name,
|
||||
LTrue,LTrue, AttrType_Explicit,
|
||||
*header_section_schemae_section_language);
|
||||
header_section_schemae_section_language->AddExplicitAttr (a_0section);
|
||||
a_1default_language =
|
||||
new AttrDescriptor("default_language",header_section_schemat_language_name,
|
||||
LFalse,LFalse, AttrType_Explicit,
|
||||
*header_section_schemae_section_language);
|
||||
header_section_schemae_section_language->AddExplicitAttr (a_1default_language);
|
||||
reg.AddEntity (*header_section_schemae_section_language);
|
||||
a_0section =
|
||||
new AttrDescriptor( "section", header_section_schemat_section_name,
|
||||
LTrue, LTrue, AttrType_Explicit,
|
||||
*header_section_schemae_section_language );
|
||||
header_section_schemae_section_language->AddExplicitAttr( a_0section );
|
||||
a_1default_language =
|
||||
new AttrDescriptor( "default_language", header_section_schemat_language_name,
|
||||
LFalse, LFalse, AttrType_Explicit,
|
||||
*header_section_schemae_section_language );
|
||||
header_section_schemae_section_language->AddExplicitAttr( a_1default_language );
|
||||
reg.AddEntity( *header_section_schemae_section_language );
|
||||
///////// END_ENTITY section_language
|
||||
|
||||
///////// ENTITY file_population
|
||||
|
||||
a_2governing_schema =
|
||||
new AttrDescriptor("governing_schema",header_section_schemat_schema_name,
|
||||
LFalse,LFalse, AttrType_Explicit,
|
||||
*header_section_schemae_file_population);
|
||||
header_section_schemae_file_population->AddExplicitAttr (a_2governing_schema);
|
||||
a_3determination_method =
|
||||
new AttrDescriptor("determination_method",header_section_schemat_exchange_structure_identifier,
|
||||
LFalse,LFalse, AttrType_Explicit,
|
||||
*header_section_schemae_file_population);
|
||||
header_section_schemae_file_population->AddExplicitAttr (a_3determination_method);
|
||||
SetTypeDescriptor * t_0 = new SetTypeDescriptor;
|
||||
t_0->AssignAggrCreator((AggregateCreator) create_StringAggregate); // Creator function
|
||||
t_0->Bound1(1);
|
||||
t_0->Bound2(2147483647);
|
||||
t_0->FundamentalType(SET_TYPE);
|
||||
t_0->Description("SET [1:?] OF section_name");
|
||||
t_0->OriginatingSchema(s_header_section_schema);
|
||||
t_0->ReferentType(header_section_schemat_section_name);
|
||||
a_4governed_sections =
|
||||
new AttrDescriptor("governed_sections",t_0,LTrue,LFalse, AttrType_Explicit,
|
||||
*header_section_schemae_file_population);
|
||||
header_section_schemae_file_population->AddExplicitAttr (a_4governed_sections);
|
||||
reg.AddEntity (*header_section_schemae_file_population);
|
||||
a_2governing_schema =
|
||||
new AttrDescriptor( "governing_schema", header_section_schemat_schema_name,
|
||||
LFalse, LFalse, AttrType_Explicit,
|
||||
*header_section_schemae_file_population );
|
||||
header_section_schemae_file_population->AddExplicitAttr( a_2governing_schema );
|
||||
a_3determination_method =
|
||||
new AttrDescriptor( "determination_method", header_section_schemat_exchange_structure_identifier,
|
||||
LFalse, LFalse, AttrType_Explicit,
|
||||
*header_section_schemae_file_population );
|
||||
header_section_schemae_file_population->AddExplicitAttr( a_3determination_method );
|
||||
SetTypeDescriptor * t_0 = new SetTypeDescriptor;
|
||||
t_0->AssignAggrCreator( ( AggregateCreator ) create_StringAggregate ); // Creator function
|
||||
t_0->Bound1( 1 );
|
||||
t_0->Bound2( 2147483647 );
|
||||
t_0->FundamentalType( SET_TYPE );
|
||||
t_0->Description( "SET [1:?] OF section_name" );
|
||||
t_0->OriginatingSchema( s_header_section_schema );
|
||||
t_0->ReferentType( header_section_schemat_section_name );
|
||||
a_4governed_sections =
|
||||
new AttrDescriptor( "governed_sections", t_0, LTrue, LFalse, AttrType_Explicit,
|
||||
*header_section_schemae_file_population );
|
||||
header_section_schemae_file_population->AddExplicitAttr( a_4governed_sections );
|
||||
reg.AddEntity( *header_section_schemae_file_population );
|
||||
///////// END_ENTITY file_population
|
||||
|
||||
///////// ENTITY file_name
|
||||
|
||||
a_5name =
|
||||
new AttrDescriptor("name",t_sdaiSTRING,
|
||||
LFalse,LFalse, AttrType_Explicit,
|
||||
*header_section_schemae_file_name);
|
||||
header_section_schemae_file_name->AddExplicitAttr (a_5name);
|
||||
a_6time_stamp =
|
||||
new AttrDescriptor("time_stamp",header_section_schemat_time_stamp_text,
|
||||
LFalse,LFalse, AttrType_Explicit,
|
||||
*header_section_schemae_file_name);
|
||||
header_section_schemae_file_name->AddExplicitAttr (a_6time_stamp);
|
||||
ListTypeDescriptor * t_1 = new ListTypeDescriptor;
|
||||
t_1->AssignAggrCreator((AggregateCreator) create_StringAggregate); // Creator function
|
||||
t_1->Bound1(1);
|
||||
t_1->Bound2(2147483647);
|
||||
t_1->FundamentalType(LIST_TYPE);
|
||||
t_1->Description("LIST [1:?] OF STRING (256)");
|
||||
t_1->OriginatingSchema(s_header_section_schema);
|
||||
t_1->ReferentType(t_sdaiSTRING);
|
||||
a_7author =
|
||||
new AttrDescriptor("author",t_1,LFalse,LFalse, AttrType_Explicit,
|
||||
*header_section_schemae_file_name);
|
||||
header_section_schemae_file_name->AddExplicitAttr (a_7author);
|
||||
ListTypeDescriptor * t_2 = new ListTypeDescriptor;
|
||||
t_2->AssignAggrCreator((AggregateCreator) create_StringAggregate); // Creator function
|
||||
t_2->Bound1(1);
|
||||
t_2->Bound2(2147483647);
|
||||
t_2->FundamentalType(LIST_TYPE);
|
||||
t_2->Description("LIST [1:?] OF STRING (256)");
|
||||
t_2->OriginatingSchema(s_header_section_schema);
|
||||
t_2->ReferentType(t_sdaiSTRING);
|
||||
a_8organization =
|
||||
new AttrDescriptor("organization",t_2,LFalse,LFalse, AttrType_Explicit,
|
||||
*header_section_schemae_file_name);
|
||||
header_section_schemae_file_name->AddExplicitAttr (a_8organization);
|
||||
a_9preprocessor_version =
|
||||
new AttrDescriptor("preprocessor_version",t_sdaiSTRING,
|
||||
LFalse,LFalse, AttrType_Explicit,
|
||||
*header_section_schemae_file_name);
|
||||
header_section_schemae_file_name->AddExplicitAttr (a_9preprocessor_version);
|
||||
a_10originating_system =
|
||||
new AttrDescriptor("originating_system",t_sdaiSTRING,
|
||||
LFalse,LFalse, AttrType_Explicit,
|
||||
*header_section_schemae_file_name);
|
||||
header_section_schemae_file_name->AddExplicitAttr (a_10originating_system);
|
||||
a_11authorization =
|
||||
new AttrDescriptor("authorization",t_sdaiSTRING,
|
||||
LFalse,LFalse, AttrType_Explicit,
|
||||
*header_section_schemae_file_name);
|
||||
header_section_schemae_file_name->AddExplicitAttr (a_11authorization);
|
||||
reg.AddEntity (*header_section_schemae_file_name);
|
||||
a_5name =
|
||||
new AttrDescriptor( "name", t_sdaiSTRING,
|
||||
LFalse, LFalse, AttrType_Explicit,
|
||||
*header_section_schemae_file_name );
|
||||
header_section_schemae_file_name->AddExplicitAttr( a_5name );
|
||||
a_6time_stamp =
|
||||
new AttrDescriptor( "time_stamp", header_section_schemat_time_stamp_text,
|
||||
LFalse, LFalse, AttrType_Explicit,
|
||||
*header_section_schemae_file_name );
|
||||
header_section_schemae_file_name->AddExplicitAttr( a_6time_stamp );
|
||||
ListTypeDescriptor * t_1 = new ListTypeDescriptor;
|
||||
t_1->AssignAggrCreator( ( AggregateCreator ) create_StringAggregate ); // Creator function
|
||||
t_1->Bound1( 1 );
|
||||
t_1->Bound2( 2147483647 );
|
||||
t_1->FundamentalType( LIST_TYPE );
|
||||
t_1->Description( "LIST [1:?] OF STRING (256)" );
|
||||
t_1->OriginatingSchema( s_header_section_schema );
|
||||
t_1->ReferentType( t_sdaiSTRING );
|
||||
a_7author =
|
||||
new AttrDescriptor( "author", t_1, LFalse, LFalse, AttrType_Explicit,
|
||||
*header_section_schemae_file_name );
|
||||
header_section_schemae_file_name->AddExplicitAttr( a_7author );
|
||||
ListTypeDescriptor * t_2 = new ListTypeDescriptor;
|
||||
t_2->AssignAggrCreator( ( AggregateCreator ) create_StringAggregate ); // Creator function
|
||||
t_2->Bound1( 1 );
|
||||
t_2->Bound2( 2147483647 );
|
||||
t_2->FundamentalType( LIST_TYPE );
|
||||
t_2->Description( "LIST [1:?] OF STRING (256)" );
|
||||
t_2->OriginatingSchema( s_header_section_schema );
|
||||
t_2->ReferentType( t_sdaiSTRING );
|
||||
a_8organization =
|
||||
new AttrDescriptor( "organization", t_2, LFalse, LFalse, AttrType_Explicit,
|
||||
*header_section_schemae_file_name );
|
||||
header_section_schemae_file_name->AddExplicitAttr( a_8organization );
|
||||
a_9preprocessor_version =
|
||||
new AttrDescriptor( "preprocessor_version", t_sdaiSTRING,
|
||||
LFalse, LFalse, AttrType_Explicit,
|
||||
*header_section_schemae_file_name );
|
||||
header_section_schemae_file_name->AddExplicitAttr( a_9preprocessor_version );
|
||||
a_10originating_system =
|
||||
new AttrDescriptor( "originating_system", t_sdaiSTRING,
|
||||
LFalse, LFalse, AttrType_Explicit,
|
||||
*header_section_schemae_file_name );
|
||||
header_section_schemae_file_name->AddExplicitAttr( a_10originating_system );
|
||||
a_11authorization =
|
||||
new AttrDescriptor( "authorization", t_sdaiSTRING,
|
||||
LFalse, LFalse, AttrType_Explicit,
|
||||
*header_section_schemae_file_name );
|
||||
header_section_schemae_file_name->AddExplicitAttr( a_11authorization );
|
||||
reg.AddEntity( *header_section_schemae_file_name );
|
||||
///////// END_ENTITY file_name
|
||||
|
||||
///////// ENTITY section_context
|
||||
|
||||
a_12section =
|
||||
new AttrDescriptor("section",header_section_schemat_section_name,
|
||||
LTrue,LTrue, AttrType_Explicit,
|
||||
*header_section_schemae_section_context);
|
||||
header_section_schemae_section_context->AddExplicitAttr (a_12section);
|
||||
ListTypeDescriptor * t_3 = new ListTypeDescriptor;
|
||||
t_3->AssignAggrCreator((AggregateCreator) create_StringAggregate); // Creator function
|
||||
t_3->Bound1(1);
|
||||
t_3->Bound2(2147483647);
|
||||
t_3->FundamentalType(LIST_TYPE);
|
||||
t_3->Description("LIST [1:?] OF context_name");
|
||||
t_3->OriginatingSchema(s_header_section_schema);
|
||||
t_3->ReferentType(header_section_schemat_context_name);
|
||||
a_13context_identifiers =
|
||||
new AttrDescriptor("context_identifiers",t_3,LFalse,LFalse, AttrType_Explicit,
|
||||
*header_section_schemae_section_context);
|
||||
header_section_schemae_section_context->AddExplicitAttr (a_13context_identifiers);
|
||||
reg.AddEntity (*header_section_schemae_section_context);
|
||||
a_12section =
|
||||
new AttrDescriptor( "section", header_section_schemat_section_name,
|
||||
LTrue, LTrue, AttrType_Explicit,
|
||||
*header_section_schemae_section_context );
|
||||
header_section_schemae_section_context->AddExplicitAttr( a_12section );
|
||||
ListTypeDescriptor * t_3 = new ListTypeDescriptor;
|
||||
t_3->AssignAggrCreator( ( AggregateCreator ) create_StringAggregate ); // Creator function
|
||||
t_3->Bound1( 1 );
|
||||
t_3->Bound2( 2147483647 );
|
||||
t_3->FundamentalType( LIST_TYPE );
|
||||
t_3->Description( "LIST [1:?] OF context_name" );
|
||||
t_3->OriginatingSchema( s_header_section_schema );
|
||||
t_3->ReferentType( header_section_schemat_context_name );
|
||||
a_13context_identifiers =
|
||||
new AttrDescriptor( "context_identifiers", t_3, LFalse, LFalse, AttrType_Explicit,
|
||||
*header_section_schemae_section_context );
|
||||
header_section_schemae_section_context->AddExplicitAttr( a_13context_identifiers );
|
||||
reg.AddEntity( *header_section_schemae_section_context );
|
||||
///////// END_ENTITY section_context
|
||||
|
||||
///////// ENTITY file_description
|
||||
|
||||
ListTypeDescriptor * t_4 = new ListTypeDescriptor;
|
||||
t_4->AssignAggrCreator((AggregateCreator) create_StringAggregate); // Creator function
|
||||
t_4->Bound1(1);
|
||||
t_4->Bound2(2147483647);
|
||||
t_4->FundamentalType(LIST_TYPE);
|
||||
t_4->Description("LIST [1:?] OF STRING (256)");
|
||||
t_4->OriginatingSchema(s_header_section_schema);
|
||||
t_4->ReferentType(t_sdaiSTRING);
|
||||
a_14description =
|
||||
new AttrDescriptor("description",t_4,LFalse,LFalse, AttrType_Explicit,
|
||||
*header_section_schemae_file_description);
|
||||
header_section_schemae_file_description->AddExplicitAttr (a_14description);
|
||||
a_15implementation_level =
|
||||
new AttrDescriptor("implementation_level",t_sdaiSTRING,
|
||||
LFalse,LFalse, AttrType_Explicit,
|
||||
*header_section_schemae_file_description);
|
||||
header_section_schemae_file_description->AddExplicitAttr (a_15implementation_level);
|
||||
reg.AddEntity (*header_section_schemae_file_description);
|
||||
ListTypeDescriptor * t_4 = new ListTypeDescriptor;
|
||||
t_4->AssignAggrCreator( ( AggregateCreator ) create_StringAggregate ); // Creator function
|
||||
t_4->Bound1( 1 );
|
||||
t_4->Bound2( 2147483647 );
|
||||
t_4->FundamentalType( LIST_TYPE );
|
||||
t_4->Description( "LIST [1:?] OF STRING (256)" );
|
||||
t_4->OriginatingSchema( s_header_section_schema );
|
||||
t_4->ReferentType( t_sdaiSTRING );
|
||||
a_14description =
|
||||
new AttrDescriptor( "description", t_4, LFalse, LFalse, AttrType_Explicit,
|
||||
*header_section_schemae_file_description );
|
||||
header_section_schemae_file_description->AddExplicitAttr( a_14description );
|
||||
a_15implementation_level =
|
||||
new AttrDescriptor( "implementation_level", t_sdaiSTRING,
|
||||
LFalse, LFalse, AttrType_Explicit,
|
||||
*header_section_schemae_file_description );
|
||||
header_section_schemae_file_description->AddExplicitAttr( a_15implementation_level );
|
||||
reg.AddEntity( *header_section_schemae_file_description );
|
||||
///////// END_ENTITY file_description
|
||||
|
||||
///////// ENTITY file_schema
|
||||
|
||||
ListTypeDescriptor * t_5 = new ListTypeDescriptor;
|
||||
t_5->AssignAggrCreator((AggregateCreator) create_StringAggregate); // Creator function
|
||||
t_5->Bound1(1);
|
||||
t_5->Bound2(2147483647);
|
||||
t_5->UniqueElements(LTrue);
|
||||
t_5->FundamentalType(LIST_TYPE);
|
||||
t_5->Description("LIST [1:?] OF UNIQUE schema_name");
|
||||
t_5->OriginatingSchema(s_header_section_schema);
|
||||
t_5->ReferentType(header_section_schemat_schema_name);
|
||||
a_16schema_identifiers =
|
||||
new AttrDescriptor("schema_identifiers",t_5,LFalse,LFalse, AttrType_Explicit,
|
||||
*header_section_schemae_file_schema);
|
||||
header_section_schemae_file_schema->AddExplicitAttr (a_16schema_identifiers);
|
||||
reg.AddEntity (*header_section_schemae_file_schema);
|
||||
ListTypeDescriptor * t_5 = new ListTypeDescriptor;
|
||||
t_5->AssignAggrCreator( ( AggregateCreator ) create_StringAggregate ); // Creator function
|
||||
t_5->Bound1( 1 );
|
||||
t_5->Bound2( 2147483647 );
|
||||
t_5->UniqueElements( LTrue );
|
||||
t_5->FundamentalType( LIST_TYPE );
|
||||
t_5->Description( "LIST [1:?] OF UNIQUE schema_name" );
|
||||
t_5->OriginatingSchema( s_header_section_schema );
|
||||
t_5->ReferentType( header_section_schemat_schema_name );
|
||||
a_16schema_identifiers =
|
||||
new AttrDescriptor( "schema_identifiers", t_5, LFalse, LFalse, AttrType_Explicit,
|
||||
*header_section_schemae_file_schema );
|
||||
header_section_schemae_file_schema->AddExplicitAttr( a_16schema_identifiers );
|
||||
reg.AddEntity( *header_section_schemae_file_schema );
|
||||
///////// END_ENTITY file_schema
|
||||
|
||||
}
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
|
||||
#include <SdaiSchemaInit.h>
|
||||
|
||||
void HeaderSchemaInit (Registry & reg) {
|
||||
HeaderInitSchemasAndEnts (reg);
|
||||
SdaiHEADER_SECTION_SCHEMAInit (reg);
|
||||
reg.SetCompCollect( 0 );
|
||||
void HeaderSchemaInit( Registry & reg ) {
|
||||
HeaderInitSchemasAndEnts( reg );
|
||||
SdaiHEADER_SECTION_SCHEMAInit( reg );
|
||||
reg.SetCompCollect( 0 );
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
#include <SdaiHeaderSchemaClasses.h>
|
||||
#include <SdaiHeaderSchema.h>
|
||||
|
||||
SCL_EDITOR_EXPORT void HeaderSchemaInit (Registry &);
|
||||
SCL_EDITOR_EXPORT void HeaderInitSchemasAndEnts (Registry &);
|
||||
SCL_EDITOR_EXPORT void SdaiHEADER_SECTION_SCHEMAInit (Registry & r);
|
||||
SCL_EDITOR_EXPORT void HeaderSchemaInit( Registry & );
|
||||
SCL_EDITOR_EXPORT void HeaderInitSchemasAndEnts( Registry & );
|
||||
SCL_EDITOR_EXPORT void SdaiHEADER_SECTION_SCHEMAInit( Registry & r );
|
||||
|
||||
#endif
|
||||
|
||||
+100
-78
@@ -25,8 +25,8 @@
|
||||
#include <SingleLinkList.h>
|
||||
|
||||
//#define NUM_CMDMGR_CMDS 9
|
||||
// this is the number of columns that contain cmds (as opposed
|
||||
// to state info)
|
||||
// this is the number of columns that contain cmds (as opposed
|
||||
// to state info)
|
||||
#define NUM_CMD_COLUMNS 3
|
||||
|
||||
// **** each of CMD_CHAR must be a unique char.
|
||||
@@ -52,7 +52,7 @@
|
||||
#define DELETE_STATE_CHAR 'D'
|
||||
#define DELETE_STATE_COL 4
|
||||
|
||||
// close will try to save it to its previous status
|
||||
// close will try to save it to its previous status
|
||||
#define CLOSE_CMD_CHAR 'c'
|
||||
#define CLOSE_CMD_COL 2
|
||||
|
||||
@@ -78,101 +78,123 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class SCL_EDITOR_EXPORT ReplicateLinkNode : public SingleLinkNode {
|
||||
private:
|
||||
protected:
|
||||
MgrNode * _repNode;
|
||||
public:
|
||||
ReplicateLinkNode() { _repNode = 0; }
|
||||
~ReplicateLinkNode() { }
|
||||
private:
|
||||
protected:
|
||||
MgrNode * _repNode;
|
||||
public:
|
||||
ReplicateLinkNode() {
|
||||
_repNode = 0;
|
||||
}
|
||||
~ReplicateLinkNode() { }
|
||||
|
||||
const char *ClassName () { return "ReplicateLinkNode"; }
|
||||
const char * ClassName() {
|
||||
return "ReplicateLinkNode";
|
||||
}
|
||||
|
||||
MgrNode *ReplicateNode() { return _repNode; }
|
||||
void ReplicateNode(MgrNode *rn) { _repNode = rn; }
|
||||
MgrNode * ReplicateNode() {
|
||||
return _repNode;
|
||||
}
|
||||
void ReplicateNode( MgrNode * rn ) {
|
||||
_repNode = rn;
|
||||
}
|
||||
};
|
||||
|
||||
class SCL_EDITOR_EXPORT ReplicateList : public SingleLinkList {
|
||||
private:
|
||||
protected:
|
||||
public:
|
||||
ReplicateList() { }
|
||||
~ReplicateList() { }
|
||||
private:
|
||||
protected:
|
||||
public:
|
||||
ReplicateList() { }
|
||||
~ReplicateList() { }
|
||||
|
||||
virtual SingleLinkNode * NewNode () { return new ReplicateLinkNode; }
|
||||
virtual SingleLinkNode * NewNode() {
|
||||
return new ReplicateLinkNode;
|
||||
}
|
||||
|
||||
bool IsOnList(MgrNode *mn);
|
||||
ReplicateLinkNode *FindNode(MgrNode *mn);
|
||||
|
||||
ReplicateLinkNode * AddNode (MgrNode * rn) {
|
||||
ReplicateLinkNode *node = (ReplicateLinkNode *) NewNode();
|
||||
node->ReplicateNode(rn);
|
||||
SingleLinkList::AppendNode(node);
|
||||
return node;
|
||||
}
|
||||
bool IsOnList( MgrNode * mn );
|
||||
ReplicateLinkNode * FindNode( MgrNode * mn );
|
||||
|
||||
bool Remove(ReplicateLinkNode *rln);
|
||||
bool Remove(MgrNode *rn);
|
||||
ReplicateLinkNode * AddNode( MgrNode * rn ) {
|
||||
ReplicateLinkNode * node = ( ReplicateLinkNode * ) NewNode();
|
||||
node->ReplicateNode( rn );
|
||||
SingleLinkList::AppendNode( node );
|
||||
return node;
|
||||
}
|
||||
|
||||
const char *ClassName () { return "ReplicateList"; }
|
||||
bool Remove( ReplicateLinkNode * rln );
|
||||
bool Remove( MgrNode * rn );
|
||||
|
||||
const char * ClassName() {
|
||||
return "ReplicateList";
|
||||
}
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class SCL_EDITOR_EXPORT CmdMgr
|
||||
{
|
||||
protected:
|
||||
MgrNodeList *completeList;
|
||||
MgrNodeList *incompleteList;
|
||||
MgrNodeList *cancelList;
|
||||
MgrNodeList *deleteList;
|
||||
class SCL_EDITOR_EXPORT CmdMgr {
|
||||
protected:
|
||||
MgrNodeList * completeList;
|
||||
MgrNodeList * incompleteList;
|
||||
MgrNodeList * cancelList;
|
||||
MgrNodeList * deleteList;
|
||||
|
||||
DisplayNodeList *mappedWriteList;
|
||||
DisplayNodeList *mappedViewList;
|
||||
DisplayNodeList *closeList;
|
||||
DisplayNodeList * mappedWriteList;
|
||||
DisplayNodeList * mappedViewList;
|
||||
DisplayNodeList * closeList;
|
||||
|
||||
ReplicateList *replicateList;
|
||||
public:
|
||||
ReplicateList * replicateList;
|
||||
public:
|
||||
|
||||
CmdMgr();
|
||||
CmdMgr();
|
||||
|
||||
// STATE LIST OPERATIONS
|
||||
MgrNode *GetHead(stateEnum listType);
|
||||
DisplayNode *GetHead(displayStateEnum listType);
|
||||
ReplicateLinkNode *GetReplicateHead()
|
||||
{ return (ReplicateLinkNode *)(replicateList->GetHead()); }
|
||||
|
||||
void ClearEntries(stateEnum listType);
|
||||
void ClearEntries(displayStateEnum listType);
|
||||
void ClearReplicateEntries() { replicateList->Empty(); }
|
||||
ReplicateList *RepList() { return replicateList; }
|
||||
|
||||
// searches current list for fileId
|
||||
MgrNode *StateFindFileId(stateEnum s, int fileId);
|
||||
// returns stateNext or statePrev member variables
|
||||
// i.e. next or previous node on curr state list
|
||||
|
||||
int SaveCompleteCmdList(MgrNode *mn)
|
||||
{ return mn->ChangeList(completeList); }
|
||||
int SaveIncompleteCmdList(MgrNode *mn)
|
||||
{ return mn->ChangeList(incompleteList); }
|
||||
int CancelCmdList(MgrNode *mn)
|
||||
{ return mn->ChangeList(cancelList); }
|
||||
int DeleteCmdList(MgrNode *mn)
|
||||
{ return mn->ChangeList(deleteList); }
|
||||
int ModifyCmdList(MgrNode *mn)
|
||||
{ return mn->ChangeList(mappedWriteList); }
|
||||
int ViewCmdList(MgrNode *mn)
|
||||
{ return mn->ChangeList(mappedViewList); }
|
||||
int CloseCmdList(MgrNode *mn)
|
||||
{ return ( ( mn->DisplayState() == mappedWrite ) ||
|
||||
( mn->DisplayState() == mappedView ) ) ?
|
||||
mn->ChangeList(closeList) : 0;
|
||||
MgrNode * GetHead( stateEnum listType );
|
||||
DisplayNode * GetHead( displayStateEnum listType );
|
||||
ReplicateLinkNode * GetReplicateHead() {
|
||||
return ( ReplicateLinkNode * )( replicateList->GetHead() );
|
||||
}
|
||||
|
||||
void ReplicateCmdList(MgrNode *mn);
|
||||
|
||||
void ClearInstances();
|
||||
protected:
|
||||
void ClearEntries( stateEnum listType );
|
||||
void ClearEntries( displayStateEnum listType );
|
||||
void ClearReplicateEntries() {
|
||||
replicateList->Empty();
|
||||
}
|
||||
ReplicateList * RepList() {
|
||||
return replicateList;
|
||||
}
|
||||
|
||||
// searches current list for fileId
|
||||
MgrNode * StateFindFileId( stateEnum s, int fileId );
|
||||
// returns stateNext or statePrev member variables
|
||||
// i.e. next or previous node on curr state list
|
||||
|
||||
int SaveCompleteCmdList( MgrNode * mn ) {
|
||||
return mn->ChangeList( completeList );
|
||||
}
|
||||
int SaveIncompleteCmdList( MgrNode * mn ) {
|
||||
return mn->ChangeList( incompleteList );
|
||||
}
|
||||
int CancelCmdList( MgrNode * mn ) {
|
||||
return mn->ChangeList( cancelList );
|
||||
}
|
||||
int DeleteCmdList( MgrNode * mn ) {
|
||||
return mn->ChangeList( deleteList );
|
||||
}
|
||||
int ModifyCmdList( MgrNode * mn ) {
|
||||
return mn->ChangeList( mappedWriteList );
|
||||
}
|
||||
int ViewCmdList( MgrNode * mn ) {
|
||||
return mn->ChangeList( mappedViewList );
|
||||
}
|
||||
int CloseCmdList( MgrNode * mn ) {
|
||||
return ( ( mn->DisplayState() == mappedWrite ) ||
|
||||
( mn->DisplayState() == mappedView ) ) ?
|
||||
mn->ChangeList( closeList ) : 0;
|
||||
}
|
||||
|
||||
void ReplicateCmdList( MgrNode * mn );
|
||||
|
||||
void ClearInstances();
|
||||
protected:
|
||||
|
||||
};
|
||||
|
||||
|
||||
+41
-25
@@ -13,7 +13,7 @@
|
||||
* and is not subject to copyright.
|
||||
*/
|
||||
|
||||
/* $Id: dispnode.h,v 3.0.1.2 1997/11/05 22:11:39 sauderd DP3.1 $ */
|
||||
/* $Id: dispnode.h,v 3.0.1.2 1997/11/05 22:11:39 sauderd DP3.1 $ */
|
||||
|
||||
#include <scl_export.h>
|
||||
#ifdef __O3DB__
|
||||
@@ -35,43 +35,59 @@ class MgrNode;
|
||||
// class DisplayNode
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class SCL_EDITOR_EXPORT DisplayNode : public GenericNode
|
||||
{
|
||||
protected:
|
||||
friend class GenNodeList;
|
||||
friend class DisplayNodeList;
|
||||
class SCL_EDITOR_EXPORT DisplayNode : public GenericNode {
|
||||
protected:
|
||||
friend class GenNodeList;
|
||||
friend class DisplayNodeList;
|
||||
|
||||
MgrNode *mn;
|
||||
void *see;
|
||||
displayStateEnum displayState; // = { mappedWrite, mappedView, notMapped }
|
||||
MgrNode * mn;
|
||||
void * see;
|
||||
displayStateEnum displayState; // = { mappedWrite, mappedView, notMapped }
|
||||
|
||||
public:
|
||||
// this should probably only be used to create head nodes for dispnodelists
|
||||
DisplayNode() { displayState = noMapState; }
|
||||
DisplayNode(MgrNode *node) { mn = node; displayState = noMapState; }
|
||||
~DisplayNode();
|
||||
public:
|
||||
// this should probably only be used to create head nodes for dispnodelists
|
||||
DisplayNode() {
|
||||
displayState = noMapState;
|
||||
}
|
||||
DisplayNode( MgrNode * node ) {
|
||||
mn = node;
|
||||
displayState = noMapState;
|
||||
}
|
||||
~DisplayNode();
|
||||
|
||||
void SEE(void *s) { see = s; }
|
||||
virtual void *SEE() { return see; };
|
||||
void SEE( void * s ) {
|
||||
see = s;
|
||||
}
|
||||
virtual void * SEE() {
|
||||
return see;
|
||||
};
|
||||
|
||||
void mgrNode(MgrNode *node) { mn = node; }
|
||||
class MgrNode *mgrNode() { return mn; }
|
||||
void mgrNode( MgrNode * node ) {
|
||||
mn = node;
|
||||
}
|
||||
class MgrNode * mgrNode() {
|
||||
return mn;
|
||||
}
|
||||
|
||||
displayStateEnum DisplayState() { return displayState; }
|
||||
int DisplayListMember(displayStateEnum ds) { return (displayState == ds); }
|
||||
displayStateEnum DisplayState() {
|
||||
return displayState;
|
||||
}
|
||||
int DisplayListMember( displayStateEnum ds ) {
|
||||
return ( displayState == ds );
|
||||
}
|
||||
|
||||
int ChangeState(displayStateEnum s);
|
||||
int ChangeList(DisplayNodeList *cmdList);
|
||||
int ChangeState( displayStateEnum s );
|
||||
int ChangeList( DisplayNodeList * cmdList );
|
||||
|
||||
void Remove();
|
||||
void Remove();
|
||||
|
||||
protected:
|
||||
protected:
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// class DisplayNode inline functions
|
||||
// these functions don't rely on any inline functions (its own or
|
||||
// other classes) that aren't in this file except for Generic functions
|
||||
// other classes) that aren't in this file except for Generic functions
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif
|
||||
|
||||
+23
-23
@@ -13,7 +13,7 @@
|
||||
* and is not subject to copyright.
|
||||
*/
|
||||
|
||||
/* $Id: dispnodelist.h,v 3.0.1.2 1997/11/05 22:11:40 sauderd DP3.1 $ */
|
||||
/* $Id: dispnodelist.h,v 3.0.1.2 1997/11/05 22:11:40 sauderd DP3.1 $ */
|
||||
|
||||
#include <scl_export.h>
|
||||
#ifdef __O3DB__
|
||||
@@ -29,43 +29,43 @@
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// class DisplayNodeList
|
||||
// This will be used to represent the display state lists.
|
||||
// This will be used to represent the display state lists.
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class SCL_EDITOR_EXPORT DisplayNodeList : public GenNodeList
|
||||
{
|
||||
public:
|
||||
DisplayNodeList(displayStateEnum type);
|
||||
~DisplayNodeList() { }
|
||||
class SCL_EDITOR_EXPORT DisplayNodeList : public GenNodeList {
|
||||
public:
|
||||
DisplayNodeList( displayStateEnum type );
|
||||
~DisplayNodeList() { }
|
||||
|
||||
// ADDED functions
|
||||
displayStateEnum GetState() { return listType; }
|
||||
displayStateEnum GetState() {
|
||||
return listType;
|
||||
}
|
||||
|
||||
// REDEFINED functions
|
||||
// deletes node from its previous list & appends
|
||||
virtual void Append(GenericNode *node);
|
||||
// deletes newNode from its previous list & inserts in
|
||||
// relation to existNode
|
||||
virtual void InsertAfter(GenericNode *newNode, GenericNode *existNode);
|
||||
virtual void InsertBefore(GenericNode *newNode, GenericNode *existNode);
|
||||
virtual void Remove(GenericNode *node);
|
||||
// deletes node from its previous list & appends
|
||||
virtual void Append( GenericNode * node );
|
||||
// deletes newNode from its previous list & inserts in
|
||||
// relation to existNode
|
||||
virtual void InsertAfter( GenericNode * newNode, GenericNode * existNode );
|
||||
virtual void InsertBefore( GenericNode * newNode, GenericNode * existNode );
|
||||
virtual void Remove( GenericNode * node );
|
||||
|
||||
protected:
|
||||
private:
|
||||
displayStateEnum listType;
|
||||
protected:
|
||||
private:
|
||||
displayStateEnum listType;
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// class DisplayNodeList inline functions
|
||||
// these functions don't rely on any inline functions (its own or
|
||||
// other classes) that aren't in this file except for Generic functions
|
||||
// other classes) that aren't in this file except for Generic functions
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
inline DisplayNodeList::DisplayNodeList(displayStateEnum type)
|
||||
: GenNodeList(new DisplayNode())
|
||||
{
|
||||
inline DisplayNodeList::DisplayNodeList( displayStateEnum type )
|
||||
: GenNodeList( new DisplayNode() ) {
|
||||
listType = type;
|
||||
((DisplayNode *)head)->displayState = type;
|
||||
( ( DisplayNode * )head )->displayState = type;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* and is not subject to copyright.
|
||||
*/
|
||||
|
||||
/* $Id: editordefines.h,v 3.0.1.2 1997/11/05 22:11:46 sauderd DP3.1 $ */
|
||||
/* $Id: editordefines.h,v 3.0.1.2 1997/11/05 22:11:46 sauderd DP3.1 $ */
|
||||
|
||||
class GenericNode;
|
||||
class GenNodeList;
|
||||
@@ -27,21 +27,21 @@ class DisplayNodeList;
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
enum displayStateEnum {
|
||||
mappedWrite, // has a writable SEE on the screen
|
||||
mappedView, // has a view only SEE on the screen
|
||||
notMapped,
|
||||
noMapState
|
||||
} ;
|
||||
mappedWrite, // has a writable SEE on the screen
|
||||
mappedView, // has a view only SEE on the screen
|
||||
notMapped,
|
||||
noMapState
|
||||
} ;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
enum stateEnum {
|
||||
noStateSE, // state undefined, not on a list
|
||||
completeSE, // on saved complete list
|
||||
incompleteSE, // on saved incomplete list
|
||||
deleteSE, // on delete list
|
||||
newSE // on newly created list
|
||||
} ;
|
||||
noStateSE, // state undefined, not on a list
|
||||
completeSE, // on saved complete list
|
||||
incompleteSE, // on saved incomplete list
|
||||
deleteSE, // on delete list
|
||||
newSE // on newly created list
|
||||
} ;
|
||||
|
||||
/*
|
||||
these variable are used by the STEPfile for reading and writing
|
||||
|
||||
@@ -92,7 +92,7 @@ InstMgr::VerifyInstances( ErrorDescriptor & err ) {
|
||||
|
||||
int n = InstanceCount();
|
||||
MgrNode * mn;
|
||||
SDAI_Application_instance* se;
|
||||
SDAI_Application_instance * se;
|
||||
enum Severity rval = SEVERITY_NULL;
|
||||
|
||||
//for each instance on the list,
|
||||
@@ -177,7 +177,7 @@ int InstMgr::GetIndex( MgrNode * mn ) {
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
int InstMgr::GetIndex( SDAI_Application_instance *se ) {
|
||||
int InstMgr::GetIndex( SDAI_Application_instance * se ) {
|
||||
int fileId = se->StepFileId();
|
||||
return sortedMaster->MgrNodeIndex( fileId );
|
||||
}
|
||||
@@ -201,7 +201,7 @@ int InstMgr::VerifyEntity( int fileId, const char * expectedType ) {
|
||||
// Append instance to the list of instances. Checks the file id and
|
||||
// sets it if 1) it is not set already or 2) it already exists in the list.
|
||||
|
||||
MgrNode * InstMgr::Append( SDAI_Application_instance *se, stateEnum listState ) {
|
||||
MgrNode * InstMgr::Append( SDAI_Application_instance * se, stateEnum listState ) {
|
||||
if( debug_level > 3 ) {
|
||||
cout << "#" << se->StepFileId() << " append node to InstMgr" << endl;
|
||||
}
|
||||
@@ -261,7 +261,7 @@ void InstMgr::Delete( MgrNode * node ) {
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void InstMgr::Delete( SDAI_Application_instance *se ) {
|
||||
void InstMgr::Delete( SDAI_Application_instance * se ) {
|
||||
Delete( FindFileId( se->StepFileId() ) );
|
||||
}
|
||||
|
||||
@@ -313,7 +313,7 @@ int
|
||||
InstMgr::EntityKeywordCount( const char * name ) {
|
||||
int count = 0;
|
||||
MgrNode * node;
|
||||
SDAI_Application_instance* se;
|
||||
SDAI_Application_instance * se;
|
||||
int n = InstanceCount();
|
||||
for( int j = 0; j < n; ++j ) {
|
||||
node = GetMgrNode( j );
|
||||
@@ -363,7 +363,7 @@ InstMgr::GetSTEPentity( int index ) {
|
||||
SDAI_Application_instance *
|
||||
InstMgr::GetApplication_instance( const char * entityKeyword, int starting_index ) {
|
||||
MgrNode * node;
|
||||
SDAI_Application_instance *se;
|
||||
SDAI_Application_instance * se;
|
||||
|
||||
int count = InstanceCount();
|
||||
for( int j = starting_index; j < count; ++j ) {
|
||||
@@ -380,7 +380,7 @@ InstMgr::GetApplication_instance( const char * entityKeyword, int starting_index
|
||||
SDAI_Application_instance *
|
||||
InstMgr::GetSTEPentity( const char * entityKeyword, int starting_index ) {
|
||||
MgrNode * node;
|
||||
SDAI_Application_instance *se;
|
||||
SDAI_Application_instance * se;
|
||||
|
||||
int count = InstanceCount();
|
||||
for( int j = starting_index; j < count; ++j ) {
|
||||
|
||||
+69
-54
@@ -15,9 +15,9 @@
|
||||
|
||||
///// future? TODO? ////////////////
|
||||
// InstMgr can maintain an undo list for the last operation
|
||||
// performed on a node
|
||||
// performed on a node
|
||||
// InstMgr can have a startUndo() and endUndo() so it knows when to
|
||||
// start a new undo list and delete the old undo list.
|
||||
// start a new undo list and delete the old undo list.
|
||||
/////////////////////
|
||||
|
||||
#include <scl_export.h>
|
||||
@@ -37,76 +37,91 @@
|
||||
|
||||
#include <mgrnodearray.h>
|
||||
|
||||
class SCL_EDITOR_EXPORT InstMgr
|
||||
{
|
||||
protected:
|
||||
int maxFileId;
|
||||
int _ownsInstances; // if true will delete instances inside destructor
|
||||
class SCL_EDITOR_EXPORT InstMgr {
|
||||
protected:
|
||||
int maxFileId;
|
||||
int _ownsInstances; // if true will delete instances inside destructor
|
||||
|
||||
MgrNodeArray *master; // master array of all MgrNodes made up of
|
||||
// complete, incomplete, new, delete MgrNodes lists
|
||||
// this corresponds to the display list object by index
|
||||
MgrNodeArraySorted *sortedMaster; // master array sorted by fileId
|
||||
MgrNodeArray * master; // master array of all MgrNodes made up of
|
||||
// complete, incomplete, new, delete MgrNodes lists
|
||||
// this corresponds to the display list object by index
|
||||
MgrNodeArraySorted * sortedMaster; // master array sorted by fileId
|
||||
// StateList *master; // this will be an sorted array of ptrs to MgrNodes
|
||||
|
||||
public:
|
||||
InstMgr(int ownsInstances = 0);
|
||||
virtual ~InstMgr();
|
||||
public:
|
||||
InstMgr( int ownsInstances = 0 );
|
||||
virtual ~InstMgr();
|
||||
|
||||
// MASTER LIST OPERATIONS
|
||||
int InstanceCount() { return master->Count(); }
|
||||
int InstanceCount() {
|
||||
return master->Count();
|
||||
}
|
||||
|
||||
int OwnsInstances() { return _ownsInstances; }
|
||||
void OwnsInstances(int ownsInstances) { _ownsInstances = ownsInstances; }
|
||||
int OwnsInstances() {
|
||||
return _ownsInstances;
|
||||
}
|
||||
void OwnsInstances( int ownsInstances ) {
|
||||
_ownsInstances = ownsInstances;
|
||||
}
|
||||
|
||||
void ClearInstances(); //clears instance lists but doesn't delete instances
|
||||
void DeleteInstances(); // deletes the instances (ignores _ownsInstances)
|
||||
void ClearInstances(); //clears instance lists but doesn't delete instances
|
||||
void DeleteInstances(); // deletes the instances (ignores _ownsInstances)
|
||||
|
||||
Severity VerifyInstances(ErrorDescriptor& e);
|
||||
Severity VerifyInstances( ErrorDescriptor & e );
|
||||
|
||||
// DAS PORT possible BUG two funct's below may create a temp for the cast
|
||||
MgrNode * GetMgrNode(int index)
|
||||
{ return (MgrNode *) *GetGenNode (index); }
|
||||
GenericNode** GetGenNode(int index)
|
||||
{ return &(*master) [index]; }
|
||||
// DAS PORT possible BUG two funct's below may create a temp for the cast
|
||||
MgrNode * GetMgrNode( int index ) {
|
||||
return ( MgrNode * ) * GetGenNode( index );
|
||||
}
|
||||
GenericNode ** GetGenNode( int index ) {
|
||||
return &( *master ) [index];
|
||||
}
|
||||
|
||||
MgrNode *FindFileId(int fileId);
|
||||
// get the index into display list given a SDAI_Application_instance
|
||||
// called by see initiated functions
|
||||
int GetIndex(SDAI_Application_instance *se);
|
||||
int GetIndex(MgrNode *mn);
|
||||
int VerifyEntity(int fileId, const char *expectedType);
|
||||
MgrNode * FindFileId( int fileId );
|
||||
// get the index into display list given a SDAI_Application_instance
|
||||
// called by see initiated functions
|
||||
int GetIndex( SDAI_Application_instance * se );
|
||||
int GetIndex( MgrNode * mn );
|
||||
int VerifyEntity( int fileId, const char * expectedType );
|
||||
|
||||
// void Append(MgrNode *node);
|
||||
MgrNode *Append(SDAI_Application_instance *se, stateEnum listState);
|
||||
// deletes node from master list structure
|
||||
void Delete(MgrNode *node);
|
||||
void Delete(SDAI_Application_instance *se);
|
||||
MgrNode * Append( SDAI_Application_instance * se, stateEnum listState );
|
||||
// deletes node from master list structure
|
||||
void Delete( MgrNode * node );
|
||||
void Delete( SDAI_Application_instance * se );
|
||||
|
||||
void ChangeState(MgrNode *node, stateEnum listState);
|
||||
void ChangeState( MgrNode * node, stateEnum listState );
|
||||
|
||||
int MaxFileId() { return maxFileId; }
|
||||
int NextFileId() { return maxFileId = maxFileId +1; }
|
||||
int EntityKeywordCount(const char* name);
|
||||
int MaxFileId() {
|
||||
return maxFileId;
|
||||
}
|
||||
int NextFileId() {
|
||||
return maxFileId = maxFileId + 1;
|
||||
}
|
||||
int EntityKeywordCount( const char * name );
|
||||
|
||||
SDAI_Application_instance *GetApplication_instance(int index);
|
||||
SDAI_Application_instance *
|
||||
GetApplication_instance(const char* entityKeyword,
|
||||
int starting_index =0);
|
||||
SDAI_Application_instance *GetApplication_instance(MgrNode *node)
|
||||
{ return node->GetApplication_instance(); };
|
||||
SDAI_Application_instance * GetApplication_instance( int index );
|
||||
SDAI_Application_instance *
|
||||
GetApplication_instance( const char * entityKeyword,
|
||||
int starting_index = 0 );
|
||||
SDAI_Application_instance * GetApplication_instance( MgrNode * node ) {
|
||||
return node->GetApplication_instance();
|
||||
};
|
||||
|
||||
void *GetSEE(int index);
|
||||
void *GetSEE(MgrNode *node) { return node->SEE(); };
|
||||
void * GetSEE( int index );
|
||||
void * GetSEE( MgrNode * node ) {
|
||||
return node->SEE();
|
||||
};
|
||||
|
||||
void PrintSortedFileIds();
|
||||
void PrintSortedFileIds();
|
||||
|
||||
// OBSOLETE
|
||||
SDAI_Application_instance *GetSTEPentity(int index);
|
||||
SDAI_Application_instance *GetSTEPentity(const char* entityKeyword,
|
||||
int starting_index =0);
|
||||
SDAI_Application_instance *GetSTEPentity(MgrNode *node)
|
||||
{ return node->GetApplication_instance(); };
|
||||
// OBSOLETE
|
||||
SDAI_Application_instance * GetSTEPentity( int index );
|
||||
SDAI_Application_instance * GetSTEPentity( const char * entityKeyword,
|
||||
int starting_index = 0 );
|
||||
SDAI_Application_instance * GetSTEPentity( MgrNode * node ) {
|
||||
return node->GetApplication_instance();
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -147,7 +147,7 @@ int MgrNode::ChangeState( stateEnum s ) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
void MgrNode::Init( SDAI_Application_instance *s,
|
||||
void MgrNode::Init( SDAI_Application_instance * s,
|
||||
stateEnum listState,
|
||||
MgrNodeList * list ) {
|
||||
// if(debug_level >= PrintFunctionTrace)
|
||||
@@ -170,7 +170,7 @@ MgrNode::MgrNode() {
|
||||
Init( 0, noStateSE, 0 );
|
||||
}
|
||||
|
||||
MgrNode::MgrNode( SDAI_Application_instance *StepEntPtr ) {
|
||||
MgrNode::MgrNode( SDAI_Application_instance * StepEntPtr ) {
|
||||
// if(debug_level >= PrintFunctionTrace)
|
||||
// cout << "MgrNode::MgrNode()\n";
|
||||
// if(debug_level >= PrintValues)
|
||||
@@ -182,7 +182,7 @@ MgrNode::MgrNode( SDAI_Application_instance *StepEntPtr ) {
|
||||
// completeSE - if reading valid exchange file
|
||||
// incompleteSE or completeSE - if reading working session file
|
||||
// newSE - if instance is created by user using editor (probe)
|
||||
MgrNode::MgrNode( SDAI_Application_instance *StepEntPtr, stateEnum listState ) {
|
||||
MgrNode::MgrNode( SDAI_Application_instance * StepEntPtr, stateEnum listState ) {
|
||||
// if(debug_level >= PrintFunctionTrace)
|
||||
// cout << "MgrNode::MgrNode()\n";
|
||||
// if(debug_level >= PrintValues)
|
||||
@@ -193,7 +193,7 @@ MgrNode::MgrNode( SDAI_Application_instance *StepEntPtr, stateEnum listState ) {
|
||||
// completeSE - if reading valid exchange file
|
||||
// incompleteSE or completeSE - if reading working session file
|
||||
// newSE - if instance is created by user using editor (probe)
|
||||
MgrNode::MgrNode( SDAI_Application_instance *StepEntPtr, stateEnum listState, MgrNodeList * list ) {
|
||||
MgrNode::MgrNode( SDAI_Application_instance * StepEntPtr, stateEnum listState, MgrNodeList * list ) {
|
||||
// if(debug_level >= PrintFunctionTrace)
|
||||
// cout << "MgrNode::MgrNode()\n";
|
||||
// if(debug_level >= PrintValues)
|
||||
|
||||
+85
-72
@@ -12,7 +12,7 @@
|
||||
* and is not subject to copyright.
|
||||
*/
|
||||
|
||||
/* $Id: mgrnode.h,v 3.0.1.4 1997/11/05 22:11:37 sauderd DP3.1 $ */
|
||||
/* $Id: mgrnode.h,v 3.0.1.4 1997/11/05 22:11:37 sauderd DP3.1 $ */
|
||||
|
||||
#include <scl_export.h>
|
||||
#ifdef __O3DB__
|
||||
@@ -38,99 +38,112 @@ class InstMgr;
|
||||
// the DisplayNode, and removes itself from any list it is in.
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class SCL_EDITOR_EXPORT MgrNode : public GenericNode
|
||||
{
|
||||
friend class GenNodeList;
|
||||
friend class MgrNodeList;
|
||||
friend class InstMgr;
|
||||
|
||||
protected:
|
||||
// currState, next, prev implement several lists
|
||||
// based on currState:
|
||||
// currState = (completeSE, incompleteSE, newSE, or deleteSE)
|
||||
// every node will be on one of the four lists implemented by these:
|
||||
stateEnum currState;
|
||||
class SCL_EDITOR_EXPORT MgrNode : public GenericNode {
|
||||
friend class GenNodeList;
|
||||
friend class MgrNodeList;
|
||||
friend class InstMgr;
|
||||
|
||||
// SDAI_Application_instance this node is representing info for
|
||||
SDAI_Application_instance *se;
|
||||
// this is the index (in the InstMgr master array) of the ptr to
|
||||
// this node.
|
||||
int arrayIndex;
|
||||
protected:
|
||||
// currState, next, prev implement several lists
|
||||
// based on currState:
|
||||
// currState = (completeSE, incompleteSE, newSE, or deleteSE)
|
||||
// every node will be on one of the four lists implemented by these:
|
||||
stateEnum currState;
|
||||
|
||||
// display info (SEE, etc) for this node
|
||||
DisplayNode *di;
|
||||
// SDAI_Application_instance this node is representing info for
|
||||
SDAI_Application_instance * se;
|
||||
// this is the index (in the InstMgr master array) of the ptr to
|
||||
// this node.
|
||||
int arrayIndex;
|
||||
|
||||
public:
|
||||
// used for sentinel node on lists of MgrNodes
|
||||
MgrNode();
|
||||
MgrNode(SDAI_Application_instance *se);
|
||||
// 'listState' ==
|
||||
// completeSE - if reading valid exchange file
|
||||
// incompleteSE or completeSE - if reading working session file
|
||||
// newSE - if instance is created by user using editor (probe)
|
||||
MgrNode(SDAI_Application_instance *se, stateEnum listState);
|
||||
MgrNode(SDAI_Application_instance *se, stateEnum listState, MgrNodeList *list);
|
||||
virtual ~MgrNode();
|
||||
// display info (SEE, etc) for this node
|
||||
DisplayNode * di;
|
||||
|
||||
public:
|
||||
// used for sentinel node on lists of MgrNodes
|
||||
MgrNode();
|
||||
MgrNode( SDAI_Application_instance * se );
|
||||
// 'listState' ==
|
||||
// completeSE - if reading valid exchange file
|
||||
// incompleteSE or completeSE - if reading working session file
|
||||
// newSE - if instance is created by user using editor (probe)
|
||||
MgrNode( SDAI_Application_instance * se, stateEnum listState );
|
||||
MgrNode( SDAI_Application_instance * se, stateEnum listState, MgrNodeList * list );
|
||||
virtual ~MgrNode();
|
||||
|
||||
// STATE LIST OPERATIONS
|
||||
int MgrNodeListMember(stateEnum s) { return (currState == s); }
|
||||
stateEnum CurrState() { return currState; }
|
||||
// returns next or prev member variables
|
||||
// i.e. next or previous node on curr state list
|
||||
// searches current list for fileId
|
||||
MgrNode *StateFindFileId(int fileId);
|
||||
int MgrNodeListMember( stateEnum s ) {
|
||||
return ( currState == s );
|
||||
}
|
||||
stateEnum CurrState() {
|
||||
return currState;
|
||||
}
|
||||
// returns next or prev member variables
|
||||
// i.e. next or previous node on curr state list
|
||||
// searches current list for fileId
|
||||
MgrNode * StateFindFileId( int fileId );
|
||||
|
||||
// deletes from previous cmd list,
|
||||
// & puts on cmd list cmdList
|
||||
int ChangeList(MgrNodeList *cmdList);
|
||||
int ChangeState(stateEnum s);
|
||||
// deletes from previous cmd list,
|
||||
// & puts on cmd list cmdList
|
||||
int ChangeList( MgrNodeList * cmdList );
|
||||
int ChangeState( stateEnum s );
|
||||
|
||||
// Removes from current list.
|
||||
// Called before adding to diff list or when destructor is called.
|
||||
void Remove();
|
||||
// Removes from current list.
|
||||
// Called before adding to diff list or when destructor is called.
|
||||
void Remove();
|
||||
|
||||
// DISPLAY LIST OPERATIONS
|
||||
void *SEE();
|
||||
void * SEE();
|
||||
|
||||
displayStateEnum DisplayState();
|
||||
int IsDisplayState(displayStateEnum ds);
|
||||
displayStateEnum DisplayState();
|
||||
int IsDisplayState( displayStateEnum ds );
|
||||
|
||||
// returns next or prev member variables
|
||||
// i.e. next or previous node on display state list
|
||||
GenericNode *NextDisplay();
|
||||
GenericNode *PrevDisplay();
|
||||
// returns next or prev member variables
|
||||
// i.e. next or previous node on display state list
|
||||
GenericNode * NextDisplay();
|
||||
GenericNode * PrevDisplay();
|
||||
|
||||
// deletes from previous cmd list,
|
||||
// & puts on cmd list cmdList
|
||||
int ChangeList(DisplayNodeList *cmdList);
|
||||
// deletes from previous display list, assigns ds to
|
||||
// displayState & puts on list dsList
|
||||
int ChangeState(displayStateEnum ds);
|
||||
// deletes from previous cmd list,
|
||||
// & puts on cmd list cmdList
|
||||
int ChangeList( DisplayNodeList * cmdList );
|
||||
// deletes from previous display list, assigns ds to
|
||||
// displayState & puts on list dsList
|
||||
int ChangeState( displayStateEnum ds );
|
||||
|
||||
// might not want these three? since it won't actually map them?
|
||||
void MapModifiable(DisplayNodeList *dnList);
|
||||
void MapViewable(DisplayNodeList *dnList);
|
||||
void UnMap(DisplayNodeList *dnList);
|
||||
// might not want these three? since it won't actually map them?
|
||||
void MapModifiable( DisplayNodeList * dnList );
|
||||
void MapViewable( DisplayNodeList * dnList );
|
||||
void UnMap( DisplayNodeList * dnList );
|
||||
|
||||
// ACCESS FUNCTIONS
|
||||
int GetFileId();
|
||||
SDAI_Application_instance *GetApplication_instance() { return se; }
|
||||
DisplayNode *&displayNode() { return di; }
|
||||
int ArrayIndex() { return arrayIndex; }
|
||||
void ArrayIndex(int index) { arrayIndex = index; }
|
||||
int GetFileId();
|
||||
SDAI_Application_instance * GetApplication_instance() {
|
||||
return se;
|
||||
}
|
||||
DisplayNode * & displayNode() {
|
||||
return di;
|
||||
}
|
||||
int ArrayIndex() {
|
||||
return arrayIndex;
|
||||
}
|
||||
void ArrayIndex( int index ) {
|
||||
arrayIndex = index;
|
||||
}
|
||||
|
||||
// OBSOLETE
|
||||
SDAI_Application_instance *GetSTEPentity() { return se; }
|
||||
protected:
|
||||
// OBSOLETE
|
||||
SDAI_Application_instance * GetSTEPentity() {
|
||||
return se;
|
||||
}
|
||||
protected:
|
||||
|
||||
private:
|
||||
void Init(SDAI_Application_instance *s, stateEnum listState, MgrNodeList *list);
|
||||
private:
|
||||
void Init( SDAI_Application_instance * s, stateEnum listState, MgrNodeList * list );
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// class MgrNode inline functions
|
||||
// these functions don't rely on any inline functions (its own or
|
||||
// other classes) that aren't in this file except for Generic functions
|
||||
// other classes) that aren't in this file except for Generic functions
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif
|
||||
|
||||
+38
-32
@@ -13,7 +13,7 @@
|
||||
* and is not subject to copyright.
|
||||
*/
|
||||
|
||||
/* $Id: mgrnodearray.h,v 3.0.1.3 1997/11/05 22:11:38 sauderd DP3.1 $ */
|
||||
/* $Id: mgrnodearray.h,v 3.0.1.3 1997/11/05 22:11:38 sauderd DP3.1 $ */
|
||||
|
||||
#include <scl_export.h>
|
||||
#ifdef __O3DB__
|
||||
@@ -41,25 +41,28 @@
|
||||
// If you delete this object it deletes all of the entries it points to.
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class SCL_EDITOR_EXPORT MgrNodeArray : public GenNodeArray
|
||||
{
|
||||
public:
|
||||
MgrNodeArray(int defaultSize = ARRAY_DEFAULT_SIZE);
|
||||
~MgrNodeArray();
|
||||
class SCL_EDITOR_EXPORT MgrNodeArray : public GenNodeArray {
|
||||
public:
|
||||
MgrNodeArray( int defaultSize = ARRAY_DEFAULT_SIZE );
|
||||
~MgrNodeArray();
|
||||
|
||||
// REDEFINED functions
|
||||
// need to redefine Append() & Insert(GenericNode *) so they call
|
||||
// MgrNodeArray::Insert(GenericNode *, int index);
|
||||
virtual int Insert(GenericNode* gn, int index);
|
||||
virtual void Append(GenericNode* gn) { Insert(gn, _count); }
|
||||
virtual int Insert(GenericNode* gn) { return Insert(gn, _count); }
|
||||
virtual void Remove(int index);
|
||||
virtual void ClearEntries();
|
||||
virtual void DeleteEntries();
|
||||
// need to redefine Append() & Insert(GenericNode *) so they call
|
||||
// MgrNodeArray::Insert(GenericNode *, int index);
|
||||
virtual int Insert( GenericNode * gn, int index );
|
||||
virtual void Append( GenericNode * gn ) {
|
||||
Insert( gn, _count );
|
||||
}
|
||||
virtual int Insert( GenericNode * gn ) {
|
||||
return Insert( gn, _count );
|
||||
}
|
||||
virtual void Remove( int index );
|
||||
virtual void ClearEntries();
|
||||
virtual void DeleteEntries();
|
||||
|
||||
// ADDED functions
|
||||
virtual int MgrNodeIndex(int fileId);
|
||||
void AssignIndexAddress(int index);
|
||||
virtual int MgrNodeIndex( int fileId );
|
||||
void AssignIndexAddress( int index );
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
@@ -71,27 +74,30 @@ public:
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class SCL_EDITOR_EXPORT MgrNodeArraySorted : public GenNodeArray {
|
||||
public:
|
||||
MgrNodeArraySorted(int defaultSize = ARRAY_DEFAULT_SIZE);
|
||||
~MgrNodeArraySorted() { }
|
||||
public:
|
||||
MgrNodeArraySorted( int defaultSize = ARRAY_DEFAULT_SIZE );
|
||||
~MgrNodeArraySorted() { }
|
||||
|
||||
// REDEFINED functions
|
||||
virtual int Index(GenericNode* gn);
|
||||
virtual int Index(GenericNode** gn);
|
||||
virtual int Index( GenericNode * gn );
|
||||
virtual int Index( GenericNode ** gn );
|
||||
|
||||
virtual int Insert(GenericNode* gn);
|
||||
virtual int Insert(GenericNode* gn, int index)
|
||||
{ cerr <<
|
||||
"Call MgrNodeArraySorted::Insert() without index argument instead.\n"
|
||||
<< "index argument: " << index << " being ignored.\n";
|
||||
return Insert(gn); }
|
||||
virtual void Append(GenericNode* gn) { Insert(gn); }
|
||||
virtual void ClearEntries();
|
||||
virtual void DeleteEntries();
|
||||
virtual int Insert( GenericNode * gn );
|
||||
virtual int Insert( GenericNode * gn, int index ) {
|
||||
cerr <<
|
||||
"Call MgrNodeArraySorted::Insert() without index argument instead.\n"
|
||||
<< "index argument: " << index << " being ignored.\n";
|
||||
return Insert( gn );
|
||||
}
|
||||
virtual void Append( GenericNode * gn ) {
|
||||
Insert( gn );
|
||||
}
|
||||
virtual void ClearEntries();
|
||||
virtual void DeleteEntries();
|
||||
|
||||
// ADDED functions
|
||||
virtual int MgrNodeIndex(int fileId);
|
||||
int FindInsertPosition (const int fileId);
|
||||
virtual int MgrNodeIndex( int fileId );
|
||||
int FindInsertPosition( const int fileId );
|
||||
};
|
||||
|
||||
|
||||
|
||||
+17
-18
@@ -13,7 +13,7 @@
|
||||
* and is not subject to copyright.
|
||||
*/
|
||||
|
||||
/* $Id: mgrnodelist.h,v 3.0.1.2 1997/11/05 22:11:38 sauderd DP3.1 $ */
|
||||
/* $Id: mgrnodelist.h,v 3.0.1.2 1997/11/05 22:11:38 sauderd DP3.1 $ */
|
||||
|
||||
#include <scl_export.h>
|
||||
#ifdef __O3DB__
|
||||
@@ -27,37 +27,36 @@
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// class MgrNodeList
|
||||
// This will be used to represent the state lists.
|
||||
// This will be used to represent the state lists.
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class MgrNode;
|
||||
|
||||
class SCL_EDITOR_EXPORT MgrNodeList : public GenNodeList
|
||||
{
|
||||
public:
|
||||
MgrNodeList(stateEnum type);
|
||||
virtual ~MgrNodeList() { }
|
||||
class SCL_EDITOR_EXPORT MgrNodeList : public GenNodeList {
|
||||
public:
|
||||
MgrNodeList( stateEnum type );
|
||||
virtual ~MgrNodeList() { }
|
||||
|
||||
// ADDED functions
|
||||
virtual MgrNode *FindFileId(int fileId);
|
||||
virtual MgrNode * FindFileId( int fileId );
|
||||
|
||||
// REDEFINED functions
|
||||
// deletes node from its previous list & appends
|
||||
virtual void Append(GenericNode *node);
|
||||
// deletes newNode from its previous list & inserts in
|
||||
// relation to existNode
|
||||
virtual void InsertAfter(GenericNode *newNode, GenericNode *existNode);
|
||||
virtual void InsertBefore(GenericNode *newNode, GenericNode *existNode);
|
||||
virtual void Remove(GenericNode *node);
|
||||
// deletes node from its previous list & appends
|
||||
virtual void Append( GenericNode * node );
|
||||
// deletes newNode from its previous list & inserts in
|
||||
// relation to existNode
|
||||
virtual void InsertAfter( GenericNode * newNode, GenericNode * existNode );
|
||||
virtual void InsertBefore( GenericNode * newNode, GenericNode * existNode );
|
||||
virtual void Remove( GenericNode * node );
|
||||
|
||||
protected:
|
||||
stateEnum listType;
|
||||
protected:
|
||||
stateEnum listType;
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// class MgrNodeList inline functions
|
||||
// these functions don't rely on any inline functions (its own or
|
||||
// other classes) that aren't in this file except for Generic functions
|
||||
// other classes) that aren't in this file except for Generic functions
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif
|
||||
|
||||
@@ -3,14 +3,13 @@
|
||||
#include <OpenOODB.h>
|
||||
#endif
|
||||
|
||||
// define this to be the name of the display window object for
|
||||
// define this to be the name of the display window object for
|
||||
// STEP entity instance editing or define your own.
|
||||
|
||||
class SCL_EDITOR_EXPORT StepEntityEditor
|
||||
{
|
||||
public:
|
||||
StepEntityEditor() {};
|
||||
~StepEntityEditor() {};
|
||||
class SCL_EDITOR_EXPORT StepEntityEditor {
|
||||
public:
|
||||
StepEntityEditor() {};
|
||||
~StepEntityEditor() {};
|
||||
};
|
||||
|
||||
extern void DeleteSEE(StepEntityEditor *se);
|
||||
extern void DeleteSEE( StepEntityEditor * se );
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
*/
|
||||
|
||||
// this is a default seeinfo that does nothing... thus it is not
|
||||
// dependent on a user interface toolkit
|
||||
// dependent on a user interface toolkit
|
||||
|
||||
#include <scl_export.h>
|
||||
#ifdef __O3DB__
|
||||
@@ -28,23 +28,23 @@ class DisplayNodelist;
|
||||
|
||||
#include <editordefines.h>
|
||||
|
||||
class SCL_EDITOR_EXPORT seeInfo : public DisplayNode
|
||||
{
|
||||
public:
|
||||
seeInfo(MgrNode *node,
|
||||
SDAI_Application_instance *se,
|
||||
DisplayNodeList *dnl, displayStateEnum displaySt = mappedWrite);
|
||||
class SCL_EDITOR_EXPORT seeInfo : public DisplayNode {
|
||||
public:
|
||||
seeInfo( MgrNode * node,
|
||||
SDAI_Application_instance * se,
|
||||
DisplayNodeList * dnl, displayStateEnum displaySt = mappedWrite );
|
||||
|
||||
void *GetSEE() { return see; }
|
||||
void * GetSEE() {
|
||||
return see;
|
||||
}
|
||||
};
|
||||
|
||||
inline seeInfo::seeInfo(MgrNode *node, SDAI_Application_instance *se,
|
||||
DisplayNodeList *dnl, displayStateEnum displaySt)
|
||||
{
|
||||
mn = node;
|
||||
inline seeInfo::seeInfo( MgrNode * node, SDAI_Application_instance * se,
|
||||
DisplayNodeList * dnl, displayStateEnum displaySt ) {
|
||||
mn = node;
|
||||
see = 0;
|
||||
displayState = displaySt;
|
||||
dnl->Append(this);
|
||||
displayState = displaySt;
|
||||
dnl->Append( this );
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
+16
-16
@@ -15,8 +15,8 @@
|
||||
|
||||
/*
|
||||
* DPMenuItem - a MyMenuItem that when chosen calls the function
|
||||
* pointed to by func which you must define and
|
||||
* pass to the constructor.
|
||||
* pointed to by func which you must define and
|
||||
* pass to the constructor.
|
||||
*/
|
||||
|
||||
#include <IV-2_6/InterViews/message.h>
|
||||
@@ -24,32 +24,32 @@
|
||||
|
||||
#include <IV-2_6/_enter.h>
|
||||
|
||||
typedef void (Probe::*DPMenuFunc)();
|
||||
typedef void ( Probe::*DPMenuFunc )();
|
||||
|
||||
struct DPMenuInfo {
|
||||
const char* lbl;
|
||||
const char * lbl;
|
||||
DPMenuFunc func;
|
||||
};
|
||||
|
||||
class DPMenuItem : public MyMenuItem {
|
||||
public:
|
||||
DPMenuItem(const char* lbl, DPMenuFunc funcPtr, Probe *dp);
|
||||
public:
|
||||
DPMenuItem( const char * lbl, DPMenuFunc funcPtr, Probe * dp );
|
||||
|
||||
virtual void Do();
|
||||
private:
|
||||
Probe *owner;
|
||||
DPMenuFunc func;
|
||||
virtual void Do();
|
||||
private:
|
||||
Probe * owner;
|
||||
DPMenuFunc func;
|
||||
};
|
||||
|
||||
inline DPMenuItem::DPMenuItem (const char* lbl, DPMenuFunc funcPtr,
|
||||
Probe *dp)
|
||||
: MyMenuItem(new Message(lbl, Left, 2, hfil, 0))
|
||||
// Probe *dp) : MyMenuItem((Interactor*) nil)
|
||||
inline DPMenuItem::DPMenuItem( const char * lbl, DPMenuFunc funcPtr,
|
||||
Probe * dp )
|
||||
: MyMenuItem( new Message( lbl, Left, 2, hfil, 0 ) )
|
||||
// Probe *dp) : MyMenuItem((Interactor*) nil)
|
||||
{
|
||||
// Insert(new Message(lbl, Center, 2, 3));
|
||||
// Insert(new Message(lbl, Center, 2, hfil, 0));
|
||||
func = funcPtr;
|
||||
owner = dp;
|
||||
func = funcPtr;
|
||||
owner = dp;
|
||||
}
|
||||
|
||||
#include <IV-2_6/_leave.h>
|
||||
|
||||
+28
-25
@@ -34,40 +34,43 @@ class HeaderEntityEditor;
|
||||
#define HD_MODIFY_ACTION 1
|
||||
#define HD_INFO_ACTION 2
|
||||
|
||||
class HeaderDisplay : public Frame
|
||||
{
|
||||
public:
|
||||
HeaderDisplay(InstMgr *him, Probe *probe, int pinBool = 1);
|
||||
virtual ~HeaderDisplay();
|
||||
// overrule scene's virtual function to do nothing
|
||||
void Insert(Interactor *) { };
|
||||
class HeaderDisplay : public Frame {
|
||||
public:
|
||||
HeaderDisplay( InstMgr * him, Probe * probe, int pinBool = 1 );
|
||||
virtual ~HeaderDisplay();
|
||||
// overrule scene's virtual function to do nothing
|
||||
void Insert( Interactor * ) { };
|
||||
|
||||
void Update();
|
||||
virtual int ExecuteCommand(int v);
|
||||
void Update();
|
||||
virtual int ExecuteCommand( int v );
|
||||
|
||||
InstMgr *HeaderIM() { return headerIM; }
|
||||
void HeaderIM(InstMgr *him) { headerIM = him; }
|
||||
InstMgr * HeaderIM() {
|
||||
return headerIM;
|
||||
}
|
||||
void HeaderIM( InstMgr * him ) {
|
||||
headerIM = him;
|
||||
}
|
||||
|
||||
boolean IsMapped ();
|
||||
boolean IsMapped();
|
||||
|
||||
private:
|
||||
void CreateButtons(int pinBool);
|
||||
private:
|
||||
void CreateButtons( int pinBool );
|
||||
|
||||
protected:
|
||||
protected:
|
||||
|
||||
Probe *dp;
|
||||
InstMgr *headerIM;
|
||||
HeaderEntityEditor *hee1, *hee2, *hee3;
|
||||
Probe * dp;
|
||||
InstMgr * headerIM;
|
||||
HeaderEntityEditor * hee1, *hee2, *hee3;
|
||||
|
||||
ButtonState *buttonsButSt; // subject set by save & abort buttons
|
||||
ButtonState * buttonsButSt; // subject set by save & abort buttons
|
||||
|
||||
MyPushButton *saveCompleteBut; // sets buttonsButSt
|
||||
MyPushButton *saveIncompleteBut; // sets buttonsButSt
|
||||
MyPushButton *cancelBut; // sets buttonsButSt
|
||||
MyPushButton * saveCompleteBut; // sets buttonsButSt
|
||||
MyPushButton * saveIncompleteBut; // sets buttonsButSt
|
||||
MyPushButton * cancelBut; // sets buttonsButSt
|
||||
|
||||
ButtonState *pinTogButSt; // subject set by pinTogBut
|
||||
PinCheckBox *pinTogBut; // toggle pin(stay mapped)/unmap with
|
||||
// save, cancel, and delete buttons
|
||||
ButtonState * pinTogButSt; // subject set by pinTogBut
|
||||
PinCheckBox * pinTogBut; // toggle pin(stay mapped)/unmap with
|
||||
// save, cancel, and delete buttons
|
||||
};
|
||||
|
||||
#include <IV-2_6/_leave.h>
|
||||
|
||||
@@ -42,18 +42,18 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class InstCmdBufDisp : public ListMgrCore {
|
||||
public:
|
||||
InstCmdBufDisp(ButtonState* bs, int Rows, int Cols,
|
||||
const char* Done = mySBDone);
|
||||
~InstCmdBufDisp(){};
|
||||
public:
|
||||
InstCmdBufDisp( ButtonState * bs, int Rows, int Cols,
|
||||
const char * Done = mySBDone );
|
||||
~InstCmdBufDisp() {};
|
||||
|
||||
void AdvanceSelection(int index);
|
||||
virtual void DoCommand(lmCommand lm, int index);
|
||||
virtual void Choose();
|
||||
protected:
|
||||
void AdvanceSelection( int index );
|
||||
virtual void DoCommand( lmCommand lm, int index );
|
||||
virtual void Choose();
|
||||
protected:
|
||||
|
||||
private:
|
||||
void Init();
|
||||
private:
|
||||
void Init();
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
@@ -62,5 +62,5 @@ private:
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//////////////////////////////////////////
|
||||
//////////////////////////////////////////
|
||||
#endif
|
||||
|
||||
+150
-141
@@ -49,177 +49,186 @@ class ListItemChooser;
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class Probe : public MonoScene
|
||||
{
|
||||
private:
|
||||
int readUsingTC;
|
||||
InstMgr *instMgr;
|
||||
Registry *registry;
|
||||
STEPfile *fileMgr;
|
||||
CmdMgr *cmdMgr;
|
||||
sclFileChooser* fileChooser;
|
||||
HeaderDisplay *headerDisplay;
|
||||
class Probe : public MonoScene {
|
||||
private:
|
||||
int readUsingTC;
|
||||
InstMgr * instMgr;
|
||||
Registry * registry;
|
||||
STEPfile * fileMgr;
|
||||
CmdMgr * cmdMgr;
|
||||
sclFileChooser * fileChooser;
|
||||
HeaderDisplay * headerDisplay;
|
||||
|
||||
seInstListDisplay *entityInstanceList;
|
||||
seTypeListDisplay *entityTypeList;
|
||||
seInstListDisplay * entityInstanceList;
|
||||
seTypeListDisplay * entityTypeList;
|
||||
|
||||
MyMenuBar *functionsMenuBar;
|
||||
MyMenu *functionsMenu;
|
||||
MyMenuBar * functionsMenuBar;
|
||||
MyMenu * functionsMenu;
|
||||
|
||||
MyMenuBar *schemaMgmtMenuBar;
|
||||
MyMenu *schemaMgmtMenu;
|
||||
MyMenuBar * schemaMgmtMenuBar;
|
||||
MyMenu * schemaMgmtMenu;
|
||||
|
||||
MyMenuBar *instanceMgmtMenuBar;
|
||||
MyMenu *instanceMgmtMenu;
|
||||
MyMenuBar * instanceMgmtMenuBar;
|
||||
MyMenu * instanceMgmtMenu;
|
||||
|
||||
MyMenuBar *fileMgmtMenuBar;
|
||||
MyMenu *fileMgmtMenu;
|
||||
MyMenuBar * fileMgmtMenuBar;
|
||||
MyMenu * fileMgmtMenu;
|
||||
|
||||
ErrorDisplay *errorDisp;
|
||||
// Auto Save happens after every AutoSaveCount loops in Probe::Run()
|
||||
static int autoSaveCount;
|
||||
static char * autoSaveFile; // This is the Auto Save File.
|
||||
ErrorDisplay * errorDisp;
|
||||
// Auto Save happens after every AutoSaveCount loops in Probe::Run()
|
||||
static int autoSaveCount;
|
||||
static char * autoSaveFile; // This is the Auto Save File.
|
||||
|
||||
Interactor *b;
|
||||
Interactor * b;
|
||||
|
||||
public:
|
||||
public:
|
||||
|
||||
Probe();
|
||||
~Probe();
|
||||
void Run();
|
||||
Probe();
|
||||
~Probe();
|
||||
void Run();
|
||||
|
||||
int AutoSave();
|
||||
int ChooseAutoSaveFile();
|
||||
void WriteBackupFileCmd() { AutoSave(); }
|
||||
void ChooseBackupFileCmd() { ChooseAutoSaveFile(); }
|
||||
int AutoSave();
|
||||
int ChooseAutoSaveFile();
|
||||
void WriteBackupFileCmd() {
|
||||
AutoSave();
|
||||
}
|
||||
void ChooseBackupFileCmd() {
|
||||
ChooseAutoSaveFile();
|
||||
}
|
||||
|
||||
void ErrorMsg(const char *msg) { errorDisp->ErrorMsg(msg); };
|
||||
void ErrorMsg( const char * msg ) {
|
||||
errorDisp->ErrorMsg( msg );
|
||||
};
|
||||
|
||||
InstMgr *GetInstMgr() { return instMgr; }
|
||||
void AssignFileId(STEPentity *se);
|
||||
InstMgr * GetInstMgr() {
|
||||
return instMgr;
|
||||
}
|
||||
void AssignFileId( STEPentity * se );
|
||||
|
||||
//NEW (below)
|
||||
void UpdateCmdList(int index, char cmd, int cmdCol);
|
||||
void ExecuteInstanceCmds();
|
||||
void ExecuteSaveComplete();
|
||||
void ExecuteSaveIncomplete();
|
||||
void ExecuteDelete();
|
||||
void ExecuteCancel();
|
||||
void ExecuteReplicate();
|
||||
void ExecuteModify();
|
||||
void ExecuteView();
|
||||
void ExecuteClose();
|
||||
void ExecuteUnmark();
|
||||
void UpdateCmdList( int index, char cmd, int cmdCol );
|
||||
void ExecuteInstanceCmds();
|
||||
void ExecuteSaveComplete();
|
||||
void ExecuteSaveIncomplete();
|
||||
void ExecuteDelete();
|
||||
void ExecuteCancel();
|
||||
void ExecuteReplicate();
|
||||
void ExecuteModify();
|
||||
void ExecuteView();
|
||||
void ExecuteClose();
|
||||
void ExecuteUnmark();
|
||||
|
||||
//NEW (above)
|
||||
|
||||
// SEE mgmt functions
|
||||
void seeSaveComplete(StepEntityEditor *see);
|
||||
void seeSaveIncomplete(StepEntityEditor *see);
|
||||
void seeCancel(StepEntityEditor *see);
|
||||
void seeDelete(StepEntityEditor *see);
|
||||
void seeReplicate(StepEntityEditor *see);
|
||||
void seeOpenSED(StepEntityEditor *see);
|
||||
// SEE mgmt functions
|
||||
void seeSaveComplete( StepEntityEditor * see );
|
||||
void seeSaveIncomplete( StepEntityEditor * see );
|
||||
void seeCancel( StepEntityEditor * see );
|
||||
void seeDelete( StepEntityEditor * see );
|
||||
void seeReplicate( StepEntityEditor * see );
|
||||
void seeOpenSED( StepEntityEditor * see );
|
||||
|
||||
int seeEdit(StepEntityEditor *see);
|
||||
int seeEntityEdit(StepEntityEditor *see);
|
||||
int seeEnumEdit(StepEntityEditor *see);
|
||||
int seeSelectEdit(StepEntityEditor *see);
|
||||
int seeEdit( StepEntityEditor * see );
|
||||
int seeEntityEdit( StepEntityEditor * see );
|
||||
int seeEnumEdit( StepEntityEditor * see );
|
||||
int seeSelectEdit( StepEntityEditor * see );
|
||||
|
||||
int seeSelectMark(StepEntityEditor *see);
|
||||
int seeSelectMark( StepEntityEditor * see );
|
||||
// int seeList(StepEntityEditor *see);
|
||||
void seeToggle(StepEntityEditor *see, int code);
|
||||
void seeToggle( StepEntityEditor * see, int code );
|
||||
|
||||
// command options called from the STEPentity display list
|
||||
boolean sedlSaveComplete(MgrNode *mn, int index);
|
||||
boolean sedlSaveIncomplete(MgrNode *mn, int index);
|
||||
void sedlCancel(MgrNode *mn, int index);
|
||||
void sedlDelete(MgrNode *mn, int index);
|
||||
void sedlReplicate(MgrNode *mn, int index);
|
||||
void sedlModify(MgrNode *mn, int index);
|
||||
void sedlView(MgrNode *mn, int index);
|
||||
void sedlClose(MgrNode *mn, int index);
|
||||
void sedlUnmark(MgrNode *mn, int index);
|
||||
/* these are missing because they act on an STEPattribute not a STEPentity
|
||||
void sedlEdit(int index);
|
||||
void sedlChooseMark(int index);
|
||||
void sedlList(int index);
|
||||
*/
|
||||
// place objects into the world
|
||||
Interactor *InsertInteractor (Interactor * i, Alignment align = Center,
|
||||
Interactor * alignTo = 0);
|
||||
void RemoveInteractor (Interactor* i);
|
||||
// command options called from the STEPentity display list
|
||||
boolean sedlSaveComplete( MgrNode * mn, int index );
|
||||
boolean sedlSaveIncomplete( MgrNode * mn, int index );
|
||||
void sedlCancel( MgrNode * mn, int index );
|
||||
void sedlDelete( MgrNode * mn, int index );
|
||||
void sedlReplicate( MgrNode * mn, int index );
|
||||
void sedlModify( MgrNode * mn, int index );
|
||||
void sedlView( MgrNode * mn, int index );
|
||||
void sedlClose( MgrNode * mn, int index );
|
||||
void sedlUnmark( MgrNode * mn, int index );
|
||||
/* these are missing because they act on an STEPattribute not a STEPentity
|
||||
void sedlEdit(int index);
|
||||
void sedlChooseMark(int index);
|
||||
void sedlList(int index);
|
||||
*/
|
||||
// place objects into the world
|
||||
Interactor * InsertInteractor( Interactor * i, Alignment align = Center,
|
||||
Interactor * alignTo = 0 );
|
||||
void RemoveInteractor( Interactor * i );
|
||||
|
||||
void InsertHeaderEditor ();
|
||||
void RemoveHeaderEditor ();
|
||||
void InsertHeaderEditor();
|
||||
void RemoveHeaderEditor();
|
||||
|
||||
void InsertSED (StepEntityDescriptor * sed);
|
||||
void RemoveSED (StepEntityDescriptor * sed);
|
||||
void InsertSED( StepEntityDescriptor * sed );
|
||||
void RemoveSED( StepEntityDescriptor * sed );
|
||||
|
||||
void InsertSEE (StepEntityEditor * i);
|
||||
void RemoveSEE (StepEntityEditor* i);
|
||||
void RemoveSeeIfNotPinned (StepEntityEditor* see, MgrNode *mn);
|
||||
void SetProbeCursor(Cursor *c);
|
||||
void InsertSEE( StepEntityEditor * i );
|
||||
void RemoveSEE( StepEntityEditor * i );
|
||||
void RemoveSeeIfNotPinned( StepEntityEditor * see, MgrNode * mn );
|
||||
void SetProbeCursor( Cursor * c );
|
||||
|
||||
boolean IsMapped ();
|
||||
boolean IsMapped();
|
||||
|
||||
void ReadFile();
|
||||
void AppendFile();
|
||||
void WriteFile();
|
||||
// functions_menu
|
||||
void Quit() { exit(0); };
|
||||
void Refresh() { };
|
||||
// schema_mgmt_menu
|
||||
void ListEntityTypesCmd();
|
||||
void DescribeEntityCmd();
|
||||
void SelectSchemaCmd();
|
||||
// instance_mgmt_menu
|
||||
void CreateInstanceCmd();
|
||||
void ModifyInstanceCmd();
|
||||
void ViewInstanceCmd();
|
||||
void CloseInstanceCmd();
|
||||
void SaveComplInstanceCmd();
|
||||
void SaveIncomplInstanceCmd();
|
||||
void ReplicateInstanceCmd();
|
||||
void UnmarkInstanceCmd();
|
||||
void DeleteInstanceCmd();
|
||||
void PrintInstanceCmd();
|
||||
void SelectInstanceCmd();
|
||||
// file_mgmt_menu
|
||||
void ReadExchangeFileCmd();
|
||||
void ReadExchangeFileCmdPreTC();
|
||||
void AppendExchangeFileCmd();
|
||||
void WriteExchangeFileCmd();
|
||||
|
||||
void ReadWorkingFileCmd();
|
||||
void ReadWorkingFileCmdPreTC();
|
||||
void AppendWorkingFileCmd();
|
||||
void WriteWorkingFileCmd();
|
||||
void ReadFile();
|
||||
void AppendFile();
|
||||
void WriteFile();
|
||||
// functions_menu
|
||||
void Quit() {
|
||||
exit( 0 );
|
||||
};
|
||||
void Refresh() { };
|
||||
// schema_mgmt_menu
|
||||
void ListEntityTypesCmd();
|
||||
void DescribeEntityCmd();
|
||||
void SelectSchemaCmd();
|
||||
// instance_mgmt_menu
|
||||
void CreateInstanceCmd();
|
||||
void ModifyInstanceCmd();
|
||||
void ViewInstanceCmd();
|
||||
void CloseInstanceCmd();
|
||||
void SaveComplInstanceCmd();
|
||||
void SaveIncomplInstanceCmd();
|
||||
void ReplicateInstanceCmd();
|
||||
void UnmarkInstanceCmd();
|
||||
void DeleteInstanceCmd();
|
||||
void PrintInstanceCmd();
|
||||
void SelectInstanceCmd();
|
||||
// file_mgmt_menu
|
||||
void ReadExchangeFileCmd();
|
||||
void ReadExchangeFileCmdPreTC();
|
||||
void AppendExchangeFileCmd();
|
||||
void WriteExchangeFileCmd();
|
||||
|
||||
void VerifyInstsCmd();
|
||||
void RemoveDelInstsCmd();
|
||||
void ClearInstanceListCmd();
|
||||
void EditHeaderInstancesCmd();
|
||||
void DoNothing() {}
|
||||
protected:
|
||||
void WriteInstance(int index);
|
||||
void ListEntityInstances();
|
||||
StepEntityEditor *GetStepEntityEditor(STEPentity *se,
|
||||
int modifyBool = 1, int pinBool = 1);
|
||||
StepEntityEditor *GetStepEntityEditor(MgrNode *mn,
|
||||
int modifyBool = 1, int pinBool = 1);
|
||||
void ReadWorkingFileCmd();
|
||||
void ReadWorkingFileCmdPreTC();
|
||||
void AppendWorkingFileCmd();
|
||||
void WriteWorkingFileCmd();
|
||||
|
||||
void BuildSubtypeList(ListItemChooser *lic, EntityDescriptor *ed);
|
||||
void VerifyInstsCmd();
|
||||
void RemoveDelInstsCmd();
|
||||
void ClearInstanceListCmd();
|
||||
void EditHeaderInstancesCmd();
|
||||
void DoNothing() {}
|
||||
protected:
|
||||
void WriteInstance( int index );
|
||||
void ListEntityInstances();
|
||||
StepEntityEditor * GetStepEntityEditor( STEPentity * se,
|
||||
int modifyBool = 1, int pinBool = 1 );
|
||||
StepEntityEditor * GetStepEntityEditor( MgrNode * mn,
|
||||
int modifyBool = 1, int pinBool = 1 );
|
||||
|
||||
private:
|
||||
void Init();
|
||||
void InitEntityInstanceList();
|
||||
void InitEntityTypeList();
|
||||
void InitMenus();
|
||||
void BuildSubtypeList( ListItemChooser * lic, EntityDescriptor * ed );
|
||||
|
||||
Interactor *ProbeBody();
|
||||
Interactor *SEEHelpBody();
|
||||
MyPulldownMenu* MakePulldown( const char* name, struct DPMenuInfo* item);
|
||||
private:
|
||||
void Init();
|
||||
void InitEntityInstanceList();
|
||||
void InitEntityTypeList();
|
||||
void InitMenus();
|
||||
|
||||
Interactor * ProbeBody();
|
||||
Interactor * SEEHelpBody();
|
||||
MyPulldownMenu * MakePulldown( const char * name, struct DPMenuInfo * item );
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#ifndef SCLFILECHOOSER_H
|
||||
#define SCLFILECHOOSER_H
|
||||
#ifndef SCLFILECHOOSER_H
|
||||
#define SCLFILECHOOSER_H
|
||||
|
||||
/*
|
||||
* NIST Data Probe Class Library
|
||||
@@ -11,7 +11,7 @@
|
||||
* and is not subject to copyright.
|
||||
*/
|
||||
|
||||
/* $Id: sclfilechooser.h,v 3.0.1.1 1997/11/05 23:01:13 sauderd DP3.1 $ */
|
||||
/* $Id: sclfilechooser.h,v 3.0.1.1 1997/11/05 23:01:13 sauderd DP3.1 $ */
|
||||
|
||||
#define CHOOSER_EXCHANGE 1
|
||||
#define CHOOSER_WORKING 2
|
||||
@@ -22,38 +22,41 @@ class MyFileChooser;
|
||||
|
||||
#include <IV-2_6/_enter.h>
|
||||
|
||||
class sclFileChooser : public MyFileChooser
|
||||
{
|
||||
public:
|
||||
sclFileChooser(
|
||||
const char* title_ = "Please select a file:",
|
||||
const char* subtitle_ = "",
|
||||
const char* dir = "~",
|
||||
int rows = 10, int cols = 24,
|
||||
const char* acceptLabel = " Open ",
|
||||
Alignment a = Center,
|
||||
int restrictBool = 0
|
||||
);
|
||||
sclFileChooser(
|
||||
const char* name, const char* title_, const char* subtitle_,
|
||||
const char* dir, int rows, int cols, const char* acceptLabel,
|
||||
Alignment a, int restrictBool = 0
|
||||
);
|
||||
// the 2 functs below use the defines above:
|
||||
// CHOOSER_EXCHANGE and CHOOSER_WORKING
|
||||
int FileType()
|
||||
{ int val = 0; fileButtonsButSt->GetValue(val); return val; }
|
||||
void SetFileType(int fileType)
|
||||
{ fileButtonsButSt->SetValue(fileType); }
|
||||
class sclFileChooser : public MyFileChooser {
|
||||
public:
|
||||
sclFileChooser(
|
||||
const char * title_ = "Please select a file:",
|
||||
const char * subtitle_ = "",
|
||||
const char * dir = "~",
|
||||
int rows = 10, int cols = 24,
|
||||
const char * acceptLabel = " Open ",
|
||||
Alignment a = Center,
|
||||
int restrictBool = 0
|
||||
);
|
||||
sclFileChooser(
|
||||
const char * name, const char * title_, const char * subtitle_,
|
||||
const char * dir, int rows, int cols, const char * acceptLabel,
|
||||
Alignment a, int restrictBool = 0
|
||||
);
|
||||
// the 2 functs below use the defines above:
|
||||
// CHOOSER_EXCHANGE and CHOOSER_WORKING
|
||||
int FileType() {
|
||||
int val = 0;
|
||||
fileButtonsButSt->GetValue( val );
|
||||
return val;
|
||||
}
|
||||
void SetFileType( int fileType ) {
|
||||
fileButtonsButSt->SetValue( fileType );
|
||||
}
|
||||
|
||||
protected:
|
||||
virtual Interactor* Interior(const char* acptlbl);
|
||||
protected:
|
||||
virtual Interactor * Interior( const char * acptlbl );
|
||||
|
||||
ButtonState *fileButtonsButSt;
|
||||
MyRadioButton *exchangeBut;
|
||||
MyRadioButton *workingBut;
|
||||
ButtonState * fileButtonsButSt;
|
||||
MyRadioButton * exchangeBut;
|
||||
MyRadioButton * workingBut;
|
||||
|
||||
private:
|
||||
private:
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
* and is not subject to copyright.
|
||||
*/
|
||||
|
||||
/* $Id: seedefines.h,v 3.0.1.1 1997/11/05 23:01:08 sauderd DP3.1 $ */
|
||||
/* $Id: seedefines.h,v 3.0.1.1 1997/11/05 23:01:08 sauderd DP3.1 $ */
|
||||
|
||||
#define SEE_SAVE_COMPLETE 1001
|
||||
#define SEE_SAVE_INCOMPLETE 1002
|
||||
@@ -48,7 +48,7 @@
|
||||
#define CONTROL_U ('\025')
|
||||
#define CONTROL_X ('\030')
|
||||
|
||||
// single terminating characters for see editors
|
||||
static const char *seeTermChars = "\r\016\020\021";
|
||||
// single terminating characters for see editors
|
||||
static const char * seeTermChars = "\r\016\020\021";
|
||||
|
||||
#endif
|
||||
|
||||
+225
-240
@@ -16,40 +16,40 @@
|
||||
|
||||
/*
|
||||
* seeStringEditor - Interactive editor for strings based on StringEditor2Sub.
|
||||
* This object adds checking for two character terminating
|
||||
* characters such a ^X^S or ^X S.
|
||||
* This object adds checking for two character terminating
|
||||
* characters such a ^X^S or ^X S.
|
||||
*
|
||||
* seeIntEditor - Interactive editor for strings of integers based
|
||||
* on IntStringEditorSub. This object adds checking for
|
||||
* two character terminating characters such a ^X^S or
|
||||
* ^X S.
|
||||
* on IntStringEditorSub. This object adds checking for
|
||||
* two character terminating characters such a ^X^S or
|
||||
* ^X S.
|
||||
*
|
||||
* seeRealEditor - Same as above except for real numbers and based
|
||||
* on RealStringEditorSub.
|
||||
* seeRealEditor - Same as above except for real numbers and based
|
||||
* on RealStringEditorSub.
|
||||
*
|
||||
* seeEntityEditor - Interactive editor for character strings based on
|
||||
* on StringEditor2. This object accepts only entity
|
||||
* references (i.e. #number). This is
|
||||
* done by redefining InsertValidChar(char c). It
|
||||
* performs type checking when a terminating char is
|
||||
* typed by redefining TypeCheck().
|
||||
* on StringEditor2. This object accepts only entity
|
||||
* references (i.e. #number). This is
|
||||
* done by redefining InsertValidChar(char c). It
|
||||
* performs type checking when a terminating char is
|
||||
* typed by redefining TypeCheck().
|
||||
*
|
||||
* seeEntAggrEditor - Interactive editor for character strings based
|
||||
* on EntityStringEditor. This one is sociable with
|
||||
* a supervisor. In addition to supplying the
|
||||
* supervisor with the terminating char it also
|
||||
* returns a pointer to itself.
|
||||
* It does this by redefining SetSubject() to
|
||||
* communicate with the supervisor supplying the
|
||||
* fields contained in class SubordinateInfo.
|
||||
* on EntityStringEditor. This one is sociable with
|
||||
* a supervisor. In addition to supplying the
|
||||
* supervisor with the terminating char it also
|
||||
* returns a pointer to itself.
|
||||
* It does this by redefining SetSubject() to
|
||||
* communicate with the supervisor supplying the
|
||||
* fields contained in class SubordinateInfo.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <seedefines.h> // ivfasd/intstreditorsub.h
|
||||
#include <streditor2sub.h> // ivfasd/streditor2sub.h
|
||||
#include <intstreditorsub.h> // ivfasd/intstreditor2sub.h
|
||||
#include <seedefines.h> // ivfasd/intstreditorsub.h
|
||||
#include <streditor2sub.h> // ivfasd/streditor2sub.h
|
||||
#include <intstreditorsub.h> // ivfasd/intstreditor2sub.h
|
||||
|
||||
int CheckTermChar(char c, const char lastChar, const char *done);
|
||||
int CheckTermChar( char c, const char lastChar, const char * done );
|
||||
#define SETYPE_ENTITY 7
|
||||
#define SETYPE_ENTITY_AGGR 8
|
||||
|
||||
@@ -62,22 +62,24 @@ int CheckTermChar(char c, const char lastChar, const char *done);
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class seeStringEditor : public StringEditor2Sub {
|
||||
public:
|
||||
seeStringEditor(ButtonState* bs, const char* sample, int width = 0,
|
||||
const char *singleTermChars = seeTermChars);
|
||||
seeStringEditor(const char* name, ButtonState* bs, const char* sample,
|
||||
int width = 0, const char *singleTermChars = seeTermChars);
|
||||
virtual ~seeStringEditor();
|
||||
virtual void Handle(Event&);
|
||||
virtual void NewEdit();
|
||||
virtual int TypeCheck() { return SETYPE_STRING; }
|
||||
public:
|
||||
seeStringEditor( ButtonState * bs, const char * sample, int width = 0,
|
||||
const char * singleTermChars = seeTermChars );
|
||||
seeStringEditor( const char * name, ButtonState * bs, const char * sample,
|
||||
int width = 0, const char * singleTermChars = seeTermChars );
|
||||
virtual ~seeStringEditor();
|
||||
virtual void Handle( Event & );
|
||||
virtual void NewEdit();
|
||||
virtual int TypeCheck() {
|
||||
return SETYPE_STRING;
|
||||
}
|
||||
|
||||
protected:
|
||||
boolean CheckForCmdChars(char c);
|
||||
int TermChar(char c);
|
||||
protected:
|
||||
boolean CheckForCmdChars( char c );
|
||||
int TermChar( char c );
|
||||
|
||||
private:
|
||||
void Init();
|
||||
private:
|
||||
void Init();
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
@@ -87,22 +89,24 @@ private:
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class seeIntEditor : public IntStringEditorSub {
|
||||
public:
|
||||
seeIntEditor(ButtonState* bs, const char* sample, int width = 0,
|
||||
const char *singleTermChars = seeTermChars);
|
||||
seeIntEditor(const char* name, ButtonState* bs, const char* sample,
|
||||
int width = 0, const char *singleTermChars = seeTermChars);
|
||||
virtual ~seeIntEditor();
|
||||
virtual void Handle(Event&);
|
||||
virtual void NewEdit();
|
||||
virtual int TypeCheck() { return SETYPE_SIGNED_INTEGER; }
|
||||
public:
|
||||
seeIntEditor( ButtonState * bs, const char * sample, int width = 0,
|
||||
const char * singleTermChars = seeTermChars );
|
||||
seeIntEditor( const char * name, ButtonState * bs, const char * sample,
|
||||
int width = 0, const char * singleTermChars = seeTermChars );
|
||||
virtual ~seeIntEditor();
|
||||
virtual void Handle( Event & );
|
||||
virtual void NewEdit();
|
||||
virtual int TypeCheck() {
|
||||
return SETYPE_SIGNED_INTEGER;
|
||||
}
|
||||
|
||||
protected:
|
||||
boolean CheckForCmdChars(char c);
|
||||
int TermChar(char c);
|
||||
protected:
|
||||
boolean CheckForCmdChars( char c );
|
||||
int TermChar( char c );
|
||||
|
||||
private:
|
||||
void Init();
|
||||
private:
|
||||
void Init();
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
@@ -112,28 +116,28 @@ private:
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class seeIntAggrEditor : public StringEditor2 {
|
||||
protected:
|
||||
SubordinateInfo *subInfo;
|
||||
public:
|
||||
seeIntAggrEditor(ButtonState* bs, const char* sample, int width = 0,
|
||||
const char *singleTermChars = seeTermChars);
|
||||
seeIntAggrEditor(const char* name, ButtonState* bs, const char* sample,
|
||||
int width = 0, const char *singleTermChars = seeTermChars);
|
||||
virtual ~seeIntAggrEditor();
|
||||
protected:
|
||||
SubordinateInfo * subInfo;
|
||||
public:
|
||||
seeIntAggrEditor( ButtonState * bs, const char * sample, int width = 0,
|
||||
const char * singleTermChars = seeTermChars );
|
||||
seeIntAggrEditor( const char * name, ButtonState * bs, const char * sample,
|
||||
int width = 0, const char * singleTermChars = seeTermChars );
|
||||
virtual ~seeIntAggrEditor();
|
||||
|
||||
// returns SETYPE_ for success
|
||||
// otherwise returns zero.
|
||||
virtual int TypeCheck();
|
||||
virtual void SetSubject(int c);
|
||||
virtual void Handle(Event&);
|
||||
virtual void NewEdit();
|
||||
// returns SETYPE_ for success
|
||||
// otherwise returns zero.
|
||||
virtual int TypeCheck();
|
||||
virtual void SetSubject( int c );
|
||||
virtual void Handle( Event & );
|
||||
virtual void NewEdit();
|
||||
|
||||
protected:
|
||||
virtual boolean InsertValidChar(char c);
|
||||
boolean CheckForCmdChars(char c);
|
||||
int TermChar(char c);
|
||||
private:
|
||||
void Init();
|
||||
protected:
|
||||
virtual boolean InsertValidChar( char c );
|
||||
boolean CheckForCmdChars( char c );
|
||||
int TermChar( char c );
|
||||
private:
|
||||
void Init();
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
@@ -143,22 +147,24 @@ private:
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class seeRealEditor : public RealStringEditorSub {
|
||||
public:
|
||||
seeRealEditor(ButtonState* bs, const char* sample, int width = 0,
|
||||
const char *singleTermChars = seeTermChars);
|
||||
seeRealEditor(const char* name, ButtonState* bs, const char* sample,
|
||||
int width = 0, const char *singleTermChars = seeTermChars);
|
||||
virtual ~seeRealEditor();
|
||||
virtual void Handle(Event&);
|
||||
virtual void NewEdit();
|
||||
virtual int TypeCheck() { return SETYPE_REAL; }
|
||||
public:
|
||||
seeRealEditor( ButtonState * bs, const char * sample, int width = 0,
|
||||
const char * singleTermChars = seeTermChars );
|
||||
seeRealEditor( const char * name, ButtonState * bs, const char * sample,
|
||||
int width = 0, const char * singleTermChars = seeTermChars );
|
||||
virtual ~seeRealEditor();
|
||||
virtual void Handle( Event & );
|
||||
virtual void NewEdit();
|
||||
virtual int TypeCheck() {
|
||||
return SETYPE_REAL;
|
||||
}
|
||||
|
||||
protected:
|
||||
boolean CheckForCmdChars(char c);
|
||||
int TermChar(char c);
|
||||
protected:
|
||||
boolean CheckForCmdChars( char c );
|
||||
int TermChar( char c );
|
||||
|
||||
private:
|
||||
void Init();
|
||||
private:
|
||||
void Init();
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
@@ -168,28 +174,28 @@ private:
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class seeRealAggrEditor : public StringEditor2 {
|
||||
protected:
|
||||
SubordinateInfo *subInfo;
|
||||
public:
|
||||
seeRealAggrEditor(ButtonState* bs, const char* sample, int width = 0,
|
||||
const char *singleTermChars = seeTermChars);
|
||||
seeRealAggrEditor(const char* name, ButtonState* bs, const char* sample,
|
||||
int width = 0, const char *singleTermChars = seeTermChars);
|
||||
virtual ~seeRealAggrEditor();
|
||||
protected:
|
||||
SubordinateInfo * subInfo;
|
||||
public:
|
||||
seeRealAggrEditor( ButtonState * bs, const char * sample, int width = 0,
|
||||
const char * singleTermChars = seeTermChars );
|
||||
seeRealAggrEditor( const char * name, ButtonState * bs, const char * sample,
|
||||
int width = 0, const char * singleTermChars = seeTermChars );
|
||||
virtual ~seeRealAggrEditor();
|
||||
|
||||
// returns SETYPE_ for success
|
||||
// otherwise returns zero.
|
||||
virtual int TypeCheck();
|
||||
virtual void SetSubject(int c);
|
||||
virtual void Handle(Event&);
|
||||
virtual void NewEdit();
|
||||
// returns SETYPE_ for success
|
||||
// otherwise returns zero.
|
||||
virtual int TypeCheck();
|
||||
virtual void SetSubject( int c );
|
||||
virtual void Handle( Event & );
|
||||
virtual void NewEdit();
|
||||
|
||||
protected:
|
||||
virtual boolean InsertValidChar(char c);
|
||||
boolean CheckForCmdChars(char c);
|
||||
int TermChar(char c);
|
||||
private:
|
||||
void Init();
|
||||
protected:
|
||||
virtual boolean InsertValidChar( char c );
|
||||
boolean CheckForCmdChars( char c );
|
||||
int TermChar( char c );
|
||||
private:
|
||||
void Init();
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
@@ -199,28 +205,28 @@ private:
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class seeEntityEditor : public StringEditor2 {
|
||||
protected:
|
||||
SubordinateInfo *subInfo;
|
||||
public:
|
||||
seeEntityEditor(ButtonState* bs, const char* sample, int width = 0,
|
||||
const char *singleTermChars = seeTermChars);
|
||||
seeEntityEditor(const char* name, ButtonState* bs, const char* sample,
|
||||
int width = 0, const char *singleTermChars = seeTermChars);
|
||||
virtual ~seeEntityEditor();
|
||||
protected:
|
||||
SubordinateInfo * subInfo;
|
||||
public:
|
||||
seeEntityEditor( ButtonState * bs, const char * sample, int width = 0,
|
||||
const char * singleTermChars = seeTermChars );
|
||||
seeEntityEditor( const char * name, ButtonState * bs, const char * sample,
|
||||
int width = 0, const char * singleTermChars = seeTermChars );
|
||||
virtual ~seeEntityEditor();
|
||||
|
||||
// returns SETYPE_ENTITY for success
|
||||
// otherwise returns zero.
|
||||
virtual int TypeCheck();
|
||||
virtual void SetSubject(int c);
|
||||
virtual void Handle(Event&);
|
||||
virtual void NewEdit();
|
||||
// returns SETYPE_ENTITY for success
|
||||
// otherwise returns zero.
|
||||
virtual int TypeCheck();
|
||||
virtual void SetSubject( int c );
|
||||
virtual void Handle( Event & );
|
||||
virtual void NewEdit();
|
||||
|
||||
protected:
|
||||
virtual boolean InsertValidChar(char c);
|
||||
boolean CheckForCmdChars(char c);
|
||||
int TermChar(char c);
|
||||
private:
|
||||
void Init();
|
||||
protected:
|
||||
virtual boolean InsertValidChar( char c );
|
||||
boolean CheckForCmdChars( char c );
|
||||
int TermChar( char c );
|
||||
private:
|
||||
void Init();
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
@@ -230,28 +236,28 @@ private:
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class seeEntAggrEditor : public StringEditor2 {
|
||||
protected:
|
||||
SubordinateInfo *subInfo;
|
||||
public:
|
||||
seeEntAggrEditor(ButtonState* bs, const char* sample, int width = 0,
|
||||
const char *singleTermChars = seeTermChars);
|
||||
seeEntAggrEditor(const char* name, ButtonState* bs, const char* sample,
|
||||
int width = 0, const char *singleTermChars = seeTermChars);
|
||||
virtual ~seeEntAggrEditor();
|
||||
protected:
|
||||
SubordinateInfo * subInfo;
|
||||
public:
|
||||
seeEntAggrEditor( ButtonState * bs, const char * sample, int width = 0,
|
||||
const char * singleTermChars = seeTermChars );
|
||||
seeEntAggrEditor( const char * name, ButtonState * bs, const char * sample,
|
||||
int width = 0, const char * singleTermChars = seeTermChars );
|
||||
virtual ~seeEntAggrEditor();
|
||||
|
||||
// returns SETYPE_ENTITY
|
||||
// otherwise returns zero.
|
||||
virtual int TypeCheck();
|
||||
virtual void SetSubject(int c);
|
||||
virtual void Handle(Event&);
|
||||
virtual void NewEdit();
|
||||
// returns SETYPE_ENTITY
|
||||
// otherwise returns zero.
|
||||
virtual int TypeCheck();
|
||||
virtual void SetSubject( int c );
|
||||
virtual void Handle( Event & );
|
||||
virtual void NewEdit();
|
||||
|
||||
protected:
|
||||
virtual boolean InsertValidChar(char c);
|
||||
boolean CheckForCmdChars(char c);
|
||||
int TermChar(char c);
|
||||
private:
|
||||
void Init();
|
||||
protected:
|
||||
virtual boolean InsertValidChar( char c );
|
||||
boolean CheckForCmdChars( char c );
|
||||
int TermChar( char c );
|
||||
private:
|
||||
void Init();
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
@@ -260,24 +266,21 @@ private:
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
inline void seeStringEditor::Init()
|
||||
{
|
||||
SetClassName("seeStringEditor");
|
||||
inline void seeStringEditor::Init() {
|
||||
SetClassName( "seeStringEditor" );
|
||||
}
|
||||
|
||||
inline seeStringEditor::seeStringEditor (
|
||||
ButtonState* bs, const char* Sample, int width, const char *singleTermChars
|
||||
) : StringEditor2Sub(bs, Sample, singleTermChars, width)
|
||||
{
|
||||
inline seeStringEditor::seeStringEditor(
|
||||
ButtonState * bs, const char * Sample, int width, const char * singleTermChars
|
||||
) : StringEditor2Sub( bs, Sample, singleTermChars, width ) {
|
||||
Init();
|
||||
}
|
||||
|
||||
inline seeStringEditor::seeStringEditor (
|
||||
const char* name, ButtonState* bs, const char* Sample, int width,
|
||||
const char *singleTermChars
|
||||
) : StringEditor2Sub(bs, Sample, singleTermChars, width)
|
||||
{
|
||||
SetInstance(name);
|
||||
inline seeStringEditor::seeStringEditor(
|
||||
const char * name, ButtonState * bs, const char * Sample, int width,
|
||||
const char * singleTermChars
|
||||
) : StringEditor2Sub( bs, Sample, singleTermChars, width ) {
|
||||
SetInstance( name );
|
||||
Init();
|
||||
}
|
||||
|
||||
@@ -287,24 +290,21 @@ inline seeStringEditor::seeStringEditor (
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
inline void seeIntEditor::Init()
|
||||
{
|
||||
SetClassName("seeIntEditor");
|
||||
inline void seeIntEditor::Init() {
|
||||
SetClassName( "seeIntEditor" );
|
||||
}
|
||||
|
||||
inline seeIntEditor::seeIntEditor (
|
||||
ButtonState* bs, const char* Sample, int width, const char *singleTermChars
|
||||
) : IntStringEditorSub(bs, Sample, singleTermChars, width)
|
||||
{
|
||||
inline seeIntEditor::seeIntEditor(
|
||||
ButtonState * bs, const char * Sample, int width, const char * singleTermChars
|
||||
) : IntStringEditorSub( bs, Sample, singleTermChars, width ) {
|
||||
Init();
|
||||
}
|
||||
|
||||
inline seeIntEditor::seeIntEditor (
|
||||
const char* name, ButtonState* bs, const char* Sample, int width,
|
||||
const char *singleTermChars
|
||||
) : IntStringEditorSub(bs, Sample, singleTermChars, width)
|
||||
{
|
||||
SetInstance(name);
|
||||
inline seeIntEditor::seeIntEditor(
|
||||
const char * name, ButtonState * bs, const char * Sample, int width,
|
||||
const char * singleTermChars
|
||||
) : IntStringEditorSub( bs, Sample, singleTermChars, width ) {
|
||||
SetInstance( name );
|
||||
Init();
|
||||
}
|
||||
|
||||
@@ -314,25 +314,22 @@ inline seeIntEditor::seeIntEditor (
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
inline void seeIntAggrEditor::Init()
|
||||
{
|
||||
SetClassName("seeIntAggrEditor");
|
||||
subInfo = new SubordinateInfo(0, this);
|
||||
inline void seeIntAggrEditor::Init() {
|
||||
SetClassName( "seeIntAggrEditor" );
|
||||
subInfo = new SubordinateInfo( 0, this );
|
||||
}
|
||||
|
||||
inline seeIntAggrEditor::seeIntAggrEditor (
|
||||
ButtonState* bs, const char* Sample, int width, const char *singleTermChars
|
||||
) : StringEditor2(bs, Sample, singleTermChars, width)
|
||||
{
|
||||
inline seeIntAggrEditor::seeIntAggrEditor(
|
||||
ButtonState * bs, const char * Sample, int width, const char * singleTermChars
|
||||
) : StringEditor2( bs, Sample, singleTermChars, width ) {
|
||||
Init();
|
||||
}
|
||||
|
||||
inline seeIntAggrEditor::seeIntAggrEditor (
|
||||
const char* name, ButtonState* bs, const char* Sample, int width,
|
||||
const char *singleTermChars
|
||||
) : StringEditor2(bs, Sample, singleTermChars, width)
|
||||
{
|
||||
SetInstance(name);
|
||||
inline seeIntAggrEditor::seeIntAggrEditor(
|
||||
const char * name, ButtonState * bs, const char * Sample, int width,
|
||||
const char * singleTermChars
|
||||
) : StringEditor2( bs, Sample, singleTermChars, width ) {
|
||||
SetInstance( name );
|
||||
Init();
|
||||
}
|
||||
|
||||
@@ -342,24 +339,21 @@ inline seeIntAggrEditor::seeIntAggrEditor (
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
inline void seeRealEditor::Init()
|
||||
{
|
||||
SetClassName("seeRealEditor");
|
||||
inline void seeRealEditor::Init() {
|
||||
SetClassName( "seeRealEditor" );
|
||||
}
|
||||
|
||||
inline seeRealEditor::seeRealEditor (
|
||||
ButtonState* bs, const char* Sample, int width, const char *singleTermChars)
|
||||
: RealStringEditorSub(bs, Sample, singleTermChars, width)
|
||||
{
|
||||
inline seeRealEditor::seeRealEditor(
|
||||
ButtonState * bs, const char * Sample, int width, const char * singleTermChars )
|
||||
: RealStringEditorSub( bs, Sample, singleTermChars, width ) {
|
||||
Init();
|
||||
}
|
||||
|
||||
inline seeRealEditor::seeRealEditor (
|
||||
const char* name, ButtonState* bs, const char* Sample, int width,
|
||||
const char *singleTermChars
|
||||
) : RealStringEditorSub(bs, Sample, singleTermChars, width)
|
||||
{
|
||||
SetInstance(name);
|
||||
inline seeRealEditor::seeRealEditor(
|
||||
const char * name, ButtonState * bs, const char * Sample, int width,
|
||||
const char * singleTermChars
|
||||
) : RealStringEditorSub( bs, Sample, singleTermChars, width ) {
|
||||
SetInstance( name );
|
||||
Init();
|
||||
}
|
||||
|
||||
@@ -375,25 +369,22 @@ inline seeRealEditor::seeRealEditor (
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
inline void seeRealAggrEditor::Init()
|
||||
{
|
||||
SetClassName("seeRealAggrEditor");
|
||||
subInfo = new SubordinateInfo(0, this);
|
||||
inline void seeRealAggrEditor::Init() {
|
||||
SetClassName( "seeRealAggrEditor" );
|
||||
subInfo = new SubordinateInfo( 0, this );
|
||||
}
|
||||
|
||||
inline seeRealAggrEditor::seeRealAggrEditor (
|
||||
ButtonState* bs, const char* Sample, int width, const char *singleTermChars
|
||||
) : StringEditor2(bs, Sample, singleTermChars, width)
|
||||
{
|
||||
inline seeRealAggrEditor::seeRealAggrEditor(
|
||||
ButtonState * bs, const char * Sample, int width, const char * singleTermChars
|
||||
) : StringEditor2( bs, Sample, singleTermChars, width ) {
|
||||
Init();
|
||||
}
|
||||
|
||||
inline seeRealAggrEditor::seeRealAggrEditor (
|
||||
const char* name, ButtonState* bs, const char* Sample, int width,
|
||||
const char *singleTermChars
|
||||
) : StringEditor2(bs, Sample, singleTermChars, width)
|
||||
{
|
||||
SetInstance(name);
|
||||
inline seeRealAggrEditor::seeRealAggrEditor(
|
||||
const char * name, ButtonState * bs, const char * Sample, int width,
|
||||
const char * singleTermChars
|
||||
) : StringEditor2( bs, Sample, singleTermChars, width ) {
|
||||
SetInstance( name );
|
||||
Init();
|
||||
}
|
||||
|
||||
@@ -403,25 +394,22 @@ inline seeRealAggrEditor::seeRealAggrEditor (
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
inline void seeEntityEditor::Init()
|
||||
{
|
||||
SetClassName("seeEntityEditor");
|
||||
subInfo = new SubordinateInfo(0, this);
|
||||
inline void seeEntityEditor::Init() {
|
||||
SetClassName( "seeEntityEditor" );
|
||||
subInfo = new SubordinateInfo( 0, this );
|
||||
}
|
||||
|
||||
inline seeEntityEditor::seeEntityEditor (
|
||||
ButtonState* bs, const char* Sample, int width, const char *singleTermChars
|
||||
) : StringEditor2(bs, Sample, singleTermChars, width)
|
||||
{
|
||||
inline seeEntityEditor::seeEntityEditor(
|
||||
ButtonState * bs, const char * Sample, int width, const char * singleTermChars
|
||||
) : StringEditor2( bs, Sample, singleTermChars, width ) {
|
||||
Init();
|
||||
}
|
||||
|
||||
inline seeEntityEditor::seeEntityEditor (
|
||||
const char* name, ButtonState* bs, const char* Sample, int width,
|
||||
const char *singleTermChars
|
||||
) : StringEditor2(bs, Sample, singleTermChars, width)
|
||||
{
|
||||
SetInstance(name);
|
||||
inline seeEntityEditor::seeEntityEditor(
|
||||
const char * name, ButtonState * bs, const char * Sample, int width,
|
||||
const char * singleTermChars
|
||||
) : StringEditor2( bs, Sample, singleTermChars, width ) {
|
||||
SetInstance( name );
|
||||
Init();
|
||||
}
|
||||
|
||||
@@ -431,25 +419,22 @@ inline seeEntityEditor::seeEntityEditor (
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
inline void seeEntAggrEditor::Init()
|
||||
{
|
||||
SetClassName("seeEntAggrEditor");
|
||||
subInfo = new SubordinateInfo(0, this);
|
||||
inline void seeEntAggrEditor::Init() {
|
||||
SetClassName( "seeEntAggrEditor" );
|
||||
subInfo = new SubordinateInfo( 0, this );
|
||||
}
|
||||
|
||||
inline seeEntAggrEditor::seeEntAggrEditor (
|
||||
ButtonState* bs, const char* Sample, int width, const char *singleTermChars
|
||||
) : StringEditor2(bs, Sample, singleTermChars, width)
|
||||
{
|
||||
inline seeEntAggrEditor::seeEntAggrEditor(
|
||||
ButtonState * bs, const char * Sample, int width, const char * singleTermChars
|
||||
) : StringEditor2( bs, Sample, singleTermChars, width ) {
|
||||
Init();
|
||||
}
|
||||
|
||||
inline seeEntAggrEditor::seeEntAggrEditor (
|
||||
const char* name, ButtonState* bs, const char* Sample, int width,
|
||||
const char *singleTermChars
|
||||
) : StringEditor2(bs, Sample, singleTermChars, width)
|
||||
{
|
||||
SetInstance(name);
|
||||
inline seeEntAggrEditor::seeEntAggrEditor(
|
||||
const char * name, ButtonState * bs, const char * Sample, int width,
|
||||
const char * singleTermChars
|
||||
) : StringEditor2( bs, Sample, singleTermChars, width ) {
|
||||
SetInstance( name );
|
||||
Init();
|
||||
}
|
||||
|
||||
|
||||
+77
-85
@@ -45,134 +45,126 @@
|
||||
#define ILD_VSPACE (round(.15*inch))
|
||||
#define ILD_HSPACE (round(.15*inch))
|
||||
|
||||
class seInstListDisplay : public Frame
|
||||
{
|
||||
public:
|
||||
seInstListDisplay();
|
||||
// overrule scene's virtual function to do nothing
|
||||
void Insert(Interactor *) { };
|
||||
class seInstListDisplay : public Frame {
|
||||
public:
|
||||
seInstListDisplay();
|
||||
// overrule scene's virtual function to do nothing
|
||||
void Insert( Interactor * ) { };
|
||||
|
||||
void Update();
|
||||
void Update();
|
||||
|
||||
// operations on the list
|
||||
void Browse();
|
||||
virtual void Insert(const char*, int index);
|
||||
virtual int Append(const char*); // returns the index where appended
|
||||
virtual void Remove(int index);
|
||||
virtual void ReplaceText(const char* s, int index);
|
||||
InstCmdBufDisp *GetInstCmdBuf() { return entityInstanceList; }
|
||||
char* CmdString(int index, char *str, int strSize)
|
||||
{ return entityInstanceList->CmdString(index, str, strSize); }
|
||||
void AdvanceSelection(int index)
|
||||
{ entityInstanceList->AdvanceSelection(index); }
|
||||
void Browse();
|
||||
virtual void Insert( const char *, int index );
|
||||
virtual int Append( const char * ); // returns the index where appended
|
||||
virtual void Remove( int index );
|
||||
virtual void ReplaceText( const char * s, int index );
|
||||
InstCmdBufDisp * GetInstCmdBuf() {
|
||||
return entityInstanceList;
|
||||
}
|
||||
char * CmdString( int index, char * str, int strSize ) {
|
||||
return entityInstanceList->CmdString( index, str, strSize );
|
||||
}
|
||||
void AdvanceSelection( int index ) {
|
||||
entityInstanceList->AdvanceSelection( index );
|
||||
}
|
||||
|
||||
void WriteCmdChar(char ch, int cmdColIndex, int rowIndex)
|
||||
{ entityInstanceList->WriteChar(ch, cmdColIndex, rowIndex); }
|
||||
int Index(const char*);
|
||||
char* String(int);
|
||||
int Count();
|
||||
void Clear();
|
||||
void WriteCmdChar( char ch, int cmdColIndex, int rowIndex ) {
|
||||
entityInstanceList->WriteChar( ch, cmdColIndex, rowIndex );
|
||||
}
|
||||
int Index( const char * );
|
||||
char * String( int );
|
||||
int Count();
|
||||
void Clear();
|
||||
|
||||
void Select(int index);
|
||||
void Unselect(int index);
|
||||
void UnselectAll();
|
||||
int Selection(int selindex = 0);
|
||||
int SelectionIndex(int index);
|
||||
int Selections();
|
||||
boolean Selected(int index);
|
||||
void CheckButtons();
|
||||
void Select( int index );
|
||||
void Unselect( int index );
|
||||
void UnselectAll();
|
||||
int Selection( int selindex = 0 );
|
||||
int SelectionIndex( int index );
|
||||
int Selections();
|
||||
boolean Selected( int index );
|
||||
void CheckButtons();
|
||||
|
||||
private:
|
||||
void CreateButtons();
|
||||
private:
|
||||
void CreateButtons();
|
||||
|
||||
private:
|
||||
private:
|
||||
// MyStringBrowser *entityInstanceList;
|
||||
InstCmdBufDisp *entityInstanceList;
|
||||
ButtonState *entityInstanceListButSt;
|
||||
|
||||
StringEditor2 *searchBuf;
|
||||
ButtonState *searchBufButSt;
|
||||
ButtonState *searchButtonsButSt;
|
||||
MyRadioButton *forwardSearchBut;
|
||||
MyRadioButton *backwardSearchBut;
|
||||
ButtonState *caseButtonButSt;
|
||||
MyCheckBox *caseSearchBut;
|
||||
InstCmdBufDisp * entityInstanceList;
|
||||
ButtonState * entityInstanceListButSt;
|
||||
|
||||
ButtonState *buttonsButSt;
|
||||
StringEditor2 * searchBuf;
|
||||
ButtonState * searchBufButSt;
|
||||
ButtonState * searchButtonsButSt;
|
||||
MyRadioButton * forwardSearchBut;
|
||||
MyRadioButton * backwardSearchBut;
|
||||
ButtonState * caseButtonButSt;
|
||||
MyCheckBox * caseSearchBut;
|
||||
|
||||
MyPushButton *completeBut;
|
||||
MyPushButton *incompleteBut;
|
||||
MyPushButton *replicateBut;
|
||||
ButtonState * buttonsButSt;
|
||||
|
||||
MyPushButton *executeBut;
|
||||
MyPushButton *unmarkBut;
|
||||
MyPushButton *deleteBut;
|
||||
MyPushButton * completeBut;
|
||||
MyPushButton * incompleteBut;
|
||||
MyPushButton * replicateBut;
|
||||
|
||||
MyPushButton *viewBut;
|
||||
MyPushButton *modifyBut;
|
||||
MyPushButton *closeBut;
|
||||
MyPushButton * executeBut;
|
||||
MyPushButton * unmarkBut;
|
||||
MyPushButton * deleteBut;
|
||||
|
||||
MyPushButton * viewBut;
|
||||
MyPushButton * modifyBut;
|
||||
MyPushButton * closeBut;
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
inline void seInstListDisplay::Browse()
|
||||
{
|
||||
inline void seInstListDisplay::Browse() {
|
||||
entityInstanceList->Browse();
|
||||
}
|
||||
|
||||
inline int seInstListDisplay::Index(const char* s)
|
||||
{
|
||||
return entityInstanceList->Index(s);
|
||||
inline int seInstListDisplay::Index( const char * s ) {
|
||||
return entityInstanceList->Index( s );
|
||||
}
|
||||
|
||||
inline char *seInstListDisplay::String(int index)
|
||||
{
|
||||
return entityInstanceList->String(index);
|
||||
inline char * seInstListDisplay::String( int index ) {
|
||||
return entityInstanceList->String( index );
|
||||
}
|
||||
|
||||
inline int seInstListDisplay::Count()
|
||||
{
|
||||
inline int seInstListDisplay::Count() {
|
||||
return entityInstanceList->Count();
|
||||
}
|
||||
|
||||
inline void seInstListDisplay::Clear()
|
||||
{
|
||||
inline void seInstListDisplay::Clear() {
|
||||
entityInstanceList->Clear();
|
||||
}
|
||||
|
||||
inline void seInstListDisplay::Select(int index)
|
||||
{
|
||||
entityInstanceList->Select(index);
|
||||
inline void seInstListDisplay::Select( int index ) {
|
||||
entityInstanceList->Select( index );
|
||||
}
|
||||
|
||||
inline void seInstListDisplay::Unselect(int index)
|
||||
{
|
||||
entityInstanceList->Unselect(index);
|
||||
inline void seInstListDisplay::Unselect( int index ) {
|
||||
entityInstanceList->Unselect( index );
|
||||
}
|
||||
|
||||
inline void seInstListDisplay::UnselectAll()
|
||||
{
|
||||
inline void seInstListDisplay::UnselectAll() {
|
||||
entityInstanceList->UnselectAll();
|
||||
}
|
||||
|
||||
inline int seInstListDisplay::Selection(int selindex)
|
||||
{
|
||||
return entityInstanceList->Selection(selindex);
|
||||
inline int seInstListDisplay::Selection( int selindex ) {
|
||||
return entityInstanceList->Selection( selindex );
|
||||
}
|
||||
|
||||
inline int seInstListDisplay::SelectionIndex(int index)
|
||||
{
|
||||
return entityInstanceList->SelectionIndex(index);
|
||||
inline int seInstListDisplay::SelectionIndex( int index ) {
|
||||
return entityInstanceList->SelectionIndex( index );
|
||||
}
|
||||
|
||||
inline int seInstListDisplay::Selections()
|
||||
{
|
||||
inline int seInstListDisplay::Selections() {
|
||||
return entityInstanceList->Selections();
|
||||
}
|
||||
|
||||
inline boolean seInstListDisplay::Selected(int index)
|
||||
{
|
||||
return entityInstanceList->Selected(index);
|
||||
inline boolean seInstListDisplay::Selected( int index ) {
|
||||
return entityInstanceList->Selected( index );
|
||||
}
|
||||
|
||||
#include <IV-2_6/_leave.h>
|
||||
|
||||
+60
-74
@@ -33,123 +33,109 @@
|
||||
#define TLD_VSPACE (round(.15*inch))
|
||||
#define TLD_HSPACE (round(.15*inch))
|
||||
|
||||
class seTypeListDisplay : public Frame
|
||||
{
|
||||
public:
|
||||
seTypeListDisplay();
|
||||
// overrule scene's virtual function to do nothing
|
||||
void Insert(Interactor *) { };
|
||||
class seTypeListDisplay : public Frame {
|
||||
public:
|
||||
seTypeListDisplay();
|
||||
// overrule scene's virtual function to do nothing
|
||||
void Insert( Interactor * ) { };
|
||||
|
||||
void Update();
|
||||
void Update();
|
||||
|
||||
// operations on the list
|
||||
void Browse();
|
||||
virtual void Insert(const char*, int index);
|
||||
virtual void Append(const char*);
|
||||
virtual void Remove(int index);
|
||||
virtual void ReplaceText(const char* s, int index);
|
||||
void Browse();
|
||||
virtual void Insert( const char *, int index );
|
||||
virtual void Append( const char * );
|
||||
virtual void Remove( int index );
|
||||
virtual void ReplaceText( const char * s, int index );
|
||||
|
||||
void Bold(int index);
|
||||
void Bold( int index );
|
||||
|
||||
int Index(const char*);
|
||||
char* String(int);
|
||||
int Count();
|
||||
void Clear();
|
||||
int Index( const char * );
|
||||
char * String( int );
|
||||
int Count();
|
||||
void Clear();
|
||||
|
||||
void Select(int index);
|
||||
void Unselect(int index);
|
||||
void UnselectAll();
|
||||
int Selection(int selindex = 0);
|
||||
int SelectionIndex(int index);
|
||||
int Selections();
|
||||
boolean Selected(int index);
|
||||
void Select( int index );
|
||||
void Unselect( int index );
|
||||
void UnselectAll();
|
||||
int Selection( int selindex = 0 );
|
||||
int SelectionIndex( int index );
|
||||
int Selections();
|
||||
boolean Selected( int index );
|
||||
|
||||
private:
|
||||
void CreateButtons();
|
||||
private:
|
||||
void CreateButtons();
|
||||
|
||||
private:
|
||||
MyStringBrowser *entityTypeList;
|
||||
ButtonState *entityTypeListButSt;
|
||||
|
||||
StringEditor2 *searchBuf;
|
||||
ButtonState *searchBufButSt;
|
||||
ButtonState *searchButtonsButSt;
|
||||
MyRadioButton *forwardSearchBut;
|
||||
MyRadioButton *backwardSearchBut;
|
||||
ButtonState *caseButtonButSt;
|
||||
MyCheckBox *caseSearchBut;
|
||||
private:
|
||||
MyStringBrowser * entityTypeList;
|
||||
ButtonState * entityTypeListButSt;
|
||||
|
||||
ButtonState *buttonsButSt;
|
||||
StringEditor2 * searchBuf;
|
||||
ButtonState * searchBufButSt;
|
||||
ButtonState * searchButtonsButSt;
|
||||
MyRadioButton * forwardSearchBut;
|
||||
MyRadioButton * backwardSearchBut;
|
||||
ButtonState * caseButtonButSt;
|
||||
MyCheckBox * caseSearchBut;
|
||||
|
||||
MyPushButton *createBut;
|
||||
MyPushButton *infoBut;
|
||||
ButtonState * buttonsButSt;
|
||||
|
||||
MyPushButton * createBut;
|
||||
MyPushButton * infoBut;
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
inline void seTypeListDisplay::Browse()
|
||||
{
|
||||
inline void seTypeListDisplay::Browse() {
|
||||
entityTypeList->Browse();
|
||||
}
|
||||
|
||||
inline void seTypeListDisplay::Bold(int index)
|
||||
{
|
||||
entityTypeList->Bold(index);
|
||||
inline void seTypeListDisplay::Bold( int index ) {
|
||||
entityTypeList->Bold( index );
|
||||
}
|
||||
|
||||
inline int seTypeListDisplay::Index(const char* s)
|
||||
{
|
||||
return entityTypeList->Index(s);
|
||||
inline int seTypeListDisplay::Index( const char * s ) {
|
||||
return entityTypeList->Index( s );
|
||||
}
|
||||
|
||||
inline char *seTypeListDisplay::String(int index)
|
||||
{
|
||||
return entityTypeList->String(index);
|
||||
inline char * seTypeListDisplay::String( int index ) {
|
||||
return entityTypeList->String( index );
|
||||
}
|
||||
|
||||
inline int seTypeListDisplay::Count()
|
||||
{
|
||||
inline int seTypeListDisplay::Count() {
|
||||
return entityTypeList->Count();
|
||||
}
|
||||
|
||||
inline void seTypeListDisplay::Clear()
|
||||
{
|
||||
inline void seTypeListDisplay::Clear() {
|
||||
entityTypeList->Clear();
|
||||
}
|
||||
|
||||
inline void seTypeListDisplay::Select(int index)
|
||||
{
|
||||
entityTypeList->Select(index);
|
||||
inline void seTypeListDisplay::Select( int index ) {
|
||||
entityTypeList->Select( index );
|
||||
}
|
||||
|
||||
inline void seTypeListDisplay::Unselect(int index)
|
||||
{
|
||||
entityTypeList->Unselect(index);
|
||||
inline void seTypeListDisplay::Unselect( int index ) {
|
||||
entityTypeList->Unselect( index );
|
||||
}
|
||||
|
||||
inline void seTypeListDisplay::UnselectAll()
|
||||
{
|
||||
inline void seTypeListDisplay::UnselectAll() {
|
||||
entityTypeList->UnselectAll();
|
||||
}
|
||||
|
||||
inline int seTypeListDisplay::Selection(int selindex)
|
||||
{
|
||||
return entityTypeList->Selection(selindex);
|
||||
inline int seTypeListDisplay::Selection( int selindex ) {
|
||||
return entityTypeList->Selection( selindex );
|
||||
}
|
||||
|
||||
inline int seTypeListDisplay::SelectionIndex(int index)
|
||||
{
|
||||
return entityTypeList->SelectionIndex(index);
|
||||
inline int seTypeListDisplay::SelectionIndex( int index ) {
|
||||
return entityTypeList->SelectionIndex( index );
|
||||
}
|
||||
|
||||
inline int seTypeListDisplay::Selections()
|
||||
{
|
||||
inline int seTypeListDisplay::Selections() {
|
||||
return entityTypeList->Selections();
|
||||
}
|
||||
|
||||
inline boolean seTypeListDisplay::Selected(int index)
|
||||
{
|
||||
return entityTypeList->Selected(index);
|
||||
inline boolean seTypeListDisplay::Selected( int index ) {
|
||||
return entityTypeList->Selected( index );
|
||||
}
|
||||
|
||||
#include <IV-2_6/_leave.h>
|
||||
|
||||
@@ -27,127 +27,141 @@
|
||||
|
||||
#include <IV-2_6/_enter.h>
|
||||
|
||||
class EntityDescriptorBlock : public MonoScene
|
||||
{
|
||||
public:
|
||||
class EntityDescriptorBlock : public MonoScene {
|
||||
public:
|
||||
|
||||
protected:
|
||||
const EntityDescriptor *ed;
|
||||
protected:
|
||||
const EntityDescriptor * ed;
|
||||
|
||||
ButtonState *typeMsg;
|
||||
ButtonState * typeMsg;
|
||||
|
||||
BoldMessage *name;
|
||||
BoldMessage * name;
|
||||
|
||||
ButtonState *attrBS;
|
||||
StringBrowser *attrListBrowser;
|
||||
const AttrDescriptorList *attrList;
|
||||
|
||||
ButtonState *subtypeBS;
|
||||
StringBrowser *subtypeListBrowser;
|
||||
const EntityDescriptorList *subtypeList;
|
||||
ButtonState * attrBS;
|
||||
StringBrowser * attrListBrowser;
|
||||
const AttrDescriptorList * attrList;
|
||||
|
||||
ButtonState *openCloseBS;
|
||||
CheckBox *openCloseBut;
|
||||
int lastCloseVal;
|
||||
ButtonState * subtypeBS;
|
||||
StringBrowser * subtypeListBrowser;
|
||||
const EntityDescriptorList * subtypeList;
|
||||
|
||||
VBox *bodyBox;
|
||||
HBox *attrSubtypeBox;
|
||||
ButtonState * openCloseBS;
|
||||
CheckBox * openCloseBut;
|
||||
int lastCloseVal;
|
||||
|
||||
private:
|
||||
VBox * bodyBox;
|
||||
HBox * attrSubtypeBox;
|
||||
|
||||
public:
|
||||
EntityDescriptorBlock() { }
|
||||
EntityDescriptorBlock (const EntityDescriptor *e,
|
||||
int maxAttrLen = 30, int maxSubtypeLen = 30);
|
||||
EntityDescriptorBlock (const EntityDescriptor *e, ButtonState *typeMessage,
|
||||
int maxAttrLen = 30, int maxSubtypeLen = 30);
|
||||
~EntityDescriptorBlock() { }
|
||||
private:
|
||||
|
||||
const EntityDescriptor *EntityDesc() const { return ed; }
|
||||
public:
|
||||
EntityDescriptorBlock() { }
|
||||
EntityDescriptorBlock( const EntityDescriptor * e,
|
||||
int maxAttrLen = 30, int maxSubtypeLen = 30 );
|
||||
EntityDescriptorBlock( const EntityDescriptor * e, ButtonState * typeMessage,
|
||||
int maxAttrLen = 30, int maxSubtypeLen = 30 );
|
||||
~EntityDescriptorBlock() { }
|
||||
|
||||
const EntityDescriptor * EntityDesc() const {
|
||||
return ed;
|
||||
}
|
||||
// void EntityDesc(EntityDescriptor *e) { ed = e; }
|
||||
|
||||
virtual void Update();
|
||||
virtual void Update();
|
||||
|
||||
protected:
|
||||
protected:
|
||||
|
||||
private:
|
||||
Interactor *Body();
|
||||
void Init (const EntityDescriptor *e, ButtonState *typeMessage,
|
||||
int maxAttrLen = 30, int maxSubtypeLen = 30);
|
||||
private:
|
||||
Interactor * Body();
|
||||
void Init( const EntityDescriptor * e, ButtonState * typeMessage,
|
||||
int maxAttrLen = 30, int maxSubtypeLen = 30 );
|
||||
|
||||
};
|
||||
|
||||
class EntityDescBlockList;
|
||||
|
||||
class EntityDescBlockNode : public SingleLinkNode
|
||||
{
|
||||
friend EntityDescBlockList;
|
||||
|
||||
private:
|
||||
protected:
|
||||
EntityDescriptorBlock * edBlock;
|
||||
public:
|
||||
char *ClassName () { return "EntityDescBlockNode"; }
|
||||
class EntityDescBlockNode : public SingleLinkNode {
|
||||
friend EntityDescBlockList;
|
||||
|
||||
EntityDescriptorBlock *EDBlock() { return edBlock; }
|
||||
void EDBlock(EntityDescriptorBlock *edb) { edBlock = edb; }
|
||||
private:
|
||||
protected:
|
||||
EntityDescriptorBlock * edBlock;
|
||||
public:
|
||||
char * ClassName() {
|
||||
return "EntityDescBlockNode";
|
||||
}
|
||||
|
||||
EntityDescBlockNode() { edBlock = 0; }
|
||||
EntityDescBlockNode(EntityDescriptorBlock *edb) { edBlock = edb; }
|
||||
~EntityDescBlockNode() { }
|
||||
EntityDescriptorBlock * EDBlock() {
|
||||
return edBlock;
|
||||
}
|
||||
void EDBlock( EntityDescriptorBlock * edb ) {
|
||||
edBlock = edb;
|
||||
}
|
||||
|
||||
EntityDescBlockNode() {
|
||||
edBlock = 0;
|
||||
}
|
||||
EntityDescBlockNode( EntityDescriptorBlock * edb ) {
|
||||
edBlock = edb;
|
||||
}
|
||||
~EntityDescBlockNode() { }
|
||||
};
|
||||
|
||||
class EntityDescBlockList : public SingleLinkList
|
||||
{
|
||||
private:
|
||||
protected:
|
||||
public:
|
||||
EntityDescBlockList() { }
|
||||
~EntityDescBlockList() { }
|
||||
char *ClassName () { return "EntityDescBlockList"; }
|
||||
class EntityDescBlockList : public SingleLinkList {
|
||||
private:
|
||||
protected:
|
||||
public:
|
||||
EntityDescBlockList() { }
|
||||
~EntityDescBlockList() { }
|
||||
char * ClassName() {
|
||||
return "EntityDescBlockList";
|
||||
}
|
||||
|
||||
virtual SingleLinkNode * NewNode () { return new EntityDescBlockNode; }
|
||||
EntityDescBlockNode * PrependNode (EntityDescriptorBlock * edb);
|
||||
void PrependNode (EntityDescBlockNode * node)
|
||||
{
|
||||
if (head) {
|
||||
node->next = head;
|
||||
head = node;
|
||||
}
|
||||
else head = tail = node;
|
||||
}
|
||||
virtual SingleLinkNode * NewNode() {
|
||||
return new EntityDescBlockNode;
|
||||
}
|
||||
EntityDescBlockNode * PrependNode( EntityDescriptorBlock * edb );
|
||||
void PrependNode( EntityDescBlockNode * node ) {
|
||||
if( head ) {
|
||||
node->next = head;
|
||||
head = node;
|
||||
} else {
|
||||
head = tail = node;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
class StepEntityDescriptor : public VBox
|
||||
{
|
||||
private:
|
||||
class StepEntityDescriptor : public VBox {
|
||||
private:
|
||||
|
||||
protected:
|
||||
EntityDescBlockList *edbList;
|
||||
PushButton *close;
|
||||
ButtonState *closeBS;
|
||||
const EntityDescriptor *entDesc;
|
||||
protected:
|
||||
EntityDescBlockList * edbList;
|
||||
PushButton * close;
|
||||
ButtonState * closeBS;
|
||||
const EntityDescriptor * entDesc;
|
||||
|
||||
StringDisplay *strDisp;
|
||||
ButtonState *strDispBS;
|
||||
StringDisplay * strDisp;
|
||||
ButtonState * strDispBS;
|
||||
|
||||
public:
|
||||
StepEntityDescriptor(const EntityDescriptor *ed);
|
||||
~StepEntityDescriptor() { }
|
||||
|
||||
const EntityDescriptor * EntityDesc() { return entDesc; }
|
||||
public:
|
||||
StepEntityDescriptor( const EntityDescriptor * ed );
|
||||
~StepEntityDescriptor() { }
|
||||
|
||||
void Insert(EntityDescriptorBlock *edb);
|
||||
void Insert(Interactor *i);
|
||||
virtual void Update();
|
||||
const EntityDescriptor * EntityDesc() {
|
||||
return entDesc;
|
||||
}
|
||||
|
||||
char *LongestAttrInBlock (const EntityDescriptor *entity);
|
||||
char *FindLongestAttribute ();
|
||||
void Insert( EntityDescriptorBlock * edb );
|
||||
void Insert( Interactor * i );
|
||||
virtual void Update();
|
||||
|
||||
char *LongestSubtNameInBlock (const EntityDescriptor *entity);
|
||||
char *FindLongestSubtName ();
|
||||
char * LongestAttrInBlock( const EntityDescriptor * entity );
|
||||
char * FindLongestAttribute();
|
||||
|
||||
boolean IsMapped ();
|
||||
char * LongestSubtNameInBlock( const EntityDescriptor * entity );
|
||||
char * FindLongestSubtName();
|
||||
|
||||
boolean IsMapped();
|
||||
|
||||
};
|
||||
|
||||
|
||||
+312
-252
@@ -13,7 +13,7 @@
|
||||
|
||||
/* $Id: stepenteditor.h,v 3.0.1.1 1997/11/05 23:01:12 sauderd DP3.1 $ */
|
||||
|
||||
#include <ctype.h> // to get iscntrl()
|
||||
#include <ctype.h> // to get iscntrl()
|
||||
|
||||
#include <instmgr.h>
|
||||
// #include <schema.h>
|
||||
@@ -27,7 +27,7 @@
|
||||
#include <label.h>
|
||||
|
||||
#include <mybutton.h>
|
||||
#include <streditor2sub.h> // "~sauderd/src/iv/hfiles/streditor2sub.h"
|
||||
#include <streditor2sub.h> // "~sauderd/src/iv/hfiles/streditor2sub.h"
|
||||
|
||||
#include <seedefines.h>
|
||||
#include <mymessage.h>
|
||||
@@ -40,333 +40,393 @@ class MyButtonState;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// This is a horizontal box object that represents a STEPattribute in a
|
||||
// This is a horizontal box object that represents a STEPattribute in a
|
||||
// STEPentity (a row in the StepEntityEditor's (SEE's) list of STEPattributes)
|
||||
// It's a Horizontal box containing a myLabel (attr name), StringEditor
|
||||
// It's a Horizontal box containing a myLabel (attr name), StringEditor
|
||||
// (editable attribute field), and another myLabel (attr type).
|
||||
// Note that these rows correspond to STEPattributes for a STEPentity;
|
||||
// it does not mean that when the values are changed the STEPentity's
|
||||
// it does not mean that when the values are changed the STEPentity's
|
||||
// STEPattribute values are changed. The value for the attribute in
|
||||
// this object can be saved complete, saved incomplete, or aborted by the
|
||||
// StepEntityEditor.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class seeAttrRow : public HBox
|
||||
{
|
||||
public:
|
||||
seeAttrRow(STEPattribute * sAttr, InstMgr *im, ButtonState *b,
|
||||
int nameWidth, int editWidth, int typeWidth);
|
||||
virtual ~seeAttrRow();
|
||||
class seeAttrRow : public HBox {
|
||||
public:
|
||||
seeAttrRow( STEPattribute * sAttr, InstMgr * im, ButtonState * b,
|
||||
int nameWidth, int editWidth, int typeWidth );
|
||||
virtual ~seeAttrRow();
|
||||
|
||||
const char * GetAttrName();
|
||||
const char * GetAttrTypeName();
|
||||
BASE_TYPE GetType();
|
||||
// return aName with brackets around it if attribute is optional
|
||||
char * IndicateOptionality(const char *aName);
|
||||
enum Severity Validate(InstMgr *instMgr, int setMark = 1,
|
||||
enum Severity setMarkAtSev = SEVERITY_INCOMPLETE);
|
||||
enum Severity SaveAttr(InstMgr *instMgr,
|
||||
enum Severity setMarkAtSev = SEVERITY_INCOMPLETE);
|
||||
void UndoChanges();
|
||||
const char * GetAttrName();
|
||||
const char * GetAttrTypeName();
|
||||
BASE_TYPE GetType();
|
||||
// return aName with brackets around it if attribute is optional
|
||||
char * IndicateOptionality( const char * aName );
|
||||
enum Severity Validate( InstMgr * instMgr, int setMark = 1,
|
||||
enum Severity setMarkAtSev = SEVERITY_INCOMPLETE );
|
||||
enum Severity SaveAttr( InstMgr * instMgr,
|
||||
enum Severity setMarkAtSev = SEVERITY_INCOMPLETE );
|
||||
void UndoChanges();
|
||||
|
||||
char *StrAttrAssignVal(const char *s);
|
||||
char *StrEditorVal(std::string &s);
|
||||
char * StrAttrAssignVal( const char * s );
|
||||
char * StrEditorVal( std::string & s );
|
||||
|
||||
// return private class members
|
||||
STEPattribute *StepAttr() { return stepAttr; }
|
||||
MyMessage *StatusMarker() { return statusMarker; }
|
||||
myLabel *NameField() { return nameField; };
|
||||
StringEditor2 *EditField() { return editField; };
|
||||
myLabel *TypeField() { return typeField; };
|
||||
ButtonState *ButtonSt() { return butSt; };
|
||||
seeAttrRow *Next() { return next; };
|
||||
seeAttrRow *Previous() { return previous; };
|
||||
// return private class members
|
||||
STEPattribute * StepAttr() {
|
||||
return stepAttr;
|
||||
}
|
||||
MyMessage * StatusMarker() {
|
||||
return statusMarker;
|
||||
}
|
||||
myLabel * NameField() {
|
||||
return nameField;
|
||||
};
|
||||
StringEditor2 * EditField() {
|
||||
return editField;
|
||||
};
|
||||
myLabel * TypeField() {
|
||||
return typeField;
|
||||
};
|
||||
ButtonState * ButtonSt() {
|
||||
return butSt;
|
||||
};
|
||||
seeAttrRow * Next() {
|
||||
return next;
|
||||
};
|
||||
seeAttrRow * Previous() {
|
||||
return previous;
|
||||
};
|
||||
|
||||
// get or set the text in the editable field
|
||||
const char *GetEditFieldText() { return editField->Text(); };
|
||||
void SetEditFieldText(const char *str) { editField->Message(str); };
|
||||
// get or set the text in the editable field
|
||||
const char * GetEditFieldText() {
|
||||
return editField->Text();
|
||||
};
|
||||
void SetEditFieldText( const char * str ) {
|
||||
editField->Message( str );
|
||||
};
|
||||
|
||||
// initiate an edit for the attribute editable field and get
|
||||
// or set the terminating char for an edit
|
||||
void Edit() { butSt->SetValue(0); editField->NewEdit();};
|
||||
int GetTerminatingChar() { int v; butSt->GetValue(v); return (v); };
|
||||
void SetTerminatingChar(int v) { butSt->SetValue(v); };
|
||||
// initiate an edit for the attribute editable field and get
|
||||
// or set the terminating char for an edit
|
||||
void Edit() {
|
||||
butSt->SetValue( 0 );
|
||||
editField->NewEdit();
|
||||
};
|
||||
int GetTerminatingChar() {
|
||||
int v;
|
||||
butSt->GetValue( v );
|
||||
return ( v );
|
||||
};
|
||||
void SetTerminatingChar( int v ) {
|
||||
butSt->SetValue( v );
|
||||
};
|
||||
|
||||
boolean IsMapped ();
|
||||
boolean IsMapped();
|
||||
|
||||
private:
|
||||
friend class seeAttrRowList;
|
||||
private:
|
||||
friend class seeAttrRowList;
|
||||
|
||||
// StringDisplay *statusMarker; // a marker for indicating invalid data, etc.
|
||||
MyMessage *statusMarker; // a marker for indicating invalid data, etc.
|
||||
myLabel *nameField; // label for STEPattribute name
|
||||
StringEditor2 *editField; // editable (Step attribute) field
|
||||
myLabel *typeField; // label for STEPattribute type
|
||||
ButtonState *butSt; // set by editField to char terminating edit
|
||||
MyMessage * statusMarker; // a marker for indicating invalid data, etc.
|
||||
myLabel * nameField; // label for STEPattribute name
|
||||
StringEditor2 * editField; // editable (Step attribute) field
|
||||
myLabel * typeField; // label for STEPattribute type
|
||||
ButtonState * butSt; // set by editField to char terminating edit
|
||||
|
||||
seeAttrRow *next; // next row in SEE's list of STEPattributes
|
||||
seeAttrRow *previous; // previous row in SEE's list of STEPattributes
|
||||
STEPattribute *stepAttr; // STEPattribute represented by this row
|
||||
seeAttrRow * next; // next row in SEE's list of STEPattributes
|
||||
seeAttrRow * previous; // previous row in SEE's list of STEPattributes
|
||||
STEPattribute * stepAttr; // STEPattribute represented by this row
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// This is a list of seeAttrRow's (i.e. a list of editable STEPattribute's)
|
||||
// in the order returned by STEPentity's NextAttribute() for a single
|
||||
// in the order returned by STEPentity's NextAttribute() for a single
|
||||
// STEPentity. It has the idea of a current row to indicate, for instance,
|
||||
// where the previous edit was done or where the current edit is being done.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class seeAttrRowList
|
||||
{
|
||||
public:
|
||||
seeAttrRowList();
|
||||
virtual ~seeAttrRowList();
|
||||
class seeAttrRowList {
|
||||
public:
|
||||
seeAttrRowList();
|
||||
virtual ~seeAttrRowList();
|
||||
|
||||
// access members in the list.
|
||||
seeAttrRow *Head() { return head; };
|
||||
seeAttrRow *LastRow() { return (head ? (head->Previous()) : nil); };
|
||||
seeAttrRow *CurRow() { return currentRow; };
|
||||
seeAttrRow *NextRow(); // following current row
|
||||
seeAttrRow *PreviousRow(); // preceding current row
|
||||
// access members in the list.
|
||||
seeAttrRow * Head() {
|
||||
return head;
|
||||
};
|
||||
seeAttrRow * LastRow() {
|
||||
return ( head ? ( head->Previous() ) : nil );
|
||||
};
|
||||
seeAttrRow * CurRow() {
|
||||
return currentRow;
|
||||
};
|
||||
seeAttrRow * NextRow(); // following current row
|
||||
seeAttrRow * PreviousRow(); // preceding current row
|
||||
|
||||
// set the current row in the list by index, returns index or 0 (error)
|
||||
int SetCurRow(int index);
|
||||
// set the current row in the list to existingRow,
|
||||
// returns the row object -- does not check if existingRow is in list.
|
||||
seeAttrRow *SetCurRow(seeAttrRow *existingRow);
|
||||
// set the current row in the list by index, returns index or 0 (error)
|
||||
int SetCurRow( int index );
|
||||
// set the current row in the list to existingRow,
|
||||
// returns the row object -- does not check if existingRow is in list.
|
||||
seeAttrRow * SetCurRow( seeAttrRow * existingRow );
|
||||
|
||||
// return the number of members (rows) in the list
|
||||
int RowCount() { return rowCount; };
|
||||
// return the number of members (rows) in the list
|
||||
int RowCount() {
|
||||
return rowCount;
|
||||
};
|
||||
|
||||
// Find() returns the index in the list (found) if found
|
||||
// otherwise zero (not found)
|
||||
int Find(seeAttrRow *r);
|
||||
// returns the row object containing the editable attribute field
|
||||
seeAttrRow *FindEditField(Interactor *targetStrEd);
|
||||
// Find() returns the index in the list (found) if found
|
||||
// otherwise zero (not found)
|
||||
int Find( seeAttrRow * r );
|
||||
// returns the row object containing the editable attribute field
|
||||
seeAttrRow * FindEditField( Interactor * targetStrEd );
|
||||
|
||||
// Append() and Insert() add a row object to the end of the list.
|
||||
void Append(seeAttrRow *newRow) { InsertAfter(newRow, LastRow()); };
|
||||
void Insert(seeAttrRow *newRow) { InsertAfter(newRow, LastRow()); };
|
||||
// insert a row object into the list before or after existingRow.
|
||||
// returns the index of the new object in the list or zero (error)
|
||||
int InsertAfter(seeAttrRow *newRow, seeAttrRow *existingRow);
|
||||
int InsertBefore(seeAttrRow *newRow, seeAttrRow *existingRow);
|
||||
/*
|
||||
int InsertAfter(seeAttrRow *newRow, seeAttrRow *existingRow = LastRow());
|
||||
int InsertBefore(seeAttrRow *newRow, seeAttrRow *existingRow = Head());
|
||||
// Append() and Insert() add a row object to the end of the list.
|
||||
void Append( seeAttrRow * newRow ) {
|
||||
InsertAfter( newRow, LastRow() );
|
||||
};
|
||||
void Insert( seeAttrRow * newRow ) {
|
||||
InsertAfter( newRow, LastRow() );
|
||||
};
|
||||
// insert a row object into the list before or after existingRow.
|
||||
// returns the index of the new object in the list or zero (error)
|
||||
int InsertAfter( seeAttrRow * newRow, seeAttrRow * existingRow );
|
||||
int InsertBefore( seeAttrRow * newRow, seeAttrRow * existingRow );
|
||||
/*
|
||||
int InsertAfter(seeAttrRow *newRow, seeAttrRow *existingRow = LastRow());
|
||||
int InsertBefore(seeAttrRow *newRow, seeAttrRow *existingRow = Head());
|
||||
|
||||
int InsertAfter(seeAttrRow *newRow,
|
||||
seeAttrRow *existingRow = (head ? (head->previous) : nil) );
|
||||
int InsertBefore(seeAttrRow *newRow, seeAttrRow *existingRow = head);
|
||||
*/
|
||||
// causes the editable attribute fields in the list to ignore events.
|
||||
void ComponentsIgnore();
|
||||
void ComponentsListen();
|
||||
private:
|
||||
seeAttrRow *head;
|
||||
seeAttrRow *currentRow;
|
||||
int rowCount; // number of objects (rows/attributes) in the list
|
||||
int InsertAfter(seeAttrRow *newRow,
|
||||
seeAttrRow *existingRow = (head ? (head->previous) : nil) );
|
||||
int InsertBefore(seeAttrRow *newRow, seeAttrRow *existingRow = head);
|
||||
*/
|
||||
// causes the editable attribute fields in the list to ignore events.
|
||||
void ComponentsIgnore();
|
||||
void ComponentsListen();
|
||||
private:
|
||||
seeAttrRow * head;
|
||||
seeAttrRow * currentRow;
|
||||
int rowCount; // number of objects (rows/attributes) in the list
|
||||
};
|
||||
|
||||
inline seeAttrRow *seeAttrRowList::PreviousRow()
|
||||
{ return (currentRow ? (currentRow->Previous()) : nil); };
|
||||
inline seeAttrRow * seeAttrRowList::PreviousRow() {
|
||||
return ( currentRow ? ( currentRow->Previous() ) : nil );
|
||||
};
|
||||
|
||||
inline seeAttrRow *seeAttrRowList::NextRow()
|
||||
{ return (currentRow ? (currentRow->Next()) : nil); };
|
||||
inline seeAttrRow * seeAttrRowList::NextRow() {
|
||||
return ( currentRow ? ( currentRow->Next() ) : nil );
|
||||
};
|
||||
|
||||
inline seeAttrRow *seeAttrRowList::SetCurRow(seeAttrRow *row)
|
||||
{ if(currentRow){
|
||||
currentRow->NameField()->Highlight(false);
|
||||
currentRow->TypeField()->Highlight(false);
|
||||
currentRow = row;
|
||||
currentRow->NameField()->Highlight(true);
|
||||
currentRow->TypeField()->Highlight(true);
|
||||
return (currentRow);
|
||||
} else return 0;
|
||||
};
|
||||
inline seeAttrRow * seeAttrRowList::SetCurRow( seeAttrRow * row ) {
|
||||
if( currentRow ) {
|
||||
currentRow->NameField()->Highlight( false );
|
||||
currentRow->TypeField()->Highlight( false );
|
||||
currentRow = row;
|
||||
currentRow->NameField()->Highlight( true );
|
||||
currentRow->TypeField()->Highlight( true );
|
||||
return ( currentRow );
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// This is a vertical box object that represents a STEPentity. The vertical
|
||||
// box has inserted (in order top to bottom) the following objects :
|
||||
// 1) STEPentity name
|
||||
// 2) step file id
|
||||
// 3) label field for this instance of STEPentity
|
||||
// 4) a seeAttrRow for each attribute in a STEPentity in the
|
||||
// order returned by STEPentity::NextAttribute().
|
||||
// these objects are accessed through attrRowList (a list
|
||||
// of seeAttrRows)
|
||||
// 5) a button for saving completed modifications
|
||||
// 6) a button for saving incompleted modifications
|
||||
// 7) a button for aborting modifications
|
||||
// box has inserted (in order top to bottom) the following objects :
|
||||
// 1) STEPentity name
|
||||
// 2) step file id
|
||||
// 3) label field for this instance of STEPentity
|
||||
// 4) a seeAttrRow for each attribute in a STEPentity in the
|
||||
// order returned by STEPentity::NextAttribute().
|
||||
// these objects are accessed through attrRowList (a list
|
||||
// of seeAttrRows)
|
||||
// 5) a button for saving completed modifications
|
||||
// 6) a button for saving incompleted modifications
|
||||
// 7) a button for aborting modifications
|
||||
//
|
||||
// Note that this corresponds to a STEPentity; it does not mean that
|
||||
// when it's attribute values are changed the STEPentity's values are
|
||||
// Note that this corresponds to a STEPentity; it does not mean that
|
||||
// when it's attribute values are changed the STEPentity's values are
|
||||
// changed. The modified values for the attributes in this object can
|
||||
// be saved complete, saved incomplete, or aborted by the StepEntityEditor.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class StepEntityEditor : public VBox
|
||||
{
|
||||
public:
|
||||
StepEntityEditor(MgrNode *mn, InstMgr *im, int pinBool = 1,
|
||||
int modifyBool = 1);
|
||||
StepEntityEditor(STEPentity *se, int pinBool = 1,
|
||||
int modifyBool = 1);
|
||||
virtual ~StepEntityEditor();
|
||||
class StepEntityEditor : public VBox {
|
||||
public:
|
||||
StepEntityEditor( MgrNode * mn, InstMgr * im, int pinBool = 1,
|
||||
int modifyBool = 1 );
|
||||
StepEntityEditor( STEPentity * se, int pinBool = 1,
|
||||
int modifyBool = 1 );
|
||||
virtual ~StepEntityEditor();
|
||||
|
||||
boolean IsMapped ();
|
||||
|
||||
virtual void Handle(Event& e); // handle down events to grab focus
|
||||
// initiate editing starting at currentRow (attribute) in attrRowList
|
||||
virtual int Edit();
|
||||
// append a seeAttrRow (HBox representing an attribute) to end of
|
||||
// seeAttrRowList and insert seeAttrRow into end of StepEntityEditor
|
||||
// (VBox representing a STEPentity)
|
||||
void NotifyUser(const char *msg, int numBellRings = 1);
|
||||
boolean IsMapped();
|
||||
|
||||
void SetAttrTypeMessage(seeAttrRow *row);
|
||||
enum Severity ValidateAttr(seeAttrRow *row,
|
||||
enum Severity setMarkAtSev = SEVERITY_INCOMPLETE,
|
||||
int notifyUser = 1);
|
||||
enum Severity Validate();
|
||||
boolean SaveComplete();
|
||||
boolean SaveIncomplete();
|
||||
void UndoChanges();
|
||||
virtual void Handle( Event & e ); // handle down events to grab focus
|
||||
// initiate editing starting at currentRow (attribute) in attrRowList
|
||||
virtual int Edit();
|
||||
// append a seeAttrRow (HBox representing an attribute) to end of
|
||||
// seeAttrRowList and insert seeAttrRow into end of StepEntityEditor
|
||||
// (VBox representing a STEPentity)
|
||||
void NotifyUser( const char * msg, int numBellRings = 1 );
|
||||
|
||||
void Insert(STEPattribute *attr, int nameWidth, int editWidth, int typeWidth);
|
||||
void SetAttrTypeMessage( seeAttrRow * row );
|
||||
enum Severity ValidateAttr( seeAttrRow * row,
|
||||
enum Severity setMarkAtSev = SEVERITY_INCOMPLETE,
|
||||
int notifyUser = 1 );
|
||||
enum Severity Validate();
|
||||
boolean SaveComplete();
|
||||
boolean SaveIncomplete();
|
||||
void UndoChanges();
|
||||
|
||||
void Insert( STEPattribute * attr, int nameWidth, int editWidth, int typeWidth );
|
||||
//DAS seeAttrRowList *AttrRowList() { return attrRowList; };
|
||||
seeAttrRowList *&AttrRowList() { return attrRowList; };
|
||||
seeAttrRowList * & AttrRowList() {
|
||||
return attrRowList;
|
||||
};
|
||||
|
||||
int Pinned();
|
||||
void SetPinned(int pinnedBool = 1);
|
||||
virtual void ComponentsIgnore();
|
||||
virtual void ComponentsListen();
|
||||
virtual void PressButton(int butCode);
|
||||
virtual void DisableSave() { saveCompleteBut->Disable();
|
||||
saveIncompleteBut->Disable(); };
|
||||
virtual void EnableSave() { saveCompleteBut->Enable();
|
||||
saveIncompleteBut->Enable(); };
|
||||
int Pinned();
|
||||
void SetPinned( int pinnedBool = 1 );
|
||||
virtual void ComponentsIgnore();
|
||||
virtual void ComponentsListen();
|
||||
virtual void PressButton( int butCode );
|
||||
virtual void DisableSave() {
|
||||
saveCompleteBut->Disable();
|
||||
saveIncompleteBut->Disable();
|
||||
};
|
||||
virtual void EnableSave() {
|
||||
saveCompleteBut->Enable();
|
||||
saveIncompleteBut->Enable();
|
||||
};
|
||||
// int GetTerminatingChar() { int v; editorsButSt->GetValue(v); return (v);};
|
||||
// Called when a subject (buttonsButSt or editorsButSt) is set to
|
||||
// a NEW value. StepEntityEditor is 'Subject::Attach()ed' to the
|
||||
// two subjects except during the scope of StepEntityEditor::Edit()
|
||||
// when it is 'Subject::Detach()ed'. This means that it's called
|
||||
// when (inside a SEE) a button is pushed or an attribute field is
|
||||
// changed (and terminated by a terminating char) outside of
|
||||
// the scope of StepEntityEditor::Edit(). It does the appropriate
|
||||
// action associated with the button or the term char for an attribute
|
||||
// edit.
|
||||
void Update();
|
||||
ButtonState *GetButtonState() { return buttonsButSt; };
|
||||
STEPentity *GetStepEntity() { return stepEnt; };
|
||||
MgrNode *GetMgrNode() { return mgrNode; };
|
||||
// Called when a subject (buttonsButSt or editorsButSt) is set to
|
||||
// a NEW value. StepEntityEditor is 'Subject::Attach()ed' to the
|
||||
// two subjects except during the scope of StepEntityEditor::Edit()
|
||||
// when it is 'Subject::Detach()ed'. This means that it's called
|
||||
// when (inside a SEE) a button is pushed or an attribute field is
|
||||
// changed (and terminated by a terminating char) outside of
|
||||
// the scope of StepEntityEditor::Edit(). It does the appropriate
|
||||
// action associated with the button or the term char for an attribute
|
||||
// edit.
|
||||
void Update();
|
||||
ButtonState * GetButtonState() {
|
||||
return buttonsButSt;
|
||||
};
|
||||
STEPentity * GetStepEntity() {
|
||||
return stepEnt;
|
||||
};
|
||||
MgrNode * GetMgrNode() {
|
||||
return mgrNode;
|
||||
};
|
||||
|
||||
void SetProbe(Probe *p) { dp = p; }
|
||||
Probe *GetProbe() { return dp;}
|
||||
void SetProbe( Probe * p ) {
|
||||
dp = p;
|
||||
}
|
||||
Probe * GetProbe() {
|
||||
return dp;
|
||||
}
|
||||
|
||||
void SetInstMgr(InstMgr *im) { instMgr = im; }
|
||||
InstMgr *GetInstMgr() { return instMgr;}
|
||||
void SetInstMgr( InstMgr * im ) {
|
||||
instMgr = im;
|
||||
}
|
||||
InstMgr * GetInstMgr() {
|
||||
return instMgr;
|
||||
}
|
||||
|
||||
protected:
|
||||
StepEntityEditor() { }
|
||||
protected:
|
||||
StepEntityEditor() { }
|
||||
|
||||
void EditRows();
|
||||
void EditRows();
|
||||
|
||||
virtual void CreateHeading();
|
||||
virtual void CreateButtonsAndStates(int modifyBool = 1, int pinBool = 1);
|
||||
virtual void InsertButtons();
|
||||
void CreateInsertAttributeEditors();
|
||||
// checks editorsButSt & assigns new currentRow (in attrRowList)
|
||||
// being edited based on terminating char of edit
|
||||
virtual int ExecuteTermChar();
|
||||
virtual void CreateHeading();
|
||||
virtual void CreateButtonsAndStates( int modifyBool = 1, int pinBool = 1 );
|
||||
virtual void InsertButtons();
|
||||
void CreateInsertAttributeEditors();
|
||||
// checks editorsButSt & assigns new currentRow (in attrRowList)
|
||||
// being edited based on terminating char of edit
|
||||
virtual int ExecuteTermChar();
|
||||
// int AssignCurRow();
|
||||
// checks buttonsButSt & does appropriate action if a button was pushed
|
||||
int CheckButtons();
|
||||
virtual int ExecuteCommand(int v);
|
||||
// checks buttonsButSt & does appropriate action if a button was pushed
|
||||
int CheckButtons();
|
||||
virtual int ExecuteCommand( int v );
|
||||
|
||||
protected:
|
||||
// list of contained seeAttrRow's (HBox's) representing attributes
|
||||
seeAttrRowList *attrRowList; // members set editorsButSt
|
||||
protected:
|
||||
// list of contained seeAttrRow's (HBox's) representing attributes
|
||||
seeAttrRowList * attrRowList; // members set editorsButSt
|
||||
|
||||
MyButtonState *editorsButSt; // subject set by editable attr fields
|
||||
ButtonState *buttonsButSt; // subject set by save & abort buttons
|
||||
MyPushButton *saveCompleteBut; // sets buttonsButSt
|
||||
MyPushButton *saveIncompleteBut; // sets buttonsButSt
|
||||
MyPushButton *cancelBut; // sets buttonsButSt
|
||||
MyPushButton *deleteBut; // sets buttonsButSt
|
||||
MyButtonState * editorsButSt; // subject set by editable attr fields
|
||||
ButtonState * buttonsButSt; // subject set by save & abort buttons
|
||||
MyPushButton * saveCompleteBut; // sets buttonsButSt
|
||||
MyPushButton * saveIncompleteBut; // sets buttonsButSt
|
||||
MyPushButton * cancelBut; // sets buttonsButSt
|
||||
MyPushButton * deleteBut; // sets buttonsButSt
|
||||
|
||||
MyPushButton *replicateBut; // sets buttonsButSt
|
||||
MyPushButton *editBut; // sets buttonsButSt
|
||||
MyPushButton *markBut; // sets buttonsButSt
|
||||
MyPushButton *listBut; // sets buttonsButSt
|
||||
MyPushButton * replicateBut; // sets buttonsButSt
|
||||
MyPushButton * editBut; // sets buttonsButSt
|
||||
MyPushButton * markBut; // sets buttonsButSt
|
||||
MyPushButton * listBut; // sets buttonsButSt
|
||||
|
||||
MyPushButton *sedBut; // sets buttonsButSt
|
||||
MyPushButton *attrInfoBut; // sets buttonsButSt
|
||||
MyPushButton * sedBut; // sets buttonsButSt
|
||||
MyPushButton * attrInfoBut; // sets buttonsButSt
|
||||
|
||||
int modifyTogVal; // used to remember the previous modify/view state
|
||||
ButtonState *modifyTogButSt; // subject set by modifyTogBut
|
||||
ModifyViewCheckBox *modifyTogBut; // toggle modify/view of window
|
||||
int modifyTogVal; // used to remember the previous modify/view state
|
||||
ButtonState * modifyTogButSt; // subject set by modifyTogBut
|
||||
ModifyViewCheckBox * modifyTogBut; // toggle modify/view of window
|
||||
|
||||
ButtonState *pinTogButSt; // subject set by pinTogBut
|
||||
PinCheckBox *pinTogBut; // toggle pin(stay mapped)/unmap with
|
||||
// save, cancel, and delete buttons
|
||||
Probe *dp;
|
||||
InstMgr *instMgr;
|
||||
MgrNode *mgrNode; // MgrNode containing stepEnt
|
||||
STEPentity *stepEnt; // represented STEPentity
|
||||
StringEditor2Sub *label; // label field associated with this STEPentity
|
||||
StringDisplay *messageDisp;
|
||||
ButtonState *dispButSt;
|
||||
ButtonState * pinTogButSt; // subject set by pinTogBut
|
||||
PinCheckBox * pinTogBut; // toggle pin(stay mapped)/unmap with
|
||||
// save, cancel, and delete buttons
|
||||
Probe * dp;
|
||||
InstMgr * instMgr;
|
||||
MgrNode * mgrNode; // MgrNode containing stepEnt
|
||||
STEPentity * stepEnt; // represented STEPentity
|
||||
StringEditor2Sub * label; // label field associated with this STEPentity
|
||||
StringDisplay * messageDisp;
|
||||
ButtonState * dispButSt;
|
||||
};
|
||||
|
||||
inline int StepEntityEditor::Pinned()
|
||||
{
|
||||
inline int StepEntityEditor::Pinned() {
|
||||
int v;
|
||||
pinTogButSt->GetValue(v);
|
||||
return (v == SEE_PIN);
|
||||
pinTogButSt->GetValue( v );
|
||||
return ( v == SEE_PIN );
|
||||
}
|
||||
|
||||
inline void StepEntityEditor::SetPinned(int pinnedBool)
|
||||
{
|
||||
if(pinnedBool)
|
||||
pinTogButSt->SetValue(SEE_PIN);
|
||||
else
|
||||
pinTogButSt->SetValue(SEE_NOT_PIN);
|
||||
inline void StepEntityEditor::SetPinned( int pinnedBool ) {
|
||||
if( pinnedBool ) {
|
||||
pinTogButSt->SetValue( SEE_PIN );
|
||||
} else {
|
||||
pinTogButSt->SetValue( SEE_NOT_PIN );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class HeaderEntityEditor : public StepEntityEditor
|
||||
{
|
||||
public:
|
||||
HeaderEntityEditor(MgrNode *mn, InstMgr *im, int pinBool = 1,
|
||||
int modifyBool = 1);
|
||||
virtual ~HeaderEntityEditor();
|
||||
class HeaderEntityEditor : public StepEntityEditor {
|
||||
public:
|
||||
HeaderEntityEditor( MgrNode * mn, InstMgr * im, int pinBool = 1,
|
||||
int modifyBool = 1 );
|
||||
virtual ~HeaderEntityEditor();
|
||||
|
||||
void ComponentsIgnore();
|
||||
void ComponentsListen();
|
||||
void PressButton(int butCode);
|
||||
// Called when a subject (buttonsButSt or editorsButSt) is set to
|
||||
// a NEW value. StepEntityEditor is 'Subject::Attach()ed' to the
|
||||
// two subjects except during the scope of StepEntityEditor::Edit()
|
||||
// when it is 'Subject::Detach()ed'. This means that it's called
|
||||
// when (inside a SEE) a button is pushed or an attribute field is
|
||||
// changed (and terminated by a terminating char) outside of
|
||||
// the scope of StepEntityEditor::Edit(). It does the appropriate
|
||||
// action associated with the button or the term char for an attribute
|
||||
// edit.
|
||||
void Update();
|
||||
void ComponentsIgnore();
|
||||
void ComponentsListen();
|
||||
void PressButton( int butCode );
|
||||
// Called when a subject (buttonsButSt or editorsButSt) is set to
|
||||
// a NEW value. StepEntityEditor is 'Subject::Attach()ed' to the
|
||||
// two subjects except during the scope of StepEntityEditor::Edit()
|
||||
// when it is 'Subject::Detach()ed'. This means that it's called
|
||||
// when (inside a SEE) a button is pushed or an attribute field is
|
||||
// changed (and terminated by a terminating char) outside of
|
||||
// the scope of StepEntityEditor::Edit(). It does the appropriate
|
||||
// action associated with the button or the term char for an attribute
|
||||
// edit.
|
||||
void Update();
|
||||
|
||||
protected:
|
||||
void CreateHeading();
|
||||
void CreateButtonsAndStates(int modifyBool = 1, int pinBool = 1);
|
||||
void InsertButtons();
|
||||
// checks buttonsButSt & does appropriate action if a button was pushed
|
||||
int ExecuteCommand(int v);
|
||||
protected:
|
||||
void CreateHeading();
|
||||
void CreateButtonsAndStates( int modifyBool = 1, int pinBool = 1 );
|
||||
void InsertButtons();
|
||||
// checks buttonsButSt & does appropriate action if a button was pushed
|
||||
int ExecuteCommand( int v );
|
||||
};
|
||||
|
||||
#include <IV-2_6/_leave.h>
|
||||
|
||||
+1201
-910
File diff suppressed because it is too large
Load Diff
@@ -17,9 +17,9 @@ Dictionary_instance::~Dictionary_instance() {
|
||||
|
||||
|
||||
Schema::Schema( const char * schemaName )
|
||||
: _use_interface_list( new Interface_spec__set ),
|
||||
_ref_interface_list( new Interface_spec__set ),
|
||||
_function_list( 0 ), _procedure_list( 0 ), _global_rules( 0 ) {
|
||||
: _use_interface_list( new Interface_spec__set ),
|
||||
_ref_interface_list( new Interface_spec__set ),
|
||||
_function_list( 0 ), _procedure_list( 0 ), _global_rules( 0 ) {
|
||||
_name = schemaName;
|
||||
}
|
||||
|
||||
@@ -351,8 +351,8 @@ char * SchRename::rename( const char * schnm, char * newnm ) const {
|
||||
AttrDescriptor::AttrDescriptor( const char * name, const TypeDescriptor * domainType,
|
||||
Logical optional, Logical unique, AttrType_Enum at,
|
||||
const EntityDescriptor & owner )
|
||||
: _name( name ), _domainType( domainType ), _optional( optional ),
|
||||
_unique( unique ), _attrType( at ), _owner( ( EntityDescriptor & )owner ) {
|
||||
: _name( name ), _domainType( domainType ), _optional( optional ),
|
||||
_unique( unique ), _attrType( at ), _owner( ( EntityDescriptor & )owner ) {
|
||||
}
|
||||
|
||||
AttrDescriptor::~AttrDescriptor() {
|
||||
@@ -391,7 +391,7 @@ Logical AttrDescriptor::Deriving() const {
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Derived_attribute::Derived_attribute( const char * name, const TypeDescriptor * domainType,
|
||||
Logical optional, Logical unique, AttrType_Enum at, const EntityDescriptor & owner )
|
||||
Logical optional, Logical unique, AttrType_Enum at, const EntityDescriptor & owner )
|
||||
: AttrDescriptor( name, domainType, optional, unique, at, owner ) {
|
||||
_initializer = ( const char * )0;
|
||||
}
|
||||
|
||||
+51
-45
@@ -22,62 +22,68 @@
|
||||
typedef struct Hash_Table * HashTable;
|
||||
|
||||
class Registry;
|
||||
typedef void (* CF_init) (Registry &); // pointer to creation initialization
|
||||
typedef void ( * CF_init )( Registry & ); // pointer to creation initialization
|
||||
|
||||
class SCL_CORE_EXPORT Registry {
|
||||
protected:
|
||||
HashTable primordialSwamp; // dictionary of EntityDescriptors
|
||||
HashTable active_schemas; // dictionary of Schemas
|
||||
HashTable active_types; // dictionary of TypeDescriptors
|
||||
ComplexCollect *col; // struct containing all complex entity info
|
||||
|
||||
int entity_cnt,
|
||||
all_ents_cnt;
|
||||
HashEntry cur_entity;
|
||||
HashEntry cur_schema;
|
||||
HashEntry cur_type;
|
||||
protected:
|
||||
HashTable primordialSwamp; // dictionary of EntityDescriptors
|
||||
HashTable active_schemas; // dictionary of Schemas
|
||||
HashTable active_types; // dictionary of TypeDescriptors
|
||||
ComplexCollect * col; // struct containing all complex entity info
|
||||
|
||||
// used by AddEntity() and RemoveEntity() to deal with renamings of an
|
||||
// entity done in a USE or REFERENCE clause - see header comments in
|
||||
// file Registry.inline.cc
|
||||
void AddClones (const EntityDescriptor &);
|
||||
void RemoveClones (const EntityDescriptor &);
|
||||
int entity_cnt,
|
||||
all_ents_cnt;
|
||||
HashEntry cur_entity;
|
||||
HashEntry cur_schema;
|
||||
HashEntry cur_type;
|
||||
|
||||
public:
|
||||
Registry (CF_init initFunct);
|
||||
~Registry ();
|
||||
void DeleteContents (); // CAUTION: calls delete on all the descriptors
|
||||
// used by AddEntity() and RemoveEntity() to deal with renamings of an
|
||||
// entity done in a USE or REFERENCE clause - see header comments in
|
||||
// file Registry.inline.cc
|
||||
void AddClones( const EntityDescriptor & );
|
||||
void RemoveClones( const EntityDescriptor & );
|
||||
|
||||
const EntityDescriptor* FindEntity (const char *, const char * =0,
|
||||
int check_case =0) const;
|
||||
const Schema* FindSchema (const char *, int check_case =0) const;
|
||||
const TypeDescriptor* FindType (const char *, int check_case =0) const;
|
||||
|
||||
void AddEntity (const EntityDescriptor&);
|
||||
void AddSchema (const Schema&);
|
||||
void AddType (const TypeDescriptor&);
|
||||
|
||||
void RemoveEntity (const char *);
|
||||
void RemoveSchema (const char *);
|
||||
void RemoveType (const char *);
|
||||
public:
|
||||
Registry( CF_init initFunct );
|
||||
~Registry();
|
||||
void DeleteContents(); // CAUTION: calls delete on all the descriptors
|
||||
|
||||
int GetEntityCnt ();
|
||||
int GetFullEntCnt () { return all_ents_cnt; }
|
||||
const EntityDescriptor * FindEntity( const char *, const char * = 0,
|
||||
int check_case = 0 ) const;
|
||||
const Schema * FindSchema( const char *, int check_case = 0 ) const;
|
||||
const TypeDescriptor * FindType( const char *, int check_case = 0 ) const;
|
||||
|
||||
void ResetEntities ();
|
||||
const EntityDescriptor * NextEntity ();
|
||||
void AddEntity( const EntityDescriptor & );
|
||||
void AddSchema( const Schema & );
|
||||
void AddType( const TypeDescriptor & );
|
||||
|
||||
void ResetSchemas ();
|
||||
const Schema * NextSchema ();
|
||||
void RemoveEntity( const char * );
|
||||
void RemoveSchema( const char * );
|
||||
void RemoveType( const char * );
|
||||
|
||||
void ResetTypes ();
|
||||
const TypeDescriptor * NextType ();
|
||||
int GetEntityCnt();
|
||||
int GetFullEntCnt() {
|
||||
return all_ents_cnt;
|
||||
}
|
||||
|
||||
const ComplexCollect *CompCol() { return col; }
|
||||
void SetCompCollect( ComplexCollect *c ) { col = c; }
|
||||
void ResetEntities();
|
||||
const EntityDescriptor * NextEntity();
|
||||
|
||||
SDAI_Application_instance* ObjCreate (const char * nm, const char * =0,
|
||||
int check_case =0) const;
|
||||
void ResetSchemas();
|
||||
const Schema * NextSchema();
|
||||
|
||||
void ResetTypes();
|
||||
const TypeDescriptor * NextType();
|
||||
|
||||
const ComplexCollect * CompCol() {
|
||||
return col;
|
||||
}
|
||||
void SetCompCollect( ComplexCollect * c ) {
|
||||
col = c;
|
||||
}
|
||||
|
||||
SDAI_Application_instance * ObjCreate( const char * nm, const char * = 0,
|
||||
int check_case = 0 ) const;
|
||||
};
|
||||
|
||||
#endif /* _REGISTRY_H */
|
||||
|
||||
@@ -99,8 +99,7 @@ void Registry::DeleteContents() {
|
||||
* entity A from schema Y and renames it to B, X should only refer to A as
|
||||
* B. Thus, if schNm here = "X", only e="B" would be valid but not e="A".
|
||||
*/
|
||||
const EntityDescriptor * Registry::FindEntity( const char * e, const char * schNm, int check_case ) const
|
||||
{
|
||||
const EntityDescriptor * Registry::FindEntity( const char * e, const char * schNm, int check_case ) const {
|
||||
const EntityDescriptor * entd;
|
||||
const SchRename * altlist;
|
||||
char schformat[BUFSIZ], altName[BUFSIZ];
|
||||
@@ -191,8 +190,7 @@ void Registry::AddType( const TypeDescriptor & d ) {
|
||||
* so that if we comes across one of them in a Part 21 file, we'll recog-
|
||||
* nize it.
|
||||
*/
|
||||
void Registry::AddClones( const EntityDescriptor & e )
|
||||
{
|
||||
void Registry::AddClones( const EntityDescriptor & e ) {
|
||||
const SchRename * alts = e.AltNameList();
|
||||
|
||||
while( alts ) {
|
||||
@@ -209,8 +207,7 @@ void Registry::AddClones( const EntityDescriptor & e )
|
||||
* does the same (or if C simply uses yy from B), altlist will contain 2
|
||||
* entries with the same alt name.
|
||||
*/
|
||||
static int uniqueNames( const char * entnm, const SchRename * altlist )
|
||||
{
|
||||
static int uniqueNames( const char * entnm, const SchRename * altlist ) {
|
||||
int cnt = 0;
|
||||
const SchRename * alt = altlist;
|
||||
|
||||
@@ -259,8 +256,7 @@ void Registry::RemoveType( const char * n ) {
|
||||
/**
|
||||
* Remove all the "clones", or rename values of e.
|
||||
*/
|
||||
void Registry::RemoveClones( const EntityDescriptor & e )
|
||||
{
|
||||
void Registry::RemoveClones( const EntityDescriptor & e ) {
|
||||
const SchRename * alts = e.AltNameList();
|
||||
struct Element * tmp;
|
||||
|
||||
@@ -276,7 +272,7 @@ void Registry::RemoveClones( const EntityDescriptor & e )
|
||||
SDAI_Application_instance * Registry::ObjCreate( const char * nm, const char * schnm, int check_case ) const {
|
||||
const EntityDescriptor * entd = FindEntity( nm, schnm, check_case );
|
||||
if( entd ) {
|
||||
SDAI_Application_instance *se =
|
||||
SDAI_Application_instance * se =
|
||||
( ( EntityDescriptor * )entd ) -> NewSTEPentity();
|
||||
|
||||
// See comment in previous function.
|
||||
|
||||
@@ -50,9 +50,9 @@ STEPaggregate & STEPaggregate::ShallowCopy( const STEPaggregate & a ) {
|
||||
|
||||
/// do not require exchange file format
|
||||
Severity STEPaggregate::AggrValidLevel( const char * value, ErrorDescriptor * err,
|
||||
const TypeDescriptor * elem_type, InstMgr * insts,
|
||||
int optional, char * tokenList, int addFileId,
|
||||
int clearError ) {
|
||||
const TypeDescriptor * elem_type, InstMgr * insts,
|
||||
int optional, char * tokenList, int addFileId,
|
||||
int clearError ) {
|
||||
std::string buf;
|
||||
if( clearError ) {
|
||||
err->ClearErrorMsg();
|
||||
@@ -70,9 +70,9 @@ Severity STEPaggregate::AggrValidLevel( const char * value, ErrorDescriptor * er
|
||||
|
||||
/// require exchange file format
|
||||
Severity STEPaggregate::AggrValidLevel( istream & in, ErrorDescriptor * err,
|
||||
const TypeDescriptor * elem_type, InstMgr * insts,
|
||||
int optional, char * tokenList, int addFileId,
|
||||
int clearError ) {
|
||||
const TypeDescriptor * elem_type, InstMgr * insts,
|
||||
int optional, char * tokenList, int addFileId,
|
||||
int clearError ) {
|
||||
std::string buf;
|
||||
if( clearError ) {
|
||||
err->ClearErrorMsg();
|
||||
@@ -89,9 +89,9 @@ Severity STEPaggregate::AggrValidLevel( istream & in, ErrorDescriptor * err,
|
||||
/// if exchangeFileFormat == 1 then paren delims are required.
|
||||
|
||||
Severity STEPaggregate::ReadValue( istream & in, ErrorDescriptor * err,
|
||||
const TypeDescriptor * elem_type, InstMgr * insts,
|
||||
int addFileId, int assignVal, int exchangeFileFormat,
|
||||
const char * ) {
|
||||
const TypeDescriptor * elem_type, InstMgr * insts,
|
||||
int addFileId, int assignVal, int exchangeFileFormat,
|
||||
const char * ) {
|
||||
ErrorDescriptor errdesc;
|
||||
char errmsg[BUFSIZ];
|
||||
int value_cnt = 0;
|
||||
@@ -192,8 +192,8 @@ Severity STEPaggregate::ReadValue( istream & in, ErrorDescriptor * err,
|
||||
}
|
||||
|
||||
Severity STEPaggregate::StrToVal( const char * s, ErrorDescriptor * err,
|
||||
const TypeDescriptor * elem_type, InstMgr * insts,
|
||||
int addFileId ) {
|
||||
const TypeDescriptor * elem_type, InstMgr * insts,
|
||||
int addFileId ) {
|
||||
istringstream in( ( char * )s );
|
||||
return ReadValue( in, err, elem_type, insts, addFileId, 1, 0 );
|
||||
}
|
||||
@@ -201,8 +201,8 @@ Severity STEPaggregate::StrToVal( const char * s, ErrorDescriptor * err,
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Severity STEPaggregate::STEPread( istream & in, ErrorDescriptor * err,
|
||||
const TypeDescriptor * elem_type, InstMgr * insts,
|
||||
int addFileId, const char * currSch ) {
|
||||
const TypeDescriptor * elem_type, InstMgr * insts,
|
||||
int addFileId, const char * currSch ) {
|
||||
return ReadValue( in, err, elem_type, insts, addFileId, 1, 1, currSch );
|
||||
}
|
||||
|
||||
@@ -456,9 +456,9 @@ EntityAggregate::~EntityAggregate() {
|
||||
|
||||
/// if exchangeFileFormat == 1 then delims are required.
|
||||
Severity EntityAggregate::ReadValue( istream & in, ErrorDescriptor * err,
|
||||
const TypeDescriptor * elem_type, InstMgr * insts,
|
||||
int addFileId, int assignVal,
|
||||
int exchangeFileFormat, const char * ) {
|
||||
const TypeDescriptor * elem_type, InstMgr * insts,
|
||||
int addFileId, int assignVal,
|
||||
int exchangeFileFormat, const char * ) {
|
||||
ErrorDescriptor errdesc;
|
||||
char errmsg[BUFSIZ];
|
||||
int value_cnt = 0;
|
||||
@@ -597,10 +597,10 @@ SingleLinkNode * EntityNode::NewNode() {
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Severity EntityNode::StrToVal( const char * s, ErrorDescriptor * err,
|
||||
const TypeDescriptor * elem_type,
|
||||
InstMgr * insts, int addFileId ) {
|
||||
SDAI_Application_instance *se = ReadEntityRef( s, err, ",)", insts,
|
||||
addFileId );
|
||||
const TypeDescriptor * elem_type,
|
||||
InstMgr * insts, int addFileId ) {
|
||||
SDAI_Application_instance * se = ReadEntityRef( s, err, ",)", insts,
|
||||
addFileId );
|
||||
if( se != S_ENTITY_NULL ) {
|
||||
ErrorDescriptor error;
|
||||
if( EntityValidLevel( se, elem_type, &error ) == SEVERITY_NULL ) {
|
||||
@@ -618,23 +618,23 @@ Severity EntityNode::StrToVal( const char * s, ErrorDescriptor * err,
|
||||
}
|
||||
|
||||
Severity EntityNode::StrToVal( istream & in, ErrorDescriptor * err,
|
||||
const TypeDescriptor * elem_type,
|
||||
InstMgr * insts, int addFileId ) {
|
||||
const TypeDescriptor * elem_type,
|
||||
InstMgr * insts, int addFileId ) {
|
||||
return STEPread( in, err, elem_type, insts, addFileId );
|
||||
}
|
||||
|
||||
Severity EntityNode::STEPread( const char * s, ErrorDescriptor * err,
|
||||
const TypeDescriptor * elem_type,
|
||||
InstMgr * insts, int addFileId ) {
|
||||
const TypeDescriptor * elem_type,
|
||||
InstMgr * insts, int addFileId ) {
|
||||
istringstream in( ( char * )s );
|
||||
return STEPread( in, err, elem_type, insts, addFileId );
|
||||
}
|
||||
|
||||
Severity EntityNode::STEPread( istream & in, ErrorDescriptor * err,
|
||||
const TypeDescriptor * elem_type,
|
||||
InstMgr * insts, int addFileId ) {
|
||||
SDAI_Application_instance *se = ReadEntityRef( in, err, ",)", insts,
|
||||
addFileId );
|
||||
const TypeDescriptor * elem_type,
|
||||
InstMgr * insts, int addFileId ) {
|
||||
SDAI_Application_instance * se = ReadEntityRef( in, err, ",)", insts,
|
||||
addFileId );
|
||||
if( se != S_ENTITY_NULL ) {
|
||||
ErrorDescriptor error;
|
||||
if( EntityValidLevel( se, elem_type, &error ) == SEVERITY_NULL ) {
|
||||
@@ -694,9 +694,9 @@ SelectAggregate::~SelectAggregate() {
|
||||
|
||||
/// if exchangeFileFormat == 1 then delims are required.
|
||||
Severity SelectAggregate::ReadValue( istream & in, ErrorDescriptor * err,
|
||||
const TypeDescriptor * elem_type, InstMgr * insts,
|
||||
int addFileId, int assignVal,
|
||||
int exchangeFileFormat, const char * currSch ) {
|
||||
const TypeDescriptor * elem_type, InstMgr * insts,
|
||||
int addFileId, int assignVal,
|
||||
int exchangeFileFormat, const char * currSch ) {
|
||||
ErrorDescriptor errdesc;
|
||||
char errmsg[BUFSIZ];
|
||||
int value_cnt = 0;
|
||||
@@ -836,8 +836,8 @@ SingleLinkNode * SelectNode::NewNode() {
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Severity SelectNode::StrToVal( const char * s, ErrorDescriptor * err,
|
||||
const TypeDescriptor * elem_type,
|
||||
InstMgr * insts, int addFileId ) {
|
||||
const TypeDescriptor * elem_type,
|
||||
InstMgr * insts, int addFileId ) {
|
||||
istringstream in( ( char * )s );
|
||||
if( err->severity( node->STEPread( in, err, insts ) ) != SEVERITY_NULL ) {
|
||||
err->AppendToDetailMsg( node ->Error() );
|
||||
@@ -846,21 +846,21 @@ Severity SelectNode::StrToVal( const char * s, ErrorDescriptor * err,
|
||||
}
|
||||
|
||||
Severity SelectNode::StrToVal( istream & in, ErrorDescriptor * err,
|
||||
const TypeDescriptor * elem_type,
|
||||
InstMgr * insts, int addFileId, const char * currSch ) {
|
||||
const TypeDescriptor * elem_type,
|
||||
InstMgr * insts, int addFileId, const char * currSch ) {
|
||||
return STEPread( in, err, elem_type, insts, addFileId, currSch );
|
||||
}
|
||||
|
||||
Severity SelectNode::STEPread( const char * s, ErrorDescriptor * err,
|
||||
const TypeDescriptor * elem_type,
|
||||
InstMgr * insts, int addFileId ) {
|
||||
const TypeDescriptor * elem_type,
|
||||
InstMgr * insts, int addFileId ) {
|
||||
istringstream in( ( char * )s );
|
||||
return STEPread( in, err, elem_type, insts, addFileId );
|
||||
}
|
||||
|
||||
Severity SelectNode::STEPread( istream & in, ErrorDescriptor * err,
|
||||
const TypeDescriptor * elem_type,
|
||||
InstMgr * insts, int addFileId, const char * currSch ) {
|
||||
const TypeDescriptor * elem_type,
|
||||
InstMgr * insts, int addFileId, const char * currSch ) {
|
||||
if( !node ) {
|
||||
cerr << "Internal error: " << __FILE__ << ": " << __LINE__ << "\n"
|
||||
<< _POC_ "\n";
|
||||
|
||||
+297
-300
@@ -36,53 +36,54 @@ typedef STEPaggregate * STEPaggregateH;
|
||||
typedef STEPaggregate * STEPaggregate_ptr;
|
||||
typedef STEPaggregate_ptr STEPaggregate_var;
|
||||
|
||||
class SCL_CORE_EXPORT STEPaggregate : public SingleLinkList
|
||||
{
|
||||
protected:
|
||||
int _null;
|
||||
class SCL_CORE_EXPORT STEPaggregate : public SingleLinkList {
|
||||
protected:
|
||||
int _null;
|
||||
|
||||
protected:
|
||||
protected:
|
||||
|
||||
virtual Severity ReadValue(istream &in, ErrorDescriptor *err,
|
||||
const TypeDescriptor *elem_type,
|
||||
InstMgr *insts, int addFileId =0,
|
||||
int assignVal =1, int ExchangeFileFormat =1,
|
||||
const char *currSch =0);
|
||||
public:
|
||||
virtual Severity ReadValue( istream & in, ErrorDescriptor * err,
|
||||
const TypeDescriptor * elem_type,
|
||||
InstMgr * insts, int addFileId = 0,
|
||||
int assignVal = 1, int ExchangeFileFormat = 1,
|
||||
const char * currSch = 0 );
|
||||
public:
|
||||
|
||||
int is_null() { return _null; }
|
||||
int is_null() {
|
||||
return _null;
|
||||
}
|
||||
|
||||
virtual Severity AggrValidLevel(const char *value, ErrorDescriptor *err,
|
||||
const TypeDescriptor *elem_type, InstMgr *insts,
|
||||
int optional, char *tokenList, int addFileId =0,
|
||||
int clearError =0);
|
||||
virtual Severity AggrValidLevel( const char * value, ErrorDescriptor * err,
|
||||
const TypeDescriptor * elem_type, InstMgr * insts,
|
||||
int optional, char * tokenList, int addFileId = 0,
|
||||
int clearError = 0 );
|
||||
|
||||
virtual Severity AggrValidLevel(istream &in, ErrorDescriptor *err,
|
||||
const TypeDescriptor *elem_type, InstMgr *insts,
|
||||
int optional, char *tokenList, int addFileId =0,
|
||||
int clearError =0);
|
||||
virtual Severity AggrValidLevel( istream & in, ErrorDescriptor * err,
|
||||
const TypeDescriptor * elem_type, InstMgr * insts,
|
||||
int optional, char * tokenList, int addFileId = 0,
|
||||
int clearError = 0 );
|
||||
|
||||
// INPUT
|
||||
virtual Severity StrToVal(const char *s, ErrorDescriptor *err =0,
|
||||
const TypeDescriptor *elem_type =0,
|
||||
InstMgr *insts =0, int addFileId = 0);
|
||||
virtual Severity STEPread (istream& in, ErrorDescriptor *err,
|
||||
const TypeDescriptor *elem_type =0,
|
||||
InstMgr *insts =0, int addFileId =0,
|
||||
const char *currSch =0);
|
||||
virtual Severity StrToVal( const char * s, ErrorDescriptor * err = 0,
|
||||
const TypeDescriptor * elem_type = 0,
|
||||
InstMgr * insts = 0, int addFileId = 0 );
|
||||
virtual Severity STEPread( istream & in, ErrorDescriptor * err,
|
||||
const TypeDescriptor * elem_type = 0,
|
||||
InstMgr * insts = 0, int addFileId = 0,
|
||||
const char * currSch = 0 );
|
||||
// OUTPUT
|
||||
virtual const char *asStr(std::string& s) const;
|
||||
virtual void STEPwrite (ostream& out =cout, const char * =0) const;
|
||||
virtual const char * asStr( std::string & s ) const;
|
||||
virtual void STEPwrite( ostream & out = cout, const char * = 0 ) const;
|
||||
|
||||
virtual SingleLinkNode * NewNode ();
|
||||
void AddNode (SingleLinkNode *);
|
||||
void Empty ();
|
||||
virtual SingleLinkNode * NewNode();
|
||||
void AddNode( SingleLinkNode * );
|
||||
void Empty();
|
||||
|
||||
STEPaggregate ();
|
||||
virtual ~STEPaggregate ();
|
||||
STEPaggregate();
|
||||
virtual ~STEPaggregate();
|
||||
|
||||
// COPY - defined in subtypes
|
||||
virtual STEPaggregate& ShallowCopy (const STEPaggregate&);
|
||||
virtual STEPaggregate & ShallowCopy( const STEPaggregate & );
|
||||
};
|
||||
|
||||
/****************************************************************//**
|
||||
@@ -90,14 +91,13 @@ class SCL_CORE_EXPORT STEPaggregate : public SingleLinkList
|
||||
** This class supports LIST OF:
|
||||
** SELECT_TYPE, BINARY_TYPE, GENERIC_TYPE, ENUM_TYPE, UNKNOWN_TYPE type
|
||||
******************************************************************/
|
||||
class SCL_CORE_EXPORT GenericAggregate : public STEPaggregate
|
||||
{
|
||||
public:
|
||||
virtual SingleLinkNode *NewNode();
|
||||
virtual STEPaggregate& ShallowCopy (const STEPaggregate&);
|
||||
class SCL_CORE_EXPORT GenericAggregate : public STEPaggregate {
|
||||
public:
|
||||
virtual SingleLinkNode * NewNode();
|
||||
virtual STEPaggregate & ShallowCopy( const STEPaggregate & );
|
||||
|
||||
GenericAggregate();
|
||||
virtual ~GenericAggregate();
|
||||
GenericAggregate();
|
||||
virtual ~GenericAggregate();
|
||||
};
|
||||
typedef GenericAggregate * GenericAggregateH;
|
||||
typedef GenericAggregate * GenericAggregate_ptr;
|
||||
@@ -107,20 +107,19 @@ typedef GenericAggregate_ptr GenericAggregate_var;
|
||||
**
|
||||
*****************************************************************************/
|
||||
|
||||
class SCL_CORE_EXPORT EntityAggregate : public STEPaggregate
|
||||
{
|
||||
public:
|
||||
virtual Severity ReadValue(istream &in, ErrorDescriptor *err,
|
||||
const TypeDescriptor *elem_type,
|
||||
InstMgr *insts, int addFileId =0,
|
||||
int assignVal =1, int ExchangeFileFormat =1,
|
||||
const char *currSch =0);
|
||||
class SCL_CORE_EXPORT EntityAggregate : public STEPaggregate {
|
||||
public:
|
||||
virtual Severity ReadValue( istream & in, ErrorDescriptor * err,
|
||||
const TypeDescriptor * elem_type,
|
||||
InstMgr * insts, int addFileId = 0,
|
||||
int assignVal = 1, int ExchangeFileFormat = 1,
|
||||
const char * currSch = 0 );
|
||||
|
||||
virtual SingleLinkNode *NewNode();
|
||||
virtual STEPaggregate& ShallowCopy (const STEPaggregate&);
|
||||
virtual SingleLinkNode * NewNode();
|
||||
virtual STEPaggregate & ShallowCopy( const STEPaggregate & );
|
||||
|
||||
EntityAggregate ();
|
||||
virtual ~EntityAggregate ();
|
||||
EntityAggregate();
|
||||
virtual ~EntityAggregate();
|
||||
};
|
||||
typedef EntityAggregate * EntityAggregateH;
|
||||
typedef EntityAggregate * EntityAggregate_ptr;
|
||||
@@ -130,37 +129,35 @@ typedef EntityAggregate_ptr EntityAggregate_var;
|
||||
** \class SelectAggregate
|
||||
** This is a minimal represention for a collection of SDAI_Select
|
||||
******************************************************************/
|
||||
class SCL_CORE_EXPORT SelectAggregate : public STEPaggregate
|
||||
{
|
||||
public:
|
||||
virtual Severity ReadValue(istream &in, ErrorDescriptor *err,
|
||||
const TypeDescriptor *elem_type,
|
||||
InstMgr *insts, int addFileId =0,
|
||||
int assignVal =1, int ExchangeFileFormat =1,
|
||||
const char *currSch =0);
|
||||
class SCL_CORE_EXPORT SelectAggregate : public STEPaggregate {
|
||||
public:
|
||||
virtual Severity ReadValue( istream & in, ErrorDescriptor * err,
|
||||
const TypeDescriptor * elem_type,
|
||||
InstMgr * insts, int addFileId = 0,
|
||||
int assignVal = 1, int ExchangeFileFormat = 1,
|
||||
const char * currSch = 0 );
|
||||
|
||||
virtual SingleLinkNode *NewNode ();
|
||||
virtual STEPaggregate& ShallowCopy (const STEPaggregate&);
|
||||
virtual SingleLinkNode * NewNode();
|
||||
virtual STEPaggregate & ShallowCopy( const STEPaggregate & );
|
||||
|
||||
SelectAggregate ();
|
||||
virtual ~SelectAggregate ();
|
||||
SelectAggregate();
|
||||
virtual ~SelectAggregate();
|
||||
};
|
||||
typedef SelectAggregate * SelectAggregateH;
|
||||
typedef SelectAggregate * SelectAggregate_ptr;
|
||||
typedef SelectAggregate * SelectAggregateH;
|
||||
typedef SelectAggregate * SelectAggregate_ptr;
|
||||
typedef SelectAggregate_ptr SelectAggregate_var;
|
||||
|
||||
/****************************************************************//**
|
||||
** \class StringAggregate
|
||||
** This class supports LIST OF STRING type
|
||||
******************************************************************/
|
||||
class SCL_CORE_EXPORT StringAggregate : public STEPaggregate
|
||||
{
|
||||
public:
|
||||
virtual SingleLinkNode *NewNode();
|
||||
virtual STEPaggregate& ShallowCopy (const STEPaggregate&);
|
||||
class SCL_CORE_EXPORT StringAggregate : public STEPaggregate {
|
||||
public:
|
||||
virtual SingleLinkNode * NewNode();
|
||||
virtual STEPaggregate & ShallowCopy( const STEPaggregate & );
|
||||
|
||||
StringAggregate();
|
||||
virtual ~StringAggregate();
|
||||
StringAggregate();
|
||||
virtual ~StringAggregate();
|
||||
};
|
||||
typedef StringAggregate * StringAggregateH;
|
||||
typedef StringAggregate * StringAggregate_ptr;
|
||||
@@ -171,14 +168,13 @@ typedef StringAggregate_ptr StringAggregate_var;
|
||||
** \class BinaryAggregate
|
||||
** This class supports LIST OF BINARY type
|
||||
******************************************************************/
|
||||
class SCL_CORE_EXPORT BinaryAggregate : public STEPaggregate
|
||||
{
|
||||
public:
|
||||
virtual SingleLinkNode *NewNode();
|
||||
virtual STEPaggregate& ShallowCopy (const STEPaggregate&);
|
||||
class SCL_CORE_EXPORT BinaryAggregate : public STEPaggregate {
|
||||
public:
|
||||
virtual SingleLinkNode * NewNode();
|
||||
virtual STEPaggregate & ShallowCopy( const STEPaggregate & );
|
||||
|
||||
BinaryAggregate();
|
||||
virtual ~BinaryAggregate();
|
||||
BinaryAggregate();
|
||||
virtual ~BinaryAggregate();
|
||||
|
||||
};
|
||||
typedef BinaryAggregate * BinaryAggregateH;
|
||||
@@ -189,180 +185,181 @@ typedef BinaryAggregate_ptr BinaryAggregate_var;
|
||||
** \class EnumAggregate
|
||||
** This is a minimal representions for a collection ofSDAI_Enum
|
||||
******************************************************************/
|
||||
class SCL_CORE_EXPORT EnumAggregate : public STEPaggregate
|
||||
{
|
||||
public:
|
||||
virtual SingleLinkNode *NewNode ();
|
||||
virtual STEPaggregate& ShallowCopy (const STEPaggregate&);
|
||||
class SCL_CORE_EXPORT EnumAggregate : public STEPaggregate {
|
||||
public:
|
||||
virtual SingleLinkNode * NewNode();
|
||||
virtual STEPaggregate & ShallowCopy( const STEPaggregate & );
|
||||
|
||||
EnumAggregate ();
|
||||
virtual ~EnumAggregate ();
|
||||
EnumAggregate();
|
||||
virtual ~EnumAggregate();
|
||||
};
|
||||
typedef EnumAggregate * EnumAggregateH;
|
||||
typedef EnumAggregate * EnumAggregate_ptr;
|
||||
typedef EnumAggregate * EnumAggregateH;
|
||||
typedef EnumAggregate * EnumAggregate_ptr;
|
||||
typedef EnumAggregate_ptr EnumAggregate_var;
|
||||
|
||||
class SCL_CORE_EXPORT LOGICALS : public EnumAggregate
|
||||
{
|
||||
public:
|
||||
virtual SingleLinkNode * NewNode ();
|
||||
class SCL_CORE_EXPORT LOGICALS : public EnumAggregate {
|
||||
public:
|
||||
virtual SingleLinkNode * NewNode();
|
||||
|
||||
LOGICALS();
|
||||
virtual ~LOGICALS();
|
||||
LOGICALS();
|
||||
virtual ~LOGICALS();
|
||||
};
|
||||
typedef LOGICALS * LogicalsH;
|
||||
typedef LOGICALS * LOGICALS_ptr;
|
||||
typedef LOGICALS * LogicalsH;
|
||||
typedef LOGICALS * LOGICALS_ptr;
|
||||
typedef LOGICALS_ptr LOGICALS_var;
|
||||
SCL_CORE_EXPORT LOGICALS * create_LOGICALS();
|
||||
|
||||
|
||||
class SCL_CORE_EXPORT BOOLEANS : public EnumAggregate
|
||||
{
|
||||
public:
|
||||
virtual SingleLinkNode * NewNode ();
|
||||
class SCL_CORE_EXPORT BOOLEANS : public EnumAggregate {
|
||||
public:
|
||||
virtual SingleLinkNode * NewNode();
|
||||
|
||||
BOOLEANS();
|
||||
virtual ~BOOLEANS();
|
||||
BOOLEANS();
|
||||
virtual ~BOOLEANS();
|
||||
};
|
||||
|
||||
typedef BOOLEANS * BOOLEANS_ptr;
|
||||
typedef BOOLEANS * BOOLEANS_ptr;
|
||||
typedef BOOLEANS_ptr BOOLEANS_var;
|
||||
|
||||
SCL_CORE_EXPORT BOOLEANS * create_BOOLEANS();
|
||||
|
||||
class SCL_CORE_EXPORT RealAggregate : public STEPaggregate {
|
||||
|
||||
public:
|
||||
virtual SingleLinkNode *NewNode();
|
||||
virtual STEPaggregate& ShallowCopy (const STEPaggregate&);
|
||||
public:
|
||||
virtual SingleLinkNode * NewNode();
|
||||
virtual STEPaggregate & ShallowCopy( const STEPaggregate & );
|
||||
|
||||
RealAggregate();
|
||||
virtual ~RealAggregate();
|
||||
RealAggregate();
|
||||
virtual ~RealAggregate();
|
||||
};
|
||||
typedef RealAggregate * RealAggregateH;
|
||||
typedef RealAggregate * RealAggregate_ptr;
|
||||
typedef RealAggregate * RealAggregateH;
|
||||
typedef RealAggregate * RealAggregate_ptr;
|
||||
typedef RealAggregate_ptr RealAggregate_var;
|
||||
|
||||
class SCL_CORE_EXPORT IntAggregate : public STEPaggregate {
|
||||
|
||||
public:
|
||||
virtual SingleLinkNode *NewNode();
|
||||
virtual STEPaggregate& ShallowCopy (const STEPaggregate&);
|
||||
public:
|
||||
virtual SingleLinkNode * NewNode();
|
||||
virtual STEPaggregate & ShallowCopy( const STEPaggregate & );
|
||||
|
||||
IntAggregate();
|
||||
virtual ~IntAggregate();
|
||||
IntAggregate();
|
||||
virtual ~IntAggregate();
|
||||
};
|
||||
typedef IntAggregate * IntAggregateH;
|
||||
typedef IntAggregate * IntAggregate_ptr;
|
||||
typedef IntAggregate * IntAggregateH;
|
||||
typedef IntAggregate * IntAggregate_ptr;
|
||||
typedef IntAggregate_ptr IntAggregate_var;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class SCL_CORE_EXPORT STEPnode : public SingleLinkNode {
|
||||
protected:
|
||||
int _null;
|
||||
protected:
|
||||
int _null;
|
||||
|
||||
public:
|
||||
int is_null() { return _null; }
|
||||
void set_null() { _null = 1; }
|
||||
public:
|
||||
int is_null() {
|
||||
return _null;
|
||||
}
|
||||
void set_null() {
|
||||
_null = 1;
|
||||
}
|
||||
|
||||
// INPUT
|
||||
virtual Severity StrToVal(const char *s, ErrorDescriptor *err);
|
||||
virtual Severity StrToVal(istream &in, ErrorDescriptor *err);
|
||||
virtual Severity StrToVal( const char * s, ErrorDescriptor * err );
|
||||
virtual Severity StrToVal( istream & in, ErrorDescriptor * err );
|
||||
|
||||
virtual Severity STEPread(const char *s, ErrorDescriptor *err);
|
||||
virtual Severity STEPread(istream &in, ErrorDescriptor *err);
|
||||
virtual Severity STEPread( const char * s, ErrorDescriptor * err );
|
||||
virtual Severity STEPread( istream & in, ErrorDescriptor * err );
|
||||
|
||||
// OUTPUT
|
||||
virtual const char *asStr(std::string& s);
|
||||
virtual const char *STEPwrite(std::string& s, const char * =0);
|
||||
virtual void STEPwrite (ostream& out =cout);
|
||||
virtual const char * asStr( std::string & s );
|
||||
virtual const char * STEPwrite( std::string & s, const char * = 0 );
|
||||
virtual void STEPwrite( ostream & out = cout );
|
||||
};
|
||||
typedef STEPnode * STEPnodeH;
|
||||
typedef STEPnode * STEPnodeH;
|
||||
|
||||
/**************************************************************//**
|
||||
** \class GenericAggregate
|
||||
** This class is for the Nodes of GenericAggregates
|
||||
******************************************************************/
|
||||
class SCL_CORE_EXPORT GenericAggrNode : public STEPnode {
|
||||
public:
|
||||
SCLundefined value;
|
||||
|
||||
// INPUT
|
||||
virtual Severity StrToVal(const char *s, ErrorDescriptor *err);
|
||||
virtual Severity StrToVal(istream &in, ErrorDescriptor *err);
|
||||
public:
|
||||
SCLundefined value;
|
||||
|
||||
virtual Severity STEPread(const char *s, ErrorDescriptor *err);
|
||||
virtual Severity STEPread(istream &in, ErrorDescriptor *err);
|
||||
// INPUT
|
||||
virtual Severity StrToVal( const char * s, ErrorDescriptor * err );
|
||||
virtual Severity StrToVal( istream & in, ErrorDescriptor * err );
|
||||
|
||||
virtual Severity STEPread( const char * s, ErrorDescriptor * err );
|
||||
virtual Severity STEPread( istream & in, ErrorDescriptor * err );
|
||||
|
||||
// OUTPUT
|
||||
virtual const char *asStr(std::string& s);
|
||||
virtual const char *STEPwrite(std::string& s, const char * =0);
|
||||
virtual void STEPwrite (ostream& out =cout);
|
||||
virtual const char * asStr( std::string & s );
|
||||
virtual const char * STEPwrite( std::string & s, const char * = 0 );
|
||||
virtual void STEPwrite( ostream & out = cout );
|
||||
|
||||
// CONSTRUCTORS
|
||||
GenericAggrNode (const char *str);
|
||||
GenericAggrNode (GenericAggrNode& gan);
|
||||
GenericAggrNode ();
|
||||
~GenericAggrNode ();
|
||||
GenericAggrNode( const char * str );
|
||||
GenericAggrNode( GenericAggrNode & gan );
|
||||
GenericAggrNode();
|
||||
~GenericAggrNode();
|
||||
|
||||
virtual SingleLinkNode * NewNode ();
|
||||
virtual SingleLinkNode * NewNode();
|
||||
};
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class SCL_CORE_EXPORT EntityNode : public STEPnode {
|
||||
public:
|
||||
SDAI_Application_instance * node;
|
||||
public:
|
||||
SDAI_Application_instance * node;
|
||||
|
||||
// INPUT
|
||||
virtual Severity StrToVal(const char *s, ErrorDescriptor *err,
|
||||
const TypeDescriptor *elem_type,
|
||||
InstMgr *insts, int addFileId = 0);
|
||||
virtual Severity StrToVal(istream &in, ErrorDescriptor *err,
|
||||
const TypeDescriptor *elem_type,
|
||||
InstMgr *insts, int addFileId = 0);
|
||||
virtual Severity StrToVal( const char * s, ErrorDescriptor * err,
|
||||
const TypeDescriptor * elem_type,
|
||||
InstMgr * insts, int addFileId = 0 );
|
||||
virtual Severity StrToVal( istream & in, ErrorDescriptor * err,
|
||||
const TypeDescriptor * elem_type,
|
||||
InstMgr * insts, int addFileId = 0 );
|
||||
|
||||
virtual Severity STEPread(const char *s, ErrorDescriptor *err,
|
||||
const TypeDescriptor *elem_type,
|
||||
InstMgr *insts, int addFileId = 0);
|
||||
virtual Severity STEPread(istream &in, ErrorDescriptor *err,
|
||||
const TypeDescriptor *elem_type,
|
||||
InstMgr *insts, int addFileId = 0);
|
||||
virtual Severity STEPread( const char * s, ErrorDescriptor * err,
|
||||
const TypeDescriptor * elem_type,
|
||||
InstMgr * insts, int addFileId = 0 );
|
||||
virtual Severity STEPread( istream & in, ErrorDescriptor * err,
|
||||
const TypeDescriptor * elem_type,
|
||||
InstMgr * insts, int addFileId = 0 );
|
||||
// OUTPUT
|
||||
virtual const char *asStr(std::string& s);
|
||||
virtual const char *STEPwrite (std::string& s, const char * =0);
|
||||
virtual void STEPwrite (ostream& out =cout);
|
||||
virtual const char * asStr( std::string & s );
|
||||
virtual const char * STEPwrite( std::string & s, const char * = 0 );
|
||||
virtual void STEPwrite( ostream & out = cout );
|
||||
|
||||
// CONSTRUCTORS
|
||||
EntityNode (SDAI_Application_instance * e);
|
||||
EntityNode();
|
||||
~EntityNode();
|
||||
EntityNode( SDAI_Application_instance * e );
|
||||
EntityNode();
|
||||
~EntityNode();
|
||||
|
||||
virtual SingleLinkNode * NewNode ();
|
||||
virtual SingleLinkNode * NewNode();
|
||||
|
||||
// Calling these funtions is an error.
|
||||
Severity StrToVal(const char *s, ErrorDescriptor *err) {
|
||||
cerr << "Internal error: " << __FILE__ << __LINE__
|
||||
<< "\n" << _POC_ "\n";
|
||||
return StrToVal(s, err, 0, 0, 0);
|
||||
}
|
||||
Severity StrToVal(istream &in, ErrorDescriptor *err) {
|
||||
cerr << "Internal error: " << __FILE__ << __LINE__
|
||||
<< "\n" << _POC_ "\n";
|
||||
return StrToVal(in, err, 0, 0, 0);
|
||||
}
|
||||
// Calling these funtions is an error.
|
||||
Severity StrToVal( const char * s, ErrorDescriptor * err ) {
|
||||
cerr << "Internal error: " << __FILE__ << __LINE__
|
||||
<< "\n" << _POC_ "\n";
|
||||
return StrToVal( s, err, 0, 0, 0 );
|
||||
}
|
||||
Severity StrToVal( istream & in, ErrorDescriptor * err ) {
|
||||
cerr << "Internal error: " << __FILE__ << __LINE__
|
||||
<< "\n" << _POC_ "\n";
|
||||
return StrToVal( in, err, 0, 0, 0 );
|
||||
}
|
||||
|
||||
Severity STEPread(const char *s, ErrorDescriptor *err) {
|
||||
cerr << "Internal error: " << __FILE__ << __LINE__
|
||||
<< "\n" << _POC_ "\n";
|
||||
return STEPread(s, err, 0, 0, 0);
|
||||
}
|
||||
Severity STEPread(istream &in, ErrorDescriptor *err) {
|
||||
cerr << "Internal error: " << __FILE__ << __LINE__
|
||||
<< "\n" << _POC_ "\n";
|
||||
return STEPread(in, err, 0, 0, 0);
|
||||
}
|
||||
Severity STEPread( const char * s, ErrorDescriptor * err ) {
|
||||
cerr << "Internal error: " << __FILE__ << __LINE__
|
||||
<< "\n" << _POC_ "\n";
|
||||
return STEPread( s, err, 0, 0, 0 );
|
||||
}
|
||||
Severity STEPread( istream & in, ErrorDescriptor * err ) {
|
||||
cerr << "Internal error: " << __FILE__ << __LINE__
|
||||
<< "\n" << _POC_ "\n";
|
||||
return STEPread( in, err, 0, 0, 0 );
|
||||
}
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
@@ -372,58 +369,58 @@ class SCL_CORE_EXPORT EntityNode : public STEPnode {
|
||||
** This is a minimal representions for node in lists of SDAI_Select
|
||||
******************************************************************/
|
||||
class SCL_CORE_EXPORT SelectNode : public STEPnode {
|
||||
public:
|
||||
SDAI_Select * node;
|
||||
public:
|
||||
SDAI_Select * node;
|
||||
// INPUT
|
||||
virtual Severity StrToVal(const char *s, ErrorDescriptor *err,
|
||||
const TypeDescriptor *elem_type,
|
||||
InstMgr *insts, int addFileId = 0);
|
||||
virtual Severity StrToVal(istream &in, ErrorDescriptor *err,
|
||||
const TypeDescriptor *elem_type,
|
||||
InstMgr *insts, int addFileId = 0,
|
||||
const char *currSch =0);
|
||||
virtual Severity StrToVal( const char * s, ErrorDescriptor * err,
|
||||
const TypeDescriptor * elem_type,
|
||||
InstMgr * insts, int addFileId = 0 );
|
||||
virtual Severity StrToVal( istream & in, ErrorDescriptor * err,
|
||||
const TypeDescriptor * elem_type,
|
||||
InstMgr * insts, int addFileId = 0,
|
||||
const char * currSch = 0 );
|
||||
|
||||
virtual Severity STEPread(const char *s, ErrorDescriptor *err,
|
||||
const TypeDescriptor *elem_type,
|
||||
InstMgr *insts, int addFileId = 0);
|
||||
virtual Severity STEPread(istream &in, ErrorDescriptor *err,
|
||||
const TypeDescriptor *elem_type,
|
||||
InstMgr *insts, int addFileId = 0,
|
||||
const char *currSch =0);
|
||||
virtual Severity STEPread( const char * s, ErrorDescriptor * err,
|
||||
const TypeDescriptor * elem_type,
|
||||
InstMgr * insts, int addFileId = 0 );
|
||||
virtual Severity STEPread( istream & in, ErrorDescriptor * err,
|
||||
const TypeDescriptor * elem_type,
|
||||
InstMgr * insts, int addFileId = 0,
|
||||
const char * currSch = 0 );
|
||||
// OUTPUT
|
||||
virtual const char *asStr(std::string& s);
|
||||
virtual const char *STEPwrite (std::string& s, const char * =0);
|
||||
virtual void STEPwrite (ostream& out =cout);
|
||||
virtual const char * asStr( std::string & s );
|
||||
virtual const char * STEPwrite( std::string & s, const char * = 0 );
|
||||
virtual void STEPwrite( ostream & out = cout );
|
||||
|
||||
// CONSTRUCTORS
|
||||
SelectNode(SDAI_Select * s);
|
||||
SelectNode();
|
||||
~SelectNode();
|
||||
SelectNode( SDAI_Select * s );
|
||||
SelectNode();
|
||||
~SelectNode();
|
||||
|
||||
virtual SingleLinkNode * NewNode ();
|
||||
virtual SingleLinkNode * NewNode();
|
||||
|
||||
// Calling these funtions is an error.
|
||||
Severity StrToVal(const char *s, ErrorDescriptor *err) {
|
||||
cerr << "Internal error: " << __FILE__ << __LINE__
|
||||
<< "\n" << _POC_ "\n";
|
||||
return StrToVal(s, err, 0, 0, 0);
|
||||
}
|
||||
Severity StrToVal(istream &in, ErrorDescriptor *err) {
|
||||
cerr << "Internal error: " << __FILE__ << __LINE__
|
||||
<< "\n" << _POC_ "\n";
|
||||
return StrToVal(in, err, 0, 0, 0);
|
||||
}
|
||||
// Calling these funtions is an error.
|
||||
Severity StrToVal( const char * s, ErrorDescriptor * err ) {
|
||||
cerr << "Internal error: " << __FILE__ << __LINE__
|
||||
<< "\n" << _POC_ "\n";
|
||||
return StrToVal( s, err, 0, 0, 0 );
|
||||
}
|
||||
Severity StrToVal( istream & in, ErrorDescriptor * err ) {
|
||||
cerr << "Internal error: " << __FILE__ << __LINE__
|
||||
<< "\n" << _POC_ "\n";
|
||||
return StrToVal( in, err, 0, 0, 0 );
|
||||
}
|
||||
|
||||
Severity STEPread(const char *s, ErrorDescriptor *err) {
|
||||
cerr << "Internal error: " << __FILE__ << __LINE__
|
||||
<< "\n" << _POC_ "\n";
|
||||
return STEPread(s, err, 0, 0, 0);
|
||||
}
|
||||
Severity STEPread(istream &in, ErrorDescriptor *err) {
|
||||
cerr << "Internal error: " << __FILE__ << __LINE__
|
||||
<< "\n" << _POC_ "\n";
|
||||
return STEPread(in, err, 0, 0, 0);
|
||||
}
|
||||
Severity STEPread( const char * s, ErrorDescriptor * err ) {
|
||||
cerr << "Internal error: " << __FILE__ << __LINE__
|
||||
<< "\n" << _POC_ "\n";
|
||||
return STEPread( s, err, 0, 0, 0 );
|
||||
}
|
||||
Severity STEPread( istream & in, ErrorDescriptor * err ) {
|
||||
cerr << "Internal error: " << __FILE__ << __LINE__
|
||||
<< "\n" << _POC_ "\n";
|
||||
return STEPread( in, err, 0, 0, 0 );
|
||||
}
|
||||
};
|
||||
|
||||
/**************************************************************//**
|
||||
@@ -431,27 +428,27 @@ class SCL_CORE_EXPORT SelectNode : public STEPnode {
|
||||
** This class is for the Nodes of StringAggregates
|
||||
******************************************************************/
|
||||
class SCL_CORE_EXPORT StringNode : public STEPnode {
|
||||
public:
|
||||
SDAI_String value;
|
||||
public:
|
||||
SDAI_String value;
|
||||
// INPUT
|
||||
virtual Severity StrToVal(const char *s, ErrorDescriptor *err);
|
||||
virtual Severity StrToVal(istream &in, ErrorDescriptor *err);
|
||||
virtual Severity StrToVal( const char * s, ErrorDescriptor * err );
|
||||
virtual Severity StrToVal( istream & in, ErrorDescriptor * err );
|
||||
|
||||
virtual Severity STEPread(const char *s, ErrorDescriptor *err);
|
||||
virtual Severity STEPread(istream &in, ErrorDescriptor *err);
|
||||
virtual Severity STEPread( const char * s, ErrorDescriptor * err );
|
||||
virtual Severity STEPread( istream & in, ErrorDescriptor * err );
|
||||
|
||||
// OUTPUT
|
||||
virtual const char *asStr(std::string& s);
|
||||
virtual const char *STEPwrite (std::string& s, const char * =0);
|
||||
virtual void STEPwrite (ostream& out =cout);
|
||||
virtual const char * asStr( std::string & s );
|
||||
virtual const char * STEPwrite( std::string & s, const char * = 0 );
|
||||
virtual void STEPwrite( ostream & out = cout );
|
||||
|
||||
// CONSTRUCTORS
|
||||
StringNode(StringNode& sn);
|
||||
StringNode (const char * sStr);
|
||||
StringNode();
|
||||
~StringNode();
|
||||
StringNode( StringNode & sn );
|
||||
StringNode( const char * sStr );
|
||||
StringNode();
|
||||
~StringNode();
|
||||
|
||||
virtual SingleLinkNode * NewNode ();
|
||||
virtual SingleLinkNode * NewNode();
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
@@ -461,27 +458,27 @@ class SCL_CORE_EXPORT StringNode : public STEPnode {
|
||||
** This class is for the Nodes of BinaryAggregates
|
||||
******************************************************************/
|
||||
class SCL_CORE_EXPORT BinaryNode : public STEPnode {
|
||||
public:
|
||||
SDAI_Binary value;
|
||||
public:
|
||||
SDAI_Binary value;
|
||||
// INPUT
|
||||
virtual Severity StrToVal(const char *s, ErrorDescriptor *err);
|
||||
virtual Severity StrToVal(istream &in, ErrorDescriptor *err);
|
||||
virtual Severity StrToVal( const char * s, ErrorDescriptor * err );
|
||||
virtual Severity StrToVal( istream & in, ErrorDescriptor * err );
|
||||
|
||||
virtual Severity STEPread(const char *s, ErrorDescriptor *err);
|
||||
virtual Severity STEPread(istream &in, ErrorDescriptor *err);
|
||||
virtual Severity STEPread( const char * s, ErrorDescriptor * err );
|
||||
virtual Severity STEPread( istream & in, ErrorDescriptor * err );
|
||||
|
||||
// OUTPUT
|
||||
virtual const char *asStr(std::string& s);
|
||||
virtual const char *STEPwrite (std::string& s, const char * =0);
|
||||
virtual void STEPwrite (ostream& out =cout);
|
||||
virtual const char * asStr( std::string & s );
|
||||
virtual const char * STEPwrite( std::string & s, const char * = 0 );
|
||||
virtual void STEPwrite( ostream & out = cout );
|
||||
|
||||
// CONSTRUCTORS
|
||||
BinaryNode(BinaryNode& bn);
|
||||
BinaryNode (const char * sStr);
|
||||
BinaryNode();
|
||||
~BinaryNode();
|
||||
BinaryNode( BinaryNode & bn );
|
||||
BinaryNode( const char * sStr );
|
||||
BinaryNode();
|
||||
~BinaryNode();
|
||||
|
||||
virtual SingleLinkNode * NewNode ();
|
||||
virtual SingleLinkNode * NewNode();
|
||||
};
|
||||
|
||||
/**************************************************************//**
|
||||
@@ -489,70 +486,70 @@ class SCL_CORE_EXPORT BinaryNode : public STEPnode {
|
||||
** This is a minimal representions for node in lists of SDAI_Enum
|
||||
******************************************************************/
|
||||
class SCL_CORE_EXPORT EnumNode : public STEPnode {
|
||||
public:
|
||||
SDAI_Enum * node;
|
||||
public:
|
||||
SDAI_Enum * node;
|
||||
// INPUT
|
||||
virtual Severity StrToVal(const char *s, ErrorDescriptor *err);
|
||||
virtual Severity StrToVal(istream &in, ErrorDescriptor *err);
|
||||
virtual Severity StrToVal( const char * s, ErrorDescriptor * err );
|
||||
virtual Severity StrToVal( istream & in, ErrorDescriptor * err );
|
||||
|
||||
virtual Severity STEPread(const char *s, ErrorDescriptor *err);
|
||||
virtual Severity STEPread(istream &in, ErrorDescriptor *err);
|
||||
virtual Severity STEPread( const char * s, ErrorDescriptor * err );
|
||||
virtual Severity STEPread( istream & in, ErrorDescriptor * err );
|
||||
|
||||
// OUTPUT
|
||||
virtual const char *asStr(std::string& s);
|
||||
virtual const char *STEPwrite (std::string& s, const char * =0);
|
||||
virtual void STEPwrite (ostream& out =cout);
|
||||
virtual const char * asStr( std::string & s );
|
||||
virtual const char * STEPwrite( std::string & s, const char * = 0 );
|
||||
virtual void STEPwrite( ostream & out = cout );
|
||||
|
||||
// CONSTRUCTORS
|
||||
EnumNode(SDAI_Enum * e);
|
||||
EnumNode();
|
||||
~EnumNode();
|
||||
EnumNode( SDAI_Enum * e );
|
||||
EnumNode();
|
||||
~EnumNode();
|
||||
|
||||
virtual SingleLinkNode * NewNode ();
|
||||
virtual SingleLinkNode * NewNode();
|
||||
};
|
||||
|
||||
class SCL_CORE_EXPORT RealNode : public STEPnode {
|
||||
public:
|
||||
SDAI_Real value; // double
|
||||
public:
|
||||
SDAI_Real value; // double
|
||||
// INPUT
|
||||
virtual Severity StrToVal(const char *s, ErrorDescriptor *err);
|
||||
virtual Severity StrToVal(istream &in, ErrorDescriptor *err);
|
||||
virtual Severity StrToVal( const char * s, ErrorDescriptor * err );
|
||||
virtual Severity StrToVal( istream & in, ErrorDescriptor * err );
|
||||
|
||||
virtual Severity STEPread(const char *s, ErrorDescriptor *err);
|
||||
virtual Severity STEPread(istream &in, ErrorDescriptor *err);
|
||||
virtual Severity STEPread( const char * s, ErrorDescriptor * err );
|
||||
virtual Severity STEPread( istream & in, ErrorDescriptor * err );
|
||||
|
||||
// OUTPUT
|
||||
virtual const char *asStr(std::string& s);
|
||||
virtual const char *STEPwrite (std::string& s, const char * =0);
|
||||
virtual void STEPwrite (ostream& out =cout);
|
||||
virtual const char * asStr( std::string & s );
|
||||
virtual const char * STEPwrite( std::string & s, const char * = 0 );
|
||||
virtual void STEPwrite( ostream & out = cout );
|
||||
|
||||
// CONSTRUCTORS
|
||||
RealNode();
|
||||
~RealNode();
|
||||
RealNode();
|
||||
~RealNode();
|
||||
|
||||
virtual SingleLinkNode * NewNode ();
|
||||
virtual SingleLinkNode * NewNode();
|
||||
};
|
||||
|
||||
class SCL_CORE_EXPORT IntNode : public STEPnode {
|
||||
public:
|
||||
SDAI_Integer value; // long int
|
||||
public:
|
||||
SDAI_Integer value; // long int
|
||||
// INPUT
|
||||
virtual Severity StrToVal(const char *s, ErrorDescriptor *err);
|
||||
virtual Severity StrToVal(istream &in, ErrorDescriptor *err);
|
||||
virtual Severity StrToVal( const char * s, ErrorDescriptor * err );
|
||||
virtual Severity StrToVal( istream & in, ErrorDescriptor * err );
|
||||
|
||||
virtual Severity STEPread(const char *s, ErrorDescriptor *err);
|
||||
virtual Severity STEPread(istream &in, ErrorDescriptor *err);
|
||||
virtual Severity STEPread( const char * s, ErrorDescriptor * err );
|
||||
virtual Severity STEPread( istream & in, ErrorDescriptor * err );
|
||||
|
||||
// OUTPUT
|
||||
virtual const char *asStr(std::string& s);
|
||||
virtual const char *STEPwrite (std::string& s, const char * =0);
|
||||
virtual void STEPwrite (ostream& out =cout);
|
||||
virtual const char * asStr( std::string & s );
|
||||
virtual const char * STEPwrite( std::string & s, const char * = 0 );
|
||||
virtual void STEPwrite( ostream & out = cout );
|
||||
|
||||
// CONSTRUCTORS
|
||||
IntNode();
|
||||
~IntNode();
|
||||
IntNode();
|
||||
~IntNode();
|
||||
|
||||
virtual SingleLinkNode * NewNode ();
|
||||
virtual SingleLinkNode * NewNode();
|
||||
};
|
||||
|
||||
/******************************************************************
|
||||
|
||||
@@ -193,7 +193,7 @@ Severity STEPattribute::StrToVal( const char * s, InstMgr * instances, int addFi
|
||||
** value <= SEVERITY_INPUT_ERROR is fatal read error
|
||||
******************************************************************/
|
||||
Severity STEPattribute::STEPread( istream & in, InstMgr * instances, int addFileId,
|
||||
const char * currSch, bool strict ) {
|
||||
const char * currSch, bool strict ) {
|
||||
|
||||
// The attribute has been redefined by the attribute pointed
|
||||
// to by _redefAttr so write the redefined value.
|
||||
@@ -237,7 +237,7 @@ Severity STEPattribute::STEPread( istream & in, InstMgr * instances, int addFile
|
||||
}
|
||||
if( Nullable() ) {
|
||||
_error.severity( SEVERITY_NULL );
|
||||
} else if ( !strict ) {
|
||||
} else if( !strict ) {
|
||||
std::string fillerValue;
|
||||
// we aren't in strict mode, so find out the type of the missing attribute and insert a suitable value.
|
||||
ErrorDescriptor err; //this will be discarded
|
||||
@@ -259,7 +259,7 @@ Severity STEPattribute::STEPread( istream & in, InstMgr * instances, int addFile
|
||||
}
|
||||
case STRING_TYPE: {
|
||||
fillerValue = "'',";
|
||||
*(ptr.S) = "''";
|
||||
*( ptr.S ) = "''";
|
||||
break;
|
||||
}
|
||||
default: { //do not know what a good value would be for other types
|
||||
@@ -276,7 +276,7 @@ Severity STEPattribute::STEPread( istream & in, InstMgr * instances, int addFile
|
||||
//create a warning. SEVERITY_WARNING makes more sense to me, but is considered more severe than SEVERITY_INCOMPLETE
|
||||
_error.severity( SEVERITY_USERMSG );
|
||||
_error.AppendToDetailMsg( " missing and required. For compatibility, replacing with " );
|
||||
_error.AppendToDetailMsg( fillerValue.substr( 0, fillerValue.length()-1 ) );
|
||||
_error.AppendToDetailMsg( fillerValue.substr( 0, fillerValue.length() - 1 ) );
|
||||
_error.AppendToDetailMsg( ".\n" );
|
||||
} else {
|
||||
_error.severity( SEVERITY_INCOMPLETE );
|
||||
@@ -779,7 +779,7 @@ int STEPattribute::is_null() const {
|
||||
return ( *( ptr.c ) == S_ENTITY_NULL );
|
||||
|
||||
case STRING_TYPE:
|
||||
return ( *( ptr.S ) == S_STRING_NULL);
|
||||
return ( *( ptr.S ) == S_STRING_NULL );
|
||||
|
||||
case BINARY_TYPE:
|
||||
ptr.b->clear();
|
||||
@@ -819,7 +819,7 @@ int STEPattribute::is_null() const {
|
||||
** \return bool -- if false => not equal
|
||||
******************************************************************/
|
||||
bool operator == ( STEPattribute & a1, STEPattribute & a2 ) {
|
||||
if ( a1.aDesc == a2.aDesc ) {
|
||||
if( a1.aDesc == a2.aDesc ) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -834,7 +834,7 @@ bool operator == ( STEPattribute & a1, STEPattribute & a2 ) {
|
||||
* attrValue exists it is valid.
|
||||
******************************************************************/
|
||||
Severity STEPattribute::ValidLevel( const char * attrValue, ErrorDescriptor * error,
|
||||
InstMgr * im, int clearError ) {
|
||||
InstMgr * im, int clearError ) {
|
||||
if( clearError ) {
|
||||
ClearErrorMsg();
|
||||
}
|
||||
|
||||
+111
-99
@@ -26,7 +26,7 @@
|
||||
*/
|
||||
#define REAL_NUM_PRECISION 15
|
||||
|
||||
typedef double real;
|
||||
typedef double real;
|
||||
|
||||
class InstMgr;
|
||||
class SDAI_Application_instance;
|
||||
@@ -39,144 +39,156 @@ class EntityDescriptor;
|
||||
|
||||
#include <sstream>
|
||||
|
||||
extern SCL_CORE_EXPORT int SetErrOnNull(const char *attrValue, ErrorDescriptor *error);
|
||||
extern SCL_CORE_EXPORT int SetErrOnNull( const char * attrValue, ErrorDescriptor * error );
|
||||
|
||||
extern SCL_CORE_EXPORT SDAI_Application_instance * ReadEntityRef(istream &in, ErrorDescriptor *err, const char *tokenList,
|
||||
InstMgr * instances, int addFileId);
|
||||
extern SCL_CORE_EXPORT SDAI_Application_instance * ReadEntityRef( istream & in, ErrorDescriptor * err, const char * tokenList,
|
||||
InstMgr * instances, int addFileId );
|
||||
|
||||
extern SCL_CORE_EXPORT SDAI_Application_instance * ReadEntityRef(const char * s, ErrorDescriptor *err, const char *tokenList,
|
||||
InstMgr * instances, int addFileId);
|
||||
extern SCL_CORE_EXPORT SDAI_Application_instance * ReadEntityRef( const char * s, ErrorDescriptor * err, const char * tokenList,
|
||||
InstMgr * instances, int addFileId );
|
||||
|
||||
extern SCL_CORE_EXPORT Severity EntityValidLevel(SDAI_Application_instance *se,
|
||||
const TypeDescriptor *ed, ///< entity type that entity se needs to match. (this must be an EntityDescriptor)
|
||||
ErrorDescriptor *err);
|
||||
extern SCL_CORE_EXPORT Severity EntityValidLevel( SDAI_Application_instance * se,
|
||||
const TypeDescriptor * ed, ///< entity type that entity se needs to match. (this must be an EntityDescriptor)
|
||||
ErrorDescriptor * err );
|
||||
|
||||
extern SCL_CORE_EXPORT Severity EntityValidLevel(const char *attrValue, ///< string containing entity ref
|
||||
const TypeDescriptor *ed, /**< entity type that entity in attrValue (if it exists) needs
|
||||
extern SCL_CORE_EXPORT Severity EntityValidLevel( const char * attrValue, ///< string containing entity ref
|
||||
const TypeDescriptor * ed, /**< entity type that entity in attrValue (if it exists) needs
|
||||
* to match. (this must be an EntityDescriptor)
|
||||
*/
|
||||
ErrorDescriptor *err, InstMgr *im, int clearError);
|
||||
ErrorDescriptor * err, InstMgr * im, int clearError );
|
||||
|
||||
////////////////////
|
||||
////////////////////
|
||||
|
||||
extern SCL_CORE_EXPORT SDAI_Application_instance *STEPread_reference (const char * s, ErrorDescriptor *err,
|
||||
InstMgr * instances, int addFileId);
|
||||
extern SCL_CORE_EXPORT SDAI_Application_instance * STEPread_reference( const char * s, ErrorDescriptor * err,
|
||||
InstMgr * instances, int addFileId );
|
||||
////////////////////
|
||||
|
||||
extern SCL_CORE_EXPORT int QuoteInString(istream& in);
|
||||
extern SCL_CORE_EXPORT int QuoteInString( istream & in );
|
||||
|
||||
extern SCL_CORE_EXPORT void AppendChar(char c, int& index, char *&s, int& sSize);
|
||||
extern SCL_CORE_EXPORT void AppendChar( char c, int & index, char *&s, int & sSize );
|
||||
|
||||
extern SCL_CORE_EXPORT void PushPastString (istream& in, std::string& s, ErrorDescriptor *err);
|
||||
extern SCL_CORE_EXPORT void PushPastString( istream & in, std::string & s, ErrorDescriptor * err );
|
||||
|
||||
extern SCL_CORE_EXPORT void PushPastImbedAggr (istream& in, std::string& s, ErrorDescriptor *err);
|
||||
extern SCL_CORE_EXPORT void PushPastImbedAggr( istream & in, std::string & s, ErrorDescriptor * err );
|
||||
|
||||
extern SCL_CORE_EXPORT void PushPastAggr1Dim(istream& in, std::string& s, ErrorDescriptor *err);
|
||||
extern SCL_CORE_EXPORT void PushPastAggr1Dim( istream & in, std::string & s, ErrorDescriptor * err );
|
||||
|
||||
class SCL_CORE_EXPORT STEPattribute {
|
||||
friend ostream &operator<< ( ostream&, STEPattribute& );
|
||||
friend class SDAI_Application_instance;
|
||||
protected:
|
||||
ErrorDescriptor _error;
|
||||
unsigned int _derive : 1;
|
||||
int Derive (unsigned int n =1) { return _derive =n; }
|
||||
STEPattribute *_redefAttr;
|
||||
void RedefiningAttr(STEPattribute *a) { _redefAttr = a; }
|
||||
friend ostream & operator<< ( ostream &, STEPattribute & );
|
||||
friend class SDAI_Application_instance;
|
||||
protected:
|
||||
ErrorDescriptor _error;
|
||||
unsigned int _derive : 1;
|
||||
int Derive( unsigned int n = 1 ) {
|
||||
return _derive = n;
|
||||
}
|
||||
STEPattribute * _redefAttr;
|
||||
void RedefiningAttr( STEPattribute * a ) {
|
||||
_redefAttr = a;
|
||||
}
|
||||
|
||||
public:
|
||||
const AttrDescriptor * aDesc;
|
||||
public:
|
||||
const AttrDescriptor * aDesc;
|
||||
|
||||
/** \union ptr
|
||||
** You know which of these to use based on the return value of
|
||||
** NonRefType() - see below. BASE_TYPE is defined in baseType.h
|
||||
** This variable points to an appropriate member variable in the entity
|
||||
** class in the generated schema class library (the entity class is
|
||||
** inherited from SDAI_Application_instance)
|
||||
*/
|
||||
union {
|
||||
SDAI_String *S; // STRING_TYPE
|
||||
SDAI_Integer *i; // INTEGER_TYPE (Integer is a long int)
|
||||
SDAI_Binary *b; // BINARY_TYPE
|
||||
SDAI_Real *r; // REAL_TYPE and NUMBER_TYPE (Real is a double)
|
||||
SDAI_Application_instance* *c; // ENTITY_TYPE
|
||||
STEPaggregate *a; // AGGREGATE_TYPE
|
||||
SDAI_Enum *e; // ENUM_TYPE, BOOLEAN_TYPE, and LOGICAL_TYPE
|
||||
SDAI_Select *sh; // SELECT_TYPE
|
||||
SCLundefined *u; // UNKNOWN_TYPE
|
||||
void *p;
|
||||
|
||||
} ptr;
|
||||
/** \union ptr
|
||||
** You know which of these to use based on the return value of
|
||||
** NonRefType() - see below. BASE_TYPE is defined in baseType.h
|
||||
** This variable points to an appropriate member variable in the entity
|
||||
** class in the generated schema class library (the entity class is
|
||||
** inherited from SDAI_Application_instance)
|
||||
*/
|
||||
union {
|
||||
SDAI_String * S; // STRING_TYPE
|
||||
SDAI_Integer * i; // INTEGER_TYPE (Integer is a long int)
|
||||
SDAI_Binary * b; // BINARY_TYPE
|
||||
SDAI_Real * r; // REAL_TYPE and NUMBER_TYPE (Real is a double)
|
||||
SDAI_Application_instance * * c; // ENTITY_TYPE
|
||||
STEPaggregate * a; // AGGREGATE_TYPE
|
||||
SDAI_Enum * e; // ENUM_TYPE, BOOLEAN_TYPE, and LOGICAL_TYPE
|
||||
SDAI_Select * sh; // SELECT_TYPE
|
||||
SCLundefined * u; // UNKNOWN_TYPE
|
||||
void * p;
|
||||
|
||||
protected:
|
||||
char SkipBadAttr(istream& in, char *StopChars);
|
||||
void AddErrorInfo();
|
||||
} ptr;
|
||||
|
||||
public:
|
||||
protected:
|
||||
char SkipBadAttr( istream & in, char * StopChars );
|
||||
void AddErrorInfo();
|
||||
|
||||
public:
|
||||
|
||||
///////////// Read, Write, Assign attr value
|
||||
|
||||
Severity StrToVal(const char *s, InstMgr *instances =0,
|
||||
int addFileId =0);
|
||||
Severity STEPread(istream& in = cin, InstMgr *instances =0,
|
||||
int addFileId =0, const char * =NULL, bool strict = true);
|
||||
Severity StrToVal( const char * s, InstMgr * instances = 0,
|
||||
int addFileId = 0 );
|
||||
Severity STEPread( istream & in = cin, InstMgr * instances = 0,
|
||||
int addFileId = 0, const char * = NULL, bool strict = true );
|
||||
|
||||
const char * asStr(std::string&, const char * =0) const;
|
||||
// return the attr value as a string
|
||||
void STEPwrite(ostream& out = cout, const char * =0);
|
||||
const char * asStr( std::string &, const char * = 0 ) const;
|
||||
// return the attr value as a string
|
||||
void STEPwrite( ostream & out = cout, const char * = 0 );
|
||||
|
||||
int ShallowCopy(STEPattribute *sa);
|
||||
int ShallowCopy( STEPattribute * sa );
|
||||
|
||||
Severity set_null();
|
||||
Severity set_null();
|
||||
|
||||
////////////// Return info on attr
|
||||
|
||||
int Nullable() const; // may this attribute be null?
|
||||
int is_null () const; // is this attribute null?
|
||||
int IsDerived () const { return _derive; }
|
||||
STEPattribute *RedefiningAttr() { return _redefAttr; }
|
||||
int Nullable() const; // may this attribute be null?
|
||||
int is_null() const; // is this attribute null?
|
||||
int IsDerived() const {
|
||||
return _derive;
|
||||
}
|
||||
STEPattribute * RedefiningAttr() {
|
||||
return _redefAttr;
|
||||
}
|
||||
|
||||
const char * Name() const;
|
||||
const char * TypeName() const;
|
||||
const BASE_TYPE Type() const;
|
||||
const BASE_TYPE NonRefType() const;
|
||||
const BASE_TYPE BaseType() const;
|
||||
const char * Name() const;
|
||||
const char * TypeName() const;
|
||||
const BASE_TYPE Type() const;
|
||||
const BASE_TYPE NonRefType() const;
|
||||
const BASE_TYPE BaseType() const;
|
||||
|
||||
const TypeDescriptor *ReferentType() const;
|
||||
const TypeDescriptor * ReferentType() const;
|
||||
|
||||
ErrorDescriptor &Error() { return _error; }
|
||||
void ClearErrorMsg() { _error.ClearErrorMsg(); }
|
||||
ErrorDescriptor & Error() {
|
||||
return _error;
|
||||
}
|
||||
void ClearErrorMsg() {
|
||||
_error.ClearErrorMsg();
|
||||
}
|
||||
|
||||
Severity ValidLevel (const char *attrValue, ErrorDescriptor *error,
|
||||
InstMgr *im, int clearError = 1);
|
||||
public:
|
||||
Severity ValidLevel( const char * attrValue, ErrorDescriptor * error,
|
||||
InstMgr * im, int clearError = 1 );
|
||||
public:
|
||||
|
||||
////////////////// Constructors
|
||||
|
||||
STEPattribute (const STEPattribute& a);
|
||||
STEPattribute () {};
|
||||
~STEPattribute () {};
|
||||
STEPattribute( const STEPattribute & a );
|
||||
STEPattribute() {};
|
||||
~STEPattribute() {};
|
||||
|
||||
// INTEGER
|
||||
STEPattribute (const class AttrDescriptor& d, SDAI_Integer *p);
|
||||
// BINARY
|
||||
STEPattribute (const class AttrDescriptor& d, SDAI_Binary *p);
|
||||
// STRING
|
||||
STEPattribute (const class AttrDescriptor& d, SDAI_String *p);
|
||||
// REAL & NUMBER
|
||||
STEPattribute (const class AttrDescriptor& d, SDAI_Real *p);
|
||||
// ENTITY
|
||||
STEPattribute (const class AttrDescriptor& d, SDAI_Application_instance* *p);
|
||||
// AGGREGATE
|
||||
STEPattribute (const class AttrDescriptor& d, STEPaggregate *p);
|
||||
// ENUMERATION and Logical
|
||||
STEPattribute (const class AttrDescriptor& d, SDAI_Enum *p);
|
||||
// SELECT
|
||||
STEPattribute (const class AttrDescriptor& d, SDAI_Select *p);
|
||||
// UNDEFINED
|
||||
STEPattribute (const class AttrDescriptor& d, SCLundefined *p);
|
||||
// INTEGER
|
||||
STEPattribute( const class AttrDescriptor & d, SDAI_Integer * p );
|
||||
// BINARY
|
||||
STEPattribute( const class AttrDescriptor & d, SDAI_Binary * p );
|
||||
// STRING
|
||||
STEPattribute( const class AttrDescriptor & d, SDAI_String * p );
|
||||
// REAL & NUMBER
|
||||
STEPattribute( const class AttrDescriptor & d, SDAI_Real * p );
|
||||
// ENTITY
|
||||
STEPattribute( const class AttrDescriptor & d, SDAI_Application_instance* *p );
|
||||
// AGGREGATE
|
||||
STEPattribute( const class AttrDescriptor & d, STEPaggregate * p );
|
||||
// ENUMERATION and Logical
|
||||
STEPattribute( const class AttrDescriptor & d, SDAI_Enum * p );
|
||||
// SELECT
|
||||
STEPattribute( const class AttrDescriptor & d, SDAI_Select * p );
|
||||
// UNDEFINED
|
||||
STEPattribute( const class AttrDescriptor & d, SCLundefined * p );
|
||||
|
||||
friend bool operator == (STEPattribute &a1, STEPattribute &a2);
|
||||
friend bool operator == ( STEPattribute & a1, STEPattribute & a2 );
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -20,28 +20,28 @@ STEPattribute::STEPattribute( const STEPattribute & a )
|
||||
: _derive( 0 ), _redefAttr( 0 ), aDesc( a.aDesc ) {}
|
||||
|
||||
/// INTEGER
|
||||
STEPattribute::STEPattribute( const class AttrDescriptor & d, SDAI_Integer *p )
|
||||
STEPattribute::STEPattribute( const class AttrDescriptor & d, SDAI_Integer * p )
|
||||
: _derive( 0 ), _redefAttr( 0 ), aDesc( &d ) {
|
||||
ptr.i = p;
|
||||
assert( &d ); //ensure that the AttrDescriptor is not a null pointer
|
||||
}
|
||||
|
||||
/// BINARY
|
||||
STEPattribute::STEPattribute( const class AttrDescriptor & d, SDAI_Binary *p )
|
||||
STEPattribute::STEPattribute( const class AttrDescriptor & d, SDAI_Binary * p )
|
||||
: _derive( 0 ), _redefAttr( 0 ), aDesc( &d ) {
|
||||
ptr.b = p;
|
||||
assert( &d ); //ensure that the AttrDescriptor is not a null pointer
|
||||
}
|
||||
|
||||
/// STRING
|
||||
STEPattribute::STEPattribute( const class AttrDescriptor & d, SDAI_String *p )
|
||||
STEPattribute::STEPattribute( const class AttrDescriptor & d, SDAI_String * p )
|
||||
: _derive( 0 ), _redefAttr( 0 ), aDesc( &d ) {
|
||||
ptr.S = p;
|
||||
assert( &d ); //ensure that the AttrDescriptor is not a null pointer
|
||||
}
|
||||
|
||||
/// REAL & NUMBER
|
||||
STEPattribute::STEPattribute( const class AttrDescriptor & d, SDAI_Real *p )
|
||||
STEPattribute::STEPattribute( const class AttrDescriptor & d, SDAI_Real * p )
|
||||
: _derive( 0 ), _redefAttr( 0 ), aDesc( &d ) {
|
||||
ptr.r = p;
|
||||
assert( &d ); //ensure that the AttrDescriptor is not a null pointer
|
||||
@@ -63,7 +63,7 @@ STEPattribute::STEPattribute( const class AttrDescriptor & d, STEPaggregate * p
|
||||
}
|
||||
|
||||
/// ENUMERATION and Logical
|
||||
STEPattribute::STEPattribute( const class AttrDescriptor & d, SDAI_Enum *p )
|
||||
STEPattribute::STEPattribute( const class AttrDescriptor & d, SDAI_Enum * p )
|
||||
: _derive( 0 ), _redefAttr( 0 ), aDesc( &d ) {
|
||||
ptr.e = p;
|
||||
assert( &d ); //ensure that the AttrDescriptor is not a null pointer
|
||||
@@ -71,7 +71,7 @@ STEPattribute::STEPattribute( const class AttrDescriptor & d, SDAI_Enum *p )
|
||||
|
||||
/// SELECT
|
||||
STEPattribute::STEPattribute( const class AttrDescriptor & d,
|
||||
class SDAI_Select *p )
|
||||
class SDAI_Select * p )
|
||||
: _derive( 0 ), _redefAttr( 0 ), aDesc( &d ) {
|
||||
ptr.sh = p;
|
||||
assert( &d ); //ensure that the AttrDescriptor is not a null pointer
|
||||
@@ -106,7 +106,7 @@ const BASE_TYPE STEPattribute::Type() const {
|
||||
|
||||
const BASE_TYPE STEPattribute::NonRefType() const {
|
||||
return ( _redefAttr ? _redefAttr->NonRefType() :
|
||||
( aDesc ? aDesc->NonRefType() : UNKNOWN_TYPE ) );
|
||||
( aDesc ? aDesc->NonRefType() : UNKNOWN_TYPE ) );
|
||||
}
|
||||
|
||||
const BASE_TYPE STEPattribute::BaseType() const {
|
||||
|
||||
@@ -43,7 +43,7 @@ STEPattribute & STEPattributeList::operator []( int n ) {
|
||||
cerr << "\nERROR in STEP Core library: " << __FILE__ << ":"
|
||||
<< __LINE__ << "\n" << _POC_ << "\n\n";
|
||||
abort();
|
||||
return *(STEPattribute*) 0; //will never get here, but gcc produces warning
|
||||
return *( STEPattribute * ) 0; //will never get here, but gcc produces warning
|
||||
}
|
||||
|
||||
int STEPattributeList::list_length() {
|
||||
@@ -57,13 +57,13 @@ void STEPattributeList::push( STEPattribute * a ) {
|
||||
// TODO: does it break anything?
|
||||
AttrListNode * a2 = ( AttrListNode * )head;
|
||||
while( a2 && push ) {
|
||||
if (*a == *(a2 -> attr)) {
|
||||
if( *a == *( a2 -> attr ) ) {
|
||||
push = false;
|
||||
}
|
||||
a2 = ( AttrListNode * )( a2->next );
|
||||
}
|
||||
|
||||
if (push) {
|
||||
if( push ) {
|
||||
AttrListNode * saln = new AttrListNode( a );
|
||||
AppendNode( saln );
|
||||
}
|
||||
|
||||
@@ -20,40 +20,38 @@ class STEPattribute;
|
||||
|
||||
class STEPattributeList;
|
||||
|
||||
class SCL_CORE_EXPORT AttrListNode : public SingleLinkNode
|
||||
{
|
||||
friend class STEPattributeList;
|
||||
class SCL_CORE_EXPORT AttrListNode : public SingleLinkNode {
|
||||
friend class STEPattributeList;
|
||||
|
||||
protected:
|
||||
STEPattribute *attr;
|
||||
protected:
|
||||
STEPattribute * attr;
|
||||
|
||||
public:
|
||||
AttrListNode(STEPattribute *a);
|
||||
virtual ~AttrListNode();
|
||||
public:
|
||||
AttrListNode( STEPattribute * a );
|
||||
virtual ~AttrListNode();
|
||||
|
||||
};
|
||||
|
||||
class SCL_CORE_EXPORT STEPattributeList : public SingleLinkList
|
||||
{
|
||||
public:
|
||||
STEPattributeList();
|
||||
virtual ~STEPattributeList();
|
||||
class SCL_CORE_EXPORT STEPattributeList : public SingleLinkList {
|
||||
public:
|
||||
STEPattributeList();
|
||||
virtual ~STEPattributeList();
|
||||
|
||||
STEPattribute& operator [] (int n);
|
||||
int list_length();
|
||||
void push(STEPattribute *a);
|
||||
STEPattribute & operator []( int n );
|
||||
int list_length();
|
||||
void push( STEPattribute * a );
|
||||
};
|
||||
|
||||
/*************************************************************//**
|
||||
** \file STEPattributeList.h
|
||||
** This file defines the type STEPattributeList -- a list
|
||||
** of pointers to STEPattribute objects. The nodes on the
|
||||
** list point to STEPattributes.
|
||||
**
|
||||
** The file is dependent on the file "STEPattribute.h"
|
||||
** which contains the definition of STEPattribute.
|
||||
**
|
||||
** 1/15/91 kcm
|
||||
** This file defines the type STEPattributeList -- a list
|
||||
** of pointers to STEPattribute objects. The nodes on the
|
||||
** list point to STEPattributes.
|
||||
**
|
||||
** The file is dependent on the file "STEPattribute.h"
|
||||
** which contains the definition of STEPattribute.
|
||||
**
|
||||
** 1/15/91 kcm
|
||||
*****************************************************************/
|
||||
|
||||
#endif
|
||||
|
||||
@@ -259,7 +259,7 @@ void STEPcomplex::AppendEntity( STEPcomplex * stepc ) {
|
||||
|
||||
// READ
|
||||
Severity STEPcomplex::STEPread( int id, int addFileId, class InstMgr * instance_set,
|
||||
istream & in, const char * currSch, bool /*useTechCor*/, bool /*strict*/ ) {
|
||||
istream & in, const char * currSch, bool /*useTechCor*/, bool /*strict*/ ) {
|
||||
char c;
|
||||
std::string typeNm;
|
||||
STEPcomplex * stepc = 0;
|
||||
@@ -324,7 +324,7 @@ Severity STEPcomplex::STEPread( int id, int addFileId, class InstMgr * instance_
|
||||
#ifdef buildwhileread
|
||||
// READ
|
||||
Severity STEPcomplex::STEPread( int id, int addFileId, class InstMgr * instance_set,
|
||||
istream & in, const char * currSch ) {
|
||||
istream & in, const char * currSch ) {
|
||||
ClearError( 1 );
|
||||
STEPfile_id = id;
|
||||
|
||||
@@ -364,7 +364,7 @@ Severity STEPcomplex::STEPread( int id, int addFileId, class InstMgr * instance_
|
||||
cout << s << endl;
|
||||
BuildAttrs( s.c_str() );
|
||||
SDAI_Application_instance::STEPread( id, addFileId, instance_set,
|
||||
in, currSch );
|
||||
in, currSch );
|
||||
|
||||
in >> ws;
|
||||
in.get( c );
|
||||
@@ -498,14 +498,14 @@ void STEPcomplex::BuildAttrs( const char * s ) {
|
||||
void STEPcomplex::STEPread_error( char c, int index, istream & in ) {
|
||||
cout << "STEPcomplex::STEPread_error(), index=" << index << ", entity #" << STEPfile_id << "." << endl;
|
||||
streampos p = in.tellg();
|
||||
std::string q,r;
|
||||
getline(in,q);
|
||||
getline(in,r);
|
||||
std::string q, r;
|
||||
getline( in, q );
|
||||
getline( in, r );
|
||||
cout << "Remainder of this line:" << endl << c << q << endl << "Next line:" << endl << r << endl;
|
||||
in.seekg(p);
|
||||
in.seekg( p );
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
** These functions take into account the current schema, so that if an entity
|
||||
** or attribute type is renamed in this schema (using the USE/REF clause) the
|
||||
** new name is written out. They do not, however, comply with the requirement
|
||||
@@ -527,11 +527,11 @@ const char * STEPcomplex::STEPwrite( std::string & buf, const char * currSch ) {
|
||||
|
||||
stringstream ss;
|
||||
ss << "#" << STEPfile_id << "=(";
|
||||
WriteExtMapEntities(ss, currSch);
|
||||
WriteExtMapEntities( ss, currSch );
|
||||
ss << ");";
|
||||
ss << ends;
|
||||
|
||||
buf.append(ss.str());
|
||||
buf.append( ss.str() );
|
||||
|
||||
return const_cast<char *>( buf.c_str() );
|
||||
}
|
||||
@@ -581,7 +581,7 @@ const char * STEPcomplex::WriteExtMapEntities( std::string & buf, const char * c
|
||||
return const_cast<char *>( buf.c_str() );
|
||||
}
|
||||
|
||||
void STEPcomplex::CopyAs( SDAI_Application_instance *se ) {
|
||||
void STEPcomplex::CopyAs( SDAI_Application_instance * se ) {
|
||||
if( !se->IsComplex() ) {
|
||||
char errStr[BUFSIZ];
|
||||
cerr << "STEPcomplex::CopyAs() called with non-complex entity: "
|
||||
|
||||
@@ -9,55 +9,55 @@
|
||||
#include <Registry.h>
|
||||
|
||||
class SCL_CORE_EXPORT STEPcomplex : public SDAI_Application_instance {
|
||||
public:
|
||||
STEPcomplex * sc;
|
||||
STEPcomplex * head;
|
||||
Registry * _registry;
|
||||
int visited; ///< used when reading (or as you wish?)
|
||||
public:
|
||||
STEPcomplex * sc;
|
||||
STEPcomplex * head;
|
||||
Registry * _registry;
|
||||
int visited; ///< used when reading (or as you wish?)
|
||||
|
||||
public:
|
||||
STEPcomplex(Registry *registry, int fileid);
|
||||
STEPcomplex(Registry *registry, const std::string **names, int fileid,
|
||||
const char *schnm =0);
|
||||
STEPcomplex(Registry *registry, const char **names, int fileid,
|
||||
const char *schnm =0);
|
||||
virtual ~STEPcomplex();
|
||||
public:
|
||||
STEPcomplex( Registry * registry, int fileid );
|
||||
STEPcomplex( Registry * registry, const std::string ** names, int fileid,
|
||||
const char * schnm = 0 );
|
||||
STEPcomplex( Registry * registry, const char ** names, int fileid,
|
||||
const char * schnm = 0 );
|
||||
virtual ~STEPcomplex();
|
||||
|
||||
int EntityExists(const char *name, const char *currSch =0);
|
||||
STEPcomplex *EntityPart(const char *name, const char *currSch =0);
|
||||
int EntityExists( const char * name, const char * currSch = 0 );
|
||||
STEPcomplex * EntityPart( const char * name, const char * currSch = 0 );
|
||||
|
||||
|
||||
virtual const EntityDescriptor * IsA(const EntityDescriptor *) const;
|
||||
|
||||
virtual Severity ValidLevel(ErrorDescriptor *error, InstMgr *im,
|
||||
int clearError = 1);
|
||||
virtual const EntityDescriptor * IsA( const EntityDescriptor * ) const;
|
||||
|
||||
virtual Severity ValidLevel( ErrorDescriptor * error, InstMgr * im,
|
||||
int clearError = 1 );
|
||||
// READ
|
||||
virtual Severity STEPread(int id, int addFileId,
|
||||
class InstMgr * instance_set,
|
||||
istream& in =cin, const char *currSch =NULL,
|
||||
bool useTechCor = true, bool strict = true );
|
||||
virtual Severity STEPread( int id, int addFileId,
|
||||
class InstMgr * instance_set,
|
||||
istream & in = cin, const char * currSch = NULL,
|
||||
bool useTechCor = true, bool strict = true );
|
||||
|
||||
virtual void STEPread_error(char c, int index, istream& in);
|
||||
virtual void STEPread_error( char c, int index, istream & in );
|
||||
|
||||
// WRITE
|
||||
virtual void STEPwrite(ostream& out =cout, const char *currSch =NULL,
|
||||
int writeComment = 1);
|
||||
virtual const char * STEPwrite(std::string &buf, const char *currSch =NULL);
|
||||
virtual void STEPwrite( ostream & out = cout, const char * currSch = NULL,
|
||||
int writeComment = 1 );
|
||||
virtual const char * STEPwrite( std::string & buf, const char * currSch = NULL );
|
||||
|
||||
SDAI_Application_instance *Replicate();
|
||||
SDAI_Application_instance * Replicate();
|
||||
|
||||
virtual void WriteExtMapEntities(ostream& out =cout,
|
||||
const char *currSch =NULL);
|
||||
virtual const char * WriteExtMapEntities(std::string &buf,
|
||||
const char *currSch =NULL);
|
||||
virtual void AppendEntity(STEPcomplex *stepc);
|
||||
virtual void WriteExtMapEntities( ostream & out = cout,
|
||||
const char * currSch = NULL );
|
||||
virtual const char * WriteExtMapEntities( std::string & buf,
|
||||
const char * currSch = NULL );
|
||||
virtual void AppendEntity( STEPcomplex * stepc );
|
||||
|
||||
protected:
|
||||
virtual void CopyAs(SDAI_Application_instance *);
|
||||
void BuildAttrs(const char *s);
|
||||
void AddEntityPart(const char *name);
|
||||
void AssignDerives();
|
||||
void Initialize(const char **, const char *);
|
||||
protected:
|
||||
virtual void CopyAs( SDAI_Application_instance * );
|
||||
void BuildAttrs( const char * s );
|
||||
void AddEntityPart( const char * name );
|
||||
void AssignDerives();
|
||||
void Initialize( const char **, const char * );
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -106,7 +106,7 @@ const char * SCLundefined::asStr( std::string & s ) const {
|
||||
}
|
||||
|
||||
const char * SCLundefined::STEPwrite( std::string & s ) {
|
||||
if ( val.empty() ) {
|
||||
if( val.empty() ) {
|
||||
s = "$";
|
||||
} else {
|
||||
s = val.c_str();
|
||||
@@ -115,7 +115,7 @@ const char * SCLundefined::STEPwrite( std::string & s ) {
|
||||
}
|
||||
|
||||
void SCLundefined:: STEPwrite( ostream & out ) {
|
||||
if( val.empty()) {
|
||||
if( val.empty() ) {
|
||||
out << "$";
|
||||
} else {
|
||||
out << val;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#ifndef STEPUNDEFINED_H
|
||||
#define STEPUNDEFINED_H
|
||||
#ifndef STEPUNDEFINED_H
|
||||
#define STEPUNDEFINED_H
|
||||
|
||||
/*
|
||||
* NIST STEP Core Class Library
|
||||
@@ -18,28 +18,28 @@
|
||||
#include <read_func.h>
|
||||
|
||||
class SCL_CORE_EXPORT SCLundefined {
|
||||
protected:
|
||||
std::string val;
|
||||
|
||||
public:
|
||||
// INPUT
|
||||
virtual Severity StrToVal(const char *s, ErrorDescriptor *err);
|
||||
virtual Severity StrToVal(istream &in, ErrorDescriptor *err);
|
||||
protected:
|
||||
std::string val;
|
||||
|
||||
virtual Severity STEPread(const char *s, ErrorDescriptor *err);
|
||||
virtual Severity STEPread(istream &in, ErrorDescriptor *err);
|
||||
public:
|
||||
// INPUT
|
||||
virtual Severity StrToVal( const char * s, ErrorDescriptor * err );
|
||||
virtual Severity StrToVal( istream & in, ErrorDescriptor * err );
|
||||
|
||||
virtual Severity STEPread( const char * s, ErrorDescriptor * err );
|
||||
virtual Severity STEPread( istream & in, ErrorDescriptor * err );
|
||||
|
||||
// OUTPUT
|
||||
virtual const char *asStr(std::string& s) const;
|
||||
virtual const char *STEPwrite(std::string& s);
|
||||
virtual void STEPwrite (ostream& out =cout);
|
||||
virtual const char * asStr( std::string & s ) const;
|
||||
virtual const char * STEPwrite( std::string & s );
|
||||
virtual void STEPwrite( ostream & out = cout );
|
||||
|
||||
int set_null ();
|
||||
int is_null ();
|
||||
SCLundefined& operator= (const SCLundefined&);
|
||||
SCLundefined& operator= (const char *str);
|
||||
SCLundefined ();
|
||||
virtual ~SCLundefined ();
|
||||
int set_null();
|
||||
int is_null();
|
||||
SCLundefined & operator= ( const SCLundefined & );
|
||||
SCLundefined & operator= ( const char * str );
|
||||
SCLundefined();
|
||||
virtual ~SCLundefined();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -16,44 +16,44 @@
|
||||
|
||||
class SCL_CORE_EXPORT SingleLinkList {
|
||||
|
||||
// node which represents the value is contained in the subclass
|
||||
// since it may have different types for different lists
|
||||
|
||||
protected:
|
||||
|
||||
class SingleLinkNode * head;
|
||||
SingleLinkNode * tail;
|
||||
// node which represents the value is contained in the subclass
|
||||
// since it may have different types for different lists
|
||||
|
||||
public:
|
||||
|
||||
virtual SingleLinkNode *NewNode();
|
||||
virtual void AppendNode (SingleLinkNode *);
|
||||
virtual void DeleteNode (SingleLinkNode *);
|
||||
protected:
|
||||
|
||||
virtual void Empty ();
|
||||
virtual void DeleteFollowingNodes (SingleLinkNode *);
|
||||
virtual SingleLinkNode * GetHead () const;
|
||||
|
||||
int EntryCount() const;
|
||||
class SingleLinkNode * head;
|
||||
SingleLinkNode * tail;
|
||||
|
||||
SingleLinkList ();
|
||||
virtual ~SingleLinkList ();
|
||||
public:
|
||||
|
||||
virtual SingleLinkNode * NewNode();
|
||||
virtual void AppendNode( SingleLinkNode * );
|
||||
virtual void DeleteNode( SingleLinkNode * );
|
||||
|
||||
virtual void Empty();
|
||||
virtual void DeleteFollowingNodes( SingleLinkNode * );
|
||||
virtual SingleLinkNode * GetHead() const;
|
||||
|
||||
int EntryCount() const;
|
||||
|
||||
SingleLinkList();
|
||||
virtual ~SingleLinkList();
|
||||
|
||||
}
|
||||
;
|
||||
|
||||
|
||||
class SCL_CORE_EXPORT SingleLinkNode {
|
||||
friend class SingleLinkList;
|
||||
protected:
|
||||
friend class SingleLinkList;
|
||||
protected:
|
||||
|
||||
public:
|
||||
SingleLinkList *owner;
|
||||
SingleLinkNode *next;
|
||||
public:
|
||||
SingleLinkList * owner;
|
||||
SingleLinkNode * next;
|
||||
|
||||
virtual SingleLinkNode *NextNode () const;
|
||||
SingleLinkNode() : owner(0), next(0) { }
|
||||
virtual ~SingleLinkNode() { }
|
||||
virtual SingleLinkNode * NextNode() const;
|
||||
SingleLinkNode() : owner( 0 ), next( 0 ) { }
|
||||
virtual ~SingleLinkNode() { }
|
||||
|
||||
};
|
||||
|
||||
|
||||
+20
-20
@@ -17,27 +17,27 @@
|
||||
// IMS, 9 Aug 95: changed values to make these values usable in a bitmask
|
||||
|
||||
enum PrimitiveType {
|
||||
sdaiINTEGER = 0x0001,
|
||||
sdaiREAL = 0x0002,
|
||||
sdaiBOOLEAN = 0x0004,
|
||||
sdaiLOGICAL = 0x0008,
|
||||
sdaiSTRING = 0x0010,
|
||||
sdaiBINARY = 0x0020,
|
||||
sdaiENUMERATION = 0x0040,
|
||||
sdaiSELECT = 0x0080,
|
||||
sdaiINSTANCE = 0x0100,
|
||||
sdaiAGGR = 0x0200,
|
||||
sdaiNUMBER = 0x0400,
|
||||
sdaiINTEGER = 0x0001,
|
||||
sdaiREAL = 0x0002,
|
||||
sdaiBOOLEAN = 0x0004,
|
||||
sdaiLOGICAL = 0x0008,
|
||||
sdaiSTRING = 0x0010,
|
||||
sdaiBINARY = 0x0020,
|
||||
sdaiENUMERATION = 0x0040,
|
||||
sdaiSELECT = 0x0080,
|
||||
sdaiINSTANCE = 0x0100,
|
||||
sdaiAGGR = 0x0200,
|
||||
sdaiNUMBER = 0x0400,
|
||||
// The elements defined below are not part of part 23
|
||||
// (IMS: these should not be used as bitmask fields)
|
||||
ARRAY_TYPE, // DAS
|
||||
BAG_TYPE, // DAS
|
||||
SET_TYPE, // DAS
|
||||
LIST_TYPE, // DAS
|
||||
GENERIC_TYPE,
|
||||
REFERENCE_TYPE,
|
||||
UNKNOWN_TYPE
|
||||
};
|
||||
ARRAY_TYPE, // DAS
|
||||
BAG_TYPE, // DAS
|
||||
SET_TYPE, // DAS
|
||||
LIST_TYPE, // DAS
|
||||
GENERIC_TYPE,
|
||||
REFERENCE_TYPE,
|
||||
UNKNOWN_TYPE
|
||||
};
|
||||
|
||||
// for backwards compatibility with our previous implementation
|
||||
typedef PrimitiveType BASE_TYPE;
|
||||
@@ -65,4 +65,4 @@ typedef PrimitiveType BASE_TYPE;
|
||||
UNKNOWN_TYPE
|
||||
*/
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
+279
-205
@@ -73,118 +73,171 @@ class ComplexList;
|
||||
class ComplexCollect;
|
||||
|
||||
class SCL_CORE_EXPORT EntNode {
|
||||
friend class SimpleList;
|
||||
friend class AndOrList;
|
||||
friend class AndList;
|
||||
friend class OrList;
|
||||
friend class ComplexList;
|
||||
friend class SimpleList;
|
||||
friend class AndOrList;
|
||||
friend class AndList;
|
||||
friend class OrList;
|
||||
friend class ComplexList;
|
||||
|
||||
public:
|
||||
EntNode( const char *nm="" ) : next(0), mark(NOMARK), multSupers(0)
|
||||
{ StrToLower( nm, name ); }
|
||||
EntNode( const char ** ); ///< given a list, create a linked list of EntNodes
|
||||
~EntNode() { if ( next ) delete next; }
|
||||
operator const char *() { return name; }
|
||||
bool operator== ( EntNode &ent )
|
||||
{ return ( strcmp( name, ent.name ) == 0 ); }
|
||||
bool operator< ( EntNode &ent )
|
||||
{ return ( strcmp( name, ent.name ) < 0 ); }
|
||||
bool operator> ( EntNode &ent )
|
||||
{ return ( strcmp( name, ent.name ) > 0 ); }
|
||||
EntNode &operator= ( EntNode &ent );
|
||||
void Name( const char *nm ) { strncpy( name, nm, BUFSIZ-1 ); }
|
||||
const char *Name() { return name; }
|
||||
void setmark( MarkType stamp=MARK ) { mark = stamp; }
|
||||
void markAll( MarkType=MARK );
|
||||
void unmarkAll() { markAll( NOMARK ); }
|
||||
bool marked( MarkType base=ORMARK ) { return ( mark >= base ); }
|
||||
bool allMarked(); ///< returns true if all nodes in list are marked
|
||||
int unmarkedCount();
|
||||
bool multSuprs() { return multSupers; }
|
||||
void multSuprs( bool j ) { multSupers = j; }
|
||||
void sort( EntNode ** );
|
||||
public:
|
||||
EntNode( const char * nm = "" ) : next( 0 ), mark( NOMARK ), multSupers( 0 ) {
|
||||
StrToLower( nm, name );
|
||||
}
|
||||
EntNode( const char ** ); ///< given a list, create a linked list of EntNodes
|
||||
~EntNode() {
|
||||
if( next ) {
|
||||
delete next;
|
||||
}
|
||||
}
|
||||
operator const char * () {
|
||||
return name;
|
||||
}
|
||||
bool operator== ( EntNode & ent ) {
|
||||
return ( strcmp( name, ent.name ) == 0 );
|
||||
}
|
||||
bool operator< ( EntNode & ent ) {
|
||||
return ( strcmp( name, ent.name ) < 0 );
|
||||
}
|
||||
bool operator> ( EntNode & ent ) {
|
||||
return ( strcmp( name, ent.name ) > 0 );
|
||||
}
|
||||
EntNode & operator= ( EntNode & ent );
|
||||
void Name( const char * nm ) {
|
||||
strncpy( name, nm, BUFSIZ - 1 );
|
||||
}
|
||||
const char * Name() {
|
||||
return name;
|
||||
}
|
||||
void setmark( MarkType stamp = MARK ) {
|
||||
mark = stamp;
|
||||
}
|
||||
void markAll( MarkType = MARK );
|
||||
void unmarkAll() {
|
||||
markAll( NOMARK );
|
||||
}
|
||||
bool marked( MarkType base = ORMARK ) {
|
||||
return ( mark >= base );
|
||||
}
|
||||
bool allMarked(); ///< returns true if all nodes in list are marked
|
||||
int unmarkedCount();
|
||||
bool multSuprs() {
|
||||
return multSupers;
|
||||
}
|
||||
void multSuprs( bool j ) {
|
||||
multSupers = j;
|
||||
}
|
||||
void sort( EntNode ** );
|
||||
|
||||
EntNode *next;
|
||||
EntNode * next;
|
||||
|
||||
private:
|
||||
MarkType mark;
|
||||
char name[BUFSIZ];
|
||||
bool multSupers; ///< do I correspond to an entity with >1 supertype?
|
||||
EntNode *lastSmaller( EntNode * ); ///< used by ::sort()
|
||||
private:
|
||||
MarkType mark;
|
||||
char name[BUFSIZ];
|
||||
bool multSupers; ///< do I correspond to an entity with >1 supertype?
|
||||
EntNode * lastSmaller( EntNode * ); ///< used by ::sort()
|
||||
};
|
||||
|
||||
class SCL_CORE_EXPORT EntList {
|
||||
friend class MultList;
|
||||
friend class JoinList;
|
||||
friend class OrList;
|
||||
friend class ComplexList;
|
||||
friend class ComplexCollect;
|
||||
friend ostream & operator<< ( ostream &, EntList & );
|
||||
friend ostream & operator<< ( ostream &, MultList & );
|
||||
friend class MultList;
|
||||
friend class JoinList;
|
||||
friend class OrList;
|
||||
friend class ComplexList;
|
||||
friend class ComplexCollect;
|
||||
friend ostream & operator<< ( ostream &, EntList & );
|
||||
friend ostream & operator<< ( ostream &, MultList & );
|
||||
|
||||
public:
|
||||
EntList( JoinType j ) : join(j), next(0), prev(0), viable(UNKNOWN),
|
||||
level(0) {}
|
||||
virtual ~EntList() {}
|
||||
MatchType viableVal() { return viable; }
|
||||
virtual void setLevel( int l ) { level = l; }
|
||||
virtual bool contains( char * ) =0;
|
||||
virtual bool hit( char * ) =0;
|
||||
virtual MatchType matchNonORs( EntNode * ) { return UNKNOWN; }
|
||||
virtual bool acceptChoice( EntNode * ) =0;
|
||||
virtual void unmarkAll( EntNode * ) =0;
|
||||
virtual void reset() { viable = UNKNOWN; }
|
||||
int siblings();
|
||||
public:
|
||||
EntList( JoinType j ) : join( j ), next( 0 ), prev( 0 ), viable( UNKNOWN ),
|
||||
level( 0 ) {}
|
||||
virtual ~EntList() {}
|
||||
MatchType viableVal() {
|
||||
return viable;
|
||||
}
|
||||
virtual void setLevel( int l ) {
|
||||
level = l;
|
||||
}
|
||||
virtual bool contains( char * ) = 0;
|
||||
virtual bool hit( char * ) = 0;
|
||||
virtual MatchType matchNonORs( EntNode * ) {
|
||||
return UNKNOWN;
|
||||
}
|
||||
virtual bool acceptChoice( EntNode * ) = 0;
|
||||
virtual void unmarkAll( EntNode * ) = 0;
|
||||
virtual void reset() {
|
||||
viable = UNKNOWN;
|
||||
}
|
||||
int siblings();
|
||||
|
||||
// List access functions. They access desired children based on their
|
||||
// join or viable values. Below is an incomplete list of possible fns,
|
||||
// but all we need.
|
||||
EntList *firstNot( JoinType );
|
||||
EntList *nextNot( JoinType j ) { return next->firstNot( j ); }
|
||||
EntList *firstWanted( MatchType );
|
||||
EntList *nextWanted( MatchType mat ) { return next->firstWanted( mat ); }
|
||||
EntList *lastNot( JoinType );
|
||||
EntList *prevNot( JoinType j ) { return prev->lastNot( j ); }
|
||||
EntList *lastWanted( MatchType );
|
||||
EntList *prevWanted( MatchType mat ) { return prev->lastWanted( mat ); }
|
||||
// List access functions. They access desired children based on their
|
||||
// join or viable values. Below is an incomplete list of possible fns,
|
||||
// but all we need.
|
||||
EntList * firstNot( JoinType );
|
||||
EntList * nextNot( JoinType j ) {
|
||||
return next->firstNot( j );
|
||||
}
|
||||
EntList * firstWanted( MatchType );
|
||||
EntList * nextWanted( MatchType mat ) {
|
||||
return next->firstWanted( mat );
|
||||
}
|
||||
EntList * lastNot( JoinType );
|
||||
EntList * prevNot( JoinType j ) {
|
||||
return prev->lastNot( j );
|
||||
}
|
||||
EntList * lastWanted( MatchType );
|
||||
EntList * prevWanted( MatchType mat ) {
|
||||
return prev->lastWanted( mat );
|
||||
}
|
||||
|
||||
JoinType join;
|
||||
int multiple() { return ( join != SIMPLE ); }
|
||||
EntList *next, *prev;
|
||||
JoinType join;
|
||||
int multiple() {
|
||||
return ( join != SIMPLE );
|
||||
}
|
||||
EntList * next, *prev;
|
||||
|
||||
protected:
|
||||
MatchType viable;
|
||||
/** \var viable
|
||||
* How does this EntList match the complex type. Used especially if Ent-
|
||||
* List's parent is an OrList or AndOrList to record if this child is an
|
||||
* acceptable choice or not. For an AndOr, viable children are accepted
|
||||
* right away. For Or, only one is accepted, but we keep track of the
|
||||
* other possible solutions in case we'll want to try them.
|
||||
*/
|
||||
int level; ///< How many levels deep are we (main use for printing).
|
||||
protected:
|
||||
MatchType viable;
|
||||
/** \var viable
|
||||
* How does this EntList match the complex type. Used especially if Ent-
|
||||
* List's parent is an OrList or AndOrList to record if this child is an
|
||||
* acceptable choice or not. For an AndOr, viable children are accepted
|
||||
* right away. For Or, only one is accepted, but we keep track of the
|
||||
* other possible solutions in case we'll want to try them.
|
||||
*/
|
||||
int level; ///< How many levels deep are we (main use for printing).
|
||||
};
|
||||
|
||||
class SCL_CORE_EXPORT SimpleList : public EntList {
|
||||
friend class ComplexList;
|
||||
friend ostream & operator<< ( ostream &, SimpleList & );
|
||||
friend class ComplexList;
|
||||
friend ostream & operator<< ( ostream &, SimpleList & );
|
||||
|
||||
public:
|
||||
SimpleList( const char *n ) : EntList(SIMPLE), I_marked(NOMARK)
|
||||
{ strcpy( name, n ); }
|
||||
~SimpleList() {}
|
||||
int operator== ( const char *nm )
|
||||
{ return ( strcmp( name, nm ) == 0 ); }
|
||||
const char *Name() { return name; }
|
||||
bool contains( char *nm ) { return *this == nm; }
|
||||
bool hit( char *nm ) { return *this == nm; }
|
||||
MatchType matchNonORs( EntNode * );
|
||||
bool acceptChoice( EntNode * );
|
||||
void unmarkAll( EntNode * );
|
||||
void reset() { viable = UNKNOWN; I_marked = NOMARK; }
|
||||
public:
|
||||
SimpleList( const char * n ) : EntList( SIMPLE ), I_marked( NOMARK ) {
|
||||
strcpy( name, n );
|
||||
}
|
||||
~SimpleList() {}
|
||||
int operator== ( const char * nm ) {
|
||||
return ( strcmp( name, nm ) == 0 );
|
||||
}
|
||||
const char * Name() {
|
||||
return name;
|
||||
}
|
||||
bool contains( char * nm ) {
|
||||
return *this == nm;
|
||||
}
|
||||
bool hit( char * nm ) {
|
||||
return *this == nm;
|
||||
}
|
||||
MatchType matchNonORs( EntNode * );
|
||||
bool acceptChoice( EntNode * );
|
||||
void unmarkAll( EntNode * );
|
||||
void reset() {
|
||||
viable = UNKNOWN;
|
||||
I_marked = NOMARK;
|
||||
}
|
||||
|
||||
private:
|
||||
char name[BUFSIZ]; ///< Name of entity we correspond to.
|
||||
MarkType I_marked; ///< Did I mark, and with what type of mark.
|
||||
private:
|
||||
char name[BUFSIZ]; ///< Name of entity we correspond to.
|
||||
MarkType I_marked; ///< Did I mark, and with what type of mark.
|
||||
};
|
||||
|
||||
/** \class MultList
|
||||
@@ -193,39 +246,43 @@ class SCL_CORE_EXPORT SimpleList : public EntList {
|
||||
*/
|
||||
class SCL_CORE_EXPORT MultList : public EntList {
|
||||
|
||||
friend class ComplexList;
|
||||
friend class ComplexCollect;
|
||||
friend ostream & operator<< ( ostream &, MultList & );
|
||||
friend class ComplexList;
|
||||
friend class ComplexCollect;
|
||||
friend ostream & operator<< ( ostream &, MultList & );
|
||||
|
||||
public:
|
||||
MultList( JoinType j ) : EntList(j), supertype(0), numchildren(0),
|
||||
childList(0) {}
|
||||
~MultList();
|
||||
void setLevel( int );
|
||||
bool contains( char * );
|
||||
bool hit( char * );
|
||||
void appendList( EntList * );
|
||||
EntList *copyList( EntList * );
|
||||
virtual MatchType matchORs( EntNode * ) =0;
|
||||
virtual MatchType tryNext( EntNode * );
|
||||
public:
|
||||
MultList( JoinType j ) : EntList( j ), supertype( 0 ), numchildren( 0 ),
|
||||
childList( 0 ) {}
|
||||
~MultList();
|
||||
void setLevel( int );
|
||||
bool contains( char * );
|
||||
bool hit( char * );
|
||||
void appendList( EntList * );
|
||||
EntList * copyList( EntList * );
|
||||
virtual MatchType matchORs( EntNode * ) = 0;
|
||||
virtual MatchType tryNext( EntNode * );
|
||||
|
||||
int childCount() { return numchildren; }
|
||||
EntList *getChild( int );
|
||||
EntList *getLast() { return ( getChild( numchildren-1 ) ); }
|
||||
void unmarkAll( EntNode * );
|
||||
bool prevKnown( EntList * desc );
|
||||
void reset();
|
||||
int childCount() {
|
||||
return numchildren;
|
||||
}
|
||||
EntList * getChild( int );
|
||||
EntList * getLast() {
|
||||
return ( getChild( numchildren - 1 ) );
|
||||
}
|
||||
void unmarkAll( EntNode * );
|
||||
bool prevKnown( EntList * desc );
|
||||
void reset();
|
||||
|
||||
protected:
|
||||
int supertype; ///< do I represent a supertype?
|
||||
int numchildren;
|
||||
EntList *childList;
|
||||
/** \var childList
|
||||
* Points to a list of "children" of this EntList. E.g., if join =
|
||||
* AND, it would point to a list of the entity types we are AND'ing.
|
||||
* The children may be SIMPLE EntLists (contain entity names) or may
|
||||
* themselves be And-, Or-, or AndOrLists.
|
||||
*/
|
||||
protected:
|
||||
int supertype; ///< do I represent a supertype?
|
||||
int numchildren;
|
||||
EntList * childList;
|
||||
/** \var childList
|
||||
* Points to a list of "children" of this EntList. E.g., if join =
|
||||
* AND, it would point to a list of the entity types we are AND'ing.
|
||||
* The children may be SIMPLE EntLists (contain entity names) or may
|
||||
* themselves be And-, Or-, or AndOrLists.
|
||||
*/
|
||||
};
|
||||
|
||||
/** \class JoinList
|
||||
@@ -233,51 +290,58 @@ class SCL_CORE_EXPORT MultList : public EntList {
|
||||
* ones which join their multiple children.
|
||||
*/
|
||||
class SCL_CORE_EXPORT JoinList : public MultList {
|
||||
public:
|
||||
JoinList( JoinType j ) : MultList(j) {}
|
||||
~JoinList() {}
|
||||
void setViableVal( EntNode * );
|
||||
bool acceptChoice( EntNode * ents );
|
||||
public:
|
||||
JoinList( JoinType j ) : MultList( j ) {}
|
||||
~JoinList() {}
|
||||
void setViableVal( EntNode * );
|
||||
bool acceptChoice( EntNode * ents );
|
||||
};
|
||||
|
||||
class SCL_CORE_EXPORT AndOrList : public JoinList {
|
||||
friend class ComplexList;
|
||||
friend class ComplexList;
|
||||
|
||||
public:
|
||||
AndOrList() : JoinList( ANDOR ) {}
|
||||
~AndOrList() {}
|
||||
MatchType matchNonORs( EntNode * );
|
||||
MatchType matchORs( EntNode * );
|
||||
public:
|
||||
AndOrList() : JoinList( ANDOR ) {}
|
||||
~AndOrList() {}
|
||||
MatchType matchNonORs( EntNode * );
|
||||
MatchType matchORs( EntNode * );
|
||||
};
|
||||
|
||||
class SCL_CORE_EXPORT AndList : public JoinList {
|
||||
friend class ComplexList;
|
||||
friend ostream & operator<< ( ostream &, ComplexList & );
|
||||
friend class ComplexList;
|
||||
friend ostream & operator<< ( ostream &, ComplexList & );
|
||||
|
||||
public:
|
||||
AndList() : JoinList( AND ) {}
|
||||
~AndList() {}
|
||||
MatchType matchNonORs( EntNode * );
|
||||
MatchType matchORs( EntNode * );
|
||||
public:
|
||||
AndList() : JoinList( AND ) {}
|
||||
~AndList() {}
|
||||
MatchType matchNonORs( EntNode * );
|
||||
MatchType matchORs( EntNode * );
|
||||
};
|
||||
|
||||
class SCL_CORE_EXPORT OrList : public MultList {
|
||||
public:
|
||||
OrList() : MultList( OR ), choice(-1), choice1(-2), choiceCount(0) {}
|
||||
~OrList() {}
|
||||
bool hit( char * nm );
|
||||
MatchType matchORs( EntNode * );
|
||||
MatchType tryNext( EntNode * );
|
||||
void unmarkAll( EntNode * );
|
||||
bool acceptChoice( EntNode * );
|
||||
bool acceptNextChoice( EntNode *ents )
|
||||
{ choice++; return ( acceptChoice( ents ) ); }
|
||||
void reset() { choice = -1; choice1 = -2; choiceCount = 0; MultList::reset(); }
|
||||
public:
|
||||
OrList() : MultList( OR ), choice( -1 ), choice1( -2 ), choiceCount( 0 ) {}
|
||||
~OrList() {}
|
||||
bool hit( char * nm );
|
||||
MatchType matchORs( EntNode * );
|
||||
MatchType tryNext( EntNode * );
|
||||
void unmarkAll( EntNode * );
|
||||
bool acceptChoice( EntNode * );
|
||||
bool acceptNextChoice( EntNode * ents ) {
|
||||
choice++;
|
||||
return ( acceptChoice( ents ) );
|
||||
}
|
||||
void reset() {
|
||||
choice = -1;
|
||||
choice1 = -2;
|
||||
choiceCount = 0;
|
||||
MultList::reset();
|
||||
}
|
||||
|
||||
private:
|
||||
int choice; ///< Which choice of our childList did we select from this OrList
|
||||
int choice1; ///< what's the first viable choice
|
||||
int choiceCount; ///< how many choices are there entirely.
|
||||
private:
|
||||
int choice; ///< Which choice of our childList did we select from this OrList
|
||||
int choice1; ///< what's the first viable choice
|
||||
int choiceCount; ///< how many choices are there entirely.
|
||||
};
|
||||
|
||||
/** \class ComplexList
|
||||
@@ -285,63 +349,73 @@ class SCL_CORE_EXPORT OrList : public MultList {
|
||||
* instantiable complex entities defined by an EXPRESS expression.
|
||||
*/
|
||||
class SCL_CORE_EXPORT ComplexList {
|
||||
friend class ultList;
|
||||
friend class ComplexCollect;
|
||||
friend ostream & operator<< ( ostream &, ComplexList & );
|
||||
friend class ultList;
|
||||
friend class ComplexCollect;
|
||||
friend ostream & operator<< ( ostream &, ComplexList & );
|
||||
|
||||
public:
|
||||
ComplexList( AndList *alist = NULL ) : list(0), head(alist), next(0),
|
||||
abstract(0), dependent(0),
|
||||
multSupers(0) {}
|
||||
~ComplexList();
|
||||
void buildList();
|
||||
void remove();
|
||||
int operator< ( ComplexList &c )
|
||||
{ return ( strcmp( supertype(), c.supertype() ) < 0 ); }
|
||||
int operator< ( char *name )
|
||||
{ return ( strcmp( supertype(), name ) < 0 ); }
|
||||
int operator== ( char *name )
|
||||
{ return ( strcmp( supertype(), name ) == 0 ); }
|
||||
const char *supertype() { return ((SimpleList *)head->childList)->name; }
|
||||
/** \fn supertype
|
||||
* Based on knowledge that ComplexList always created by ANDing supertype
|
||||
* with subtypes.
|
||||
*/
|
||||
bool toplevel( const char * name );
|
||||
bool contains( EntNode * ents );
|
||||
bool matches( EntNode * );
|
||||
public:
|
||||
ComplexList( AndList * alist = NULL ) : list( 0 ), head( alist ), next( 0 ),
|
||||
abstract( 0 ), dependent( 0 ),
|
||||
multSupers( 0 ) {}
|
||||
~ComplexList();
|
||||
void buildList();
|
||||
void remove();
|
||||
int operator< ( ComplexList & c ) {
|
||||
return ( strcmp( supertype(), c.supertype() ) < 0 );
|
||||
}
|
||||
int operator< ( char * name ) {
|
||||
return ( strcmp( supertype(), name ) < 0 );
|
||||
}
|
||||
int operator== ( char * name ) {
|
||||
return ( strcmp( supertype(), name ) == 0 );
|
||||
}
|
||||
const char * supertype() {
|
||||
return ( ( SimpleList * )head->childList )->name;
|
||||
}
|
||||
/** \fn supertype
|
||||
* Based on knowledge that ComplexList always created by ANDing supertype
|
||||
* with subtypes.
|
||||
*/
|
||||
bool toplevel( const char * name );
|
||||
bool contains( EntNode * ents );
|
||||
bool matches( EntNode * );
|
||||
|
||||
EntNode *list; /**< List of all entities contained in this complex type,
|
||||
EntNode * list; /**< List of all entities contained in this complex type,
|
||||
* regardless of how. (Used as a quick way of determining
|
||||
* if this List *may* contain a certain complex type.)
|
||||
*/
|
||||
AndList *head;
|
||||
ComplexList *next;
|
||||
int Dependent() { return dependent; }
|
||||
AndList * head;
|
||||
ComplexList * next;
|
||||
int Dependent() {
|
||||
return dependent;
|
||||
}
|
||||
|
||||
private:
|
||||
void addChildren( EntList * );
|
||||
bool hitMultNodes( EntNode * ents );
|
||||
int abstract; ///< is our supertype abstract?
|
||||
int dependent; ///< is our supertype also a subtype of other supertype(s)?
|
||||
bool multSupers; ///< am I a combo-CList created to test a subtype which has >1 supertypes?
|
||||
private:
|
||||
void addChildren( EntList * );
|
||||
bool hitMultNodes( EntNode * ents );
|
||||
int abstract; ///< is our supertype abstract?
|
||||
int dependent; ///< is our supertype also a subtype of other supertype(s)?
|
||||
bool multSupers; ///< am I a combo-CList created to test a subtype which has >1 supertypes?
|
||||
};
|
||||
|
||||
/// The collection of all the ComplexLists defined by the current schema.
|
||||
class SCL_CORE_EXPORT ComplexCollect {
|
||||
public:
|
||||
ComplexCollect( ComplexList *c = NULL ) : clists(c)
|
||||
{ count = ( c ? 1 : 0 ); }
|
||||
~ComplexCollect() { delete clists; }
|
||||
void insert( ComplexList * );
|
||||
void remove( ComplexList * ); ///< Remove this list but don't delete its hierarchy structure, because it's used elsewhere.
|
||||
ComplexList *find( char * );
|
||||
bool supports( EntNode * ) const;
|
||||
public:
|
||||
ComplexCollect( ComplexList * c = NULL ) : clists( c ) {
|
||||
count = ( c ? 1 : 0 );
|
||||
}
|
||||
~ComplexCollect() {
|
||||
delete clists;
|
||||
}
|
||||
void insert( ComplexList * );
|
||||
void remove( ComplexList * ); ///< Remove this list but don't delete its hierarchy structure, because it's used elsewhere.
|
||||
ComplexList * find( char * );
|
||||
bool supports( EntNode * ) const;
|
||||
|
||||
ComplexList *clists;
|
||||
ComplexList * clists;
|
||||
|
||||
private:
|
||||
int count; ///< # of clist children
|
||||
private:
|
||||
int count; ///< # of clist children
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -30,8 +30,7 @@ ComplexList::~ComplexList() {
|
||||
* the supertypes' ComplexLists, this temp one can be deleted. Its sub-
|
||||
* structure, however, cannot be deleted since it's still being used.
|
||||
*/
|
||||
void ComplexList::remove()
|
||||
{
|
||||
void ComplexList::remove() {
|
||||
head = NULL;
|
||||
// Only the overall AND will be deleted.
|
||||
delete this;
|
||||
|
||||
+18
-18
@@ -25,44 +25,44 @@ class TypeDescLinkNode;
|
||||
class TypeDescriptorList;
|
||||
|
||||
// These all match up to the new (CD2) Part 23 spec
|
||||
// Some classes don't exist in our old dictionary implementation so they are
|
||||
// currently commented out. FIXME The underlying class names should be updated
|
||||
// Some classes don't exist in our old dictionary implementation so they are
|
||||
// currently commented out. FIXME The underlying class names should be updated
|
||||
// when the new dictionary is integrated. DAS
|
||||
|
||||
typedef class Schema* Schema_ptr;
|
||||
typedef class Schema * Schema_ptr;
|
||||
typedef Schema_ptr Schema_var;
|
||||
typedef class EntityDescriptor* Entity_ptr;
|
||||
typedef class EntityDescriptor * Entity_ptr;
|
||||
typedef Entity_ptr Entity_var;
|
||||
typedef class AttrDescriptor* Attribute_ptr;
|
||||
typedef class AttrDescriptor * Attribute_ptr;
|
||||
typedef Attribute_ptr Attribute_var;
|
||||
typedef class Derived_attribute* Derived_attribute_ptr;
|
||||
typedef class Derived_attribute * Derived_attribute_ptr;
|
||||
typedef Derived_attribute_ptr Derived_attribute_var;
|
||||
typedef class AttrDescriptor* Explicit_attribute_ptr;
|
||||
typedef class AttrDescriptor * Explicit_attribute_ptr;
|
||||
typedef Explicit_attribute_ptr Explicit_attribute_var;
|
||||
typedef Inverse_attribute* Inverse_attribute_ptr;
|
||||
typedef Inverse_attribute * Inverse_attribute_ptr;
|
||||
typedef Inverse_attribute_ptr Inverse_attribute_var;
|
||||
typedef Inverse_attribute_ptr Inverse_attribute_var;
|
||||
typedef Inverse_attribute InverseAttrDescriptor;
|
||||
typedef class EnumTypeDescriptor* Enumeration_type_ptr;
|
||||
typedef class EnumTypeDescriptor * Enumeration_type_ptr;
|
||||
typedef Enumeration_type_ptr Enumeration_type_var;
|
||||
typedef class SelectTypeDescriptor* Select_type_ptr;
|
||||
typedef class SelectTypeDescriptor * Select_type_ptr;
|
||||
typedef Select_type_ptr Select_type_var;
|
||||
typedef class RealTypeDescriptor* Real_type_ptr;
|
||||
typedef class RealTypeDescriptor * Real_type_ptr;
|
||||
typedef Real_type_ptr Real_type_var;
|
||||
typedef class StringTypeDescriptor* String_type_ptr;
|
||||
typedef class StringTypeDescriptor * String_type_ptr;
|
||||
typedef String_type_ptr String_type_var;
|
||||
typedef class AggrTypeDescriptor* Aggr_type_ptr;
|
||||
typedef class AggrTypeDescriptor * Aggr_type_ptr;
|
||||
typedef Aggr_type_ptr Aggr_type_var;
|
||||
typedef class SetTypeDescriptor* Set_type_ptr;
|
||||
typedef class SetTypeDescriptor * Set_type_ptr;
|
||||
typedef Set_type_ptr Set_type_var;
|
||||
typedef class BagTypeDescriptor* Bag_type_ptr;
|
||||
typedef class BagTypeDescriptor * Bag_type_ptr;
|
||||
typedef Bag_type_ptr Bag_type_var;
|
||||
typedef class ListTypeDescriptor* List_type_ptr;
|
||||
typedef class ListTypeDescriptor * List_type_ptr;
|
||||
typedef List_type_ptr List_type_var;
|
||||
typedef class ArrayTypeDescriptor* Array_type_ptr;
|
||||
typedef class ArrayTypeDescriptor * Array_type_ptr;
|
||||
typedef Array_type_ptr Array_type_var;
|
||||
|
||||
// the following exist until everything is updated
|
||||
// the following exist until everything is updated
|
||||
typedef EntityDescriptor Entity;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -61,8 +61,7 @@ void OrList::unmarkAll( EntNode * ents ) {
|
||||
* LISTEND. If choice was set to LISTEND before calling aC(), we reset
|
||||
* choice to choice1, and search again.
|
||||
*/
|
||||
bool OrList::acceptChoice( EntNode * ents )
|
||||
{
|
||||
bool OrList::acceptChoice( EntNode * ents ) {
|
||||
EntList * child;
|
||||
|
||||
if( choice == LISTEND ) {
|
||||
|
||||
+17
-17
@@ -67,8 +67,8 @@ void IStreamState( istream & in ) {
|
||||
// by any characters other than white space (i.e. EOF must happen)
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
int ReadInteger( SDAI_Integer &val, istream & in, ErrorDescriptor * err,
|
||||
const char * tokenList ) {
|
||||
int ReadInteger( SDAI_Integer & val, istream & in, ErrorDescriptor * err,
|
||||
const char * tokenList ) {
|
||||
SDAI_Integer i = 0;
|
||||
in >> ws;
|
||||
in >> i;
|
||||
@@ -84,8 +84,8 @@ int ReadInteger( SDAI_Integer &val, istream & in, ErrorDescriptor * err,
|
||||
}
|
||||
|
||||
/// same as above but reads from a const char *
|
||||
int ReadInteger( SDAI_Integer &val, const char * s, ErrorDescriptor * err,
|
||||
const char * tokenList ) {
|
||||
int ReadInteger( SDAI_Integer & val, const char * s, ErrorDescriptor * err,
|
||||
const char * tokenList ) {
|
||||
istringstream in( ( char * )s );
|
||||
return ReadInteger( val, in, err, tokenList );
|
||||
}
|
||||
@@ -110,7 +110,7 @@ int ReadInteger( SDAI_Integer &val, const char * s, ErrorDescriptor * err,
|
||||
// following.
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
Severity IntValidLevel( const char * attrValue, ErrorDescriptor * err,
|
||||
int clearError, int optional, char * tokenList ) {
|
||||
int clearError, int optional, char * tokenList ) {
|
||||
if( clearError ) {
|
||||
err->ClearErrorMsg();
|
||||
}
|
||||
@@ -207,8 +207,8 @@ void WriteReal( SDAI_Real val, ostream & out ) {
|
||||
// an error), optional sign, at least one decimal digit if there is an E.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
int ReadReal( SDAI_Real &val, istream & in, ErrorDescriptor * err,
|
||||
const char * tokenList ) {
|
||||
int ReadReal( SDAI_Real & val, istream & in, ErrorDescriptor * err,
|
||||
const char * tokenList ) {
|
||||
SDAI_Real d = 0;
|
||||
|
||||
// Read the real's value into a string so we can make sure it is properly
|
||||
@@ -309,8 +309,8 @@ int ReadReal( SDAI_Real &val, istream & in, ErrorDescriptor * err,
|
||||
}
|
||||
|
||||
/// same as above but reads from a const char *
|
||||
int ReadReal( SDAI_Real &val, const char * s, ErrorDescriptor * err,
|
||||
const char * tokenList ) {
|
||||
int ReadReal( SDAI_Real & val, const char * s, ErrorDescriptor * err,
|
||||
const char * tokenList ) {
|
||||
istringstream in( ( char * )s );
|
||||
return ReadReal( val, in, err, tokenList );
|
||||
}
|
||||
@@ -335,7 +335,7 @@ int ReadReal( SDAI_Real &val, const char * s, ErrorDescriptor * err,
|
||||
// following.
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
Severity RealValidLevel( const char * attrValue, ErrorDescriptor * err,
|
||||
int clearError, int optional, char * tokenList ) {
|
||||
int clearError, int optional, char * tokenList ) {
|
||||
if( clearError ) {
|
||||
err->ClearErrorMsg();
|
||||
}
|
||||
@@ -383,8 +383,8 @@ Severity RealValidLevel( const char * attrValue, ErrorDescriptor * err,
|
||||
* to be invalid. If tokenList is null then the value must not be followed
|
||||
* by any characters other than white space (i.e. EOF must happen)
|
||||
*/
|
||||
int ReadNumber( SDAI_Real &val, istream & in, ErrorDescriptor * err,
|
||||
const char * tokenList ) {
|
||||
int ReadNumber( SDAI_Real & val, istream & in, ErrorDescriptor * err,
|
||||
const char * tokenList ) {
|
||||
SDAI_Real d = 0;
|
||||
in >> ws;
|
||||
in >> d;
|
||||
@@ -399,8 +399,8 @@ int ReadNumber( SDAI_Real &val, istream & in, ErrorDescriptor * err,
|
||||
}
|
||||
|
||||
/// same as above but reads from a const char *
|
||||
int ReadNumber( SDAI_Real &val, const char * s, ErrorDescriptor * err,
|
||||
const char * tokenList ) {
|
||||
int ReadNumber( SDAI_Real & val, const char * s, ErrorDescriptor * err,
|
||||
const char * tokenList ) {
|
||||
istringstream in( ( char * )s );
|
||||
return ReadNumber( val, in, err, tokenList );
|
||||
}
|
||||
@@ -426,7 +426,7 @@ int ReadNumber( SDAI_Real &val, const char * s, ErrorDescriptor * err,
|
||||
// following.
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
Severity NumberValidLevel( const char * attrValue, ErrorDescriptor * err,
|
||||
int clearError, int optional, char * tokenList ) {
|
||||
int clearError, int optional, char * tokenList ) {
|
||||
if( clearError ) {
|
||||
err->ClearErrorMsg();
|
||||
}
|
||||
@@ -457,7 +457,7 @@ Severity NumberValidLevel( const char * attrValue, ErrorDescriptor * err,
|
||||
|
||||
/// assign 's' so that it contains an exchange file format string read from 'in'.
|
||||
void PushPastString( istream & in, std::string & s, ErrorDescriptor * err ) {
|
||||
s = ToExpressStr(in, err);
|
||||
s = ToExpressStr( in, err );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -730,7 +730,7 @@ int FoundEndSecKywd( istream & in, ErrorDescriptor & err ) {
|
||||
char c;
|
||||
in >> ws;
|
||||
in.get( c );
|
||||
|
||||
|
||||
if( c == 'E' ) {
|
||||
in.get( c );
|
||||
if( c == 'N' ) {
|
||||
|
||||
+38
-38
@@ -7,75 +7,75 @@
|
||||
#define MAX_COMMENT_LENGTH 512
|
||||
|
||||
// print Error information for debugging purposes
|
||||
extern SCL_CORE_EXPORT void PrintErrorState(ErrorDescriptor &err);
|
||||
extern SCL_CORE_EXPORT void PrintErrorState( ErrorDescriptor & err );
|
||||
|
||||
// print istream error information for debugging purposes
|
||||
extern SCL_CORE_EXPORT void IStreamState(istream &in);
|
||||
extern SCL_CORE_EXPORT void IStreamState( istream & in );
|
||||
|
||||
extern SCL_CORE_EXPORT int ReadInteger(SDAI_Integer &val, istream &in, ErrorDescriptor *err,
|
||||
const char *tokenList);
|
||||
extern SCL_CORE_EXPORT int ReadInteger( SDAI_Integer & val, istream & in, ErrorDescriptor * err,
|
||||
const char * tokenList );
|
||||
|
||||
extern SCL_CORE_EXPORT int ReadInteger(SDAI_Integer &val, const char *s, ErrorDescriptor *err,
|
||||
const char *tokenList);
|
||||
extern SCL_CORE_EXPORT int ReadInteger( SDAI_Integer & val, const char * s, ErrorDescriptor * err,
|
||||
const char * tokenList );
|
||||
|
||||
extern SCL_CORE_EXPORT Severity IntValidLevel (const char *attrValue, ErrorDescriptor *err,
|
||||
int clearError, int optional, char *tokenList);
|
||||
extern SCL_CORE_EXPORT Severity IntValidLevel( const char * attrValue, ErrorDescriptor * err,
|
||||
int clearError, int optional, char * tokenList );
|
||||
|
||||
extern SCL_CORE_EXPORT std::string WriteReal(SDAI_Real val );
|
||||
extern SCL_CORE_EXPORT std::string WriteReal( SDAI_Real val );
|
||||
|
||||
extern SCL_CORE_EXPORT void WriteReal(SDAI_Real val, ostream &out);
|
||||
extern SCL_CORE_EXPORT void WriteReal( SDAI_Real val, ostream & out );
|
||||
|
||||
extern SCL_CORE_EXPORT int ReadReal(SDAI_Real &val, istream &in, ErrorDescriptor *err,
|
||||
const char *tokenList);
|
||||
extern SCL_CORE_EXPORT int ReadReal( SDAI_Real & val, istream & in, ErrorDescriptor * err,
|
||||
const char * tokenList );
|
||||
|
||||
extern SCL_CORE_EXPORT int ReadReal(SDAI_Real &val, const char *s, ErrorDescriptor *err,
|
||||
const char *tokenList);
|
||||
extern SCL_CORE_EXPORT int ReadReal( SDAI_Real & val, const char * s, ErrorDescriptor * err,
|
||||
const char * tokenList );
|
||||
|
||||
extern SCL_CORE_EXPORT Severity RealValidLevel (const char *attrValue, ErrorDescriptor *err,
|
||||
int clearError, int optional, char *tokenList);
|
||||
extern SCL_CORE_EXPORT Severity RealValidLevel( const char * attrValue, ErrorDescriptor * err,
|
||||
int clearError, int optional, char * tokenList );
|
||||
|
||||
extern SCL_CORE_EXPORT int ReadNumber(SDAI_Real &val, istream &in, ErrorDescriptor *err,
|
||||
const char *tokenList);
|
||||
extern SCL_CORE_EXPORT int ReadNumber( SDAI_Real & val, istream & in, ErrorDescriptor * err,
|
||||
const char * tokenList );
|
||||
|
||||
extern SCL_CORE_EXPORT int ReadNumber(SDAI_Real &val, const char *s, ErrorDescriptor *err,
|
||||
const char *tokenList);
|
||||
extern SCL_CORE_EXPORT int ReadNumber( SDAI_Real & val, const char * s, ErrorDescriptor * err,
|
||||
const char * tokenList );
|
||||
|
||||
extern SCL_CORE_EXPORT Severity NumberValidLevel (const char *attrValue, ErrorDescriptor *err,
|
||||
int clearError, int optional, char *tokenList);
|
||||
extern SCL_CORE_EXPORT Severity NumberValidLevel( const char * attrValue, ErrorDescriptor * err,
|
||||
int clearError, int optional, char * tokenList );
|
||||
|
||||
|
||||
////////////////////
|
||||
|
||||
extern SCL_CORE_EXPORT int QuoteInString(istream& in);
|
||||
extern SCL_CORE_EXPORT int QuoteInString( istream & in );
|
||||
|
||||
extern SCL_CORE_EXPORT void PushPastString (istream& in, std::string &s, ErrorDescriptor *err);
|
||||
extern SCL_CORE_EXPORT void PushPastString( istream & in, std::string & s, ErrorDescriptor * err );
|
||||
|
||||
extern SCL_CORE_EXPORT void PushPastImbedAggr (istream& in, std::string &s, ErrorDescriptor *err);
|
||||
extern SCL_CORE_EXPORT void PushPastImbedAggr( istream & in, std::string & s, ErrorDescriptor * err );
|
||||
|
||||
extern SCL_CORE_EXPORT void PushPastAggr1Dim(istream& in, std::string &s, ErrorDescriptor *err);
|
||||
extern SCL_CORE_EXPORT void PushPastAggr1Dim( istream & in, std::string & s, ErrorDescriptor * err );
|
||||
|
||||
////////////////////
|
||||
|
||||
extern SCL_CORE_EXPORT Severity FindStartOfInstance(istream& in, std::string& inst);
|
||||
extern SCL_CORE_EXPORT Severity FindStartOfInstance( istream & in, std::string & inst );
|
||||
|
||||
/// used for instances that aren\'t valid - reads to next \';\'
|
||||
extern SCL_CORE_EXPORT Severity SkipInstance (istream& in, std::string & inst);
|
||||
/// used for instances that aren\'t valid - reads to next \';\'
|
||||
extern SCL_CORE_EXPORT Severity SkipInstance( istream & in, std::string & inst );
|
||||
|
||||
extern SCL_CORE_EXPORT const char * SkipSimpleRecord(istream &in, std::string &buf, ErrorDescriptor *err);
|
||||
extern SCL_CORE_EXPORT const char * SkipSimpleRecord( istream & in, std::string & buf, ErrorDescriptor * err );
|
||||
|
||||
/// this includes entity names
|
||||
extern SCL_CORE_EXPORT const char * ReadStdKeyword(istream& in, std::string &buf, int skipInitWS = 1);
|
||||
/// this includes entity names
|
||||
extern SCL_CORE_EXPORT const char * ReadStdKeyword( istream & in, std::string & buf, int skipInitWS = 1 );
|
||||
|
||||
extern SCL_CORE_EXPORT const char* GetKeyword(istream& in, const char* delims, ErrorDescriptor &err);
|
||||
extern SCL_CORE_EXPORT const char * GetKeyword( istream & in, const char * delims, ErrorDescriptor & err );
|
||||
|
||||
extern SCL_CORE_EXPORT int FoundEndSecKywd(istream& in, ErrorDescriptor &err);
|
||||
extern SCL_CORE_EXPORT int FoundEndSecKywd( istream & in, ErrorDescriptor & err );
|
||||
|
||||
extern SCL_CORE_EXPORT const char *ReadComment(std::string &ss, const char *s);
|
||||
extern SCL_CORE_EXPORT const char * ReadComment( std::string & ss, const char * s );
|
||||
|
||||
extern SCL_CORE_EXPORT const char *ReadComment(istream& in, std::string &s);
|
||||
extern SCL_CORE_EXPORT const char * ReadComment( istream & in, std::string & s );
|
||||
|
||||
extern SCL_CORE_EXPORT Severity ReadPcd(istream& in); //print control directive
|
||||
extern SCL_CORE_EXPORT Severity ReadPcd( istream & in ); //print control directive
|
||||
|
||||
extern SCL_CORE_EXPORT void ReadTokenSeparator(istream& in, std::string *comments = 0);
|
||||
extern SCL_CORE_EXPORT void ReadTokenSeparator( istream & in, std::string * comments = 0 );
|
||||
|
||||
#endif
|
||||
|
||||
+85
-81
@@ -21,7 +21,7 @@
|
||||
#include <scl_cf.h>
|
||||
#include <scl_export.h>
|
||||
|
||||
extern const char *SCLversion;
|
||||
extern const char * SCLversion;
|
||||
|
||||
#include <ctype.h>
|
||||
#include <string>
|
||||
@@ -53,7 +53,7 @@ class STEPattribute;
|
||||
#define STRING_DELIM '\''
|
||||
#endif
|
||||
|
||||
// STRING
|
||||
// STRING
|
||||
#define S_STRING_NULL ""
|
||||
|
||||
|
||||
@@ -68,30 +68,30 @@ extern SCL_CORE_EXPORT const SDAI_Integer SDAI_INT_NULL;
|
||||
extern SCL_CORE_EXPORT const SDAI_Real SDAI_REAL_NULL;
|
||||
// arbitrary choice by me for number DAS
|
||||
extern SCL_CORE_EXPORT const SDAI_Real SDAI_NUMBER_NULL;
|
||||
|
||||
|
||||
|
||||
enum SDAI_Access_type {
|
||||
SDAI_sdaiRO,
|
||||
SDAI_sdaiRW,
|
||||
SDAI_Access_type_unset
|
||||
SDAI_sdaiRO,
|
||||
SDAI_sdaiRW,
|
||||
SDAI_Access_type_unset
|
||||
};
|
||||
|
||||
enum SDAI_Commit_mode {
|
||||
SDAI_sdaiCOMMIT,
|
||||
SDAI_sdaiABORT
|
||||
SDAI_sdaiCOMMIT,
|
||||
SDAI_sdaiABORT
|
||||
} ;
|
||||
|
||||
enum SDAI_AttrFlag {
|
||||
SDAI_sdaiSET,
|
||||
SDAI_sdaiUNSET
|
||||
enum SDAI_AttrFlag {
|
||||
SDAI_sdaiSET,
|
||||
SDAI_sdaiUNSET
|
||||
} ;
|
||||
|
||||
enum SDAI_ImplementationClass {
|
||||
SDAI_sdaiCLASS1,
|
||||
SDAI_sdaiCLASS2,
|
||||
SDAI_sdaiCLASS3,
|
||||
SDAI_sdaiCLASS4,
|
||||
SDAI_sdaiCLASS5
|
||||
enum SDAI_ImplementationClass {
|
||||
SDAI_sdaiCLASS1,
|
||||
SDAI_sdaiCLASS2,
|
||||
SDAI_sdaiCLASS3,
|
||||
SDAI_sdaiCLASS4,
|
||||
SDAI_sdaiCLASS5
|
||||
}; // conflict with part 22 EXPRESS:
|
||||
|
||||
enum SDAI_Error_id {
|
||||
@@ -99,59 +99,59 @@ enum SDAI_Error_id {
|
||||
// error codes taken from 10303-23, Jan 28, 1997.
|
||||
// ISO TC184/SC4/WG11 N 004
|
||||
//
|
||||
SDAI_sdaiNO_ERR = 0, // No error
|
||||
SDAI_sdaiSS_OPN = 10, // Session open
|
||||
SDAI_sdaiSS_NAVL = 20, // Session not available
|
||||
SDAI_sdaiSS_NOPN = 30, // Session is not open
|
||||
SDAI_sdaiRP_NEXS = 40, // Repository does not exist
|
||||
SDAI_sdaiRP_NAVL = 50, // Repository not available
|
||||
SDAI_sdaiRP_OPN = 60, // Repository already opened
|
||||
SDAI_sdaiRP_NOPN = 70, // Repository is not open
|
||||
SDAI_sdaiTR_EAB = 80, // Transaction ended abnormally so it no longer exists
|
||||
SDAI_sdaiTR_EXS = 90, // Transaction exists
|
||||
SDAI_sdaiTR_NAVL = 100, // Transaction not available
|
||||
SDAI_sdaiTR_RW = 110, // Transaction read-write
|
||||
SDAI_sdaiTR_NRW = 120, // Transaction not read-write
|
||||
SDAI_sdaiTR_NEXS = 130, // Transaction does not exist
|
||||
SDAI_sdaiMO_NDEQ = 140, // SDAI-model not domain-equivalent
|
||||
SDAI_sdaiMO_NEXS = 150, // SDAI-model does not exist
|
||||
SDAI_sdaiMO_NVLD = 160, // SDAI-model invalid
|
||||
SDAI_sdaiMO_DUP = 170, // SDAI-model duplicate
|
||||
SDAI_sdaiMX_NRW = 180, // SDAI-model access not read-write
|
||||
SDAI_sdaiMX_NDEF = 190, // SDAI-model access is not defined
|
||||
SDAI_sdaiMX_RW = 200, // SDAI-model access read-write
|
||||
SDAI_sdaiMX_RO = 210, // SDAI-model access read-only
|
||||
SDAI_sdaiSD_NDEF = 220, // Schema definition is not defined
|
||||
SDAI_sdaiED_NDEF = 230, // Entity definition not defined
|
||||
SDAI_sdaiED_NDEQ = 240, // Entity definition not domain equivalent
|
||||
SDAI_sdaiED_NVLD = 250, // Entity definition invalid
|
||||
SDAI_sdaiNO_ERR = 0, // No error
|
||||
SDAI_sdaiSS_OPN = 10, // Session open
|
||||
SDAI_sdaiSS_NAVL = 20, // Session not available
|
||||
SDAI_sdaiSS_NOPN = 30, // Session is not open
|
||||
SDAI_sdaiRP_NEXS = 40, // Repository does not exist
|
||||
SDAI_sdaiRP_NAVL = 50, // Repository not available
|
||||
SDAI_sdaiRP_OPN = 60, // Repository already opened
|
||||
SDAI_sdaiRP_NOPN = 70, // Repository is not open
|
||||
SDAI_sdaiTR_EAB = 80, // Transaction ended abnormally so it no longer exists
|
||||
SDAI_sdaiTR_EXS = 90, // Transaction exists
|
||||
SDAI_sdaiTR_NAVL = 100, // Transaction not available
|
||||
SDAI_sdaiTR_RW = 110, // Transaction read-write
|
||||
SDAI_sdaiTR_NRW = 120, // Transaction not read-write
|
||||
SDAI_sdaiTR_NEXS = 130, // Transaction does not exist
|
||||
SDAI_sdaiMO_NDEQ = 140, // SDAI-model not domain-equivalent
|
||||
SDAI_sdaiMO_NEXS = 150, // SDAI-model does not exist
|
||||
SDAI_sdaiMO_NVLD = 160, // SDAI-model invalid
|
||||
SDAI_sdaiMO_DUP = 170, // SDAI-model duplicate
|
||||
SDAI_sdaiMX_NRW = 180, // SDAI-model access not read-write
|
||||
SDAI_sdaiMX_NDEF = 190, // SDAI-model access is not defined
|
||||
SDAI_sdaiMX_RW = 200, // SDAI-model access read-write
|
||||
SDAI_sdaiMX_RO = 210, // SDAI-model access read-only
|
||||
SDAI_sdaiSD_NDEF = 220, // Schema definition is not defined
|
||||
SDAI_sdaiED_NDEF = 230, // Entity definition not defined
|
||||
SDAI_sdaiED_NDEQ = 240, // Entity definition not domain equivalent
|
||||
SDAI_sdaiED_NVLD = 250, // Entity definition invalid
|
||||
// SDAI_sdaiED_NAVL = 250, // Entity definition not available
|
||||
SDAI_sdaiRU_NDEF = 260, // Rule not defined
|
||||
SDAI_sdaiEX_NSUP = 270, // Expression evaluation not supported
|
||||
SDAI_sdaiAT_NVLD = 280, // Attribute invalid
|
||||
SDAI_sdaiAT_NDEF = 290, // Attribute not defined
|
||||
SDAI_sdaiSI_DUP = 300, // Schema instance duplicate
|
||||
SDAI_sdaiSI_NEXS = 310, // Schema instance does not exist
|
||||
SDAI_sdaiEI_NEXS = 320, // Entity instance does not exist
|
||||
SDAI_sdaiEI_NAVL = 330, // Entity instance not available
|
||||
SDAI_sdaiEI_NVLD = 340, // Entity instance invalid
|
||||
SDAI_sdaiEI_NEXP = 350, // Entity instance not exported
|
||||
SDAI_sdaiSC_NEXS = 360, // Scope does not exist
|
||||
SDAI_sdaiSC_EXS = 370, // Scope exists
|
||||
SDAI_sdaiAI_NEXS = 380, // Aggregate instance does not exist
|
||||
SDAI_sdaiAI_NVLD = 390, // Aggregate instance invalid
|
||||
SDAI_sdaiAI_NSET = 400, // Aggregate instance is empty
|
||||
SDAI_sdaiVA_NVLD = 410, // Value invalid
|
||||
SDAI_sdaiVA_NEXS = 420, // Value does not exist
|
||||
SDAI_sdaiVA_NSET = 430, // Value not set
|
||||
SDAI_sdaiVT_NVLD = 440, // Value type invalid
|
||||
SDAI_sdaiIR_NEXS = 450, // Iterator does not exist
|
||||
SDAI_sdaiIR_NSET = 460, // Current member is not defined
|
||||
SDAI_sdaiIX_NVLD = 470, // Index invalid
|
||||
SDAI_sdaiER_NSET = 480, // Event recording not set
|
||||
SDAI_sdaiOP_NVLD = 490, // Operator invalid
|
||||
SDAI_sdaiFN_NAVL = 500, // Function not available
|
||||
SDAI_sdaiSY_ERR = 1000 // Underlying system error
|
||||
SDAI_sdaiRU_NDEF = 260, // Rule not defined
|
||||
SDAI_sdaiEX_NSUP = 270, // Expression evaluation not supported
|
||||
SDAI_sdaiAT_NVLD = 280, // Attribute invalid
|
||||
SDAI_sdaiAT_NDEF = 290, // Attribute not defined
|
||||
SDAI_sdaiSI_DUP = 300, // Schema instance duplicate
|
||||
SDAI_sdaiSI_NEXS = 310, // Schema instance does not exist
|
||||
SDAI_sdaiEI_NEXS = 320, // Entity instance does not exist
|
||||
SDAI_sdaiEI_NAVL = 330, // Entity instance not available
|
||||
SDAI_sdaiEI_NVLD = 340, // Entity instance invalid
|
||||
SDAI_sdaiEI_NEXP = 350, // Entity instance not exported
|
||||
SDAI_sdaiSC_NEXS = 360, // Scope does not exist
|
||||
SDAI_sdaiSC_EXS = 370, // Scope exists
|
||||
SDAI_sdaiAI_NEXS = 380, // Aggregate instance does not exist
|
||||
SDAI_sdaiAI_NVLD = 390, // Aggregate instance invalid
|
||||
SDAI_sdaiAI_NSET = 400, // Aggregate instance is empty
|
||||
SDAI_sdaiVA_NVLD = 410, // Value invalid
|
||||
SDAI_sdaiVA_NEXS = 420, // Value does not exist
|
||||
SDAI_sdaiVA_NSET = 430, // Value not set
|
||||
SDAI_sdaiVT_NVLD = 440, // Value type invalid
|
||||
SDAI_sdaiIR_NEXS = 450, // Iterator does not exist
|
||||
SDAI_sdaiIR_NSET = 460, // Current member is not defined
|
||||
SDAI_sdaiIX_NVLD = 470, // Index invalid
|
||||
SDAI_sdaiER_NSET = 480, // Event recording not set
|
||||
SDAI_sdaiOP_NVLD = 490, // Operator invalid
|
||||
SDAI_sdaiFN_NAVL = 500, // Function not available
|
||||
SDAI_sdaiSY_ERR = 1000 // Underlying system error
|
||||
};
|
||||
|
||||
typedef char * SDAI_Time_stamp;
|
||||
@@ -171,8 +171,8 @@ ENUMERATION
|
||||
The interface used is to enumerated values. The enumerations are
|
||||
mapped in the following way:
|
||||
* enumeration-item-from-schema ==> enumeration item in c++ enum clause
|
||||
* all enumeration items in c++ enum are in upper case
|
||||
* the value ENUM_NULL is used to represent NULL for all enumerated types
|
||||
* all enumeration items in c++ enum are in upper case
|
||||
* the value ENUM_NULL is used to represent NULL for all enumerated types
|
||||
*****************************************************************************/
|
||||
|
||||
#include <sdaiEnum.h>
|
||||
@@ -197,7 +197,7 @@ BOOLEAN and LOGICAL
|
||||
/******************************************************************************
|
||||
SELECT
|
||||
|
||||
Selects are represented as subclasses of the SDAI_Select class in
|
||||
Selects are represented as subclasses of the SDAI_Select class in
|
||||
sdaiSelect.h
|
||||
|
||||
******************************************************************************/
|
||||
@@ -214,7 +214,7 @@ typedef SDAI_Model_contents_ptr SDAI_Model_contents_var;
|
||||
#include <sdaiEntity_extent_set.h>
|
||||
#include <sdaiModel_contents.h>
|
||||
|
||||
// ENTITY
|
||||
// ENTITY
|
||||
extern SCL_CORE_EXPORT SDAI_Application_instance NilSTEPentity;
|
||||
#define ENTITY_NULL &NilSTEPentity
|
||||
#define NULL_ENTITY &NilSTEPentity
|
||||
@@ -222,15 +222,15 @@ extern SCL_CORE_EXPORT SDAI_Application_instance NilSTEPentity;
|
||||
|
||||
|
||||
typedef SDAI_Application_instance STEPentity;
|
||||
typedef SDAI_Application_instance* STEPentity_ptr;
|
||||
typedef SDAI_Application_instance * STEPentity_ptr;
|
||||
typedef STEPentity_ptr STEPentity_var;
|
||||
|
||||
typedef SDAI_Application_instance* STEPentityPtr;
|
||||
typedef SDAI_Application_instance* STEPentityH;
|
||||
typedef SDAI_Application_instance * STEPentityPtr;
|
||||
typedef SDAI_Application_instance * STEPentityH;
|
||||
|
||||
extern SCL_CORE_EXPORT SDAI_Application_instance *
|
||||
ReadEntityRef(istream &in, ErrorDescriptor *err, const char *tokenList,
|
||||
InstMgr * instances, int addFileId);
|
||||
ReadEntityRef( istream & in, ErrorDescriptor * err, const char * tokenList,
|
||||
InstMgr * instances, int addFileId );
|
||||
|
||||
#define SdaiInteger SDAI_Integer
|
||||
#define SdaiReal SDAI_Real
|
||||
@@ -248,14 +248,18 @@ ReadEntityRef(istream &in, ErrorDescriptor *err, const char *tokenList,
|
||||
AGGREGATE TYPES
|
||||
|
||||
Aggregate types are accessed generically. (There are not seperate
|
||||
classes for the different types of aggregates.) Aggregates are
|
||||
classes for the different types of aggregates.) Aggregates are
|
||||
implemented through the STEPaggregate class.
|
||||
|
||||
******************************************************************************/
|
||||
|
||||
inline SDAI_BOOLEAN *create_BOOLEAN() { return new SDAI_BOOLEAN ; }
|
||||
inline SDAI_BOOLEAN * create_BOOLEAN() {
|
||||
return new SDAI_BOOLEAN ;
|
||||
}
|
||||
|
||||
inline SDAI_LOGICAL *create_LOGICAL() { return new SDAI_LOGICAL ; }
|
||||
inline SDAI_LOGICAL * create_LOGICAL() {
|
||||
return new SDAI_LOGICAL ;
|
||||
}
|
||||
|
||||
// below is outdated
|
||||
typedef SDAI_Select * SdaiSelectH;
|
||||
|
||||
@@ -60,7 +60,7 @@ SDAI_Application_instance * SDAI_Application_instance::Replicate() {
|
||||
_error.GreaterSeverity( SEVERITY_BUG );
|
||||
return S_ENTITY_NULL;
|
||||
} else {
|
||||
SDAI_Application_instance *seNew = eDesc->NewSTEPentity();
|
||||
SDAI_Application_instance * seNew = eDesc->NewSTEPentity();
|
||||
seNew -> CopyAs( this );
|
||||
return seNew;
|
||||
}
|
||||
@@ -99,12 +99,12 @@ const char * SDAI_Application_instance::STEPwrite_reference( std::string & buf )
|
||||
return const_cast<char *>( buf.c_str() );
|
||||
}
|
||||
|
||||
void SDAI_Application_instance::AppendMultInstance( SDAI_Application_instance *se ) {
|
||||
void SDAI_Application_instance::AppendMultInstance( SDAI_Application_instance * se ) {
|
||||
if( nextMiEntity == 0 ) {
|
||||
nextMiEntity = se;
|
||||
} else {
|
||||
SDAI_Application_instance *link = nextMiEntity;
|
||||
SDAI_Application_instance *linkTrailing = 0;
|
||||
SDAI_Application_instance * link = nextMiEntity;
|
||||
SDAI_Application_instance * linkTrailing = 0;
|
||||
while( link ) {
|
||||
linkTrailing = link;
|
||||
link = link->nextMiEntity;
|
||||
@@ -299,7 +299,7 @@ void SDAI_Application_instance::WriteValuePairs( ostream & out,
|
||||
const char * currSch,
|
||||
int writeComments, int mixedCase ) {
|
||||
std::string s, tmp, tmp2;
|
||||
|
||||
|
||||
if( writeComments && !p21Comment.empty() ) {
|
||||
out << p21Comment;
|
||||
}
|
||||
@@ -578,7 +578,7 @@ Severity SDAI_Application_instance::STEPread( int id, int idIncr,
|
||||
|
||||
/// read an entity reference and return a pointer to the SDAI_Application_instance
|
||||
SDAI_Application_instance * ReadEntityRef( istream & in, ErrorDescriptor * err, const char * tokenList,
|
||||
InstMgr * instances, int addFileId ) {
|
||||
InstMgr * instances, int addFileId ) {
|
||||
char c;
|
||||
char errStr[BUFSIZ];
|
||||
errStr[0] = '\0';
|
||||
@@ -620,7 +620,7 @@ SDAI_Application_instance * ReadEntityRef( istream & in, ErrorDescriptor * err,
|
||||
}
|
||||
|
||||
// lookup which object has id as its instance id
|
||||
SDAI_Application_instance* inst;
|
||||
SDAI_Application_instance * inst;
|
||||
/* If there is a ManagerNode it should have a SDAI_Application_instance */
|
||||
MgrNode * mn = 0;
|
||||
mn = instances->FindFileId( id );
|
||||
@@ -662,17 +662,17 @@ SDAI_Application_instance * ReadEntityRef( istream & in, ErrorDescriptor * err,
|
||||
|
||||
/// read an entity reference and return a pointer to the SDAI_Application_instance
|
||||
SDAI_Application_instance * ReadEntityRef( const char * s, ErrorDescriptor * err, const char * tokenList,
|
||||
InstMgr * instances, int addFileId ) {
|
||||
InstMgr * instances, int addFileId ) {
|
||||
istringstream in( ( char * )s );
|
||||
return ReadEntityRef( in, err, tokenList, instances, addFileId );
|
||||
}
|
||||
|
||||
/// return SEVERITY_NULL if se's entity type matches the supplied entity type
|
||||
Severity EntityValidLevel( SDAI_Application_instance *se,
|
||||
const TypeDescriptor * ed, // entity type that entity se needs
|
||||
// to match. (this must be an
|
||||
// EntityDescriptor)
|
||||
ErrorDescriptor * err ) {
|
||||
Severity EntityValidLevel( SDAI_Application_instance * se,
|
||||
const TypeDescriptor * ed, // entity type that entity se needs
|
||||
// to match. (this must be an
|
||||
// EntityDescriptor)
|
||||
ErrorDescriptor * err ) {
|
||||
char messageBuf [BUFSIZ];
|
||||
messageBuf[0] = '\0';
|
||||
|
||||
@@ -760,11 +760,11 @@ int SetErrOnNull( const char * attrValue, ErrorDescriptor * error ) {
|
||||
** If non-whitespace characters follow the entity reference an error is set.
|
||||
*/
|
||||
Severity EntityValidLevel( const char * attrValue, // string contain entity ref
|
||||
const TypeDescriptor * ed, // entity type that entity in
|
||||
// attrValue (if it exists) needs
|
||||
// to match. (this must be an
|
||||
// EntityDescriptor)
|
||||
ErrorDescriptor * err, InstMgr * im, int clearError ) {
|
||||
const TypeDescriptor * ed, // entity type that entity in
|
||||
// attrValue (if it exists) needs
|
||||
// to match. (this must be an
|
||||
// EntityDescriptor)
|
||||
ErrorDescriptor * err, InstMgr * im, int clearError ) {
|
||||
char tmp [BUFSIZ];
|
||||
tmp[0] = '\0';
|
||||
char messageBuf [BUFSIZ];
|
||||
@@ -792,7 +792,7 @@ Severity EntityValidLevel( const char * attrValue, // string contain entity ref
|
||||
}
|
||||
mn = im->FindFileId( fileId );
|
||||
if( mn ) {
|
||||
SDAI_Application_instance *se = mn->GetSTEPentity();
|
||||
SDAI_Application_instance * se = mn->GetSTEPentity();
|
||||
return EntityValidLevel( se, ed, err );
|
||||
} else {
|
||||
sprintf( messageBuf,
|
||||
|
||||
@@ -17,111 +17,132 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// SDAI_Application_instance used to be STEPentity
|
||||
|
||||
class SCL_CORE_EXPORT SDAI_Application_instance : public SDAI_DAObject_SDAI
|
||||
{
|
||||
private:
|
||||
int _cur; // provides a built-in way of accessing attributes in order.
|
||||
class SCL_CORE_EXPORT SDAI_Application_instance : public SDAI_DAObject_SDAI {
|
||||
private:
|
||||
int _cur; // provides a built-in way of accessing attributes in order.
|
||||
|
||||
public:
|
||||
STEPattributeList attributes;
|
||||
int STEPfile_id;
|
||||
ErrorDescriptor _error;
|
||||
std::string p21Comment;
|
||||
// registry additions
|
||||
EntityDescriptor *eDesc;
|
||||
public:
|
||||
STEPattributeList attributes;
|
||||
int STEPfile_id;
|
||||
ErrorDescriptor _error;
|
||||
std::string p21Comment;
|
||||
// registry additions
|
||||
EntityDescriptor * eDesc;
|
||||
|
||||
/**
|
||||
** head entity for multiple inheritance. If it is null then this
|
||||
** SDAI_Application_instance is not part of a multiply inherited entity. If it
|
||||
** points to a SDAI_Application_instance then this SDAI_Application_instance is part of a mi entity
|
||||
** and head points at the root SDAI_Application_instance of the primary inheritance
|
||||
** path (the one that is the root of the leaf entity).
|
||||
*/
|
||||
SDAI_Application_instance *headMiEntity;
|
||||
/// these form a chain of other entity parents for multiple inheritance
|
||||
SDAI_Application_instance *nextMiEntity;
|
||||
/**
|
||||
** head entity for multiple inheritance. If it is null then this
|
||||
** SDAI_Application_instance is not part of a multiply inherited entity. If it
|
||||
** points to a SDAI_Application_instance then this SDAI_Application_instance is part of a mi entity
|
||||
** and head points at the root SDAI_Application_instance of the primary inheritance
|
||||
** path (the one that is the root of the leaf entity).
|
||||
*/
|
||||
SDAI_Application_instance * headMiEntity;
|
||||
/// these form a chain of other entity parents for multiple inheritance
|
||||
SDAI_Application_instance * nextMiEntity;
|
||||
|
||||
protected:
|
||||
int _complex;
|
||||
protected:
|
||||
int _complex;
|
||||
|
||||
public:
|
||||
SDAI_Application_instance ();
|
||||
SDAI_Application_instance (int fileid, int complex = 0);
|
||||
virtual ~SDAI_Application_instance();
|
||||
public:
|
||||
SDAI_Application_instance();
|
||||
SDAI_Application_instance( int fileid, int complex = 0 );
|
||||
virtual ~SDAI_Application_instance();
|
||||
|
||||
int IsComplex() const { return _complex; }
|
||||
int IsComplex() const {
|
||||
return _complex;
|
||||
}
|
||||
|
||||
void StepFileId (int fid) { STEPfile_id = fid; }
|
||||
int StepFileId() const { return STEPfile_id; }
|
||||
void StepFileId( int fid ) {
|
||||
STEPfile_id = fid;
|
||||
}
|
||||
int StepFileId() const {
|
||||
return STEPfile_id;
|
||||
}
|
||||
|
||||
void AddP21Comment(const std::string &s, bool replace = true);
|
||||
void AddP21Comment(const char *s, bool replace = true);
|
||||
void DeleteP21Comment() { p21Comment = ""; }
|
||||
void AddP21Comment( const std::string & s, bool replace = true );
|
||||
void AddP21Comment( const char * s, bool replace = true );
|
||||
void DeleteP21Comment() {
|
||||
p21Comment = "";
|
||||
}
|
||||
|
||||
const std::string P21Comment() const { return p21Comment; }
|
||||
const std::string P21Comment() const {
|
||||
return p21Comment;
|
||||
}
|
||||
|
||||
const char *EntityName( const char *schnm =NULL) const;
|
||||
const char * EntityName( const char * schnm = NULL ) const;
|
||||
|
||||
virtual const EntityDescriptor * IsA(const EntityDescriptor *) const;
|
||||
|
||||
virtual Severity ValidLevel(ErrorDescriptor *error, InstMgr *im,
|
||||
int clearError = 1);
|
||||
ErrorDescriptor &Error() { return _error; }
|
||||
// clears entity's error and optionally all attr's errors
|
||||
void ClearError(int clearAttrs = 1);
|
||||
// clears all attr's errors
|
||||
void ClearAttrError();
|
||||
virtual const EntityDescriptor * IsA( const EntityDescriptor * ) const;
|
||||
|
||||
virtual SDAI_Application_instance *Replicate();
|
||||
virtual Severity ValidLevel( ErrorDescriptor * error, InstMgr * im,
|
||||
int clearError = 1 );
|
||||
ErrorDescriptor & Error() {
|
||||
return _error;
|
||||
}
|
||||
// clears entity's error and optionally all attr's errors
|
||||
void ClearError( int clearAttrs = 1 );
|
||||
// clears all attr's errors
|
||||
void ClearAttrError();
|
||||
|
||||
virtual SDAI_Application_instance * Replicate();
|
||||
|
||||
// ACCESS attributes in order.
|
||||
int AttributeCount();
|
||||
STEPattribute * NextAttribute();
|
||||
void ResetAttributes() { _cur =0; }
|
||||
|
||||
int AttributeCount();
|
||||
STEPattribute * NextAttribute();
|
||||
void ResetAttributes() {
|
||||
_cur = 0;
|
||||
}
|
||||
|
||||
// READ
|
||||
virtual Severity STEPread(int id, int addFileId,
|
||||
class InstMgr * instance_set,
|
||||
istream& in =cin, const char * currSch = NULL,
|
||||
bool useTechCor = true, bool strict = true );
|
||||
virtual void STEPread_error(char c, int index, istream& in);
|
||||
virtual Severity STEPread( int id, int addFileId,
|
||||
class InstMgr * instance_set,
|
||||
istream & in = cin, const char * currSch = NULL,
|
||||
bool useTechCor = true, bool strict = true );
|
||||
virtual void STEPread_error( char c, int index, istream & in );
|
||||
|
||||
// WRITE
|
||||
virtual void STEPwrite(ostream& out =cout, const char *currSch =NULL,
|
||||
int writeComments = 1);
|
||||
virtual const char * STEPwrite(std::string &buf, const char *currSch =NULL);
|
||||
virtual void STEPwrite( ostream & out = cout, const char * currSch = NULL,
|
||||
int writeComments = 1 );
|
||||
virtual const char * STEPwrite( std::string & buf, const char * currSch = NULL );
|
||||
|
||||
void WriteValuePairs(ostream& out, const char *currSch =NULL,
|
||||
int writeComments = 1, int mixedCase = 1);
|
||||
void WriteValuePairs( ostream & out, const char * currSch = NULL,
|
||||
int writeComments = 1, int mixedCase = 1 );
|
||||
|
||||
void STEPwrite_reference (ostream& out =cout);
|
||||
const char * STEPwrite_reference (std::string &buf);
|
||||
void STEPwrite_reference( ostream & out = cout );
|
||||
const char * STEPwrite_reference( std::string & buf );
|
||||
|
||||
void beginSTEPwrite(ostream& out =cout); ///< writes out the SCOPE section
|
||||
void endSTEPwrite(ostream& out =cout);
|
||||
void beginSTEPwrite( ostream & out = cout ); ///< writes out the SCOPE section
|
||||
void endSTEPwrite( ostream & out = cout );
|
||||
|
||||
// MULTIPLE INHERITANCE
|
||||
int MultipleInheritance() { return !(headMiEntity == 0); }
|
||||
int MultipleInheritance() {
|
||||
return !( headMiEntity == 0 );
|
||||
}
|
||||
|
||||
void HeadEntity(SDAI_Application_instance *se) { headMiEntity = se; }
|
||||
SDAI_Application_instance * HeadEntity() { return headMiEntity; }
|
||||
void HeadEntity( SDAI_Application_instance * se ) {
|
||||
headMiEntity = se;
|
||||
}
|
||||
SDAI_Application_instance * HeadEntity() {
|
||||
return headMiEntity;
|
||||
}
|
||||
|
||||
SDAI_Application_instance *GetNextMiEntity() { return nextMiEntity; }
|
||||
SDAI_Application_instance *GetMiEntity(char *EntityName);
|
||||
void AppendMultInstance(SDAI_Application_instance *se);
|
||||
SDAI_Application_instance * GetNextMiEntity() {
|
||||
return nextMiEntity;
|
||||
}
|
||||
SDAI_Application_instance * GetMiEntity( char * EntityName );
|
||||
void AppendMultInstance( SDAI_Application_instance * se );
|
||||
|
||||
protected:
|
||||
STEPattribute * GetSTEPattribute (const char *);
|
||||
STEPattribute * MakeDerived (const char *);
|
||||
STEPattribute * MakeRedefined (STEPattribute *redefiningAttr,
|
||||
const char * nm);
|
||||
protected:
|
||||
STEPattribute * GetSTEPattribute( const char * );
|
||||
STEPattribute * MakeDerived( const char * );
|
||||
STEPattribute * MakeRedefined( STEPattribute * redefiningAttr,
|
||||
const char * nm );
|
||||
|
||||
virtual void CopyAs (SDAI_Application_instance *);
|
||||
void PrependEntityErrMsg();
|
||||
virtual void CopyAs( SDAI_Application_instance * );
|
||||
void PrependEntityErrMsg();
|
||||
};
|
||||
|
||||
// current style of CORBA handles for Part 23 - NOTE - used for more than CORBA
|
||||
typedef SDAI_Application_instance* SDAI_Application_instance_ptr;
|
||||
typedef SDAI_Application_instance * SDAI_Application_instance_ptr;
|
||||
typedef SDAI_Application_instance_ptr SDAI_Application_instance_var;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -26,7 +26,7 @@ extern ofstream * logStream;
|
||||
(member) functions for the select class SDAI_Select
|
||||
**********/
|
||||
SDAI_Select::SDAI_Select( const SelectTypeDescriptor * s,
|
||||
const TypeDescriptor * td )
|
||||
const TypeDescriptor * td )
|
||||
: _type( s ), underlying_type( td ) {
|
||||
#ifdef SCL_LOGGING
|
||||
*logStream << "Exiting SDAI_Select constructor." << endl;
|
||||
@@ -135,7 +135,7 @@ void SDAI_Select::nullify() {
|
||||
}
|
||||
|
||||
Severity SDAI_Select::SelectValidLevel( const char * attrValue, ErrorDescriptor * err,
|
||||
InstMgr * im, int clearError ) {
|
||||
InstMgr * im, int clearError ) {
|
||||
SDAI_Select * tmp = NewSelect();
|
||||
Severity s = SEVERITY_NULL;
|
||||
|
||||
@@ -146,7 +146,7 @@ Severity SDAI_Select::SelectValidLevel( const char * attrValue, ErrorDescriptor
|
||||
}
|
||||
|
||||
Severity SDAI_Select::StrToVal( const char * Val, const char * selectType,
|
||||
ErrorDescriptor * err, InstMgr * instances ) {
|
||||
ErrorDescriptor * err, InstMgr * instances ) {
|
||||
severity( SEVERITY_NULL );
|
||||
if( SetUnderlyingType( CanBe( selectType ) ) )
|
||||
|
||||
@@ -208,8 +208,8 @@ Severity SDAI_Select::StrToVal( const char * Val, const char * selectType,
|
||||
* This function does the following:
|
||||
*/
|
||||
Severity SDAI_Select::STEPread( istream & in, ErrorDescriptor * err,
|
||||
InstMgr * instances, const char * utype,
|
||||
int addFileId, const char * currSch ) {
|
||||
InstMgr * instances, const char * utype,
|
||||
int addFileId, const char * currSch ) {
|
||||
char c = '\0';
|
||||
std::string tmp;
|
||||
|
||||
|
||||
+46
-46
@@ -18,80 +18,80 @@
|
||||
** \file sdaiSelect.h class definition for the select superclass SDAI_Select.
|
||||
**/
|
||||
class SCL_CORE_EXPORT SDAI_Select {
|
||||
protected:
|
||||
const SelectTypeDescriptor *_type;
|
||||
const TypeDescriptor * underlying_type;
|
||||
protected:
|
||||
const SelectTypeDescriptor * _type;
|
||||
const TypeDescriptor * underlying_type;
|
||||
BASE_TYPE base_type; // used by the subtypes
|
||||
|
||||
// it looks like this member, val, is not used anywhere 9/27/96 - DAS
|
||||
SDAI_String val;
|
||||
ErrorDescriptor _error;
|
||||
|
||||
const TypeDescriptor * SetUnderlyingType (const TypeDescriptor *);
|
||||
const TypeDescriptor * SetUnderlyingType( const TypeDescriptor * );
|
||||
|
||||
const TypeDescriptor * CanBe (const char *) const;
|
||||
const TypeDescriptor * CanBe (BASE_TYPE) const;
|
||||
const TypeDescriptor * CanBe (const TypeDescriptor * td) const;
|
||||
const TypeDescriptor * CanBeSet (const char *, const char *) const;
|
||||
const TypeDescriptor * CanBe( const char * ) const;
|
||||
const TypeDescriptor * CanBe( BASE_TYPE ) const;
|
||||
const TypeDescriptor * CanBe( const TypeDescriptor * td ) const;
|
||||
const TypeDescriptor * CanBeSet( const char *, const char * ) const;
|
||||
|
||||
const int IsUnique(const BASE_TYPE bt) const;
|
||||
|
||||
virtual const TypeDescriptor * AssignEntity (SDAI_Application_instance * se) =0;
|
||||
virtual SDAI_Select * NewSelect () =0;
|
||||
public:
|
||||
const int IsUnique( const BASE_TYPE bt ) const;
|
||||
|
||||
virtual const TypeDescriptor * AssignEntity( SDAI_Application_instance * se ) = 0;
|
||||
virtual SDAI_Select * NewSelect() = 0;
|
||||
public:
|
||||
Severity severity() const;
|
||||
Severity severity( Severity );
|
||||
const std::string Error();
|
||||
void Error( const char * );
|
||||
// clears select's error
|
||||
// clears select's error
|
||||
void ClearError();
|
||||
// clears error
|
||||
// clears error
|
||||
|
||||
virtual BASE_TYPE ValueType() const =0;
|
||||
virtual BASE_TYPE ValueType() const = 0;
|
||||
|
||||
// constructors
|
||||
SDAI_Select (const SelectTypeDescriptor * s =0,
|
||||
const TypeDescriptor * td =0);
|
||||
virtual ~SDAI_Select ();
|
||||
// constructors
|
||||
SDAI_Select( const SelectTypeDescriptor * s = 0,
|
||||
const TypeDescriptor * td = 0 );
|
||||
virtual ~SDAI_Select();
|
||||
|
||||
// from SDAI binding
|
||||
SDAI_String UnderlyingTypeName () const;
|
||||
// from SDAI binding
|
||||
SDAI_String UnderlyingTypeName() const;
|
||||
const TypeDescriptor * CurrentUnderlyingType() const;
|
||||
bool exists() const;
|
||||
void nullify();
|
||||
|
||||
Severity SelectValidLevel(const char *attrValue, ErrorDescriptor *err,
|
||||
InstMgr *im, int clearError);
|
||||
Severity SelectValidLevel( const char * attrValue, ErrorDescriptor * err,
|
||||
InstMgr * im, int clearError );
|
||||
|
||||
// reading and writing
|
||||
const char * STEPwrite (std::string& s, const char *currSch =0) const;
|
||||
void STEPwrite (ostream& out =cout, const char *currSch =0) const;
|
||||
// reading and writing
|
||||
const char * STEPwrite( std::string & s, const char * currSch = 0 ) const;
|
||||
void STEPwrite( ostream & out = cout, const char * currSch = 0 ) const;
|
||||
|
||||
// IMS 8/2/95: added as part of new select implementation
|
||||
virtual void STEPwrite_verbose (ostream& out =cout, const char * =0)
|
||||
const;
|
||||
|
||||
virtual void STEPwrite_content (ostream& out, const char * =0) const =0;
|
||||
// IMS 8/2/95: added as part of new select implementation
|
||||
virtual void STEPwrite_verbose( ostream & out = cout, const char * = 0 )
|
||||
const;
|
||||
|
||||
virtual void STEPwrite_content( ostream & out, const char * = 0 ) const = 0;
|
||||
// char * asStr() const;
|
||||
|
||||
|
||||
Severity StrToVal(const char *val, const char *selectType,
|
||||
ErrorDescriptor *err, InstMgr * instances =0);
|
||||
virtual Severity StrToVal_content (const char *,
|
||||
InstMgr * instances =0) =0;
|
||||
Severity StrToVal( const char * val, const char * selectType,
|
||||
ErrorDescriptor * err, InstMgr * instances = 0 );
|
||||
virtual Severity StrToVal_content( const char *,
|
||||
InstMgr * instances = 0 ) = 0;
|
||||
|
||||
Severity STEPread(istream& in, ErrorDescriptor *err,
|
||||
InstMgr * instances =0, const char* utype =0,
|
||||
int addFileId =0, const char * =NULL);
|
||||
Severity STEPread( istream & in, ErrorDescriptor * err,
|
||||
InstMgr * instances = 0, const char * utype = 0,
|
||||
int addFileId = 0, const char * = NULL );
|
||||
|
||||
// abstract function
|
||||
virtual Severity STEPread_content (istream& in =cin,
|
||||
InstMgr * instances =0,
|
||||
const char *utype =0,
|
||||
int addFileId =0,
|
||||
const char *currSch =0) =0;
|
||||
// abstract function
|
||||
virtual Severity STEPread_content( istream & in = cin,
|
||||
InstMgr * instances = 0,
|
||||
const char * utype = 0,
|
||||
int addFileId = 0,
|
||||
const char * currSch = 0 ) = 0;
|
||||
|
||||
virtual SDAI_Select& operator =( const SDAI_Select& ) =0;
|
||||
virtual SDAI_Select & operator =( const SDAI_Select & ) = 0;
|
||||
|
||||
int set_null();
|
||||
int is_null();
|
||||
|
||||
+17
-18
@@ -42,8 +42,7 @@ char ToUpper( const char c ) {
|
||||
}
|
||||
|
||||
// Place in strNew a lowercase version of strOld.
|
||||
char * StrToLower( const char * strOld, char * strNew )
|
||||
{
|
||||
char * StrToLower( const char * strOld, char * strNew ) {
|
||||
int i = 0;
|
||||
|
||||
while( strOld[i] != '\0' ) {
|
||||
@@ -138,44 +137,44 @@ char * PrettyNewName( const char * oldname ) {
|
||||
/**
|
||||
* Extract the string conforming to P21 from the istream
|
||||
*/
|
||||
std::string ToExpressStr( istream &in, ErrorDescriptor *err ) {
|
||||
std::string ToExpressStr( istream & in, ErrorDescriptor * err ) {
|
||||
char c;
|
||||
in >> ws; // skip white space
|
||||
in >> c;
|
||||
int i_quote = 0;
|
||||
size_t found;
|
||||
string s = "";
|
||||
if ( c == STRING_DELIM ) {
|
||||
if( c == STRING_DELIM ) {
|
||||
s += c;
|
||||
while ( i_quote != -1 && in.get(c) ) {
|
||||
while( i_quote != -1 && in.get( c ) ) {
|
||||
s += c;
|
||||
// to handle a string like 'hi'''
|
||||
if ( c == STRING_DELIM) {
|
||||
if( c == STRING_DELIM ) {
|
||||
// to handle \S\'
|
||||
found = s.rfind("\\S\\");
|
||||
if ( !(found != string::npos && (s.size() == found + 2)) ) {
|
||||
found = s.rfind( "\\S\\" );
|
||||
if( !( found != string::npos && ( s.size() == found + 2 ) ) ) {
|
||||
i_quote++;
|
||||
}
|
||||
} else {
|
||||
// # of quotes is odd
|
||||
if ( i_quote % 2 != 0 ) {
|
||||
if( i_quote % 2 != 0 ) {
|
||||
i_quote = -1;
|
||||
// put back last char, take it off from s and update c
|
||||
in.putback(c);
|
||||
s = s.substr(0, s.size() - 1);
|
||||
in.putback( c );
|
||||
s = s.substr( 0, s.size() - 1 );
|
||||
c = *s.rbegin();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( c != STRING_DELIM ) {
|
||||
if( c != STRING_DELIM ) {
|
||||
// non-recoverable error
|
||||
err->AppendToDetailMsg("Missing closing quote on string value.\n");
|
||||
err->AppendToUserMsg("Missing closing quote on string value.\n");
|
||||
err->GreaterSeverity(SEVERITY_INPUT_ERROR);
|
||||
err->AppendToDetailMsg( "Missing closing quote on string value.\n" );
|
||||
err->AppendToUserMsg( "Missing closing quote on string value.\n" );
|
||||
err->GreaterSeverity( SEVERITY_INPUT_ERROR );
|
||||
}
|
||||
} else {
|
||||
in.putback(c);
|
||||
in.putback( c );
|
||||
}
|
||||
|
||||
return s;
|
||||
@@ -218,8 +217,8 @@ std::string ToExpressStr( istream &in, ErrorDescriptor *err ) {
|
||||
*** no way to know when to stop.
|
||||
**/
|
||||
Severity CheckRemainingInput( istream & in, ErrorDescriptor * err,
|
||||
const char * typeName, // used in error message
|
||||
const char * tokenList ) { // e.g. ",)"
|
||||
const char * typeName, // used in error message
|
||||
const char * tokenList ) { // e.g. ",)"
|
||||
std::string skipBuf;
|
||||
char name[64];
|
||||
name[0] = 0;
|
||||
|
||||
+17
-17
@@ -17,7 +17,7 @@
|
||||
#include <ctype.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <errordesc.h>
|
||||
|
||||
@@ -25,27 +25,27 @@
|
||||
//StrCmpIns - case-insensitive string compare. Original fct (replaced Sep 2011)
|
||||
//called PrettyTmpName(). Not doing so may affect sort order but that shouldn't hurt
|
||||
#ifdef _MSC_VER
|
||||
#define StrCmpIns(a,b) _stricmp(a,b)
|
||||
#define StrCmpIns(a,b) _stricmp(a,b)
|
||||
#else
|
||||
#define StrCmpIns(a,b) strcasecmp(a,b)
|
||||
#define StrCmpIns(a,b) strcasecmp(a,b)
|
||||
#endif
|
||||
|
||||
SCL_UTILS_EXPORT char ToLower (const char c);
|
||||
SCL_UTILS_EXPORT char ToUpper (const char c);
|
||||
SCL_UTILS_EXPORT char * StrToLower (const char *, char *);
|
||||
SCL_UTILS_EXPORT const char * StrToLower (const char * word, std::string &s);
|
||||
SCL_UTILS_EXPORT const char * StrToUpper (const char * word, std::string &s);
|
||||
SCL_UTILS_EXPORT const char * StrToConstant (const char * word, std::string &s);
|
||||
SCL_UTILS_EXPORT const char * PrettyTmpName (const char * oldname);
|
||||
SCL_UTILS_EXPORT char * PrettyNewName (const char * oldname);
|
||||
SCL_UTILS_EXPORT char * EntityClassName ( char * oldname);
|
||||
SCL_UTILS_EXPORT char ToLower( const char c );
|
||||
SCL_UTILS_EXPORT char ToUpper( const char c );
|
||||
SCL_UTILS_EXPORT char * StrToLower( const char *, char * );
|
||||
SCL_UTILS_EXPORT const char * StrToLower( const char * word, std::string & s );
|
||||
SCL_UTILS_EXPORT const char * StrToUpper( const char * word, std::string & s );
|
||||
SCL_UTILS_EXPORT const char * StrToConstant( const char * word, std::string & s );
|
||||
SCL_UTILS_EXPORT const char * PrettyTmpName( const char * oldname );
|
||||
SCL_UTILS_EXPORT char * PrettyNewName( const char * oldname );
|
||||
SCL_UTILS_EXPORT char * EntityClassName( char * oldname );
|
||||
|
||||
SCL_UTILS_EXPORT std::string ToExpressStr (istream &in, ErrorDescriptor *err);
|
||||
SCL_UTILS_EXPORT std::string ToExpressStr( istream & in, ErrorDescriptor * err );
|
||||
|
||||
extern SCL_UTILS_EXPORT Severity CheckRemainingInput
|
||||
(istream &in, ErrorDescriptor *err,
|
||||
const char *typeName, // used in error message
|
||||
const char *tokenList); // e.g. ",)"
|
||||
( istream & in, ErrorDescriptor * err,
|
||||
const char * typeName, // used in error message
|
||||
const char * tokenList ); // e.g. ",)"
|
||||
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
+33
-32
@@ -142,21 +142,20 @@ int DirObj::Index( const char * name ) {
|
||||
bool DirObj::Reset( const std::string & path ) {
|
||||
bool successful = IsADirectory( path.c_str() );
|
||||
if( successful ) {
|
||||
#ifdef __WIN32__
|
||||
WIN32_FIND_DATA FindFileData;
|
||||
HANDLE hFind;
|
||||
#ifdef __WIN32__
|
||||
WIN32_FIND_DATA FindFileData;
|
||||
HANDLE hFind;
|
||||
|
||||
ClearFileList();
|
||||
hFind = FindFirstFile( path.c_str(), &FindFileData );
|
||||
if (hFind != INVALID_HANDLE_VALUE)
|
||||
{
|
||||
int i = 0;
|
||||
do {
|
||||
InsertFile( FindFileData.cFileName, i++ );
|
||||
} while ( FindNextFile( hFind, &FindFileData ) );
|
||||
FindClose( hFind );
|
||||
}
|
||||
#else
|
||||
ClearFileList();
|
||||
hFind = FindFirstFile( path.c_str(), &FindFileData );
|
||||
if( hFind != INVALID_HANDLE_VALUE ) {
|
||||
int i = 0;
|
||||
do {
|
||||
InsertFile( FindFileData.cFileName, i++ );
|
||||
} while( FindNextFile( hFind, &FindFileData ) );
|
||||
FindClose( hFind );
|
||||
}
|
||||
#else
|
||||
DIR * dir = opendir( path.c_str() );
|
||||
ClearFileList();
|
||||
|
||||
@@ -164,8 +163,10 @@ bool DirObj::Reset( const std::string & path ) {
|
||||
InsertFile( d->d_name, Position( d->d_name ) );
|
||||
}
|
||||
closedir( dir );
|
||||
#endif
|
||||
} else std::cout << "not a directory: " << path << "!" << std::endl;
|
||||
#endif
|
||||
} else {
|
||||
std::cout << "not a directory: " << path << "!" << std::endl;
|
||||
}
|
||||
return successful;
|
||||
}
|
||||
|
||||
@@ -212,26 +213,26 @@ const std::string DirObj::Normalize( const std::string & path ) {
|
||||
const char * slash;
|
||||
#if defined(__WIN32__)
|
||||
char b[MAX_PATH];
|
||||
PathCanonicalize(b, path.c_str());
|
||||
PathCanonicalize( b, path.c_str() );
|
||||
slash = "\\";
|
||||
#else
|
||||
char * b;
|
||||
b = realpath(path.c_str(),0);
|
||||
b = realpath( path.c_str(), 0 );
|
||||
slash = "/";
|
||||
#endif
|
||||
if( b == 0 ) {
|
||||
buf.clear();
|
||||
} else {
|
||||
buf.assign(b);
|
||||
buf.assign( b );
|
||||
}
|
||||
|
||||
if( buf.empty() ) {
|
||||
buf = ".";
|
||||
buf.append(slash);
|
||||
buf.append( slash );
|
||||
|
||||
// if buf is a path to a directory and doesn't end with '/'
|
||||
} else if( IsADirectory( buf.c_str() ) && buf[buf.size()] != slash[0] ) {
|
||||
buf.append(slash);
|
||||
buf.append( slash );
|
||||
}
|
||||
return buf;
|
||||
}
|
||||
@@ -243,11 +244,11 @@ const std::string DirObj::Normalize( const std::string & path ) {
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
const char * DirObj::ValidDirectories( const char * path ) {
|
||||
#ifdef __WIN32__
|
||||
static char buf[MAX_PATH + 1];
|
||||
#else
|
||||
static char buf[MAXPATHLEN + 1];
|
||||
#endif
|
||||
#ifdef __WIN32__
|
||||
static char buf[MAX_PATH + 1];
|
||||
#else
|
||||
static char buf[MAXPATHLEN + 1];
|
||||
#endif
|
||||
strcpy( buf, path );
|
||||
int i = strlen( path );
|
||||
|
||||
@@ -297,12 +298,12 @@ void DirObj::InsertFile( const char * f, int index ) {
|
||||
CheckIndex( index );
|
||||
spot = &fileList[index];
|
||||
}
|
||||
#ifdef __WIN32__
|
||||
char * string = _strdup( f );
|
||||
#else
|
||||
char * string = strdup( f );
|
||||
#endif
|
||||
*spot = string;
|
||||
#ifdef __WIN32__
|
||||
char * string = _strdup( f );
|
||||
#else
|
||||
char * string = strdup( f );
|
||||
#endif
|
||||
*spot = string;
|
||||
++fileCount;
|
||||
}
|
||||
|
||||
|
||||
+47
-39
@@ -15,18 +15,18 @@
|
||||
|
||||
/*
|
||||
* DirObj - This object contains a list of files in a directory.
|
||||
* Can be used for checking paths etc.
|
||||
* based on InterViews FBDirectory
|
||||
* Copyright (c) 1987, 1988, 1989 Stanford University from
|
||||
* /depot/iv/src/libInterViews/filebrowser.c <= notice
|
||||
* I commented it, changed variable and function names, added a
|
||||
* few things, and made it so we can actually use it.
|
||||
* David Sauder
|
||||
* Can be used for checking paths etc.
|
||||
* based on InterViews FBDirectory
|
||||
* Copyright (c) 1987, 1988, 1989 Stanford University from
|
||||
* /depot/iv/src/libInterViews/filebrowser.c <= notice
|
||||
* I commented it, changed variable and function names, added a
|
||||
* few things, and made it so we can actually use it.
|
||||
* David Sauder
|
||||
*/
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// These header files are a pain between compilers etc ... and
|
||||
// These header files are a pain between compilers etc ... and
|
||||
// I agree they are in a mess. You will have to CHECK them yourself
|
||||
// depending on what you are using -- it works the way it is with g++
|
||||
// but you need -I/depot/gnu/lib/g++-include
|
||||
@@ -47,49 +47,57 @@
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
class SCL_UTILS_EXPORT DirObj {
|
||||
public:
|
||||
DirObj(const char* dirName);
|
||||
virtual ~DirObj();
|
||||
class SCL_UTILS_EXPORT DirObj {
|
||||
public:
|
||||
DirObj( const char * dirName );
|
||||
virtual ~DirObj();
|
||||
|
||||
bool LoadDirectory(const std::string & name);
|
||||
static const std::string Normalize(const std::string & s);
|
||||
bool LoadDirectory( const std::string & name );
|
||||
static const std::string Normalize( const std::string & s );
|
||||
|
||||
const char* ValidDirectories(const char*);
|
||||
const char * ValidDirectories( const char * );
|
||||
|
||||
int Index(const char*);
|
||||
const char* File(int index);
|
||||
// check for file in the currently loaded directory
|
||||
bool FileExists(const char* file) { return Index(file) ? true : false;};
|
||||
bool FileExists(const std::string & file) { return Index(file.c_str()) ? true : false;};
|
||||
int Count();
|
||||
int Index( const char * );
|
||||
const char * File( int index );
|
||||
// check for file in the currently loaded directory
|
||||
bool FileExists( const char * file ) {
|
||||
return Index( file ) ? true : false;
|
||||
};
|
||||
bool FileExists( const std::string & file ) {
|
||||
return Index( file.c_str() ) ? true : false;
|
||||
};
|
||||
int Count();
|
||||
|
||||
static bool IsADirectory(const char*);
|
||||
private:
|
||||
const char* RealPath(const char*);
|
||||
static bool IsADirectory( const char * );
|
||||
private:
|
||||
const char * RealPath( const char * );
|
||||
|
||||
bool Reset(const std::string & path);
|
||||
void ClearFileList();
|
||||
void CheckIndex(int index);
|
||||
void InsertFile(const char*, int index);
|
||||
void AppendFile(const char*);
|
||||
void RemoveFile(int index);
|
||||
virtual int Position(const char*);
|
||||
private:
|
||||
char** fileList;
|
||||
int fileCount;
|
||||
int fileListSize;
|
||||
bool Reset( const std::string & path );
|
||||
void ClearFileList();
|
||||
void CheckIndex( int index );
|
||||
void InsertFile( const char *, int index );
|
||||
void AppendFile( const char * );
|
||||
void RemoveFile( int index );
|
||||
virtual int Position( const char * );
|
||||
private:
|
||||
char ** fileList;
|
||||
int fileCount;
|
||||
int fileListSize;
|
||||
};
|
||||
|
||||
// Return the number of files in the loaded directory.
|
||||
inline int DirObj::Count () { return fileCount; }
|
||||
inline int DirObj::Count() {
|
||||
return fileCount;
|
||||
}
|
||||
|
||||
// Insert a new file into the fileList.
|
||||
inline void DirObj::AppendFile (const char* s) { InsertFile(s, fileCount); }
|
||||
inline void DirObj::AppendFile( const char * s ) {
|
||||
InsertFile( s, fileCount );
|
||||
}
|
||||
|
||||
// Return the file at the given index (starting at 0) in the fileList
|
||||
inline const char* DirObj::File (int index) {
|
||||
return (0 <= index && index < fileCount) ? fileList[index] : 0;
|
||||
inline const char * DirObj::File( int index ) {
|
||||
return ( 0 <= index && index < fileCount ) ? fileList[index] : 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
+66
-44
@@ -30,30 +30,30 @@ typedef enum Severity {
|
||||
SEVERITY_INCOMPLETE = 1, // incomplete data
|
||||
SEVERITY_USERMSG = 2, // possibly an error
|
||||
SEVERITY_NULL = 3 // no error or message
|
||||
} Severity;
|
||||
} Severity;
|
||||
|
||||
|
||||
enum DebugLevel {
|
||||
DEBUG_OFF =0,
|
||||
DEBUG_USR =1,
|
||||
DEBUG_ALL =2
|
||||
|
||||
DEBUG_OFF = 0,
|
||||
DEBUG_USR = 1,
|
||||
DEBUG_ALL = 2
|
||||
|
||||
};
|
||||
|
||||
/******************************************************************
|
||||
** Class: ErrorDescriptor
|
||||
** Data Members:
|
||||
** Data Members:
|
||||
** severity level of error
|
||||
** user message
|
||||
** detailed message
|
||||
** Description:
|
||||
** Description:
|
||||
** the error is a detailed error message + a severity level
|
||||
** also keeps a user message separately
|
||||
** detailed message gets sent to ostream
|
||||
** uses std::string class to keep the user messages
|
||||
** keeps severity of error
|
||||
** created with or without error
|
||||
** Status:
|
||||
** Status:
|
||||
******************************************************************/
|
||||
|
||||
class SCL_UTILS_EXPORT ErrorDescriptor {
|
||||
@@ -61,14 +61,14 @@ class SCL_UTILS_EXPORT ErrorDescriptor {
|
||||
Severity _severity;
|
||||
|
||||
static DebugLevel _debug_level;
|
||||
static ostream* _out; // note this will not be persistent
|
||||
static ostream * _out; // note this will not be persistent
|
||||
|
||||
std::string _userMsg, _detailMsg;
|
||||
public:
|
||||
ErrorDescriptor (Severity s = SEVERITY_NULL,
|
||||
DebugLevel d = DEBUG_OFF);
|
||||
ErrorDescriptor( Severity s = SEVERITY_NULL,
|
||||
DebugLevel d = DEBUG_OFF );
|
||||
|
||||
void PrintContents(ostream &out = cout) const;
|
||||
void PrintContents( ostream & out = cout ) const;
|
||||
|
||||
void ClearErrorMsg() {
|
||||
_severity = SEVERITY_NULL;
|
||||
@@ -76,45 +76,67 @@ class SCL_UTILS_EXPORT ErrorDescriptor {
|
||||
_detailMsg.clear();
|
||||
}
|
||||
|
||||
// return the enum value of _severity
|
||||
Severity severity() const { return _severity; }
|
||||
// return _severity as a const char * in the std::string provided
|
||||
void severity(std::string &s) const;
|
||||
Severity severity(Severity s) { return (_severity = s); }
|
||||
Severity GetCorrSeverity(const char *s);
|
||||
Severity GreaterSeverity(Severity s) {
|
||||
return ((s < _severity) ? _severity = s : _severity);
|
||||
}
|
||||
// return the enum value of _severity
|
||||
Severity severity() const {
|
||||
return _severity;
|
||||
}
|
||||
// return _severity as a const char * in the std::string provided
|
||||
void severity( std::string & s ) const;
|
||||
Severity severity( Severity s ) {
|
||||
return ( _severity = s );
|
||||
}
|
||||
Severity GetCorrSeverity( const char * s );
|
||||
Severity GreaterSeverity( Severity s ) {
|
||||
return ( ( s < _severity ) ? _severity = s : _severity );
|
||||
}
|
||||
|
||||
// inline const char * UserMsg() const { return _userMsg.c_str(); }
|
||||
inline const std::string UserMsg() const { return _userMsg; }
|
||||
void UserMsg ( const char *);
|
||||
void UserMsg( const std::string msg ) { _userMsg.assign( msg ); }
|
||||
inline const std::string UserMsg() const {
|
||||
return _userMsg;
|
||||
}
|
||||
void UserMsg( const char * );
|
||||
void UserMsg( const std::string msg ) {
|
||||
_userMsg.assign( msg );
|
||||
}
|
||||
|
||||
void AppendToUserMsg ( const char *);
|
||||
void AppendToUserMsg( const std::string & msg ) { _userMsg.append( msg ); }
|
||||
void PrependToUserMsg ( const char *);
|
||||
void AppendToUserMsg ( const char c);
|
||||
void AppendToUserMsg( const char * );
|
||||
void AppendToUserMsg( const std::string & msg ) {
|
||||
_userMsg.append( msg );
|
||||
}
|
||||
void PrependToUserMsg( const char * );
|
||||
void AppendToUserMsg( const char c );
|
||||
|
||||
// const char * DetailMsg() const { return _detailMsg.c_str(); }
|
||||
const std::string DetailMsg() const { return _detailMsg; }
|
||||
inline void DetailMsg( const std::string msg ) { _detailMsg.assign( msg ); }
|
||||
void DetailMsg ( const char *);
|
||||
void AppendToDetailMsg ( const char *);
|
||||
void AppendToDetailMsg( const std::string & msg ) { _detailMsg.append( msg ); }
|
||||
void PrependToDetailMsg ( const char *);
|
||||
void AppendToDetailMsg ( const char c);
|
||||
const std::string DetailMsg() const {
|
||||
return _detailMsg;
|
||||
}
|
||||
inline void DetailMsg( const std::string msg ) {
|
||||
_detailMsg.assign( msg );
|
||||
}
|
||||
void DetailMsg( const char * );
|
||||
void AppendToDetailMsg( const char * );
|
||||
void AppendToDetailMsg( const std::string & msg ) {
|
||||
_detailMsg.append( msg );
|
||||
}
|
||||
void PrependToDetailMsg( const char * );
|
||||
void AppendToDetailMsg( const char c );
|
||||
|
||||
Severity AppendFromErrorArg(ErrorDescriptor *err) {
|
||||
GreaterSeverity( err->severity() );
|
||||
AppendToDetailMsg( err->DetailMsg() );
|
||||
AppendToUserMsg( err->UserMsg() );
|
||||
return severity();
|
||||
}
|
||||
Severity AppendFromErrorArg( ErrorDescriptor * err ) {
|
||||
GreaterSeverity( err->severity() );
|
||||
AppendToDetailMsg( err->DetailMsg() );
|
||||
AppendToUserMsg( err->UserMsg() );
|
||||
return severity();
|
||||
}
|
||||
|
||||
DebugLevel debug_level() const { return _debug_level; }
|
||||
void debug_level(DebugLevel d) { _debug_level = d; }
|
||||
void SetOutput(ostream *o) { _out = o; }
|
||||
DebugLevel debug_level() const {
|
||||
return _debug_level;
|
||||
}
|
||||
void debug_level( DebugLevel d ) {
|
||||
_debug_level = d;
|
||||
}
|
||||
void SetOutput( ostream * o ) {
|
||||
_out = o;
|
||||
}
|
||||
} ;
|
||||
|
||||
#endif
|
||||
|
||||
+31
-29
@@ -13,7 +13,7 @@
|
||||
* and is not subject to copyright.
|
||||
*/
|
||||
|
||||
/* $Id: gennode.h,v 3.0.1.3 1997/11/05 22:33:47 sauderd DP3.1 $ */
|
||||
/* $Id: gennode.h,v 3.0.1.3 1997/11/05 22:33:47 sauderd DP3.1 $ */
|
||||
|
||||
#include <scl_export.h>
|
||||
#ifdef __O3DB__
|
||||
@@ -30,42 +30,44 @@ class DisplayNodeList;
|
||||
// If you delete this object it first removes itself from any list it is in.
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class SCL_UTILS_EXPORT GenericNode
|
||||
{
|
||||
friend class GenNodeList;
|
||||
friend class MgrNodeList;
|
||||
friend class DisplayNodeList;
|
||||
class SCL_UTILS_EXPORT GenericNode {
|
||||
friend class GenNodeList;
|
||||
friend class MgrNodeList;
|
||||
friend class DisplayNodeList;
|
||||
|
||||
protected:
|
||||
GenericNode *next;
|
||||
GenericNode *prev;
|
||||
public:
|
||||
GenericNode();
|
||||
virtual ~GenericNode();
|
||||
protected:
|
||||
GenericNode * next;
|
||||
GenericNode * prev;
|
||||
public:
|
||||
GenericNode();
|
||||
virtual ~GenericNode();
|
||||
|
||||
GenericNode *Next() { return next; }
|
||||
GenericNode *Prev() { return prev; }
|
||||
virtual void Append(GenNodeList *list);
|
||||
virtual void Remove()
|
||||
{
|
||||
(next) ? (next->prev = prev) : 0;
|
||||
(prev) ? (prev->next = next) : 0;
|
||||
/*
|
||||
// if(next)
|
||||
// next->prev = prev;
|
||||
// if(prev)
|
||||
// prev->next = next;
|
||||
*/
|
||||
next = 0;
|
||||
prev = 0;
|
||||
GenericNode * Next() {
|
||||
return next;
|
||||
}
|
||||
GenericNode * Prev() {
|
||||
return prev;
|
||||
}
|
||||
virtual void Append( GenNodeList * list );
|
||||
virtual void Remove() {
|
||||
( next ) ? ( next->prev = prev ) : 0;
|
||||
( prev ) ? ( prev->next = next ) : 0;
|
||||
/*
|
||||
// if(next)
|
||||
// next->prev = prev;
|
||||
// if(prev)
|
||||
// prev->next = next;
|
||||
*/
|
||||
next = 0;
|
||||
prev = 0;
|
||||
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// GenericNode inline functions
|
||||
// these functions don't rely on any inline functions (its own or
|
||||
// other classes) that aren't in this file
|
||||
// other classes) that aren't in this file
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif
|
||||
|
||||
+24
-27
@@ -13,7 +13,7 @@
|
||||
* and is not subject to copyright.
|
||||
*/
|
||||
|
||||
/* $Id: gennodearray.h,v 3.0.1.3 1997/11/05 22:33:47 sauderd DP3.1 $ */
|
||||
/* $Id: gennodearray.h,v 3.0.1.3 1997/11/05 22:33:47 sauderd DP3.1 $ */
|
||||
|
||||
/*
|
||||
* GenNodeArray - dynamic array object of GenericNodes.
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
#include <gennode.h>
|
||||
|
||||
// the initial size of the array
|
||||
// the initial size of the array
|
||||
#define ARRAY_DEFAULT_SIZE (1024)
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
@@ -42,46 +42,43 @@
|
||||
// DeleteEntries().
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class SCL_UTILS_EXPORT GenNodeArray
|
||||
{
|
||||
public:
|
||||
class SCL_UTILS_EXPORT GenNodeArray {
|
||||
public:
|
||||
|
||||
GenNodeArray(int defaultSize = ARRAY_DEFAULT_SIZE);
|
||||
virtual ~GenNodeArray();
|
||||
GenNodeArray( int defaultSize = ARRAY_DEFAULT_SIZE );
|
||||
virtual ~GenNodeArray();
|
||||
|
||||
GenericNode*& operator[](int index);
|
||||
virtual int Index(GenericNode* gn);
|
||||
virtual int Index(GenericNode** gn);
|
||||
GenericNode * & operator[]( int index );
|
||||
virtual int Index( GenericNode * gn );
|
||||
virtual int Index( GenericNode ** gn );
|
||||
|
||||
int Count();
|
||||
int Count();
|
||||
|
||||
virtual void Append(GenericNode* gn);
|
||||
virtual int Insert(GenericNode* gn);
|
||||
virtual int Insert(GenericNode* gn, int index);
|
||||
virtual void Remove(int index);
|
||||
virtual void ClearEntries();
|
||||
virtual void DeleteEntries();
|
||||
virtual void Append( GenericNode * gn );
|
||||
virtual int Insert( GenericNode * gn );
|
||||
virtual int Insert( GenericNode * gn, int index );
|
||||
virtual void Remove( int index );
|
||||
virtual void ClearEntries();
|
||||
virtual void DeleteEntries();
|
||||
|
||||
protected:
|
||||
virtual void Check(int index);
|
||||
protected:
|
||||
virtual void Check( int index );
|
||||
|
||||
GenericNode** _buf; // the array
|
||||
int _bufsize; // the possible number of entries in the array
|
||||
int _count; // the number of entries in the array
|
||||
GenericNode ** _buf; // the array
|
||||
int _bufsize; // the possible number of entries in the array
|
||||
int _count; // the number of entries in the array
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// class GenNodeArray inline public functions
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
inline GenericNode*& GenNodeArray::operator[] (int index)
|
||||
{
|
||||
Check(index);
|
||||
inline GenericNode * & GenNodeArray::operator[]( int index ) {
|
||||
Check( index );
|
||||
return _buf[index];
|
||||
}
|
||||
|
||||
inline int GenNodeArray::Count ()
|
||||
{
|
||||
inline int GenNodeArray::Count() {
|
||||
return _count;
|
||||
}
|
||||
|
||||
|
||||
+22
-19
@@ -13,7 +13,7 @@
|
||||
* and is not subject to copyright.
|
||||
*/
|
||||
|
||||
/* $Id: gennodelist.h,v 3.0.1.2 1997/11/05 22:33:48 sauderd DP3.1 $ */
|
||||
/* $Id: gennodelist.h,v 3.0.1.2 1997/11/05 22:33:48 sauderd DP3.1 $ */
|
||||
|
||||
#include <scl_export.h>
|
||||
#ifdef __O3DB__
|
||||
@@ -31,35 +31,38 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class SCL_UTILS_EXPORT GenNodeList {
|
||||
public:
|
||||
GenNodeList(GenericNode *headNode);
|
||||
virtual ~GenNodeList() { delete head; }
|
||||
public:
|
||||
GenNodeList( GenericNode * headNode );
|
||||
virtual ~GenNodeList() {
|
||||
delete head;
|
||||
}
|
||||
|
||||
GenericNode *GetHead() { return head; }
|
||||
GenericNode * GetHead() {
|
||||
return head;
|
||||
}
|
||||
|
||||
virtual void ClearEntries();
|
||||
virtual void DeleteEntries();
|
||||
// deletes node from its previous list & appends
|
||||
virtual void Append(GenericNode *node);
|
||||
// deletes newNode from its previous list & inserts in
|
||||
// relation to existNode
|
||||
virtual void InsertAfter(GenericNode *newNode, GenericNode *existNode);
|
||||
virtual void InsertBefore(GenericNode *newNode, GenericNode *existNode);
|
||||
virtual void ClearEntries();
|
||||
virtual void DeleteEntries();
|
||||
// deletes node from its previous list & appends
|
||||
virtual void Append( GenericNode * node );
|
||||
// deletes newNode from its previous list & inserts in
|
||||
// relation to existNode
|
||||
virtual void InsertAfter( GenericNode * newNode, GenericNode * existNode );
|
||||
virtual void InsertBefore( GenericNode * newNode, GenericNode * existNode );
|
||||
|
||||
virtual void Remove(GenericNode *node);
|
||||
virtual void Remove( GenericNode * node );
|
||||
|
||||
protected:
|
||||
GenericNode *head;
|
||||
protected:
|
||||
GenericNode * head;
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// class GenNodeList inline functions
|
||||
// these functions don't rely on any inline functions (its own or
|
||||
// other classes) that aren't in this file
|
||||
// other classes) that aren't in this file
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
inline GenNodeList::GenNodeList(GenericNode *headNode)
|
||||
{
|
||||
inline GenNodeList::GenNodeList( GenericNode * headNode ) {
|
||||
head = headNode;
|
||||
head->next = head;
|
||||
head->prev = head;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user