Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
88a1229a23 | ||
|
|
c987ad03d2 | ||
|
|
6418c44e30 | ||
|
|
d4517fbe64 | ||
|
|
6d84278f86 | ||
|
|
5eeba5b34b | ||
|
|
f2cafe04ff | ||
|
|
d08ffa5eb4 | ||
|
|
89055ea452 | ||
|
|
d0c9541679 | ||
|
|
392dfc6352 | ||
|
|
157c747d18 | ||
|
|
f5a130a3b7 | ||
|
|
79e77ff65c | ||
|
|
dba8c3fd9d | ||
|
|
1faaf698fd | ||
|
|
27ce5604c2 | ||
|
|
1ad14e1334 | ||
|
|
fffd710005 | ||
|
|
770e4a885e | ||
|
|
254b5a3dfb | ||
|
|
b12562a639 | ||
|
|
db00ec914f | ||
|
|
73b69e2df6 | ||
|
|
bbaed49beb | ||
|
|
d6d7c48230 | ||
|
|
995c19d6da | ||
|
|
aef6e73a60 | ||
|
|
b8fc557543 | ||
|
|
be58f09ec0 | ||
|
|
e72ca29407 | ||
|
|
da7639aa2f | ||
|
|
ec7e8ac2d1 |
+4
-4
@@ -106,7 +106,6 @@ IF(ENABLE_TESTING)
|
||||
endif()
|
||||
INCLUDE(CTest)
|
||||
ENABLE_TESTING()
|
||||
SUBDIRS(test)
|
||||
ENDIF(ENABLE_TESTING)
|
||||
|
||||
#---------------------------------------------------------------------
|
||||
@@ -231,9 +230,7 @@ endif()
|
||||
# Now that all the tests are done, configure the scl_cf.h file:
|
||||
configure_file(${SCL_BINARY_DIR}/include/scl_cf.h.in ${SCL_BINARY_DIR}/include/scl_cf.h)
|
||||
|
||||
add_definitions(
|
||||
-DHAVE_CONFIG_H -Wall
|
||||
)
|
||||
add_definitions( -Wall )
|
||||
|
||||
include_directories(
|
||||
${SCL_SOURCE_DIR}/include
|
||||
@@ -249,6 +246,9 @@ ADD_SUBDIRECTORY(src/cldai)
|
||||
ADD_SUBDIRECTORY(src/clutils)
|
||||
ADD_SUBDIRECTORY(include)
|
||||
ADD_SUBDIRECTORY(data)
|
||||
IF(ENABLE_TESTING)
|
||||
ADD_SUBDIRECTORY( test )
|
||||
ENDIF(ENABLE_TESTING)
|
||||
ADD_SUBDIRECTORY(doc)
|
||||
|
||||
# this is for testing - 'make core' builds everything that isn't generated
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
STEP Class Library ------ https://github.com/mpictor/StepClassLibrary
|
||||
STEP Class Library ------ http://github.com/mpictor/StepClassLibrary
|
||||
************************************************************************
|
||||
Release 0.4 (Nov 13, 2011)
|
||||
|
||||
New since v0.3:
|
||||
* Improve p21read performance by ~30%
|
||||
* Improve fedex_plus performance by ~4300% (!)
|
||||
* A variable defined in a LOCAL is not required to have a type label
|
||||
(affected ap242,210e3,209)
|
||||
* Enums and entities are allowed to have the same names
|
||||
(affected ap242,210e3,209)
|
||||
* Remove the SCLP23 macro
|
||||
http://github.com/mpictor/StepClassLibrary/wiki/changelog-v0.4
|
||||
************************************************************************
|
||||
|
||||
Release 0.3 (Oct 29, 2011)
|
||||
|
||||
What's new since v0.2?
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
***********************************************************************
|
||||
Step Class Library v0.3 -- https://github.com/mpictor/StepClassLibrary
|
||||
Step Class Library v0.4 -- http://github.com/mpictor/StepClassLibrary
|
||||
|
||||
* What is SCL? SCL reads ISO10303-11 EXPRESS schemas and generates
|
||||
C++ source code that can read and write Part 21 files conforming
|
||||
|
||||
+11
-45
@@ -1,38 +1,3 @@
|
||||
IF( INSTALL_DATA )
|
||||
SET(ap203_data
|
||||
ap203/203wseds.exp
|
||||
ap203/cube1.p21
|
||||
ap203/cube2.p21
|
||||
ap203/g_r_assembly1.p21
|
||||
ap203/gasket1.p21
|
||||
ap203/gasket2.p21
|
||||
ap203/gasket3.p21
|
||||
ap203/hex_prism1.p21
|
||||
ap203/rod_aspect1.p21
|
||||
ap203/star1.p21
|
||||
)
|
||||
INSTALL(FILES ${ap203_data} DESTINATION ${DATA_DIR}/data/ap203)
|
||||
|
||||
SET(ap227_data
|
||||
ap227/ap227.exp
|
||||
ap227/mitre.p21
|
||||
ap227/mitre.step.txt
|
||||
)
|
||||
INSTALL(FILES ${ap227_data} DESTINATION ${DATA_DIR}/data/ap227)
|
||||
|
||||
SET(step_example_data
|
||||
example/example.exp
|
||||
)
|
||||
INSTALL(FILES ${step_example_data} DESTINATION ${DATA_DIR}/data/example)
|
||||
|
||||
|
||||
|
||||
SET(step_datafiles
|
||||
pdmnet.exp
|
||||
select.exp
|
||||
)
|
||||
INSTALL(FILES ${step_datafiles} DESTINATION ${DATA_DIR}/data)
|
||||
ENDIF( INSTALL_DATA )
|
||||
|
||||
#this sets a property so that the target doesn't get built by 'make' or 'make all'
|
||||
#useful when testing generation of schema code/compiling schem libs/etc
|
||||
@@ -69,7 +34,8 @@ FUNCTION(BUILD_A_SCHEMA SCHEMA_FILE)
|
||||
file(STRINGS ${SCHEMA_FILE} SCHEMA_STATEMENT LIMIT_COUNT 1 REGEX "^SCHEMA .*")
|
||||
string(REGEX REPLACE "^SCHEMA \(.*\)\;$" "\\1" SCHEMA_N ${SCHEMA_STATEMENT} )
|
||||
string(TOUPPER ${SCHEMA_N} SCHEMA_LONG_NAME) #fedex_plus always uses upper case for file names
|
||||
get_filename_component(SCHEMA_SHORT_NAME ${SCHEMA_FILE} NAME_WE)
|
||||
get_filename_component( SCHEMA_SN ${SCHEMA_FILE} NAME )
|
||||
string( REGEX REPLACE "\(.*\).[Ee][Xx][Pp]" "\\1" SCHEMA_SHORT_NAME ${SCHEMA_SN} )
|
||||
|
||||
project( sdai_${SCHEMA_SHORT_NAME} )
|
||||
message( STATUS "Generating code for ${SCHEMA_SHORT_NAME}.")
|
||||
@@ -87,7 +53,7 @@ FUNCTION(BUILD_A_SCHEMA SCHEMA_FILE)
|
||||
# seems to be set_target_properties( <target> PROPERTIES COMPILE_FLAGS <flags> )
|
||||
set( ${PROJECT_NAME}_COMPILE_FLAGS "-I${CMAKE_CURRENT_SOURCE_DIR} -I${SCL_SOURCE_DIR}/src/cldai -I${SCL_SOURCE_DIR}/src/cleditor -I${SCL_SOURCE_DIR}/src/clutils -I${SCHEMA_OUTPUT_DIR} -I${SCL_SOURCE_DIR}/src/clstepcore" )
|
||||
|
||||
add_custom_target( generate_${SCHEMA_SHORT_NAME} SOURCES ${FEDEX_OUT} )
|
||||
add_custom_target( generate_cpp_${SCHEMA_SHORT_NAME} SOURCES ${FEDEX_OUT} )
|
||||
add_custom_command( OUTPUT ${SCHEMA_OUTPUT_DIR}
|
||||
COMMAND cmake ARGS -E make_directory ${SCHEMA_OUTPUT_DIR}
|
||||
COMMENT "Creating ${SCHEMA_OUTPUT_DIR} for schema ${SCHEMA_SHORT_NAME}")
|
||||
@@ -99,25 +65,25 @@ FUNCTION(BUILD_A_SCHEMA SCHEMA_FILE)
|
||||
VERBATIM )
|
||||
add_library( ${PROJECT_NAME} SHARED ${FEDEX_OUT} )
|
||||
target_link_libraries(${PROJECT_NAME} stepdai stepcore express stepeditor )
|
||||
add_dependencies( ${PROJECT_NAME} generate_${SCHEMA_SHORT_NAME} )
|
||||
add_dependencies( ${PROJECT_NAME} generate_cpp_${SCHEMA_SHORT_NAME} )
|
||||
set_target_properties( ${PROJECT_NAME} PROPERTIES COMPILE_FLAGS
|
||||
${${PROJECT_NAME}_COMPILE_FLAGS} )
|
||||
TESTABLE_TARGET( ${PROJECT_NAME} )
|
||||
|
||||
add_test( NAME generate_${SCHEMA_SHORT_NAME}
|
||||
add_test( NAME generate_cpp_${SCHEMA_SHORT_NAME}
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
COMMAND ${CMAKE_COMMAND} --build .
|
||||
--target generate_${SCHEMA_SHORT_NAME}
|
||||
--target generate_cpp_${SCHEMA_SHORT_NAME}
|
||||
--config $<CONFIGURATION> )
|
||||
add_test( NAME build_${PROJECT_NAME}
|
||||
add_test( NAME build_cpp_${PROJECT_NAME}
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
COMMAND ${CMAKE_COMMAND} --build .
|
||||
--target p21read_${PROJECT_NAME}
|
||||
--config $<CONFIGURATION> )
|
||||
|
||||
# label the tests and set dependencies
|
||||
set_tests_properties( generate_${SCHEMA_SHORT_NAME} PROPERTIES LABELS schema_gen )
|
||||
set_tests_properties( build_${PROJECT_NAME} PROPERTIES DEPENDS generate_${SCHEMA_SHORT_NAME} LABELS schema_build )
|
||||
set_tests_properties( generate_cpp_${SCHEMA_SHORT_NAME} PROPERTIES LABELS cpp_schema_gen )
|
||||
set_tests_properties( build_cpp_${PROJECT_NAME} PROPERTIES DEPENDS generate_cpp_${SCHEMA_SHORT_NAME} LABELS cpp_schema_build )
|
||||
|
||||
add_executable( p21read_${PROJECT_NAME} ${SCL_SOURCE_DIR}/src/test/p21read/p21read.cc )
|
||||
target_link_libraries( p21read_${PROJECT_NAME} ${PROJECT_NAME} )
|
||||
@@ -130,10 +96,10 @@ FUNCTION(BUILD_A_SCHEMA SCHEMA_FILE)
|
||||
file( GLOB_RECURSE P21_FILES ${SCHEMA_DIR}/*.stp ${SCHEMA_DIR}/*.step ${SCHEMA_DIR}/*.p21 )
|
||||
foreach( TEST_FILE ${P21_FILES} )
|
||||
get_filename_component( FNAME ${TEST_FILE} NAME_WE )
|
||||
add_test( NAME read_write_${SCHEMA_SHORT_NAME}_${FNAME}
|
||||
add_test( NAME read_write_cpp_${SCHEMA_SHORT_NAME}_${FNAME}
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
COMMAND p21read_${PROJECT_NAME} ${TEST_FILE} )
|
||||
set_tests_properties( read_write_${SCHEMA_SHORT_NAME}_${FNAME} PROPERTIES DEPENDS build_${PROJECT_NAME} LABELS schema_rw )
|
||||
set_tests_properties( read_write_cpp_${SCHEMA_SHORT_NAME}_${FNAME} PROPERTIES DEPENDS build_cpp_${PROJECT_NAME} LABELS cpp_schema_rw )
|
||||
endforeach()
|
||||
|
||||
ENDFUNCTION(BUILD_A_SCHEMA)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -5,7 +5,7 @@
|
||||
(* The schema is converted from ISO10303 P11-2003 to ISO10303 P11-1994 *)
|
||||
(* ===================================================================================== *)
|
||||
|
||||
SCHEMA Ap210_electronic_assembly_interconnect_and_packaging_design_mim_LF;
|
||||
SCHEMA wip210_electronic_assembly_interconnect_and_packaging_design_mim_LF;
|
||||
|
||||
|
||||
CONSTANT
|
||||
@@ -15,7 +15,7 @@ CONSTANT
|
||||
|
||||
dummy_gri : geometric_representation_item := representation_item('')||
|
||||
geometric_representation_item();
|
||||
schema_prefix : STRING := 'AP210_ELECTRONIC_ASSEMBLY_INTERCONNECT_AND_PACKAGING_DESIGN_MIM_LF.';
|
||||
schema_prefix : STRING := 'WIP210_ELECTRONIC_ASSEMBLY_INTERCONNECT_AND_PACKAGING_DESIGN_MIM_LF.';
|
||||
|
||||
the_empty_maths_tuple : maths_tuple := [];
|
||||
|
||||
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
+6105
File diff suppressed because it is too large
Load Diff
@@ -1,245 +0,0 @@
|
||||
#ifndef SCLPREFIXES_H
|
||||
#define SCLPREFIXES_H
|
||||
|
||||
/* **********************
|
||||
|
||||
The macro SCLP23_NAME is used in header files and for constructor/destructor
|
||||
class function names in corresponding .cc files.
|
||||
|
||||
The macro SCLP23 is used everywhere else.
|
||||
|
||||
********************* */
|
||||
|
||||
// *note* Currently the IDL generated code is not in a namespace.
|
||||
//#undef NO_P26_NAMESPACE
|
||||
//#define NO_P26_NAMESPACE 1
|
||||
|
||||
// P stands for Part (yeah, it's just to make it short & unique - hopefully)
|
||||
// as in Part 23 or Part 26.
|
||||
|
||||
#ifdef PART26 // SCL's Part 23 is providing the implementation for the Part 26
|
||||
// Orbix-generated software interface.
|
||||
|
||||
// The namespace is specified to be SDAI by Part 26 and Part 23
|
||||
// Since Part 23 and Part 26 defined objects are suppose to have the same
|
||||
// names and are supposed to be defined in a namespace called SDAI, define
|
||||
// the namespaces names for Part 23 and 26 to be different (to avoid conflict)
|
||||
|
||||
// This is the namespace for SCL's Part 23 SDAI.
|
||||
#define P23_NAMESPACE P23
|
||||
// Whenever you have something like P23_NAMESPACE##_name the preprocessor
|
||||
// does the concatenation first then substitutes things. Thus you get
|
||||
// P23_NAMESPACE_name instead of <whatever P23_NAMESPACE is>_name. If you
|
||||
// call P23_NAMESPACE_F() like P23_NAMESPACE_F(_name) you get
|
||||
// whatever P23_NAMESPACE is>_name like you want. The user never has to
|
||||
// use this macro. It is used in the definition of macros the user uses like
|
||||
// SCLP23() and SCLP23_NAME().
|
||||
#define P23_NAMESPACE_F(x) P23##x
|
||||
|
||||
// This was used by the ITI code. It holds the same meaning as P23_NAMESPACE
|
||||
#define IMP_NAMESPACE P23_NAMESPACE
|
||||
#define IMP_NAMESPACE_F(x) P23_NAMESPACE_F(x)
|
||||
// as defined by original ITI code
|
||||
// #define IMP_NAMESPACE P26_SDAI
|
||||
|
||||
// This is the namespace used by the IDL generated code implementing Part 26.
|
||||
//
|
||||
// define NO_P26_NAMESPACE if you are not going to define an encapsulating
|
||||
// module in the idl. If you define a module named SDAI then you will have to
|
||||
// refer to the class for interface PID (e.g.) as SDAI::PID and you will have
|
||||
// to refer to the macros as DEF_TIE_SDAI_PID() and TIE_SDAI_PID() instead of
|
||||
// DEF_TIE_PID() and TIE_PID(). DEF_TIE_IDL_MODULE() and TIE_IDL_MODULE()
|
||||
// handle this problem in the code.
|
||||
// You should define P26_NAMESPACE the same as the name you use for the idl
|
||||
// module. Without a module you should define NO_P26_NAMESPACE
|
||||
//
|
||||
// DEF_TIE_IDL_MODULE handles the DEF_TIE macro depending on whether a module
|
||||
// name was used in the idl. e.g. for class/interface named PID
|
||||
//#define SDAI_DEF_TIE_PID(X) DEF_TIE_IDL_MODULE(PID,X)
|
||||
// replaces either of these two stmts in your code depending on whether a
|
||||
// module name SDAI was used.
|
||||
//#define SDAI_DEF_TIE_PID(X) DEF_TIE_PID(X)
|
||||
//#define SDAI_DEF_TIE_PID(X) DEF_TIE_SDAI_PID(X)
|
||||
//
|
||||
// TIE_IDL_MODULE handles the TIE macro depending on whether a module
|
||||
// name was used in the idl. e.g. for class/interface named PID
|
||||
//#define _SDAI_TIE_PID_(X) TIE_IDL_MODULE(PID,X)
|
||||
// replaces either of these two stmts in your code depending on whether a
|
||||
// module name SDAI was used.
|
||||
//#define _SDAI_TIE_PID_(X) TIE_PID(X)
|
||||
//#define _SDAI_TIE_PID_(X) TIE_SDAI_PID(X)
|
||||
|
||||
#ifdef NO_P26_NAMESPACE
|
||||
#define P26_NAMESPACE
|
||||
#define P26_NAMESPACE_F(x) x
|
||||
#define DEF_TIE_IDL_MODULE(x,y) DEF_TIE_##x(y)
|
||||
#define TIE_IDL_MODULE(x,y) TIE_##x(y)
|
||||
#else
|
||||
// edit "SDAI" here to match the name of your module
|
||||
#define P26_NAMESPACE SDAI
|
||||
#define P26_NAMESPACE_F(x) SDAI##x
|
||||
#define DEF_TIE_IDL_MODULE(x,y) DEF_TIE_SDAI_##x(y)
|
||||
#define TIE_IDL_MODULE(x,y) TIE_SDAI_##x(y)
|
||||
#endif
|
||||
|
||||
// This would be the namespace for your application schema.
|
||||
// This is for the ITI-developed code. It really shouldn't go here - DAS
|
||||
#define APP_NAMESPACE P26_Simple_geometry
|
||||
|
||||
#else // SCL's Part 23 is not providing the implementation for the Part 26
|
||||
// Orbix-generated software interface.
|
||||
|
||||
// This is the namespace for SCL's Part 23 SDAI.
|
||||
#define P23_NAMESPACE SDAI
|
||||
#define P23_NAMESPACE_F(x) SDAI##x
|
||||
|
||||
// This was used by the ITI code. It holds the same meaning as P23_NAMESPACE
|
||||
#define IMP_NAMESPACE P23_NAMESPACE
|
||||
#define IMP_NAMESPACE_F(x) P23_NAMESPACE_F(x)
|
||||
// as defined by original ITI code
|
||||
// #define IMP_NAMESPACE SDAI
|
||||
|
||||
// This is the namespace used by the IDL generated code implementing Part 26.
|
||||
// **Note this should never be used if PART26 is not defined.
|
||||
#define P26_NAMESPACE
|
||||
#define P26_NAMESPACE_F(x) x
|
||||
|
||||
// This would be the namespace for your application schema.
|
||||
// This is for the ITI-developed code. It really shouldn't go here - DAS
|
||||
#define APP_NAMESPACE Simple_geometry
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#define CC_NO_NESTED_CLASSES 1
|
||||
#ifdef CC_NO_NESTED_CLASSES
|
||||
|
||||
///////////////////////
|
||||
// Use this macro to enclose objects generated from IDL interface types.
|
||||
// i.e. Part 26 based generated types.
|
||||
// Use this with types that will ONLY ever be Part 26 types. For types
|
||||
// that can switch use PART22() macro.
|
||||
// Used with the IDL compiler generated C++ - DAS
|
||||
#define SCLP26(X) P26_NAMESPACE_F(_##X)
|
||||
|
||||
// Used by ITI code to enclose objects generated from IDL interface types.
|
||||
// This is used for function arguments and return types that need to be
|
||||
// either the Part 26 version or the Part 23 version depending on whether
|
||||
// the Part 23 interface is being used standalone or to implement Orbix
|
||||
// implementation objects using the TIE approach. - DAS
|
||||
// This one is defined to use the Part 26 defined type for use with Orbix.
|
||||
#define SCLP22_NAME(X) P26_NAMESPACE_F(_##X)
|
||||
#define SCLP22(X) P26_NAMESPACE_F(_##X)
|
||||
// as defined by ITI
|
||||
// #define SCLP22(X) SDAI_##X
|
||||
|
||||
// Use this macro to enclose references to CORBA types.
|
||||
// Used with the Orbix base C++ types/classes #included via CORBA.h.
|
||||
// i.e. not used with types/interfaces generated from a users IDL schema.
|
||||
// DAS
|
||||
#define CORBA_REF(X) CORBA_##X
|
||||
|
||||
// I don't understand why this is necessary - DAS
|
||||
// Use this macro to enclose references to CORBA Object and Object_ptr
|
||||
#define SCLP22_BASE(X) CORBA_##X
|
||||
|
||||
|
||||
// SCLP23_NAME is used in header files and for constructor/destructor
|
||||
// class function names in corresponding .cc files.
|
||||
// Use this macro to enclose declarations of implementation types.
|
||||
#define SCLP23_NAME(x) P23_NAMESPACE_F(_##x)
|
||||
|
||||
// SCLP23 is used everywhere else.
|
||||
// Use this macro to enclose uses of Part 23 based (implementation) types.
|
||||
#define SCLP23(x) P23_NAMESPACE_F(_##x)
|
||||
|
||||
// Use this macro to enclose references to implementation types
|
||||
// whose names have already been qualified
|
||||
// I don't understand this macros use - DAS
|
||||
#define SCLP23_SPACE(x) x
|
||||
|
||||
// INTEGRATION appmacros here...
|
||||
#define SCLP22_SIMPLE_GEOMETRY(X) SDAI_Simple_geometry_##X
|
||||
#define SCLP23_SIMPLE_GEOMETRY_NAME(x) APP_NAMESPACE##_##x
|
||||
#define SCLP23_SIMPLE_GEOMETRY(x) APP_NAMESPACE##_##x
|
||||
///////////////////////////////////
|
||||
|
||||
#else // nested classes are allowed by the compiler
|
||||
/////////////////////////////////////
|
||||
|
||||
///////////////////////
|
||||
// Use this macro to enclose objects generated from IDL interface types.
|
||||
// i.e. Part 26 based generated types.
|
||||
// Used with the IDL compiler generated C++ - DAS
|
||||
#ifdef NO_P26_NAMESPACE
|
||||
#define SCLP26(X) X
|
||||
#else
|
||||
#define SCLP26(X) P26_NAMESPACE_F(::##X)
|
||||
#endif
|
||||
|
||||
// Used by ITI code to enclose objects generated from IDL interface types.
|
||||
// This is used for function arguments and return types that need to be
|
||||
// either the Part 26 version or the Part 23 version depending on whether
|
||||
// the Part 23 interface is being used standalone or to implement Orbix
|
||||
// implementation objects using the TIE approach. - DAS
|
||||
// This one is defined to use the Part 26 defined type for use with Orbix.
|
||||
#ifdef NO_P26_NAMESPACE
|
||||
#define SCLP22_NAME(X) X
|
||||
#define SCLP22(X) X
|
||||
#else
|
||||
#define SCLP22_NAME(X) P26_NAMESPACE_F(::##X)
|
||||
#define SCLP22(X) P26_NAMESPACE_F(::##X)
|
||||
#endif
|
||||
// as defined by ITI
|
||||
// #define SCLP22(X) SDAI::##X
|
||||
|
||||
// Use this macro to enclose references to CORBA types.
|
||||
// Used with the Orbix base C++ types/classes #included via CORBA.h.
|
||||
// i.e. not used with types/interfaces generated from a users IDL schema.
|
||||
// DAS
|
||||
#define CORBA_REF(X) CORBA::##X
|
||||
|
||||
// I don't understand why this is necessary - DAS
|
||||
// Use this macro to enclose references to CORBA Object and Object_ptr
|
||||
#define SCLP22_BASE(X) CORBA::##X
|
||||
|
||||
// SCLP23_NAME is used in header files and for constructor/destructor
|
||||
// class function names in corresponding .cc files.
|
||||
// Use this macro to enclose declarations of implementation types.
|
||||
#ifdef PART26
|
||||
#define SCLP23_NAME(x) P23_NAMESPACE_F(_imp##x)
|
||||
// #define SCLP23_NAME(x) imp##x
|
||||
#else
|
||||
#define SCLP23_NAME(x) x
|
||||
#endif
|
||||
|
||||
// SCLP23 is used everywhere else.
|
||||
// Use this macro to enclose uses of Part 23 based (implementation) types.
|
||||
#ifdef PART26
|
||||
#define SCLP23(x) P23_NAMESPACE_F(_imp##x)
|
||||
// #define SCLP23(x) P23_NAMESPACE_F(::##imp##x)
|
||||
#else
|
||||
#define SCLP23(x) P23_NAMESPACE_F(::##x)
|
||||
#endif
|
||||
// as defined by ITI
|
||||
// #define SCLP23(x) IMP_NAMESPACE_F(::imp##x)
|
||||
|
||||
// Use this macro to enclose references to implementation types
|
||||
// whose names have already been qualified
|
||||
// I don't understand this macros use - DAS
|
||||
#ifdef PART26
|
||||
#define SCLP23_SPACE(x) P23_NAMESPACE_F(_imp##x)
|
||||
// #define SCLP23_SPACE(x) P23_NAMESPACE_F(::##imp##x)
|
||||
#else
|
||||
#define SCLP23_SPACE(x) IMP_NAMESPACE_F(::x)
|
||||
#endif
|
||||
|
||||
// INTEGRATION appmacros here...
|
||||
#define SCLP22_SIMPLE_GEOMETRY(X) SDAI::Simple_geometry::##X
|
||||
#define SCLP23_SIMPLE_GEOMETRY_NAME(x) imp##x
|
||||
#define SCLP23_SIMPLE_GEOMETRY(x) APP_NAMESPACE::imp##x
|
||||
/////////////////////////////////////
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -9,7 +9,7 @@ result_dir="."
|
||||
mk="make -j4"
|
||||
|
||||
#separated by ; for cmake
|
||||
schemas="../data/ap203/203wseds.exp;../data/ap203e2/ap203e2_mim_lf.exp;../data/ap210e3/ap210e3_wip1.41_mim_lf.exp;../data/ap214e3/AP214E3_2010.exp;../data/ap227/ap227.exp;../data/ap235/AP235-aim-long.exp;../data/ap240/AP240_aim_lf.exp;../data/cd209/part409cdts_wg3n2617mim_lf.exp;../data/cd242/242_n2813_mim_lf.exp;../data/ifc2x3/IFC2X3_TC1.exp;../data/ifc2x4/IFC2X4_RC2.exp;../data/ISO15926/15926-0002-lifecycle_integration.exp"
|
||||
schemas="../data/203wseds/203wseds.exp;../data/ap203e2/ap203e2_mim_lf.exp;../data/ap210e2/ap210e2_v1_40_mim_lf.exp;../data/wip210e3/210e3_wip_v1_41_mim_lf.exp;../data/ap214e3/AP214E3_2010.exp;../data/ap227/ap227.exp;../data/ap235/AP235_TC_engineering_properties_schema_20110222.exp;../data/ap240/AP240_aim_lf.exp;../data/cd209/part409cdts_wg3n2617mim_lf.exp;../data/cd242/242_n2813_mim_lf.exp;../data/ifc2x3/IFC2X3_TC1.exp;../data/ifc2x4/IFC2X4_RC3.exp;../data/ISO15926/15926-0002-lifecycle_integration.exp"
|
||||
#count warnings and errors, append to $matrix_file. creates hypertext links to stderr,stdout txt
|
||||
# $1 is the name of the row, $2 is the path and first part of the filename, $3 is the schema
|
||||
function count_we {
|
||||
@@ -78,11 +78,12 @@ function fedex_details {
|
||||
function build_one_schema {
|
||||
#set $i to the schema name, all caps (to match fedex_plus output)
|
||||
i=`sed -ne '0,/^\s*SCHEMA/s/^.*SCHEMA\s\+\(.*\);.*$/\1/p;' $1|tr a-z A-Z`
|
||||
d=`echo $1|sed -e 's|^.*/\([^/]*\)\.exp$|\1|;'`
|
||||
|
||||
echo "Running fedex_plus and gcc for $i..."
|
||||
make -f data/CMakeFiles/sdai_$i.dir/build.make $i/compstructs.cc 2>"$result_dir/fedex_"$i"_stderr.txt" >"$result_dir/fedex_"$i"_stdout.txt" && \
|
||||
$mk sdai_$i >/dev/null 2>"$result_dir/compile_libsdai_"$i"_stderr.txt" && \
|
||||
$mk p21read_sdai_$i >/dev/null 2>"$result_dir/compile_p21read_sdai_"$i"_stderr.txt"
|
||||
make generate_cpp_$d 2>"$result_dir/fedex_"$i"_stderr.txt" >"$result_dir/fedex_"$i"_stdout.txt" && \
|
||||
$mk sdai_$d >/dev/null 2>"$result_dir/compile_libsdai_"$i"_stderr.txt" && \
|
||||
$mk p21read_sdai_$d >/dev/null 2>"$result_dir/compile_p21read_sdai_"$i"_stderr.txt"
|
||||
|
||||
#todo: test p21read_sdai_$i
|
||||
}
|
||||
@@ -130,6 +131,7 @@ function gen_wiki {
|
||||
git log --decorate=short -n1 |\
|
||||
head -n1 |\
|
||||
sed -e 's|^.*commit \([a-z0-9]\+\) .*$|### Current as of commit [\1](http://github.com/mpictor/StepClassLibrary/commit/\1)|;' >>$matrix_file
|
||||
echo -e "\n## See also [PLIB build matrix](http://github.com/mpictor/StepClassLibrary/wiki/PLIB-build-matrix)\n\n" >>$matrix_file
|
||||
echo "<table border=1>" >>$matrix_file
|
||||
echo "<tr><th>Key</th></tr><tr><td><table width=100%>" >>$matrix_file
|
||||
echo "<tr><th>Item</th><th>Description</th></tr>" >>$matrix_file
|
||||
|
||||
+29
-12
@@ -26,7 +26,7 @@ endif()
|
||||
# use config variables such as these in
|
||||
# ../.SCL_CTEST_PREFS.cmake
|
||||
#
|
||||
#set( CTEST_SITE "your name here")
|
||||
#set( CTEST_SITE "username")
|
||||
#set( CTEST_BUILD_NAME "build type, os, arch")
|
||||
#
|
||||
#
|
||||
@@ -35,6 +35,8 @@ endif()
|
||||
# SKIP_CPP_TEST_SCHEMA_GEN
|
||||
# SKIP_CPP_TEST_SCHEMA_BUILD
|
||||
# SKIP_CPP_TEST_SCHEMA_RW
|
||||
# SKIP_TEST_UNITARY_SCHEMAS
|
||||
# SKIP_TEST_EXCHANGE_FILE
|
||||
#
|
||||
# setting this one disables result submission to my.cdash.org
|
||||
# SKIP_SUBMISSION
|
||||
@@ -83,9 +85,7 @@ set(CTEST_BUILD_FLAGS "-j${PROCESSOR_COUNT}")
|
||||
######################################################
|
||||
##### To disable reporting of a set of tests, comment
|
||||
##### out the SUBMIT_TEST line immediately following
|
||||
##### the set you wish to disable. If other tests
|
||||
##### depend on those tests, they will be executed
|
||||
##### but not reported.
|
||||
##### the set you wish to disable.
|
||||
#####
|
||||
##### To do this for all tests:
|
||||
##### set( SKIP_SUBMISSION TRUE )
|
||||
@@ -100,19 +100,36 @@ ctest_build( BUILD "${CTEST_BINARY_DIRECTORY}" APPEND )
|
||||
SUBMIT_TEST( Build )
|
||||
# ctest_memcheck( BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res PARALLEL_LEVEL ${PROCESSOR_COUNT} )
|
||||
|
||||
if(NOT SKIP_TEST_UNITARY_SCHEMAS )
|
||||
ctest_test( BUILD "${CTEST_BINARY_DIRECTORY}" APPEND
|
||||
PARALLEL_LEVEL ${PROCESSOR_COUNT} INCLUDE_LABEL "unitary_schemas" )
|
||||
SUBMIT_TEST( Test )
|
||||
endif()
|
||||
|
||||
if(NOT SKIP_CPP_TEST_SCHEMA_GEN )
|
||||
ctest_test( BUILD "${CTEST_BINARY_DIRECTORY}" APPEND
|
||||
PARALLEL_LEVEL ${PROCESSOR_COUNT} INCLUDE_LABEL "schema_gen" )
|
||||
PARALLEL_LEVEL ${PROCESSOR_COUNT} INCLUDE_LABEL "cpp_schema_gen" )
|
||||
SUBMIT_TEST( Test )
|
||||
if(NOT SKIP_CPP_TEST_SCHEMA_BUILD )
|
||||
ctest_test( BUILD "${CTEST_BINARY_DIRECTORY}" APPEND
|
||||
PARALLEL_LEVEL ${PROCESSOR_COUNT} INCLUDE_LABEL "cpp_schema_build" )
|
||||
SUBMIT_TEST( Test )
|
||||
if(NOT SKIP_CPP_TEST_SCHEMA_RW )
|
||||
ctest_test( BUILD "${CTEST_BINARY_DIRECTORY}" APPEND
|
||||
PARALLEL_LEVEL ${PROCESSOR_COUNT} INCLUDE_LABEL "cpp_schema_rw" )
|
||||
SUBMIT_TEST( Test )
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
if(NOT SKIP_CPP_TEST_SCHEMA_BUILD_CPP )
|
||||
|
||||
if(NOT SKIP_TEST_EXCHANGE_FILE )
|
||||
if( SKIP_CPP_TEST_SCHEMA_BUILD )
|
||||
ctest_test( BUILD "${CTEST_BINARY_DIRECTORY}" APPEND
|
||||
PARALLEL_LEVEL ${PROCESSOR_COUNT} INCLUDE "build_cpp_sdai_AP214E3_2010" )
|
||||
SUBMIT_TEST( Test )
|
||||
endif()
|
||||
ctest_test( BUILD "${CTEST_BINARY_DIRECTORY}" APPEND
|
||||
PARALLEL_LEVEL ${PROCESSOR_COUNT} INCLUDE_LABEL "schema_build" )
|
||||
SUBMIT_TEST( Test )
|
||||
endif()
|
||||
if(NOT SKIP_CPP_TEST_SCHEMA_RW )
|
||||
ctest_test( BUILD "${CTEST_BINARY_DIRECTORY}" APPEND
|
||||
PARALLEL_LEVEL ${PROCESSOR_COUNT} INCLUDE_LABEL "schema_rw" )
|
||||
PARALLEL_LEVEL ${PROCESSOR_COUNT} INCLUDE_LABEL "exchange_file" )
|
||||
SUBMIT_TEST( Test )
|
||||
endif()
|
||||
|
||||
|
||||
@@ -28,8 +28,8 @@ include_directories(
|
||||
${SCL_SOURCE_DIR}/src/clutils
|
||||
)
|
||||
|
||||
add_definitions(
|
||||
-DHAVE_CONFIG_H
|
||||
)
|
||||
|
||||
SCL_ADDLIB(stepdai "${LIBSTEPDAI_SRCS}" "steputils stepcore")
|
||||
|
||||
if(APPLE)
|
||||
set_target_properties(stepdai PROPERTIES LINK_FLAGS "-flat_namespace -undefined suppress")
|
||||
endif(APPLE)
|
||||
|
||||
@@ -40,36 +40,36 @@ extern "C"
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
SCLP23( Application_instance__set )::SCLP23_NAME( Application_instance__set )( int defaultSize ) {
|
||||
SDAI_Application_instance__set::SDAI_Application_instance__set( int defaultSize ) {
|
||||
_bufsize = defaultSize;
|
||||
_buf = new SCLP23( Application_instance_ptr )[_bufsize];
|
||||
_buf = new SDAI_Application_instance_ptr[_bufsize];
|
||||
_count = 0;
|
||||
}
|
||||
|
||||
SCLP23( Application_instance__set )::~SCLP23_NAME( Application_instance__set )() {
|
||||
SDAI_Application_instance__set::~SDAI_Application_instance__set() {
|
||||
delete _buf;
|
||||
}
|
||||
|
||||
void SCLP23( Application_instance__set )::Check( int index ) {
|
||||
SCLP23( Application_instance_ptr )* newbuf;
|
||||
void SDAI_Application_instance__set::Check( int index ) {
|
||||
SDAI_Application_instance_ptr* newbuf;
|
||||
|
||||
if( index >= _bufsize ) {
|
||||
_bufsize = ( index + 1 ) * 2;
|
||||
newbuf = new SCLP23( Application_instance_ptr )[_bufsize];
|
||||
memmove( newbuf, _buf, _count * sizeof( SCLP23( Application_instance_ptr ) ) );
|
||||
newbuf = new SDAI_Application_instance_ptr[_bufsize];
|
||||
memmove( newbuf, _buf, _count * sizeof( SDAI_Application_instance_ptr ) );
|
||||
delete _buf;
|
||||
_buf = newbuf;
|
||||
}
|
||||
}
|
||||
|
||||
void SCLP23( Application_instance__set )::Insert( SCLP23( Application_instance_ptr ) v, int index ) {
|
||||
SCLP23( Application_instance_ptr )* spot;
|
||||
void SDAI_Application_instance__set::Insert( SDAI_Application_instance_ptr v, int index ) {
|
||||
SDAI_Application_instance_ptr* spot;
|
||||
index = ( index < 0 ) ? _count : index;
|
||||
|
||||
if( index < _count ) {
|
||||
Check( _count + 1 );
|
||||
spot = &_buf[index];
|
||||
memmove( spot + 1, spot, ( _count - index )*sizeof( SCLP23( Application_instance_ptr ) ) );
|
||||
memmove( spot + 1, spot, ( _count - index )*sizeof( SDAI_Application_instance_ptr ) );
|
||||
|
||||
} else {
|
||||
Check( index );
|
||||
@@ -79,14 +79,14 @@ void SCLP23( Application_instance__set )::Insert( SCLP23( Application_instance_p
|
||||
++_count;
|
||||
}
|
||||
|
||||
void SCLP23( Application_instance__set )::Append( SCLP23( Application_instance_ptr ) v ) {
|
||||
void SDAI_Application_instance__set::Append( SDAI_Application_instance_ptr v ) {
|
||||
int index = _count;
|
||||
SCLP23( Application_instance_ptr )* spot;
|
||||
SDAI_Application_instance_ptr* spot;
|
||||
|
||||
if( index < _count ) {
|
||||
Check( _count + 1 );
|
||||
spot = &_buf[index];
|
||||
memmove( spot + 1, spot, ( _count - index )*sizeof( SCLP23( Application_instance_ptr ) ) );
|
||||
memmove( spot + 1, spot, ( _count - index )*sizeof( SDAI_Application_instance_ptr ) );
|
||||
|
||||
} else {
|
||||
Check( index );
|
||||
@@ -96,22 +96,22 @@ void SCLP23( Application_instance__set )::Append( SCLP23( Application_instance_p
|
||||
++_count;
|
||||
}
|
||||
|
||||
void SCLP23( Application_instance__set )::Remove( int index ) {
|
||||
void SDAI_Application_instance__set::Remove( int index ) {
|
||||
if( 0 <= index && index < _count ) {
|
||||
--_count;
|
||||
SCLP23( Application_instance_ptr )* spot = &_buf[index];
|
||||
memmove( spot, spot + 1, ( _count - index )*sizeof( SCLP23( Application_instance_ptr ) ) );
|
||||
SDAI_Application_instance_ptr* spot = &_buf[index];
|
||||
memmove( spot, spot + 1, ( _count - index )*sizeof( SDAI_Application_instance_ptr ) );
|
||||
}
|
||||
}
|
||||
|
||||
void SCLP23( Application_instance__set )::Remove( SCLP23( Application_instance_ptr ) a ) {
|
||||
void SDAI_Application_instance__set::Remove( SDAI_Application_instance_ptr a ) {
|
||||
int index = Index( a );
|
||||
if( !( index < 0 ) ) {
|
||||
Remove( index );
|
||||
}
|
||||
}
|
||||
|
||||
int SCLP23( Application_instance__set )::Index( SCLP23( Application_instance_ptr ) v ) {
|
||||
int SDAI_Application_instance__set::Index( SDAI_Application_instance_ptr v ) {
|
||||
for( int i = 0; i < _count; ++i ) {
|
||||
if( _buf[i] == v ) {
|
||||
return i;
|
||||
@@ -120,7 +120,7 @@ int SCLP23( Application_instance__set )::Index( SCLP23( Application_instance_ptr
|
||||
return -1;
|
||||
}
|
||||
|
||||
SCLP23( Application_instance_ptr ) & SCLP23( Application_instance__set )::operator[]( int index ) {
|
||||
SDAI_Application_instance_ptr & SDAI_Application_instance__set::operator[]( int index ) {
|
||||
Check( index );
|
||||
// _count = max(_count, index+1);
|
||||
_count = ( ( _count > index + 1 ) ? _count : ( index + 1 ) );
|
||||
@@ -128,11 +128,11 @@ SCLP23( Application_instance_ptr ) & SCLP23( Application_instance__set )::operat
|
||||
}
|
||||
|
||||
int
|
||||
SCLP23( Application_instance__set )::Count() {
|
||||
SDAI_Application_instance__set::Count() {
|
||||
return _count;
|
||||
}
|
||||
|
||||
void
|
||||
SCLP23( Application_instance__set )::Clear() {
|
||||
SDAI_Application_instance__set::Clear() {
|
||||
_count = 0;
|
||||
}
|
||||
|
||||
@@ -32,31 +32,31 @@
|
||||
|
||||
//#include <STEPentity.h>
|
||||
|
||||
class SCLP23_NAME(Application_instance__set);
|
||||
typedef SCLP23_NAME(Application_instance__set) *
|
||||
SCLP23_NAME(Application_instance__set_ptr);
|
||||
typedef SCLP23_NAME(Application_instance__set_ptr)
|
||||
SCLP23_NAME(Application_instance__set_var);
|
||||
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;
|
||||
|
||||
class SCLP23_NAME(Application_instance__set)
|
||||
class SDAI_Application_instance__set
|
||||
{
|
||||
public:
|
||||
SCLP23_NAME(Application_instance__set)(int = 16);
|
||||
~SCLP23_NAME(Application_instance__set)();
|
||||
SDAI_Application_instance__set(int = 16);
|
||||
~SDAI_Application_instance__set();
|
||||
|
||||
SCLP23_NAME(Application_instance_ptr)& operator[](int index);
|
||||
void Insert(SCLP23_NAME(Application_instance_ptr), int index);
|
||||
void Append(SCLP23_NAME(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(SCLP23_NAME(Application_instance_ptr));
|
||||
int Index(SCLP23_NAME(Application_instance_ptr));
|
||||
void Remove(SDAI_Application_instance_ptr);
|
||||
int Index(SDAI_Application_instance_ptr);
|
||||
|
||||
int Count();
|
||||
void Clear();
|
||||
private:
|
||||
void Check(int index);
|
||||
private:
|
||||
SCLP23_NAME(Application_instance_ptr)* _buf;
|
||||
SDAI_Application_instance_ptr* _buf;
|
||||
int _bufsize;
|
||||
int _count;
|
||||
};
|
||||
|
||||
+36
-36
@@ -13,57 +13,57 @@ extern "C"
|
||||
#endif
|
||||
|
||||
|
||||
SCLP23( PID )::SCLP23_NAME( PID )() {
|
||||
SDAI_PID::SDAI_PID() {
|
||||
}
|
||||
|
||||
SCLP23( PID )::~SCLP23_NAME( PID )() {
|
||||
SDAI_PID::~SDAI_PID() {
|
||||
}
|
||||
|
||||
SCLP23( PID_DA )::SCLP23_NAME( PID_DA )() {
|
||||
SDAI_PID_DA::SDAI_PID_DA() {
|
||||
}
|
||||
|
||||
SCLP23( PID_DA )::~SCLP23_NAME( PID_DA )() {
|
||||
SDAI_PID_DA::~SDAI_PID_DA() {
|
||||
}
|
||||
|
||||
SCLP23( PID_SDAI )::SCLP23_NAME( PID_SDAI )() {
|
||||
SDAI_PID_SDAI::SDAI_PID_SDAI() {
|
||||
}
|
||||
|
||||
SCLP23( PID_SDAI )::~SCLP23_NAME( PID_SDAI )() {
|
||||
SDAI_PID_SDAI::~SDAI_PID_SDAI() {
|
||||
}
|
||||
|
||||
SCLP23( DAObject )::SCLP23_NAME( DAObject )() {
|
||||
SDAI_DAObject::SDAI_DAObject() {
|
||||
}
|
||||
|
||||
SCLP23( DAObject )::~SCLP23_NAME( DAObject )() {
|
||||
SDAI_DAObject::~SDAI_DAObject() {
|
||||
}
|
||||
|
||||
|
||||
#ifdef PART26
|
||||
//SCLP26(Application_instance_ptr)
|
||||
IDL_Application_instance_ptr
|
||||
SCLP23( DAObject )::create_TIE() {
|
||||
SDAI_DAObject::create_TIE() {
|
||||
cout << "ERROR DAObject::create_TIE() called." << endl;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
SCLP23( DAObject_SDAI )::SCLP23_NAME( DAObject_SDAI )() {
|
||||
SDAI_DAObject_SDAI::SDAI_DAObject_SDAI() {
|
||||
}
|
||||
|
||||
/*
|
||||
SCLP23(DAObject_SDAI)::SCLP23_NAME(DAObject_SDAI)(const DAObject_SDAI&)
|
||||
SDAI_DAObject_SDAI::SDAI_DAObject_SDAI(const DAObject_SDAI&)
|
||||
{
|
||||
}
|
||||
*/
|
||||
|
||||
SCLP23( DAObject_SDAI )::~SCLP23_NAME( DAObject_SDAI )() {
|
||||
SDAI_DAObject_SDAI::~SDAI_DAObject_SDAI() {
|
||||
}
|
||||
|
||||
|
||||
#ifdef PART26
|
||||
//SCLP26(Application_instance_ptr)
|
||||
IDL_Application_instance_ptr
|
||||
SCLP23( DAObject_SDAI )::create_TIE() {
|
||||
SDAI_DAObject_SDAI::create_TIE() {
|
||||
cout << "ERROR DAObject_SDAI::create_TIE() called." << endl;
|
||||
return 0;
|
||||
}
|
||||
@@ -97,39 +97,39 @@ SCLP23( DAObject_SDAI )::create_TIE() {
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
SCLP23( DAObject__set )::SCLP23_NAME( DAObject__set )( int defaultSize ) {
|
||||
SDAI_DAObject__set::SDAI_DAObject__set( int defaultSize ) {
|
||||
_bufsize = defaultSize;
|
||||
_buf = new SCLP23( DAObject_ptr )[_bufsize];
|
||||
_buf = new SDAI_DAObject_ptr[_bufsize];
|
||||
_count = 0;
|
||||
}
|
||||
|
||||
SCLP23( DAObject__set )::~SCLP23_NAME( DAObject__set )() {
|
||||
SDAI_DAObject__set::~SDAI_DAObject__set() {
|
||||
delete _buf;
|
||||
}
|
||||
|
||||
void SCLP23( DAObject__set )::Check( int index ) {
|
||||
void SDAI_DAObject__set::Check( int index ) {
|
||||
|
||||
SCLP23( DAObject_ptr )* newbuf;
|
||||
SDAI_DAObject_ptr* newbuf;
|
||||
|
||||
if( index >= _bufsize ) {
|
||||
_bufsize = ( index + 1 ) * 2;
|
||||
newbuf = new SCLP23( DAObject_ptr )[_bufsize];
|
||||
memmove( newbuf, _buf, _count * sizeof( SCLP23( DAObject_ptr ) ) );
|
||||
newbuf = new SDAI_DAObject_ptr[_bufsize];
|
||||
memmove( newbuf, _buf, _count * sizeof( SDAI_DAObject_ptr ) );
|
||||
delete _buf;
|
||||
_buf = newbuf;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
SCLP23( DAObject__set )::Insert( SCLP23( DAObject_ptr ) v, int index ) {
|
||||
SDAI_DAObject__set::Insert( SDAI_DAObject_ptr v, int index ) {
|
||||
|
||||
SCLP23( DAObject_ptr )* spot;
|
||||
SDAI_DAObject_ptr* spot;
|
||||
index = ( index < 0 ) ? _count : index;
|
||||
|
||||
if( index < _count ) {
|
||||
Check( _count + 1 );
|
||||
spot = &_buf[index];
|
||||
memmove( spot + 1, spot, ( _count - index )*sizeof( SCLP23( DAObject_ptr ) ) );
|
||||
memmove( spot + 1, spot, ( _count - index )*sizeof( SDAI_DAObject_ptr ) );
|
||||
|
||||
} else {
|
||||
Check( index );
|
||||
@@ -139,15 +139,15 @@ SCLP23( DAObject__set )::Insert( SCLP23( DAObject_ptr ) v, int index ) {
|
||||
++_count;
|
||||
}
|
||||
|
||||
void SCLP23( DAObject__set )::Append( SCLP23( DAObject_ptr ) v ) {
|
||||
void SDAI_DAObject__set::Append( SDAI_DAObject_ptr v ) {
|
||||
|
||||
int index = _count;
|
||||
SCLP23( DAObject_ptr )* spot;
|
||||
SDAI_DAObject_ptr* spot;
|
||||
|
||||
if( index < _count ) {
|
||||
Check( _count + 1 );
|
||||
spot = &_buf[index];
|
||||
memmove( spot + 1, spot, ( _count - index )*sizeof( SCLP23( DAObject_ptr ) ) );
|
||||
memmove( spot + 1, spot, ( _count - index )*sizeof( SDAI_DAObject_ptr ) );
|
||||
|
||||
} else {
|
||||
Check( index );
|
||||
@@ -157,16 +157,16 @@ void SCLP23( DAObject__set )::Append( SCLP23( DAObject_ptr ) v ) {
|
||||
++_count;
|
||||
}
|
||||
|
||||
void SCLP23( DAObject__set )::Remove( int index ) {
|
||||
void SDAI_DAObject__set::Remove( int index ) {
|
||||
|
||||
if( 0 <= index && index < _count ) {
|
||||
--_count;
|
||||
SCLP23( DAObject_ptr )* spot = &_buf[index];
|
||||
memmove( spot, spot + 1, ( _count - index )*sizeof( SCLP23( DAObject_ptr ) ) );
|
||||
SDAI_DAObject_ptr* spot = &_buf[index];
|
||||
memmove( spot, spot + 1, ( _count - index )*sizeof( SDAI_DAObject_ptr ) );
|
||||
}
|
||||
}
|
||||
|
||||
int SCLP23( DAObject__set )::Index( SCLP23( DAObject_ptr ) v ) {
|
||||
int SDAI_DAObject__set::Index( SDAI_DAObject_ptr v ) {
|
||||
|
||||
for( int i = 0; i < _count; ++i ) {
|
||||
if( _buf[i] == v ) {
|
||||
@@ -176,12 +176,12 @@ int SCLP23( DAObject__set )::Index( SCLP23( DAObject_ptr ) v ) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
SCLP23( DAObject_ptr )
|
||||
SCLP23( DAObject__set )::retrieve( int index ) {
|
||||
SDAI_DAObject_ptr
|
||||
SDAI_DAObject__set::retrieve( int index ) {
|
||||
return operator[]( index );
|
||||
}
|
||||
|
||||
SCLP23( DAObject_ptr ) & SCLP23( DAObject__set )::operator[]( int index ) {
|
||||
SDAI_DAObject_ptr & SDAI_DAObject__set::operator[]( int index ) {
|
||||
|
||||
Check( index );
|
||||
// _count = max(_count, index+1);
|
||||
@@ -190,16 +190,16 @@ SCLP23( DAObject_ptr ) & SCLP23( DAObject__set )::operator[]( int index ) {
|
||||
}
|
||||
|
||||
int
|
||||
SCLP23( DAObject__set )::Count() {
|
||||
SDAI_DAObject__set::Count() {
|
||||
return _count;
|
||||
}
|
||||
|
||||
int
|
||||
SCLP23( DAObject__set )::is_empty() {
|
||||
SDAI_DAObject__set::is_empty() {
|
||||
return _count;
|
||||
}
|
||||
|
||||
void
|
||||
SCLP23( DAObject__set )::Clear() {
|
||||
SDAI_DAObject__set::Clear() {
|
||||
_count = 0;
|
||||
}
|
||||
|
||||
+52
-52
@@ -1,7 +1,7 @@
|
||||
#ifndef SDAIDAOBJECT_H
|
||||
#define SDAIDAOBJECT_H 1
|
||||
|
||||
typedef char* SCLP23_NAME(DAObjectID);
|
||||
typedef char* SDAI_DAObjectID;
|
||||
|
||||
// interface PID (ISO/DIS 10303-23:1996(E) 5.3.10.1)
|
||||
// Also, CORBA POS specification, Section 5.4
|
||||
@@ -21,25 +21,25 @@ typedef char* SCLP23_NAME(DAObjectID);
|
||||
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
|
||||
SCLP23(DAObjectID) as follows:
|
||||
SDAI_DAObjectID as follows:
|
||||
*/
|
||||
|
||||
class SCLP23_NAME(PID) : public SCLP23_NAME(sdaiObject)
|
||||
class SDAI_PID : public SDAI_sdaiObject
|
||||
{
|
||||
public:
|
||||
|
||||
// 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(SCLP23_NAME(sdaiObject_ptr));
|
||||
// static PID_ptr _narrow(SDAI_sdaiObject_ptr);
|
||||
// static PID_ptr _nil();
|
||||
|
||||
SCLP23_NAME(String) _datastore_type ;
|
||||
SCLP23_NAME(String) _pidstring ;
|
||||
SDAI_String _datastore_type ;
|
||||
SDAI_String _pidstring ;
|
||||
|
||||
// constructor/destructor
|
||||
SCLP23_NAME(PID)();
|
||||
virtual ~SCLP23_NAME(PID)();
|
||||
SDAI_PID();
|
||||
virtual ~SDAI_PID();
|
||||
|
||||
/*
|
||||
The Datestore_type attribute shall identify the type of the underlying
|
||||
@@ -54,8 +54,8 @@ class SCLP23_NAME(PID) : public SCLP23_NAME(sdaiObject)
|
||||
char* get_PIDString();
|
||||
};
|
||||
|
||||
typedef SCLP23_NAME(PID)* SCLP23_NAME(PID_ptr);
|
||||
typedef SCLP23_NAME(PID_ptr) SCLP23_NAME(PID_var);
|
||||
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)
|
||||
@@ -80,11 +80,11 @@ typedef SCLP23_NAME(PID_ptr) SCLP23_NAME(PID_var);
|
||||
// interface.
|
||||
//
|
||||
|
||||
class SCLP23_NAME(PID_DA): public SCLP23_NAME(PID)
|
||||
class SDAI_PID_DA: public SDAI_PID
|
||||
{
|
||||
public:
|
||||
|
||||
SCLP23_NAME(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
|
||||
@@ -92,36 +92,36 @@ class SCLP23_NAME(PID_DA): public SCLP23_NAME(PID)
|
||||
// referred to by this object.
|
||||
//
|
||||
// POS: This returns the data object identifier used by this PDS for
|
||||
// the data object specified by the PID. The SCLP23(DAObjectID) type is
|
||||
// the data object specified by the PID. The SDAI_DAObjectID type is
|
||||
// defined as an unbounded sequence of bytes that may be
|
||||
// vendor-dependent.
|
||||
//
|
||||
|
||||
// constructor/destructor
|
||||
SCLP23_NAME(PID_DA)();
|
||||
virtual ~SCLP23_NAME(PID_DA)();
|
||||
SDAI_PID_DA();
|
||||
virtual ~SDAI_PID_DA();
|
||||
|
||||
virtual void oid (const SCLP23_NAME(DAObjectID) x) { _oid = x; }
|
||||
virtual SCLP23_NAME(DAObjectID) oid () const
|
||||
virtual void oid (const SDAI_DAObjectID x) { _oid = x; }
|
||||
virtual SDAI_DAObjectID oid () const
|
||||
{ return const_cast<char *>(_oid.c_str()); }
|
||||
};
|
||||
|
||||
typedef SCLP23_NAME(PID_DA)* SCLP23_NAME(PID_DA_ptr);
|
||||
typedef SCLP23_NAME(PID_DA_ptr) SCLP23_NAME(PID_DA_var);
|
||||
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 SCLP23_NAME(PID_SDAI) : public SCLP23_NAME(PID)
|
||||
class SDAI_PID_SDAI : public SDAI_PID
|
||||
{
|
||||
public:
|
||||
SCLP23_NAME(String) _modelid ;
|
||||
SDAI_String _modelid ;
|
||||
|
||||
// constructor/destructor
|
||||
SCLP23_NAME(PID_SDAI)();
|
||||
virtual ~SCLP23_NAME(PID_SDAI)();
|
||||
SDAI_PID_SDAI();
|
||||
virtual ~SDAI_PID_SDAI();
|
||||
|
||||
// Modelid (ISO/DIS 10303-23:1996(E) 5.3.10.3)
|
||||
//
|
||||
@@ -133,8 +133,8 @@ class SCLP23_NAME(PID_SDAI) : public SCLP23_NAME(PID)
|
||||
virtual char * Modelid () const { return const_cast<char *>(_modelid.c_str()); }
|
||||
};
|
||||
|
||||
typedef SCLP23_NAME(PID_SDAI)* SCLP23_NAME(PID_SDAI_ptr);
|
||||
typedef SCLP23_NAME(PID_SDAI_ptr) SCLP23_NAME(PID_SDAI_var);
|
||||
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.
|
||||
@@ -148,15 +148,15 @@ typedef SCLP23_NAME(PID_SDAI_ptr) SCLP23_NAME(PID_SDAI_var);
|
||||
//
|
||||
|
||||
// predefine these _ptr since they are used inside this class
|
||||
class SCLP23_NAME(DAObject);
|
||||
typedef SCLP23_NAME(DAObject)* SCLP23_NAME(DAObject_ptr);
|
||||
typedef SCLP23_NAME(DAObject_ptr) SCLP23_NAME(DAObject_var);
|
||||
class SDAI_DAObject;
|
||||
typedef SDAI_DAObject* SDAI_DAObject_ptr;
|
||||
typedef SDAI_DAObject_ptr SDAI_DAObject_var;
|
||||
|
||||
class SCLP23_NAME(DAObject) : public SCLP23_NAME(sdaiObject)
|
||||
class SDAI_DAObject : public SDAI_sdaiObject
|
||||
{
|
||||
public:
|
||||
|
||||
SCLP23_NAME(String) _dado_oid;
|
||||
SDAI_String _dado_oid;
|
||||
|
||||
// dado_same (ISO/DIS 10303-23:1996(E) 5.3.10.5)
|
||||
//
|
||||
@@ -169,10 +169,10 @@ class SCLP23_NAME(DAObject) : public SCLP23_NAME(sdaiObject)
|
||||
//
|
||||
|
||||
// constructor/destructor
|
||||
SCLP23_NAME(DAObject)();
|
||||
virtual ~SCLP23_NAME(DAObject)();
|
||||
SDAI_DAObject();
|
||||
virtual ~SDAI_DAObject();
|
||||
|
||||
Logical dado_same(SCLP23_NAME(DAObject_ptr) obj) {
|
||||
Logical dado_same(SDAI_DAObject_ptr obj) {
|
||||
return LUnknown;
|
||||
}
|
||||
|
||||
@@ -205,7 +205,7 @@ class SCLP23_NAME(DAObject) : public SCLP23_NAME(sdaiObject)
|
||||
note that the return value as described in the text above
|
||||
should be a string type.
|
||||
*/
|
||||
SCLP23_NAME(DAObjectID) dado_oid()
|
||||
SDAI_DAObjectID dado_oid()
|
||||
{ return const_cast<char *>(_dado_oid.c_str()); }
|
||||
|
||||
// dado_pid
|
||||
@@ -217,7 +217,7 @@ class SCLP23_NAME(DAObject) : public SCLP23_NAME(sdaiObject)
|
||||
part of interface DAObject in the specification of the
|
||||
Persistent Object Service.
|
||||
*/
|
||||
SCLP23_NAME(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)
|
||||
//
|
||||
@@ -249,12 +249,12 @@ class SCLP23_NAME(DAObject) : public SCLP23_NAME(sdaiObject)
|
||||
5.3.10.1 DAObject_SDAI
|
||||
*/
|
||||
|
||||
class SCLP23_NAME(DAObject_SDAI) : public SCLP23_NAME(DAObject) {
|
||||
class SDAI_DAObject_SDAI : public SDAI_DAObject {
|
||||
|
||||
public:
|
||||
SCLP23_NAME(DAObject_SDAI)();
|
||||
SDAI_DAObject_SDAI();
|
||||
|
||||
virtual ~SCLP23_NAME(DAObject_SDAI)();
|
||||
virtual ~SDAI_DAObject_SDAI();
|
||||
|
||||
/*
|
||||
5.3.10.1.1 Find entity instance SDAI-model
|
||||
@@ -296,7 +296,7 @@ class SCLP23_NAME(DAObject_SDAI) : public SCLP23_NAME(DAObject) {
|
||||
5.3.10.1.3 Is same
|
||||
*/
|
||||
|
||||
Logical IsSame(const SCLP23_NAME(sdaiObject_ptr)& otherEntity) const;
|
||||
Logical IsSame(const SDAI_sdaiObject_ptr& otherEntity) const;
|
||||
|
||||
/*
|
||||
Function:
|
||||
@@ -469,24 +469,24 @@ class SCLP23_NAME(DAObject_SDAI) : public SCLP23_NAME(DAObject) {
|
||||
|
||||
};
|
||||
|
||||
typedef SCLP23_NAME(DAObject_SDAI)* SCLP23_NAME(DAObject_SDAI_ptr);
|
||||
typedef SCLP23_NAME(DAObject_SDAI_ptr) SCLP23_NAME(DAObject_SDAI_var);
|
||||
typedef SDAI_DAObject_SDAI* SDAI_DAObject_SDAI_ptr;
|
||||
typedef SDAI_DAObject_SDAI_ptr SDAI_DAObject_SDAI_var;
|
||||
|
||||
class SCLP23_NAME(DAObject__set) {
|
||||
class SDAI_DAObject__set {
|
||||
public:
|
||||
SCLP23_NAME(DAObject__set)(int = 16);
|
||||
~SCLP23_NAME(DAObject__set)();
|
||||
SDAI_DAObject__set(int = 16);
|
||||
~SDAI_DAObject__set();
|
||||
|
||||
SCLP23_NAME(DAObject_ptr) retrieve(int index);
|
||||
SDAI_DAObject_ptr retrieve(int index);
|
||||
int is_empty();
|
||||
|
||||
SCLP23_NAME(DAObject_ptr)& operator[](int index);
|
||||
SDAI_DAObject_ptr& operator[](int index);
|
||||
|
||||
void Insert(SCLP23_NAME(DAObject_ptr), int index);
|
||||
void Append(SCLP23_NAME(DAObject_ptr));
|
||||
void Insert(SDAI_DAObject_ptr, int index);
|
||||
void Append(SDAI_DAObject_ptr);
|
||||
void Remove(int index);
|
||||
|
||||
int Index(SCLP23_NAME(DAObject_ptr));
|
||||
int Index(SDAI_DAObject_ptr);
|
||||
|
||||
void Clear();
|
||||
int Count();
|
||||
@@ -494,7 +494,7 @@ public:
|
||||
private:
|
||||
void Check(int index);
|
||||
private:
|
||||
SCLP23_NAME(DAObject_ptr)* _buf;
|
||||
SDAI_DAObject_ptr* _buf;
|
||||
int _bufsize;
|
||||
int _count;
|
||||
|
||||
@@ -502,7 +502,7 @@ private:
|
||||
|
||||
};
|
||||
|
||||
typedef SCLP23_NAME(DAObject__set)* SCLP23_NAME(DAObject__set_ptr);
|
||||
typedef SCLP23_NAME(DAObject__set_ptr) SCLP23_NAME(DAObject__set_var);
|
||||
typedef SDAI_DAObject__set* SDAI_DAObject__set_ptr;
|
||||
typedef SDAI_DAObject__set_ptr SDAI_DAObject__set_var;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
#include <sdai.h>
|
||||
|
||||
SCLP23( Entity_extent )::SCLP23_NAME( Entity_extent )( )
|
||||
SDAI_Entity_extent::SDAI_Entity_extent( )
|
||||
: _definition( 0 ), _definition_name( 0 ), _owned_by( 0 ) {
|
||||
/*
|
||||
_definition = 0;
|
||||
@@ -14,7 +14,7 @@ SCLP23( Entity_extent )::SCLP23_NAME( Entity_extent )( )
|
||||
}
|
||||
|
||||
/*
|
||||
SCLP23(Entity_extent)::SCLP23_NAME(Entity_extent)(const SCLP23(Entity_extent)& ee)
|
||||
SDAI_Entity_extent::SDAI_Entity_extent(const SDAI_Entity_extent& ee)
|
||||
{
|
||||
// { CopyAs((STEPentityH) &e); }
|
||||
_definition = 0;
|
||||
@@ -22,54 +22,54 @@ SCLP23(Entity_extent)::SCLP23_NAME(Entity_extent)(const SCLP23(Entity_extent)& e
|
||||
}
|
||||
*/
|
||||
|
||||
SCLP23( Entity_extent )::~SCLP23_NAME( Entity_extent )() {
|
||||
SDAI_Entity_extent::~SDAI_Entity_extent() {
|
||||
delete _definition_name;
|
||||
}
|
||||
|
||||
const Entity_ptr
|
||||
SCLP23( Entity_extent )::definition_() const {
|
||||
SDAI_Entity_extent::definition_() const {
|
||||
return _definition;
|
||||
}
|
||||
|
||||
/*
|
||||
const SCLP23(Entity_name)
|
||||
SCLP23(Entity_extent)::definition_name_() const
|
||||
const SDAI_Entity_name
|
||||
SDAI_Entity_extent::definition_name_() const
|
||||
{
|
||||
return _definition_name;
|
||||
}
|
||||
*/
|
||||
|
||||
void
|
||||
SCLP23( Entity_extent )::definition_( const Entity_ptr & ep ) {
|
||||
SDAI_Entity_extent::definition_( const Entity_ptr & ep ) {
|
||||
_definition = ep;
|
||||
}
|
||||
|
||||
void
|
||||
SCLP23( Entity_extent )::definition_name_( const SCLP23( 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
|
||||
SCLP23( Entity_extent )::owned_by_( SCLP23_NAME( Model_contents__list_var )& mclv ) {
|
||||
SDAI_Entity_extent::owned_by_( SDAI_Model_contents__list_var& mclv ) {
|
||||
// _owned_by = mcp;
|
||||
}
|
||||
|
||||
const SCLP23( Model_contents__list_var )
|
||||
SCLP23( Entity_extent )::owned_by_() const {
|
||||
return ( const SCLP23( Model_contents__list_var ) ) &_owned_by;
|
||||
const SDAI_Model_contents__list_var
|
||||
SDAI_Entity_extent::owned_by_() const {
|
||||
return ( const SDAI_Model_contents__list_var ) &_owned_by;
|
||||
}
|
||||
|
||||
/*
|
||||
SCLP23(DAObject__set_var) instances_()
|
||||
SDAI_DAObject__set_var instances_()
|
||||
{
|
||||
return &_instances;
|
||||
}
|
||||
|
||||
const
|
||||
SCLP23(DAObject__set_var) instances_() const
|
||||
SDAI_DAObject__set_var instances_() const
|
||||
{
|
||||
return (const SCLP23(DAObject__set_var))&_instances;
|
||||
return (const SDAI_DAObject__set_var)&_instances;
|
||||
}
|
||||
*/
|
||||
|
||||
@@ -92,7 +92,7 @@ SCLP23(DAObject__set_var) instances_() const
|
||||
*/
|
||||
|
||||
void
|
||||
SCLP23( Entity_extent )::AddInstance( const SCLP23( DAObject_ptr )& appInst ) {
|
||||
SDAI_Entity_extent::AddInstance( const SDAI_DAObject_ptr& appInst ) {
|
||||
_instances.Append( appInst );
|
||||
}
|
||||
|
||||
@@ -114,8 +114,8 @@ SCLP23( Entity_extent )::AddInstance( const SCLP23( DAObject_ptr )& appInst ) {
|
||||
|
||||
|
||||
void
|
||||
SCLP23( Entity_extent )::RemoveInstance( const SCLP23( DAObject_ptr )& appInst ) {
|
||||
SDAI_Entity_extent::RemoveInstance( const SDAI_DAObject_ptr& appInst ) {
|
||||
_instances.Remove( _instances.Index( appInst ) );
|
||||
}
|
||||
|
||||
///////// END_ENTITY SCLP23(Entity_extent)
|
||||
///////// END_ENTITY SDAI_Entity_extent
|
||||
|
||||
@@ -12,13 +12,13 @@
|
||||
7.3.3 Entity extent
|
||||
*/
|
||||
|
||||
class SCLP23_NAME(Entity_extent);
|
||||
typedef SCLP23_NAME(Entity_extent) * SCLP23_NAME(Entity_extent_ptr);
|
||||
typedef SCLP23_NAME(Entity_extent_ptr) SCLP23_NAME(Entity_extent_var);
|
||||
class SDAI_Entity_extent;
|
||||
typedef SDAI_Entity_extent * SDAI_Entity_extent_ptr;
|
||||
typedef SDAI_Entity_extent_ptr SDAI_Entity_extent_var;
|
||||
|
||||
class SCLP23_NAME(Entity_extent) : public SCLP23_NAME(Session_instance) {
|
||||
class SDAI_Entity_extent : public SDAI_Session_instance {
|
||||
|
||||
friend class SCLP23_NAME(Model_contents);
|
||||
friend class SDAI_Model_contents;
|
||||
/*
|
||||
NOTE - The ModelContent class is a friend so that ModelContent may add
|
||||
instances to Entity_extent instances.
|
||||
@@ -27,21 +27,21 @@ friend class SCLP23_NAME(Model_contents);
|
||||
public: //for now
|
||||
// protected:
|
||||
Entity_ptr _definition ;
|
||||
SCLP23_NAME(Entity_name) _definition_name ;
|
||||
SCLP23_NAME(DAObject__set) _instances ; // of Application_instance
|
||||
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;
|
||||
SCLP23_NAME(Model_contents__list) _owned_by ; // ADDED in Part 22
|
||||
SDAI_Model_contents__list _owned_by ; // ADDED in Part 22
|
||||
|
||||
// private:
|
||||
SCLP23_NAME(Entity_extent)();
|
||||
// SCLP23_NAME(Entity_extent)(const SCLP23_NAME(Entity_extent)& ee);
|
||||
~SCLP23_NAME(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:
|
||||
|
||||
SCLP23_NAME(Entity_name) definition_name_() const
|
||||
SDAI_Entity_name definition_name_() const
|
||||
{ return _definition_name; }
|
||||
|
||||
const Entity_ptr definition_() const;
|
||||
@@ -49,25 +49,25 @@ friend class SCLP23_NAME(Model_contents);
|
||||
// const Entity_ptr definition_() const;
|
||||
#endif
|
||||
|
||||
SCLP23_NAME(DAObject__set_var) instances_() { return &_instances; }
|
||||
SCLP23_NAME(DAObject__set_var) instances_() const
|
||||
{ return (const SCLP23_NAME(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 SCLP23_NAME(Model_contents__list_var) owned_by_() const;
|
||||
const SDAI_Model_contents__list_var owned_by_() const;
|
||||
|
||||
// static SCLP23_NAME(Entity_extent_ptr)
|
||||
// _duplicate(SCLP23_NAME(Entity_extent_ptr) eep);
|
||||
// static SCLP23_NAME(Entity_extent_ptr) _narrow(Object_ptr op);
|
||||
// static SCLP23_NAME(Entity_extent_ptr) _nil();
|
||||
// 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);
|
||||
#ifdef SDAI_CPP_LATE_BINDING
|
||||
// void definition_(const Entity_ptr& ep);
|
||||
#endif
|
||||
void definition_name_(const SCLP23_NAME(Entity_name)& ep);
|
||||
void owned_by_(SCLP23_NAME(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
|
||||
@@ -76,7 +76,7 @@ friend class SCLP23_NAME(Model_contents);
|
||||
*/
|
||||
|
||||
// this is no longer in Part 23
|
||||
void AddInstance(const SCLP23_NAME(DAObject_ptr)& appInst);
|
||||
void AddInstance(const SDAI_DAObject_ptr& appInst);
|
||||
|
||||
/*
|
||||
Function:
|
||||
@@ -95,7 +95,7 @@ friend class SCLP23_NAME(Model_contents);
|
||||
*/
|
||||
|
||||
// this is no longer in Part 23
|
||||
void RemoveInstance(const SCLP23_NAME(DAObject_ptr)& appInst);
|
||||
void RemoveInstance(const SDAI_DAObject_ptr& appInst);
|
||||
|
||||
/*
|
||||
7.3.3.1.2 RemoveInstance
|
||||
|
||||
@@ -43,39 +43,39 @@ extern "C"
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
SCLP23( Entity_extent__set )::SCLP23_NAME( Entity_extent__set )( int defaultSize ) {
|
||||
SDAI_Entity_extent__set::SDAI_Entity_extent__set( int defaultSize ) {
|
||||
_bufsize = defaultSize;
|
||||
_buf = new SCLP23( Entity_extent_ptr )[_bufsize];
|
||||
_buf = new SDAI_Entity_extent_ptr[_bufsize];
|
||||
_count = 0;
|
||||
}
|
||||
|
||||
SCLP23( Entity_extent__set )::~SCLP23_NAME( Entity_extent__set )() {
|
||||
SDAI_Entity_extent__set::~SDAI_Entity_extent__set() {
|
||||
delete _buf;
|
||||
}
|
||||
|
||||
void SCLP23( Entity_extent__set )::Check( int index ) {
|
||||
void SDAI_Entity_extent__set::Check( int index ) {
|
||||
|
||||
SCLP23( Entity_extent_ptr )* newbuf;
|
||||
SDAI_Entity_extent_ptr* newbuf;
|
||||
|
||||
if( index >= _bufsize ) {
|
||||
_bufsize = ( index + 1 ) * 2;
|
||||
newbuf = new SCLP23( Entity_extent_ptr )[_bufsize];
|
||||
memmove( newbuf, _buf, _count * sizeof( SCLP23( Entity_extent_ptr ) ) );
|
||||
newbuf = new SDAI_Entity_extent_ptr[_bufsize];
|
||||
memmove( newbuf, _buf, _count * sizeof( SDAI_Entity_extent_ptr ) );
|
||||
delete _buf;
|
||||
_buf = newbuf;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
SCLP23( Entity_extent__set )::Insert( SCLP23( Entity_extent_ptr ) v, int index ) {
|
||||
SDAI_Entity_extent__set::Insert( SDAI_Entity_extent_ptr v, int index ) {
|
||||
|
||||
SCLP23( Entity_extent_ptr )* spot;
|
||||
SDAI_Entity_extent_ptr* spot;
|
||||
index = ( index < 0 ) ? _count : index;
|
||||
|
||||
if( index < _count ) {
|
||||
Check( _count + 1 );
|
||||
spot = &_buf[index];
|
||||
memmove( spot + 1, spot, ( _count - index )*sizeof( SCLP23( Entity_extent_ptr ) ) );
|
||||
memmove( spot + 1, spot, ( _count - index )*sizeof( SDAI_Entity_extent_ptr ) );
|
||||
|
||||
} else {
|
||||
Check( index );
|
||||
@@ -85,15 +85,15 @@ SCLP23( Entity_extent__set )::Insert( SCLP23( Entity_extent_ptr ) v, int index )
|
||||
++_count;
|
||||
}
|
||||
|
||||
void SCLP23( Entity_extent__set )::Append( SCLP23( Entity_extent_ptr ) v ) {
|
||||
void SDAI_Entity_extent__set::Append( SDAI_Entity_extent_ptr v ) {
|
||||
|
||||
int index = _count;
|
||||
SCLP23( Entity_extent_ptr )* spot;
|
||||
SDAI_Entity_extent_ptr* spot;
|
||||
|
||||
if( index < _count ) {
|
||||
Check( _count + 1 );
|
||||
spot = &_buf[index];
|
||||
memmove( spot + 1, spot, ( _count - index )*sizeof( SCLP23( Entity_extent_ptr ) ) );
|
||||
memmove( spot + 1, spot, ( _count - index )*sizeof( SDAI_Entity_extent_ptr ) );
|
||||
|
||||
} else {
|
||||
Check( index );
|
||||
@@ -103,16 +103,16 @@ void SCLP23( Entity_extent__set )::Append( SCLP23( Entity_extent_ptr ) v ) {
|
||||
++_count;
|
||||
}
|
||||
|
||||
void SCLP23( Entity_extent__set )::Remove( int index ) {
|
||||
void SDAI_Entity_extent__set::Remove( int index ) {
|
||||
|
||||
if( 0 <= index && index < _count ) {
|
||||
--_count;
|
||||
SCLP23( Entity_extent_ptr )* spot = &_buf[index];
|
||||
memmove( spot, spot + 1, ( _count - index )*sizeof( SCLP23( Entity_extent_ptr ) ) );
|
||||
SDAI_Entity_extent_ptr* spot = &_buf[index];
|
||||
memmove( spot, spot + 1, ( _count - index )*sizeof( SDAI_Entity_extent_ptr ) );
|
||||
}
|
||||
}
|
||||
|
||||
int SCLP23( Entity_extent__set )::Index( SCLP23( Entity_extent_ptr ) v ) {
|
||||
int SDAI_Entity_extent__set::Index( SDAI_Entity_extent_ptr v ) {
|
||||
|
||||
for( int i = 0; i < _count; ++i ) {
|
||||
if( _buf[i] == v ) {
|
||||
@@ -122,12 +122,12 @@ int SCLP23( Entity_extent__set )::Index( SCLP23( Entity_extent_ptr ) v ) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
SCLP23( Entity_extent_ptr )
|
||||
SCLP23( Entity_extent__set )::retrieve( int index ) {
|
||||
SDAI_Entity_extent_ptr
|
||||
SDAI_Entity_extent__set::retrieve( int index ) {
|
||||
return operator[]( index );
|
||||
}
|
||||
|
||||
SCLP23( Entity_extent_ptr ) & SCLP23( Entity_extent__set )::operator[]( int index ) {
|
||||
SDAI_Entity_extent_ptr & SDAI_Entity_extent__set::operator[]( int index ) {
|
||||
Check( index );
|
||||
// _count = max(_count, index+1);
|
||||
_count = ( ( _count > index + 1 ) ? _count : ( index + 1 ) );
|
||||
@@ -135,17 +135,17 @@ SCLP23( Entity_extent_ptr ) & SCLP23( Entity_extent__set )::operator[]( int inde
|
||||
}
|
||||
|
||||
int
|
||||
SCLP23( Entity_extent__set )::Count() {
|
||||
SDAI_Entity_extent__set::Count() {
|
||||
return _count;
|
||||
}
|
||||
|
||||
int
|
||||
SCLP23( Entity_extent__set )::is_empty() {
|
||||
SDAI_Entity_extent__set::is_empty() {
|
||||
return _count;
|
||||
}
|
||||
|
||||
void
|
||||
SCLP23( Entity_extent__set )::Clear() {
|
||||
SDAI_Entity_extent__set::Clear() {
|
||||
_count = 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -35,21 +35,21 @@
|
||||
//#include <EntityExtent.h>
|
||||
*/
|
||||
|
||||
class SCLP23_NAME(Entity_extent__set) {
|
||||
class SDAI_Entity_extent__set {
|
||||
public:
|
||||
|
||||
SCLP23_NAME(Entity_extent__set)(int = 16);
|
||||
~SCLP23_NAME(Entity_extent__set)();
|
||||
SDAI_Entity_extent__set(int = 16);
|
||||
~SDAI_Entity_extent__set();
|
||||
|
||||
SCLP23_NAME(Entity_extent_ptr) retrieve(int index);
|
||||
SDAI_Entity_extent_ptr retrieve(int index);
|
||||
int is_empty();
|
||||
|
||||
SCLP23_NAME(Entity_extent_ptr)& operator[](int index);
|
||||
SDAI_Entity_extent_ptr& operator[](int index);
|
||||
|
||||
void Insert(SCLP23_NAME(Entity_extent_ptr), int index);
|
||||
void Append(SCLP23_NAME(Entity_extent_ptr));
|
||||
void Insert(SDAI_Entity_extent_ptr, int index);
|
||||
void Append(SDAI_Entity_extent_ptr);
|
||||
void Remove(int index);
|
||||
int Index(SCLP23_NAME(Entity_extent_ptr));
|
||||
int Index(SDAI_Entity_extent_ptr);
|
||||
|
||||
void Clear();
|
||||
int Count();
|
||||
@@ -57,14 +57,14 @@ public:
|
||||
private:
|
||||
void Check(int index);
|
||||
private:
|
||||
SCLP23_NAME(Entity_extent_ptr)* _buf;
|
||||
SDAI_Entity_extent_ptr* _buf;
|
||||
int _bufsize;
|
||||
int _count;
|
||||
|
||||
};
|
||||
|
||||
typedef SCLP23_NAME(Entity_extent__set)* SCLP23_NAME(Entity_extent__set_ptr);
|
||||
typedef SCLP23_NAME(Entity_extent__set_ptr) SCLP23_NAME(Entity_extent__set_var);
|
||||
typedef SDAI_Entity_extent__set* SDAI_Entity_extent__set_ptr;
|
||||
typedef SDAI_Entity_extent__set_ptr SDAI_Entity_extent__set_var;
|
||||
|
||||
/*
|
||||
class Entity_extent__set {
|
||||
|
||||
@@ -1,90 +1,90 @@
|
||||
|
||||
#include <sdai.h>
|
||||
|
||||
///////// SCLP23(Model_contents_instances)
|
||||
///////// SDAI_Model_contents_instances
|
||||
|
||||
SCLP23( Model_contents_instances )::SCLP23_NAME( Model_contents_instances )( ) {
|
||||
SDAI_Model_contents_instances::SDAI_Model_contents_instances( ) {
|
||||
}
|
||||
|
||||
/*
|
||||
SCLP23(Model_contents_instances)::SCLP23_NAME(Model_contents_instances) (const SCLP23(Model_contents_instances)& e )
|
||||
SDAI_Model_contents_instances::SDAI_Model_contents_instances (const SDAI_Model_contents_instances& e )
|
||||
{
|
||||
}
|
||||
*/
|
||||
|
||||
SCLP23( Model_contents_instances )::~SCLP23_NAME( Model_contents_instances )() {
|
||||
SDAI_Model_contents_instances::~SDAI_Model_contents_instances() {
|
||||
}
|
||||
|
||||
///////// SCLP23(Model_contents)
|
||||
///////// SDAI_Model_contents
|
||||
|
||||
SCLP23( Model_contents )::SCLP23_NAME( Model_contents )( ) {
|
||||
SDAI_Model_contents::SDAI_Model_contents( ) {
|
||||
}
|
||||
|
||||
/*
|
||||
SCLP23(Model_contents)::SCLP23_NAME(Model_contents) (const SCLP23(Model_contents)& e )
|
||||
SDAI_Model_contents::SDAI_Model_contents (const SDAI_Model_contents& e )
|
||||
{
|
||||
// CopyAs((STEPentityH) &e);
|
||||
}
|
||||
*/
|
||||
|
||||
SCLP23( Model_contents )::~SCLP23_NAME( Model_contents )() {
|
||||
SDAI_Model_contents::~SDAI_Model_contents() {
|
||||
}
|
||||
|
||||
// const Entity_instance__set_var instances() const;
|
||||
//const SDAIAGGRH(Set, EntityInstanceH) Instances() const;
|
||||
SCLP23( Model_contents_instances_ptr )
|
||||
SCLP23( Model_contents )::instances_() {
|
||||
SDAI_Model_contents_instances_ptr
|
||||
SDAI_Model_contents::instances_() {
|
||||
return &_instances;
|
||||
}
|
||||
|
||||
const SCLP23( Model_contents_instances_ptr )
|
||||
SCLP23( Model_contents )::instances_() const {
|
||||
return ( const SCLP23( Model_contents_instances_ptr ) ) &_instances;
|
||||
const SDAI_Model_contents_instances_ptr
|
||||
SDAI_Model_contents::instances_() const {
|
||||
return ( const SDAI_Model_contents_instances_ptr ) &_instances;
|
||||
}
|
||||
|
||||
SCLP23( Entity_extent__set_var )
|
||||
SCLP23( Model_contents )::folders_() {
|
||||
SDAI_Entity_extent__set_var
|
||||
SDAI_Model_contents::folders_() {
|
||||
return &_folders;
|
||||
}
|
||||
|
||||
const SCLP23( Entity_extent__set_var )
|
||||
SCLP23( Model_contents )::folders_() const {
|
||||
return ( const SCLP23( Entity_extent__set_var ) )&_folders;
|
||||
const SDAI_Entity_extent__set_var
|
||||
SDAI_Model_contents::folders_() const {
|
||||
return ( const SDAI_Entity_extent__set_var )&_folders;
|
||||
}
|
||||
|
||||
SCLP23( Entity_extent__set_var )
|
||||
SCLP23( Model_contents )::populated_folders_() {
|
||||
SDAI_Entity_extent__set_var
|
||||
SDAI_Model_contents::populated_folders_() {
|
||||
return &_populated_folders;
|
||||
}
|
||||
|
||||
const SCLP23( Entity_extent__set_var )
|
||||
SCLP23( Model_contents )::populated_folders_() const {
|
||||
return ( const SCLP23( Entity_extent__set_var ) )&_populated_folders;
|
||||
const SDAI_Entity_extent__set_var
|
||||
SDAI_Model_contents::populated_folders_() const {
|
||||
return ( const SDAI_Entity_extent__set_var )&_populated_folders;
|
||||
}
|
||||
|
||||
SCLP23( PID_DA_ptr )
|
||||
SCLP23( Model_contents )::get_object_pid( const SCLP23( DAObject_ptr & d ) )
|
||||
SDAI_PID_DA_ptr
|
||||
SDAI_Model_contents::get_object_pid( const SDAI_DAObject_ptr & d )
|
||||
const {
|
||||
return 0;
|
||||
}
|
||||
|
||||
SCLP23( DAObject_ptr )
|
||||
SCLP23( Model_contents )::lookup( const SCLP23( PID_DA_ptr & p ) ) const {
|
||||
SDAI_DAObject_ptr
|
||||
SDAI_Model_contents::lookup( const SDAI_PID_DA_ptr & p ) const {
|
||||
return 0;
|
||||
}
|
||||
|
||||
SCLP23( DAObject_ptr )
|
||||
SCLP23( Model_contents )::CreateEntityInstance( const char * Type ) {
|
||||
SDAI_DAObject_ptr
|
||||
SDAI_Model_contents::CreateEntityInstance( const char * Type ) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
SCLP23( Model_contents )::AddInstance( const SCLP23( DAObject_SDAI_ptr )& appInst ) {
|
||||
SDAI_Model_contents::AddInstance( const SDAI_DAObject_SDAI_ptr& appInst ) {
|
||||
_instances.contents_()->Append( appInst );
|
||||
}
|
||||
|
||||
void
|
||||
SCLP23( Model_contents )::RemoveInstance( SCLP23( DAObject_SDAI_ptr )& appInst ) {
|
||||
SDAI_Model_contents::RemoveInstance( SDAI_DAObject_SDAI_ptr& appInst ) {
|
||||
_instances.contents_()->Remove( _instances.contents_()->Index( appInst ) );
|
||||
}
|
||||
|
||||
@@ -93,19 +93,19 @@ SCLP23( Model_contents )::RemoveInstance( SCLP23( DAObject_SDAI_ptr )& appInst )
|
||||
#if 0 // for now
|
||||
|
||||
Any_var
|
||||
SCLP23( Model_contents )::GetEntity_extent( const std::string & entityName ) {
|
||||
SDAI_Model_contents::GetEntity_extent( const std::string & entityName ) {
|
||||
}
|
||||
|
||||
const Any_var
|
||||
SCLP23( Model_contents )::GetEntity_extent( const std::string & entityName ) const {
|
||||
SDAI_Model_contents::GetEntity_extent( const std::string & entityName ) const {
|
||||
}
|
||||
|
||||
Any_var
|
||||
SCLP23( Model_contents )::GetEntity_extent( const Entity_ptr & ep ) {
|
||||
SDAI_Model_contents::GetEntity_extent( const Entity_ptr & ep ) {
|
||||
}
|
||||
|
||||
const Any_var
|
||||
SCLP23( Model_contents )::GetEntity_extent( const Entity_ptr & ep ) const {
|
||||
SDAI_Model_contents::GetEntity_extent( const Entity_ptr & ep ) const {
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -134,4 +134,4 @@ SCLP23( Model_contents )::GetEntity_extent( const Entity_ptr & ep ) const {
|
||||
*/
|
||||
|
||||
#endif
|
||||
//////// END SCLP23(Model_contents)
|
||||
//////// END SDAI_Model_contents
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#ifndef SDAIMODEL_CONTENTS_H
|
||||
#define SDAIMODEL_CONTENTS_H 1
|
||||
|
||||
//SCLP23_NAME(Model_contents)
|
||||
//SDAI_Model_contents
|
||||
|
||||
/*
|
||||
7.3.2 SCLP23_NAME(Model_contents)
|
||||
7.3.2 SDAI_Model_contents
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -22,38 +22,38 @@
|
||||
//#include <SessionInstance.h>
|
||||
*/
|
||||
|
||||
// The class SCLP23_NAME(Model_contents)_instances shall implement convenience functions by
|
||||
// SCLP23_NAME(Model_contents) in this part of ISO 10303
|
||||
// The class SDAI_Model_contents_instances shall implement convenience functions by
|
||||
// SDAI_Model_contents in this part of ISO 10303
|
||||
|
||||
class SCLP23_NAME(Model_contents_instances) : public SCLP23_NAME(DAObject)
|
||||
class SDAI_Model_contents_instances : public SDAI_DAObject
|
||||
{
|
||||
public:
|
||||
|
||||
SCLP23_NAME(DAObject__set) _instances;
|
||||
SDAI_DAObject__set _instances;
|
||||
|
||||
SCLP23_NAME(Model_contents_instances)();
|
||||
virtual ~SCLP23_NAME(Model_contents_instances)();
|
||||
SDAI_Model_contents_instances();
|
||||
virtual ~SDAI_Model_contents_instances();
|
||||
|
||||
// This function shall return the set of DAObjects contained in
|
||||
// the receiver.
|
||||
SCLP23_NAME(DAObject__set_var) contents_() { return &_instances; }
|
||||
const SCLP23_NAME(DAObject__set_var) contents_() const
|
||||
{ return (const SCLP23_NAME(DAObject__set_var)) &_instances; };
|
||||
SDAI_DAObject__set_var contents_() { return &_instances; }
|
||||
const SDAI_DAObject__set_var contents_() const
|
||||
{ return (const SDAI_DAObject__set_var) &_instances; };
|
||||
|
||||
};
|
||||
|
||||
typedef SCLP23_NAME(Model_contents_instances) *
|
||||
SCLP23_NAME(Model_contents_instances_ptr);
|
||||
typedef SCLP23_NAME(Model_contents_instances_ptr)
|
||||
SCLP23_NAME(Model_contents_instances_var);
|
||||
typedef SDAI_Model_contents_instances *
|
||||
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 SCLP23_NAME(Model_contents);
|
||||
//typedef SCLP23_NAME(Model_contents) SCLP23_NAME(Model_contents_ptr);
|
||||
//class SDAI_Model_contents;
|
||||
//typedef SDAI_Model_contents SDAI_Model_contents_ptr;
|
||||
|
||||
class SCLP23_NAME(Model_contents) : public SCLP23_NAME(Session_instance) {
|
||||
class SDAI_Model_contents : public SDAI_Session_instance {
|
||||
|
||||
//friend class SCLP23_NAME(Model);
|
||||
//friend class SDAI_Model;
|
||||
|
||||
/*
|
||||
NOTE - Model is a friend so that Model may access the contents of
|
||||
@@ -64,11 +64,11 @@ class SCLP23_NAME(Model_contents) : public SCLP23_NAME(Session_instance) {
|
||||
public:
|
||||
// protected: // for now
|
||||
// contains Application_instances (i.e. STEPentities)
|
||||
SCLP23_NAME(Model_contents_instances) _instances;
|
||||
SDAI_Model_contents_instances _instances;
|
||||
|
||||
SCLP23_NAME(Entity_extent__set) _folders; // of entity_extent
|
||||
SDAI_Entity_extent__set _folders; // of entity_extent
|
||||
|
||||
SCLP23_NAME(Entity_extent__set) _populated_folders; // of entity_extent
|
||||
SDAI_Entity_extent__set _populated_folders; // of entity_extent
|
||||
|
||||
// EntityAggregate _instances; // of Entity_instance
|
||||
// EntityAggregate _folders; // of entity_extent
|
||||
@@ -79,34 +79,34 @@ class SCLP23_NAME(Model_contents) : public SCLP23_NAME(Session_instance) {
|
||||
*/
|
||||
public: // for now at least
|
||||
// private:
|
||||
SCLP23_NAME(Model_contents)();
|
||||
// SCLP23_NAME(Model_contents)(const SCLP23_NAME(Model_contents)& mc);
|
||||
~SCLP23_NAME(Model_contents)();
|
||||
SDAI_Model_contents();
|
||||
// SDAI_Model_contents(const SDAI_Model_contents& mc);
|
||||
~SDAI_Model_contents();
|
||||
/*
|
||||
Access function declarations
|
||||
*/
|
||||
public:
|
||||
SCLP23_NAME(Model_contents_instances_ptr) instances_();
|
||||
const SCLP23_NAME(Model_contents_instances_ptr) instances_() const;
|
||||
SDAI_Model_contents_instances_ptr instances_();
|
||||
const SDAI_Model_contents_instances_ptr instances_() const;
|
||||
|
||||
SCLP23_NAME(Entity_extent__set_var) folders_();
|
||||
const SCLP23_NAME(Entity_extent__set_var) folders_() const;
|
||||
SDAI_Entity_extent__set_var folders_();
|
||||
const SDAI_Entity_extent__set_var folders_() const;
|
||||
|
||||
//Boolean TestFolders() const;
|
||||
|
||||
const SCLP23_NAME(Entity_extent__set_var) populated_folders_() const;
|
||||
SCLP23_NAME(Entity_extent__set_var) populated_folders_();
|
||||
const SDAI_Entity_extent__set_var populated_folders_() const;
|
||||
SDAI_Entity_extent__set_var populated_folders_();
|
||||
//Boolean TestPopulated_folders() const;
|
||||
|
||||
// static SCLP23_NAME(Model_contents_ptr)
|
||||
// _duplicate(SCLP23_NAME(Model_contents_ptr));
|
||||
// static SCLP23_NAME(Model_contents_ptr) _narrow(Object_ptr);
|
||||
// static SCLP23_NAME(Model_contents_ptr) _nil();
|
||||
// static SDAI_Model_contents_ptr
|
||||
// _duplicate(SDAI_Model_contents_ptr);
|
||||
// static SDAI_Model_contents_ptr _narrow(Object_ptr);
|
||||
// static SDAI_Model_contents_ptr _nil();
|
||||
|
||||
SCLP23_NAME(PID_DA_ptr)
|
||||
get_object_pid(const SCLP23_NAME(DAObject_ptr &d)) const;
|
||||
SDAI_PID_DA_ptr
|
||||
get_object_pid(const SDAI_DAObject_ptr &d) const;
|
||||
|
||||
SCLP23_NAME(DAObject_ptr) lookup(const SCLP23_NAME(PID_DA_ptr &p)) const;
|
||||
SDAI_DAObject_ptr lookup(const SDAI_PID_DA_ptr &p) const;
|
||||
|
||||
/*
|
||||
SDAI operation declarations
|
||||
@@ -117,11 +117,11 @@ class SCLP23_NAME(Model_contents) : public SCLP23_NAME(Session_instance) {
|
||||
*/
|
||||
// private:
|
||||
public: // for now at least
|
||||
SCLP23_NAME(DAObject_ptr)
|
||||
SDAI_DAObject_ptr
|
||||
CreateEntityInstance(const char * Type);
|
||||
|
||||
// until we find out what this should really be in the spec
|
||||
void AddInstance(const SCLP23_NAME(DAObject_SDAI_ptr)& appInst);
|
||||
void AddInstance(const SDAI_DAObject_SDAI_ptr& appInst);
|
||||
// void AddInstance(const Entity_instance_ptr& entityHandle);
|
||||
//void AddInstance(EntityInstanceH& entityHandle);
|
||||
/* Function:
|
||||
@@ -146,7 +146,7 @@ class SCLP23_NAME(Model_contents) : public SCLP23_NAME(Session_instance) {
|
||||
*/
|
||||
|
||||
// until we find out what this should really be in the spec
|
||||
void RemoveInstance(SCLP23_NAME(DAObject_SDAI_ptr)& appInst);
|
||||
void RemoveInstance(SDAI_DAObject_SDAI_ptr& appInst);
|
||||
// void RemoveInstance(Entity_instance_ptr& entityHandle);
|
||||
//void RemoveInstance(EntityInstanceH& entityHandle);
|
||||
/* Function
|
||||
@@ -208,7 +208,7 @@ class SCLP23_NAME(Model_contents) : public SCLP23_NAME(Session_instance) {
|
||||
|
||||
#endif
|
||||
|
||||
// void instances (SCLP23_NAME(Model_contents_instances_ptr) x);
|
||||
// void instances (SDAI_Model_contents_instances_ptr x);
|
||||
// void folders (Entity_extent__set x);
|
||||
// void populated_folders (Entity_extent__set x);
|
||||
|
||||
|
||||
@@ -35,39 +35,39 @@ extern "C"
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
SCLP23( Model_contents__list )::SCLP23_NAME( Model_contents__list )( int defaultSize ) {
|
||||
SDAI_Model_contents__list::SDAI_Model_contents__list( int defaultSize ) {
|
||||
_bufsize = defaultSize;
|
||||
_buf = new SCLP23( Model_contents_ptr )[_bufsize];
|
||||
_buf = new SDAI_Model_contents_ptr[_bufsize];
|
||||
_count = 0;
|
||||
}
|
||||
|
||||
SCLP23( Model_contents__list )::~SCLP23_NAME( Model_contents__list )() {
|
||||
SDAI_Model_contents__list::~SDAI_Model_contents__list() {
|
||||
delete _buf;
|
||||
}
|
||||
|
||||
void SCLP23( Model_contents__list )::Check( int index ) {
|
||||
void SDAI_Model_contents__list::Check( int index ) {
|
||||
|
||||
SCLP23( Model_contents_ptr )* newbuf;
|
||||
SDAI_Model_contents_ptr* newbuf;
|
||||
|
||||
if( index >= _bufsize ) {
|
||||
_bufsize = ( index + 1 ) * 2;
|
||||
newbuf = new SCLP23( Model_contents_ptr )[_bufsize];
|
||||
memmove( newbuf, _buf, _count * sizeof( SCLP23( Model_contents_ptr ) ) );
|
||||
newbuf = new SDAI_Model_contents_ptr[_bufsize];
|
||||
memmove( newbuf, _buf, _count * sizeof( SDAI_Model_contents_ptr ) );
|
||||
delete _buf;
|
||||
_buf = newbuf;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
SCLP23( Model_contents__list )::Insert( SCLP23( Model_contents_ptr ) v, int index ) {
|
||||
SDAI_Model_contents__list::Insert( SDAI_Model_contents_ptr v, int index ) {
|
||||
|
||||
SCLP23( Model_contents_ptr )* spot;
|
||||
SDAI_Model_contents_ptr* spot;
|
||||
index = ( index < 0 ) ? _count : index;
|
||||
|
||||
if( index < _count ) {
|
||||
Check( _count + 1 );
|
||||
spot = &_buf[index];
|
||||
memmove( spot + 1, spot, ( _count - index )*sizeof( SCLP23( Model_contents_ptr ) ) );
|
||||
memmove( spot + 1, spot, ( _count - index )*sizeof( SDAI_Model_contents_ptr ) );
|
||||
|
||||
} else {
|
||||
Check( index );
|
||||
@@ -77,15 +77,15 @@ SCLP23( Model_contents__list )::Insert( SCLP23( Model_contents_ptr ) v, int inde
|
||||
++_count;
|
||||
}
|
||||
|
||||
void SCLP23( Model_contents__list )::Append( SCLP23( Model_contents_ptr ) v ) {
|
||||
void SDAI_Model_contents__list::Append( SDAI_Model_contents_ptr v ) {
|
||||
|
||||
int index = _count;
|
||||
SCLP23( Model_contents_ptr )* spot;
|
||||
SDAI_Model_contents_ptr* spot;
|
||||
|
||||
if( index < _count ) {
|
||||
Check( _count + 1 );
|
||||
spot = &_buf[index];
|
||||
memmove( spot + 1, spot, ( _count - index )*sizeof( SCLP23( Model_contents_ptr ) ) );
|
||||
memmove( spot + 1, spot, ( _count - index )*sizeof( SDAI_Model_contents_ptr ) );
|
||||
|
||||
} else {
|
||||
Check( index );
|
||||
@@ -95,16 +95,16 @@ void SCLP23( Model_contents__list )::Append( SCLP23( Model_contents_ptr ) v ) {
|
||||
++_count;
|
||||
}
|
||||
|
||||
void SCLP23( Model_contents__list )::Remove( int index ) {
|
||||
void SDAI_Model_contents__list::Remove( int index ) {
|
||||
|
||||
if( 0 <= index && index < _count ) {
|
||||
--_count;
|
||||
SCLP23( Model_contents_ptr )* spot = &_buf[index];
|
||||
memmove( spot, spot + 1, ( _count - index )*sizeof( SCLP23( Model_contents_ptr ) ) );
|
||||
SDAI_Model_contents_ptr* spot = &_buf[index];
|
||||
memmove( spot, spot + 1, ( _count - index )*sizeof( SDAI_Model_contents_ptr ) );
|
||||
}
|
||||
}
|
||||
|
||||
int SCLP23( Model_contents__list )::Index( SCLP23( Model_contents_ptr ) v ) {
|
||||
int SDAI_Model_contents__list::Index( SDAI_Model_contents_ptr v ) {
|
||||
|
||||
for( int i = 0; i < _count; ++i ) {
|
||||
if( _buf[i] == v ) {
|
||||
@@ -114,13 +114,13 @@ int SCLP23( Model_contents__list )::Index( SCLP23( Model_contents_ptr ) v ) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
SCLP23( Model_contents_ptr )
|
||||
SCLP23( Model_contents__list )::retrieve( int index ) {
|
||||
SDAI_Model_contents_ptr
|
||||
SDAI_Model_contents__list::retrieve( int index ) {
|
||||
return operator[]( index );
|
||||
}
|
||||
|
||||
SCLP23( Model_contents_ptr ) &
|
||||
SCLP23( Model_contents__list )::operator[]( int index ) {
|
||||
SDAI_Model_contents_ptr &
|
||||
SDAI_Model_contents__list::operator[]( int index ) {
|
||||
|
||||
Check( index );
|
||||
// _count = max(_count, index+1);
|
||||
@@ -129,17 +129,17 @@ SCLP23( Model_contents__list )::operator[]( int index ) {
|
||||
}
|
||||
|
||||
int
|
||||
SCLP23( Model_contents__list )::Count() {
|
||||
SDAI_Model_contents__list::Count() {
|
||||
return _count;
|
||||
}
|
||||
|
||||
int
|
||||
SCLP23( Model_contents__list )::is_empty() {
|
||||
SDAI_Model_contents__list::is_empty() {
|
||||
return _count;
|
||||
}
|
||||
|
||||
void
|
||||
SCLP23( Model_contents__list )::Clear() {
|
||||
SDAI_Model_contents__list::Clear() {
|
||||
_count = 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
#ifndef SDAIMODEL_CONTENTS_LIST_H
|
||||
#define SDAIMODEL_CONTENTS_LIST_H 1
|
||||
|
||||
class SCLP23_NAME(Model_contents__list) {
|
||||
class SDAI_Model_contents__list {
|
||||
public:
|
||||
SCLP23_NAME(Model_contents__list)(int = 16);
|
||||
~SCLP23_NAME(Model_contents__list)();
|
||||
SDAI_Model_contents__list(int = 16);
|
||||
~SDAI_Model_contents__list();
|
||||
|
||||
SCLP23_NAME(Model_contents_ptr) retrieve(int index);
|
||||
SDAI_Model_contents_ptr retrieve(int index);
|
||||
int is_empty();
|
||||
|
||||
SCLP23_NAME(Model_contents_ptr)& operator[](int index);
|
||||
SDAI_Model_contents_ptr& operator[](int index);
|
||||
|
||||
void Insert(SCLP23_NAME(Model_contents_ptr), int index);
|
||||
void Append(SCLP23_NAME(Model_contents_ptr));
|
||||
void Insert(SDAI_Model_contents_ptr, int index);
|
||||
void Append(SDAI_Model_contents_ptr);
|
||||
void Remove(int index);
|
||||
int Index(SCLP23_NAME(Model_contents_ptr));
|
||||
int Index(SDAI_Model_contents_ptr);
|
||||
|
||||
void Clear();
|
||||
int Count();
|
||||
@@ -22,14 +22,14 @@ public:
|
||||
private:
|
||||
void Check(int index);
|
||||
private:
|
||||
SCLP23_NAME(Model_contents_ptr)* _buf;
|
||||
SDAI_Model_contents_ptr* _buf;
|
||||
int _bufsize;
|
||||
int _count;
|
||||
};
|
||||
|
||||
typedef SCLP23_NAME(Model_contents__list)*
|
||||
SCLP23_NAME(Model_contents__list_ptr);
|
||||
typedef SCLP23_NAME(Model_contents__list_ptr)
|
||||
SCLP23_NAME(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
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
#include <sdai.h>
|
||||
|
||||
SCLP23( sdaiObject )::SCLP23_NAME( sdaiObject )() {
|
||||
SDAI_sdaiObject::SDAI_sdaiObject() {
|
||||
}
|
||||
|
||||
SCLP23( sdaiObject )::~SCLP23_NAME( sdaiObject )() {
|
||||
SDAI_sdaiObject::~SDAI_sdaiObject() {
|
||||
}
|
||||
|
||||
#ifdef PART26
|
||||
//SCLP26(Application_instance_ptr)
|
||||
IDL_Application_instance_ptr
|
||||
SCLP23( sdaiObject )::create_TIE() {
|
||||
SDAI_sdaiObject::create_TIE() {
|
||||
cout << "ERROR sdaiObject::create_TIE() called." << endl;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#define SDAIOBJECT_H 1
|
||||
|
||||
/*
|
||||
#include <sclprefixes.h>
|
||||
|
||||
*/
|
||||
/*
|
||||
The EXPRESS ENTITY entity_instance from the SDAI_data_type_schema from
|
||||
@@ -11,11 +11,11 @@
|
||||
The class Entity_instance shall be a subtype of the C++ class Object:
|
||||
*/
|
||||
|
||||
class SCLP23_NAME(sdaiObject)
|
||||
class SDAI_sdaiObject
|
||||
{
|
||||
public:
|
||||
SCLP23_NAME(sdaiObject)();
|
||||
virtual ~SCLP23_NAME(sdaiObject)();
|
||||
SDAI_sdaiObject();
|
||||
virtual ~SDAI_sdaiObject();
|
||||
// static Object_ptr _duplicate(Object_ptr);
|
||||
// static Object_ptr _nil();
|
||||
|
||||
@@ -26,8 +26,8 @@ class SCLP23_NAME(sdaiObject)
|
||||
|
||||
};
|
||||
|
||||
typedef SCLP23_NAME(sdaiObject)* SCLP23_NAME(sdaiObject_ptr);
|
||||
typedef SCLP23_NAME(sdaiObject_ptr) SCLP23_NAME(sdaiObject_var);
|
||||
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
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include <sdai.h>
|
||||
|
||||
SCLP23( Session_instance )::SCLP23_NAME( Session_instance )() {
|
||||
SDAI_Session_instance::SDAI_Session_instance() {
|
||||
}
|
||||
|
||||
SCLP23( Session_instance )::~SCLP23_NAME( Session_instance )() {
|
||||
SDAI_Session_instance::~SDAI_Session_instance() {
|
||||
}
|
||||
|
||||
@@ -4,29 +4,29 @@
|
||||
|
||||
//#include <sdai.h>
|
||||
|
||||
class SCLP23_NAME(Session_instance) : public SCLP23_NAME(sdaiObject)
|
||||
class SDAI_Session_instance : public SDAI_sdaiObject
|
||||
{
|
||||
|
||||
public:
|
||||
int x;
|
||||
|
||||
SCLP23_NAME(Session_instance)();
|
||||
virtual ~SCLP23_NAME(Session_instance)();
|
||||
// SCLP23_NAME(Session_instance)(const SCLP23_NAME(Session_instance)& si) {}
|
||||
SDAI_Session_instance();
|
||||
virtual ~SDAI_Session_instance();
|
||||
// SDAI_Session_instance(const SDAI_Session_instance& si) {}
|
||||
|
||||
// static SCLP23_NAME(Session_instance_ptr)
|
||||
// _duplicate(SCLP23_NAME(Session_instance_ptr) sip);
|
||||
// static SCLP23_NAME(Session_instance_ptr)
|
||||
// _narrow(SCLP23_NAME(Object_ptr) o);
|
||||
// static SCLP23_NAME(Session_instance_ptr) _nil();
|
||||
// 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 SCLP23_NAME(Session_instance)* SCLP23_NAME(Session_instance_ptr);
|
||||
typedef SCLP23_NAME(Session_instance_ptr) SCLP23_NAME(Session_instance_var);
|
||||
typedef SDAI_Session_instance* SDAI_Session_instance_ptr;
|
||||
typedef SDAI_Session_instance_ptr SDAI_Session_instance_var;
|
||||
|
||||
// the old names
|
||||
//typedef SCLP23_NAME(Session_instance) SCLP23_NAME(SessionInstance);
|
||||
//typedef SCLP23_NAME(Session_instance_ptr) SCLP23_NAME(SessionInstanceH);
|
||||
//typedef SDAI_Session_instance SDAI_SessionInstance;
|
||||
//typedef SDAI_Session_instance_ptr SDAI_SessionInstanceH;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -40,8 +40,8 @@ include_directories(
|
||||
${SCL_SOURCE_DIR}/src/clutils
|
||||
)
|
||||
|
||||
add_definitions(
|
||||
-DHAVE_CONFIG_H
|
||||
)
|
||||
|
||||
SCL_ADDLIB(stepeditor "${LIBSTEPEDITOR_SRCS}" stepcore)
|
||||
|
||||
if(APPLE)
|
||||
set_target_properties(stepeditor PROPERTIES LINK_FLAGS "-flat_namespace -undefined suppress")
|
||||
endif(APPLE)
|
||||
|
||||
+65
-81
@@ -75,7 +75,7 @@ STEPfile::ReadHeader( istream & in ) {
|
||||
std::string cmtStr;
|
||||
|
||||
InstMgr * im = new InstMgr;
|
||||
SCLP23( Application_instance )* obj;
|
||||
SDAI_Application_instance* obj;
|
||||
__attribute__( ( unused ) ) Severity objsev = SEVERITY_NULL;
|
||||
|
||||
int endsec = 0;
|
||||
@@ -126,7 +126,7 @@ STEPfile::ReadHeader( istream & in ) {
|
||||
break; //from while-loop
|
||||
} else {
|
||||
//create and read the header instance
|
||||
// SCLP23(Application_instance)::STEPread now reads the opening parenthesis
|
||||
// SDAI_Application_instance::STEPread now reads the opening parenthesis
|
||||
|
||||
//create header instance
|
||||
buf[0] = '\0';
|
||||
@@ -210,7 +210,7 @@ Severity
|
||||
STEPfile::HeaderVerifyInstances( InstMgr * im ) {
|
||||
int err = 0;
|
||||
int fileid;
|
||||
SCLP23( Application_instance )* obj;
|
||||
SDAI_Application_instance* obj;
|
||||
|
||||
//check File_Name
|
||||
fileid = HeaderId( "File_Name" );
|
||||
@@ -250,7 +250,7 @@ STEPfile::HeaderVerifyInstances( InstMgr * im ) {
|
||||
return SEVERITY_WARNING;
|
||||
}
|
||||
|
||||
SCLP23( Application_instance ) *
|
||||
SDAI_Application_instance *
|
||||
STEPfile::HeaderDefaultFileName() {
|
||||
SdaiFile_name * fn = new SdaiFile_name;
|
||||
StringAggregate_ptr tmp = new StringAggregate;
|
||||
@@ -278,7 +278,7 @@ STEPfile::HeaderDefaultFileName() {
|
||||
return fn;
|
||||
}
|
||||
|
||||
SCLP23( Application_instance ) *
|
||||
SDAI_Application_instance *
|
||||
STEPfile::HeaderDefaultFileDescription() {
|
||||
SdaiFile_description * fd = new SdaiFile_description;
|
||||
|
||||
@@ -289,7 +289,7 @@ STEPfile::HeaderDefaultFileDescription() {
|
||||
return fd;
|
||||
}
|
||||
|
||||
SCLP23( Application_instance ) *
|
||||
SDAI_Application_instance *
|
||||
STEPfile::HeaderDefaultFileSchema() {
|
||||
SdaiFile_schema * fs = new SdaiFile_schema;
|
||||
StringAggregate_ptr tmp = new StringAggregate;
|
||||
@@ -328,8 +328,8 @@ header section entites. The file id numbers are important.
|
||||
***************************/
|
||||
void
|
||||
STEPfile::HeaderMergeInstances( InstMgr * im ) {
|
||||
SCLP23( Application_instance )* se = 0;
|
||||
SCLP23( Application_instance )* from = 0;
|
||||
SDAI_Application_instance* se = 0;
|
||||
SDAI_Application_instance* from = 0;
|
||||
|
||||
int idnum;
|
||||
|
||||
@@ -434,7 +434,7 @@ STEPfile::ReadData1( istream & in ) {
|
||||
buf[0] = '\0';
|
||||
std::string tmpbuf;
|
||||
|
||||
SCLP23( Application_instance ) * obj = ENTITY_NULL;
|
||||
SDAI_Application_instance * obj = ENTITY_NULL;
|
||||
stateEnum inst_state = noStateSE; // used if reading working file
|
||||
|
||||
ErrorDescriptor e;
|
||||
@@ -553,7 +553,7 @@ STEPfile::ReadData1( istream & in ) {
|
||||
buf[0] = '\0';
|
||||
std::string tmpbuf;
|
||||
|
||||
SCLP23( Application_instance ) * obj;
|
||||
SDAI_Application_instance * obj;
|
||||
stateEnum inst_state; // used if reading working file
|
||||
|
||||
ReadTokenSeparator( in ); // also skips white space
|
||||
@@ -696,7 +696,7 @@ STEPfile::ReadWorkingData1( istream & in ) {
|
||||
std::string tmpbuf;
|
||||
|
||||
// PASS 1: create instances
|
||||
SCLP23( Application_instance ) * obj;
|
||||
SDAI_Application_instance * obj;
|
||||
stateEnum inst_state;
|
||||
|
||||
int endsec = 0;
|
||||
@@ -847,7 +847,7 @@ STEPfile::ReadData2( istream & in, int useTechCor ) {
|
||||
buf[0] = '\0';
|
||||
std::string tmpbuf;
|
||||
|
||||
SCLP23( Application_instance ) * obj = ENTITY_NULL;
|
||||
SDAI_Application_instance * obj = ENTITY_NULL;
|
||||
std::string cmtStr;
|
||||
|
||||
// ReadTokenSeparator(in, &cmtStr);
|
||||
@@ -975,7 +975,7 @@ STEPfile::ReadData2( istream & in ) {
|
||||
buf[0] = '\0';
|
||||
std::string tmpbuf;
|
||||
|
||||
SCLP23( Application_instance ) * obj;
|
||||
SDAI_Application_instance * obj;
|
||||
std::string cmtStr;
|
||||
|
||||
ReadTokenSeparator( in, &cmtStr );
|
||||
@@ -1096,7 +1096,7 @@ STEPfile::ReadData2( istream & in ) {
|
||||
|
||||
int valid_insts = 0; // used for exchange file only
|
||||
|
||||
SCLP23( Application_instance ) * obj = ENTITY_NULL;
|
||||
SDAI_Application_instance * obj = ENTITY_NULL;
|
||||
|
||||
ReadTokenSeparator( in );
|
||||
|
||||
@@ -1143,7 +1143,7 @@ STEPfile::ReadWorkingData2( istream & in, int useTechCor ) {
|
||||
std::string tmpbuf;
|
||||
int total_instances = 0;
|
||||
|
||||
SCLP23( Application_instance ) * obj = ENTITY_NULL;
|
||||
SDAI_Application_instance * obj = ENTITY_NULL;
|
||||
|
||||
// PASS 2: read data
|
||||
int endsec = 0;
|
||||
@@ -1214,7 +1214,7 @@ STEPfile::ReadWorkingData2( istream & in, int useTechCor ) {
|
||||
int
|
||||
STEPfile::FindDataSection( istream & in ) {
|
||||
ErrorDescriptor errs;
|
||||
SCLP23( String ) tmp;
|
||||
SDAI_String tmp;
|
||||
std::string s; // used if need to read a comment
|
||||
char c;
|
||||
|
||||
@@ -1308,19 +1308,18 @@ an ENTITY_INSTANCE consists of:
|
||||
'#'(int)'=' [SCOPE] SUBSUPER_RECORD ';'
|
||||
The '#' is read from the istream before CreateInstance is called.
|
||||
***************************/
|
||||
SCLP23( Application_instance ) *
|
||||
SDAI_Application_instance *
|
||||
STEPfile::CreateInstance( istream & in, ostream & out ) {
|
||||
std::string tmpbuf;
|
||||
std::string objnm;
|
||||
|
||||
char c;
|
||||
char schnm[BUFSIZ];
|
||||
schnm[0] = '\0';
|
||||
std::string schnm;
|
||||
|
||||
int fileid = -1;
|
||||
SCLP23( Application_instance_ptr ) * scopelist = 0;
|
||||
SDAI_Application_instance_ptr * scopelist = 0;
|
||||
|
||||
SCLP23( Application_instance )* obj;
|
||||
SDAI_Application_instance* obj;
|
||||
ErrorDescriptor result;
|
||||
// Sent down to CreateSubSuperInstance() to receive error info
|
||||
|
||||
@@ -1395,8 +1394,8 @@ STEPfile::CreateInstance( istream & in, ostream & out ) {
|
||||
<< endl;
|
||||
return ENTITY_NULL;
|
||||
} else {
|
||||
schemaName( schnm );
|
||||
obj = reg().ObjCreate( objnm.c_str(), schnm );
|
||||
schnm = schemaName();
|
||||
obj = reg().ObjCreate( objnm.c_str(), schnm.c_str() );
|
||||
if( obj == ENTITY_NULL ) {
|
||||
// This will be the case if objnm does not exist in the reg.
|
||||
result.UserMsg( "Unknown ENTITY type" );
|
||||
@@ -1448,13 +1447,13 @@ STEPfile::CreateInstance( istream & in, ostream & out ) {
|
||||
< SEVERITY_BUG: fatal
|
||||
**************************************************/
|
||||
Severity
|
||||
STEPfile::CreateScopeInstances( istream & in, SCLP23( Application_instance_ptr ) ** scopelist ) {
|
||||
STEPfile::CreateScopeInstances( istream & in, SDAI_Application_instance_ptr ** scopelist ) {
|
||||
Severity rval = SEVERITY_NULL;
|
||||
SCLP23( Application_instance ) * se;
|
||||
SDAI_Application_instance * se;
|
||||
std::string tmpbuf;
|
||||
char c;
|
||||
int exportid;
|
||||
SCLP23( Application_instance_ptr ) inscope [BUFSIZ];
|
||||
SDAI_Application_instance_ptr inscope [BUFSIZ];
|
||||
int i = 0;
|
||||
std::string keywd;
|
||||
|
||||
@@ -1496,7 +1495,7 @@ STEPfile::CreateScopeInstances( istream & in, SCLP23( Application_instance_ptr )
|
||||
in.get( c );
|
||||
}
|
||||
in.putback( c );
|
||||
*scopelist = new SCLP23( Application_instance_ptr ) [i];
|
||||
*scopelist = new SDAI_Application_instance_ptr [i];
|
||||
while( i > 0 ) {
|
||||
*scopelist [i-1] = inscope [i];
|
||||
i--;
|
||||
@@ -1542,14 +1541,13 @@ STEPfile::CreateScopeInstances( istream & in, SCLP23( Application_instance_ptr )
|
||||
return rval;
|
||||
}
|
||||
|
||||
SCLP23( Application_instance ) *
|
||||
SDAI_Application_instance *
|
||||
STEPfile::CreateSubSuperInstance( istream & in, int fileid, ErrorDescriptor & e ) {
|
||||
std::string tmpstr;
|
||||
SCLP23( Application_instance ) * obj = ENTITY_NULL;
|
||||
SDAI_Application_instance * obj = ENTITY_NULL;
|
||||
|
||||
char c;
|
||||
char schnm[BUFSIZ];
|
||||
schnm[0] = '\0';
|
||||
std::string schnm;
|
||||
|
||||
std::string buf; // used to hold the simple record that is read
|
||||
ErrorDescriptor err; // used to catch error msgs
|
||||
@@ -1584,9 +1582,9 @@ STEPfile::CreateSubSuperInstance( istream & in, int fileid, ErrorDescriptor & e
|
||||
}
|
||||
}
|
||||
entNmArr[enaIndex] = 0;
|
||||
schemaName( schnm );
|
||||
schnm = schemaName();
|
||||
|
||||
obj = new STEPcomplex( &_reg, ( const std::string ** )entNmArr, fileid, schnm );
|
||||
obj = new STEPcomplex( &_reg, ( const std::string ** )entNmArr, fileid, schnm.c_str() );
|
||||
|
||||
if( obj->Error().severity() <= SEVERITY_WARNING ) {
|
||||
// If obj is not legal, record its error info and delete it:
|
||||
@@ -1609,7 +1607,7 @@ STEPfile::CreateSubSuperInstance( istream & in, int fileid, ErrorDescriptor & e
|
||||
Severity
|
||||
STEPfile::ReadScopeInstances( istream & in ) {
|
||||
Severity rval = SEVERITY_NULL;
|
||||
SCLP23( Application_instance ) * se;
|
||||
SDAI_Application_instance * se;
|
||||
std::string tmpbuf;
|
||||
char c;
|
||||
int exportid;
|
||||
@@ -1738,14 +1736,14 @@ void ReadEntityError( char c, int i, istream & in ) {
|
||||
|
||||
/*****************************************************
|
||||
description:
|
||||
This function populates a SCLP23(Application_instance) with the values read from
|
||||
This function populates a SDAI_Application_instance with the values read from
|
||||
the istream.
|
||||
|
||||
This function must keeps track of error messages encountered when
|
||||
reading the SCLP23(Application_instance). It passes SCLP23(Application_instance) error information onto
|
||||
reading the SDAI_Application_instance. It passes SDAI_Application_instance error information onto
|
||||
the STEPfile ErrorDescriptor.
|
||||
*****************************************************/
|
||||
SCLP23( Application_instance ) *
|
||||
SDAI_Application_instance *
|
||||
STEPfile::ReadInstance( istream & in, ostream & out, std::string & cmtStr,
|
||||
int useTechCor ) {
|
||||
Severity sev = SEVERITY_NULL;
|
||||
@@ -1753,13 +1751,12 @@ STEPfile::ReadInstance( istream & in, ostream & out, std::string & cmtStr,
|
||||
std::string tmpbuf;
|
||||
char errbuf[BUFSIZ];
|
||||
errbuf[0] = '\0';
|
||||
char currSch[BUFSIZ];
|
||||
currSch[0] = '\0';
|
||||
std::string currSch;
|
||||
std::string objnm;
|
||||
|
||||
char c;
|
||||
int fileid;
|
||||
SCLP23( Application_instance )* obj = ENTITY_NULL;
|
||||
SDAI_Application_instance* obj = ENTITY_NULL;
|
||||
int idIncrNum = FileIdIncr();
|
||||
|
||||
ReadComment( in, cmtStr );
|
||||
@@ -1825,12 +1822,12 @@ STEPfile::ReadInstance( istream & in, ostream & out, std::string & cmtStr,
|
||||
in.putback( c );
|
||||
}
|
||||
|
||||
schemaName( currSch );
|
||||
currSch = schemaName();
|
||||
|
||||
//check for subtype/supertype record
|
||||
if( c == '(' ) {
|
||||
// TODO
|
||||
sev = obj->STEPread( fileid, idIncrNum, &instances(), in, currSch,
|
||||
sev = obj->STEPread( fileid, idIncrNum, &instances(), in, currSch.c_str(),
|
||||
useTechCor );
|
||||
|
||||
ReadTokenSeparator( in, &cmtStr );
|
||||
@@ -1877,7 +1874,7 @@ STEPfile::ReadInstance( istream & in, ostream & out, std::string & cmtStr,
|
||||
// NOTE: this function is called for all FileTypes
|
||||
// (WORKING_SESSION included)
|
||||
|
||||
sev = obj->STEPread( fileid, idIncrNum, &instances(), in, currSch,
|
||||
sev = obj->STEPread( fileid, idIncrNum, &instances(), in, currSch.c_str(),
|
||||
useTechCor );
|
||||
|
||||
ReadTokenSeparator( in, &cmtStr );
|
||||
@@ -2108,7 +2105,7 @@ STEPfile::WriteHeader( ostream & out ) {
|
||||
WriteHeaderInstanceFileSchema( out );
|
||||
|
||||
// Write the rest of the header instances
|
||||
SCLP23( Application_instance )* se;
|
||||
SDAI_Application_instance* se;
|
||||
int n = _headerInstances->InstanceCount();
|
||||
for( int i = 0; i < n; ++i ) {
|
||||
se = _headerInstances->GetMgrNode( i ) ->GetApplication_instance();
|
||||
@@ -2126,7 +2123,7 @@ STEPfile::WriteHeader( ostream & out ) {
|
||||
/***************************
|
||||
***************************/
|
||||
void
|
||||
STEPfile::WriteHeaderInstance( SCLP23( Application_instance )* obj, ostream & out ) {
|
||||
STEPfile::WriteHeaderInstance( SDAI_Application_instance* obj, ostream & out ) {
|
||||
std::string tmp;
|
||||
if( !obj->P21Comment().empty() ) {
|
||||
out << obj->P21Comment();
|
||||
@@ -2147,10 +2144,10 @@ STEPfile::WriteHeaderInstance( SCLP23( Application_instance )* obj, ostream & ou
|
||||
void
|
||||
STEPfile::WriteHeaderInstanceFileName( ostream & out ) {
|
||||
// Get the FileName instance from _headerInstances
|
||||
SCLP23( Application_instance ) *se = 0;
|
||||
SDAI_Application_instance *se = 0;
|
||||
se = _headerInstances->GetApplication_instance( "File_Name" );
|
||||
if( se == ENTITY_NULL ) {
|
||||
se = ( SCLP23( Application_instance ) * )HeaderDefaultFileName();
|
||||
se = ( SDAI_Application_instance * )HeaderDefaultFileName();
|
||||
}
|
||||
|
||||
//set some of the attribute values at time of output
|
||||
@@ -2174,22 +2171,22 @@ STEPfile::WriteHeaderInstanceFileName( ostream & out ) {
|
||||
|
||||
void STEPfile::WriteHeaderInstanceFileDescription( ostream & out ) {
|
||||
// Get the FileDescription instance from _headerInstances
|
||||
SCLP23( Application_instance ) *se = 0;
|
||||
SDAI_Application_instance *se = 0;
|
||||
se = _headerInstances->GetApplication_instance( "File_Description" );
|
||||
if( se == ENTITY_NULL ) {
|
||||
se = ( SCLP23( Application_instance ) * )HeaderDefaultFileDescription();
|
||||
se = ( SDAI_Application_instance * )HeaderDefaultFileDescription();
|
||||
}
|
||||
|
||||
WriteHeaderInstance( se, out );
|
||||
}
|
||||
|
||||
void STEPfile::WriteHeaderInstanceFileSchema( ostream & out ) {
|
||||
SCLP23( Application_instance ) *se = 0;
|
||||
SDAI_Application_instance *se = 0;
|
||||
|
||||
// Get the FileName instance from _headerInstances
|
||||
se = _headerInstances->GetApplication_instance( "File_Schema" );
|
||||
if( se == ENTITY_NULL ) {
|
||||
se = ( SCLP23( Application_instance ) * ) HeaderDefaultFileSchema();
|
||||
se = ( SDAI_Application_instance * ) HeaderDefaultFileSchema();
|
||||
}
|
||||
WriteHeaderInstance( se, out );
|
||||
}
|
||||
@@ -2199,16 +2196,13 @@ void STEPfile::WriteHeaderInstanceFileSchema( ostream & out ) {
|
||||
***************************/
|
||||
|
||||
void STEPfile::WriteData( ostream & out, int writeComments ) {
|
||||
char currSch[BUFSIZ];
|
||||
currSch[0] = '\0';
|
||||
|
||||
std::string currSch = schemaName();
|
||||
out << "DATA;\n";
|
||||
|
||||
schemaName( currSch );
|
||||
int n = instances().InstanceCount();
|
||||
for( int i = 0; i < n; ++i )
|
||||
{
|
||||
instances().GetMgrNode( i )->GetApplication_instance()->STEPwrite( out, currSch, writeComments );
|
||||
instances().GetMgrNode( i )->GetApplication_instance()->STEPwrite( out, currSch.c_str(), writeComments );
|
||||
}
|
||||
|
||||
out << "ENDSEC;\n";
|
||||
@@ -2217,20 +2211,16 @@ void STEPfile::WriteData( ostream & out, int writeComments ) {
|
||||
/***************************
|
||||
***************************/
|
||||
|
||||
void
|
||||
STEPfile::WriteValuePairsData( ostream & out, int writeComments, int mixedCase ) {
|
||||
char currSch[BUFSIZ];
|
||||
currSch[0] = '\0';
|
||||
schemaName( currSch );
|
||||
void STEPfile::WriteValuePairsData( ostream & out, int writeComments, int mixedCase ) {
|
||||
std::string currSch = schemaName();
|
||||
int n = instances().InstanceCount();
|
||||
for( int i = 0; i < n; ++i )
|
||||
{
|
||||
instances().GetMgrNode( i )->GetApplication_instance()->WriteValuePairs( out, currSch, writeComments, mixedCase );
|
||||
instances().GetMgrNode( i )->GetApplication_instance()->WriteValuePairs( out, currSch.c_str(), writeComments, mixedCase );
|
||||
}
|
||||
}
|
||||
|
||||
Severity
|
||||
STEPfile::AppendFile( istream * in, int useTechCor ) {
|
||||
Severity STEPfile::AppendFile( istream * in, int useTechCor ) {
|
||||
Severity rval = SEVERITY_NULL;
|
||||
char errbuf[BUFSIZ];
|
||||
|
||||
@@ -2393,8 +2383,7 @@ STEPfile::AppendFile( istream * in, int useTechCor ) {
|
||||
|
||||
|
||||
/******************************************************/
|
||||
Severity
|
||||
STEPfile::WriteWorkingFile( ostream & out, int clearError, int writeComments ) {
|
||||
Severity STEPfile::WriteWorkingFile( ostream & out, int clearError, int writeComments ) {
|
||||
SetFileType( WORKING_SESSION );
|
||||
if( clearError ) {
|
||||
_error.ClearErrorMsg();
|
||||
@@ -2416,8 +2405,7 @@ STEPfile::WriteWorkingFile( ostream & out, int clearError, int writeComments ) {
|
||||
}
|
||||
|
||||
/******************************************************/
|
||||
Severity
|
||||
STEPfile::WriteWorkingFile( const std::string filename, int clearError,
|
||||
Severity STEPfile::WriteWorkingFile( const std::string filename, int clearError,
|
||||
int writeComments ) {
|
||||
if( clearError ) {
|
||||
_error.ClearErrorMsg();
|
||||
@@ -2435,36 +2423,32 @@ STEPfile::WriteWorkingFile( const std::string filename, int clearError,
|
||||
|
||||
/***************************
|
||||
***************************/
|
||||
void
|
||||
STEPfile::WriteWorkingData( ostream & out, int writeComments ) {
|
||||
char currSch[BUFSIZ];
|
||||
currSch[0] = '\0';
|
||||
|
||||
schemaName( currSch );
|
||||
void STEPfile::WriteWorkingData( ostream & out, int writeComments ) {
|
||||
std::string currSch = schemaName();
|
||||
out << "DATA;\n";
|
||||
// SCLP23(Application_instance)* se;
|
||||
int n = instances().InstanceCount();
|
||||
|
||||
for( int i = 0; i < n; ++i ) {
|
||||
switch( instances().GetMgrNode( i )->CurrState() ) {
|
||||
case deleteSE:
|
||||
out << wsDelete;
|
||||
instances().GetMgrNode( i )->GetApplication_instance()->
|
||||
STEPwrite( out, currSch, writeComments );
|
||||
STEPwrite( out, currSch.c_str(), writeComments );
|
||||
break;
|
||||
case completeSE:
|
||||
out << wsSaveComplete;
|
||||
instances().GetMgrNode( i )->GetApplication_instance()->
|
||||
STEPwrite( out, currSch, writeComments );
|
||||
STEPwrite( out, currSch.c_str(), writeComments );
|
||||
break;
|
||||
case incompleteSE:
|
||||
out << wsSaveIncomplete;
|
||||
instances().GetMgrNode( i )->GetApplication_instance()->
|
||||
STEPwrite( out, currSch, writeComments );
|
||||
STEPwrite( out, currSch.c_str(), writeComments );
|
||||
break;
|
||||
case newSE:
|
||||
out << wsNew;
|
||||
instances().GetMgrNode( i )->GetApplication_instance()->
|
||||
STEPwrite( out, currSch, writeComments );
|
||||
STEPwrite( out, currSch.c_str(), writeComments );
|
||||
break;
|
||||
case noStateSE:
|
||||
_error.AppendToUserMsg( "no state information for this node\n" );
|
||||
@@ -2478,7 +2462,7 @@ STEPfile::WriteWorkingData( ostream & out, int writeComments ) {
|
||||
description:
|
||||
This function sends messages to 'cerr'
|
||||
based on the values in the given ErrorDescriptor (e), which is
|
||||
supposed to be from a SCLP23(Application_instance) object, being manipulated by one
|
||||
supposed to be from a SDAI_Application_instance object, being manipulated by one
|
||||
of the STEPfile member functions.
|
||||
|
||||
The given error descriptor's messages are then cleared.
|
||||
@@ -2494,7 +2478,7 @@ STEPfile::AppendEntityErrorMsg( ErrorDescriptor * e ) {
|
||||
|
||||
if( ( sev < SEVERITY_MAX ) || ( sev > SEVERITY_NULL ) ) {
|
||||
//ERROR: something wrong with ErrorDescriptor
|
||||
//_error.AppendToDetailMsg("Error: in AppendEntityErrorMsg(ErrorDesriptor& e). Incomplete ErrorDescriptor, unable to report error message in SCLP23(Application_instance).\n");
|
||||
//_error.AppendToDetailMsg("Error: in AppendEntityErrorMsg(ErrorDesriptor& e). Incomplete ErrorDescriptor, unable to report error message in SDAI_Application_instance.\n");
|
||||
_error.GreaterSeverity( SEVERITY_WARNING );
|
||||
return SEVERITY_BUG;
|
||||
}
|
||||
|
||||
+10
-11
@@ -51,7 +51,7 @@ class STEPfile
|
||||
InstMgr* _headerInstances;
|
||||
Registry *_headerRegistry;
|
||||
|
||||
int _headerId; //STEPfile_id given to SCLP23(Application_instance) from header section
|
||||
int _headerId; //STEPfile_id given to SDAI_Application_instance from header section
|
||||
|
||||
//file information
|
||||
DirObj* _currentDir;
|
||||
@@ -91,9 +91,9 @@ class STEPfile
|
||||
InstMgr* HeaderInstances() { return _headerInstances; }
|
||||
const Registry *HeaderRegistry() { return _headerRegistry; }
|
||||
// to create header instances
|
||||
SCLP23(Application_instance)* HeaderDefaultFileName();
|
||||
SCLP23(Application_instance)* HeaderDefaultFileDescription();
|
||||
SCLP23(Application_instance)* HeaderDefaultFileSchema();
|
||||
SDAI_Application_instance* HeaderDefaultFileName();
|
||||
SDAI_Application_instance* HeaderDefaultFileDescription();
|
||||
SDAI_Application_instance* HeaderDefaultFileSchema();
|
||||
|
||||
//file information
|
||||
const std::string FileName() const { return _fileName; }
|
||||
@@ -143,8 +143,7 @@ class STEPfile
|
||||
|
||||
protected:
|
||||
//member functions
|
||||
char *schemaName( char * ); // 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);
|
||||
@@ -168,18 +167,18 @@ class STEPfile
|
||||
void ReadRestOfFile(istream& in);
|
||||
|
||||
// create instance - used by ReadData1()
|
||||
SCLP23(Application_instance) * CreateInstance(istream& in, ostream& out);
|
||||
SDAI_Application_instance * CreateInstance(istream& in, ostream& out);
|
||||
// create complex instance - used by CreateInstance()
|
||||
SCLP23(Application_instance) * CreateSubSuperInstance(istream& in, int fileid,
|
||||
SDAI_Application_instance * CreateSubSuperInstance(istream& in, int fileid,
|
||||
ErrorDescriptor &);
|
||||
|
||||
// read the instance - used by ReadData2()
|
||||
SCLP23(Application_instance) * ReadInstance(istream& in, ostream& out,
|
||||
SDAI_Application_instance * ReadInstance(istream& in, ostream& out,
|
||||
std::string &cmtStr, int useTechCor =1);
|
||||
|
||||
// reading scopes are still incomplete
|
||||
// these functions are stubs
|
||||
Severity CreateScopeInstances(istream& in, SCLP23(Application_instance_ptr) ** scopelist);
|
||||
Severity CreateScopeInstances(istream& in, SDAI_Application_instance_ptr ** scopelist);
|
||||
Severity ReadScopeInstances(istream& in);
|
||||
// Severity ReadSubSuperInstance(istream& in);
|
||||
|
||||
@@ -194,7 +193,7 @@ class STEPfile
|
||||
void CloseOutputFile(ostream* out);
|
||||
|
||||
void WriteHeader (ostream& out);
|
||||
void WriteHeaderInstance (SCLP23(Application_instance) *obj, ostream& out);
|
||||
void WriteHeaderInstance (SDAI_Application_instance *obj, ostream& out);
|
||||
void WriteHeaderInstanceFileName (ostream& out);
|
||||
void WriteHeaderInstanceFileDescription (ostream& out);
|
||||
void WriteHeaderInstanceFileSchema (ostream& out);
|
||||
|
||||
@@ -14,14 +14,10 @@
|
||||
#include <STEPfile.h>
|
||||
#include <SdaiHeaderSchema.h>
|
||||
#include <STEPaggregate.h>
|
||||
#include <cmath>
|
||||
|
||||
#include <cstring>
|
||||
|
||||
extern "C" {
|
||||
double ceil( double );
|
||||
}
|
||||
|
||||
|
||||
extern void HeaderSchemaInit( Registry & reg );
|
||||
|
||||
//To Be inline functions
|
||||
@@ -258,53 +254,56 @@ int STEPfile::IncrementFileId( int fileid ) {
|
||||
return ( fileid + FileIdIncr() );
|
||||
}
|
||||
|
||||
|
||||
void STEPfile::SetFileIdIncrement() {
|
||||
if( instances().MaxFileId() < 0 ) {
|
||||
_fileIdIncr = 0;
|
||||
} else _fileIdIncr =
|
||||
( int )( ( ceil( ( double )( ( instances().MaxFileId() + 99 ) / 1000 ) ) + 1 ) * 1000 );
|
||||
// FIXME: Is this correct? Why put an integer expression into ceil()?
|
||||
( int )( ( ceil( ( ( instances().MaxFileId() + 99.0 ) / 1000.0 ) ) + 1.0 ) * 1000.0 );
|
||||
}
|
||||
|
||||
char * STEPfile::schemaName( char * schName )
|
||||
/*
|
||||
|
||||
/**
|
||||
* Returns the schema name from the file schema header section (or the 1st
|
||||
* one if more than one exists). Copies this value into schName. If there
|
||||
* is no header section or no value for file schema, NULL is returned and
|
||||
* schName is unset.
|
||||
*/
|
||||
{
|
||||
const std::string STEPfile::schemaName() {
|
||||
SdaiFile_schema * fs;
|
||||
std::string tmp;
|
||||
std::string schName;
|
||||
STEPnode * n;
|
||||
|
||||
|
||||
if( _headerInstances == NULL ) {
|
||||
return NULL;
|
||||
return schName;
|
||||
}
|
||||
fs = ( SdaiFile_schema * )_headerInstances->GetApplication_instance( "File_Schema" );
|
||||
if( fs == ENTITY_NULL ) {
|
||||
return NULL;
|
||||
return schName;
|
||||
}
|
||||
|
||||
n = ( STEPnode * )fs->schema_identifiers_()->GetHead();
|
||||
// (take the first one)
|
||||
if( n == NULL ) {
|
||||
return NULL;
|
||||
return schName;
|
||||
}
|
||||
n->STEPwrite( tmp );
|
||||
if( *tmp.c_str() == '\0' || *tmp.c_str() == '$' ) {
|
||||
return NULL;
|
||||
n->STEPwrite( schName );
|
||||
if( schName.empty() || schName[0] == '$' ) {
|
||||
schName.clear();
|
||||
return schName;
|
||||
} else if( schName[0] == '\0' ) {
|
||||
//probably never - it seems that putting null in std::string takes effort
|
||||
_error.AppendToUserMsg( "In STEPfile::schemaName: schName contains \\0 - it should be empty." );
|
||||
_error.GreaterSeverity( SEVERITY_WARNING );
|
||||
schName.clear();
|
||||
return schName;
|
||||
}
|
||||
// tmp.c_str() returns the string we want plus a beginning and ending
|
||||
// quote mark ('). We remove these below.
|
||||
strncpy( schName, tmp.c_str() + 1, BUFSIZ - 1 );
|
||||
// "+1" to remove beginning '.
|
||||
if( *( schName + strlen( schName ) - 1 ) == '\'' ) {
|
||||
// Remove trailing '. This condition checks that it wasn't removed
|
||||
// already. That may have happend if strncpy had truncated schName
|
||||
// (it were >= BUFSIZ).
|
||||
*( schName + strlen( schName ) - 1 ) = '\0';
|
||||
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);
|
||||
}
|
||||
return schName;
|
||||
}
|
||||
|
||||
@@ -45,10 +45,10 @@ SdaiSection_language::SdaiSection_language( )
|
||||
attributes.push (a);
|
||||
}
|
||||
SdaiSection_language::SdaiSection_language (SdaiSection_language& e )
|
||||
{ CopyAs((SCLP23(Application_instance_ptr)) &e); }
|
||||
{ CopyAs((SDAI_Application_instance_ptr) &e); }
|
||||
SdaiSection_language::~SdaiSection_language () { }
|
||||
|
||||
SdaiSection_language::SdaiSection_language( SCLP23(Application_instance) *se, int *addAttrs)
|
||||
SdaiSection_language::SdaiSection_language( SDAI_Application_instance *se, int *addAttrs)
|
||||
{
|
||||
/* Set this to point to the head entity. */
|
||||
HeadEntity(se);
|
||||
@@ -128,10 +128,10 @@ SdaiFile_population::SdaiFile_population( )
|
||||
attributes.push (a);
|
||||
}
|
||||
SdaiFile_population::SdaiFile_population (SdaiFile_population& e )
|
||||
{ CopyAs((SCLP23(Application_instance_ptr)) &e); }
|
||||
{ CopyAs((SDAI_Application_instance_ptr) &e); }
|
||||
SdaiFile_population::~SdaiFile_population () { }
|
||||
|
||||
SdaiFile_population::SdaiFile_population( SCLP23(Application_instance) *se, int *addAttrs)
|
||||
SdaiFile_population::SdaiFile_population( SDAI_Application_instance *se, int *addAttrs)
|
||||
{
|
||||
/* Set this to point to the head entity. */
|
||||
HeadEntity(se);
|
||||
@@ -247,10 +247,10 @@ SdaiFile_name::SdaiFile_name( )
|
||||
attributes.push (a);
|
||||
}
|
||||
SdaiFile_name::SdaiFile_name (SdaiFile_name& e )
|
||||
{ CopyAs((SCLP23(Application_instance_ptr)) &e); }
|
||||
{ CopyAs((SDAI_Application_instance_ptr) &e); }
|
||||
SdaiFile_name::~SdaiFile_name () { }
|
||||
|
||||
SdaiFile_name::SdaiFile_name( SCLP23(Application_instance) *se, int *addAttrs)
|
||||
SdaiFile_name::SdaiFile_name( SDAI_Application_instance *se, int *addAttrs)
|
||||
{
|
||||
/* Set this to point to the head entity. */
|
||||
HeadEntity(se);
|
||||
@@ -323,14 +323,14 @@ SdaiFile_name::SdaiFile_name( SCLP23(Application_instance) *se, int *addAttrs)
|
||||
se->attributes.push (a);
|
||||
}
|
||||
|
||||
const SCLP23(String)
|
||||
const SDAI_String
|
||||
SdaiFile_name::name_() const
|
||||
{
|
||||
return (const SCLP23(String)) _name;
|
||||
return (const SDAI_String) _name;
|
||||
}
|
||||
|
||||
void
|
||||
SdaiFile_name::name_ (const SCLP23(String) x)
|
||||
SdaiFile_name::name_ (const SDAI_String x)
|
||||
|
||||
{
|
||||
_name = x;
|
||||
@@ -371,40 +371,40 @@ SdaiFile_name::organization_ (const StringAggregate_ptr x)
|
||||
|
||||
{ _organization.ShallowCopy (*x); }
|
||||
|
||||
const SCLP23(String)
|
||||
const SDAI_String
|
||||
SdaiFile_name::preprocessor_version_() const
|
||||
{
|
||||
return (const SCLP23(String)) _preprocessor_version;
|
||||
return (const SDAI_String) _preprocessor_version;
|
||||
}
|
||||
|
||||
void
|
||||
SdaiFile_name::preprocessor_version_ (const SCLP23(String) x)
|
||||
SdaiFile_name::preprocessor_version_ (const SDAI_String x)
|
||||
|
||||
{
|
||||
_preprocessor_version = x;
|
||||
}
|
||||
|
||||
const SCLP23(String)
|
||||
const SDAI_String
|
||||
SdaiFile_name::originating_system_() const
|
||||
{
|
||||
return (const SCLP23(String)) _originating_system;
|
||||
return (const SDAI_String) _originating_system;
|
||||
}
|
||||
|
||||
void
|
||||
SdaiFile_name::originating_system_ (const SCLP23(String) x)
|
||||
SdaiFile_name::originating_system_ (const SDAI_String x)
|
||||
|
||||
{
|
||||
_originating_system = x;
|
||||
}
|
||||
|
||||
const SCLP23(String)
|
||||
const SDAI_String
|
||||
SdaiFile_name::authorization_() const
|
||||
{
|
||||
return (const SCLP23(String)) _authorization;
|
||||
return (const SDAI_String) _authorization;
|
||||
}
|
||||
|
||||
void
|
||||
SdaiFile_name::authorization_ (const SCLP23(String) x)
|
||||
SdaiFile_name::authorization_ (const SDAI_String x)
|
||||
|
||||
{
|
||||
_authorization = x;
|
||||
@@ -432,10 +432,10 @@ SdaiSection_context::SdaiSection_context( )
|
||||
attributes.push (a);
|
||||
}
|
||||
SdaiSection_context::SdaiSection_context (SdaiSection_context& e )
|
||||
{ CopyAs((SCLP23(Application_instance_ptr)) &e); }
|
||||
{ CopyAs((SDAI_Application_instance_ptr) &e); }
|
||||
SdaiSection_context::~SdaiSection_context () { }
|
||||
|
||||
SdaiSection_context::SdaiSection_context( SCLP23(Application_instance) *se, int *addAttrs)
|
||||
SdaiSection_context::SdaiSection_context( SDAI_Application_instance *se, int *addAttrs)
|
||||
{
|
||||
/* Set this to point to the head entity. */
|
||||
HeadEntity(se);
|
||||
@@ -509,10 +509,10 @@ SdaiFile_description::SdaiFile_description( )
|
||||
attributes.push (a);
|
||||
}
|
||||
SdaiFile_description::SdaiFile_description (SdaiFile_description& e )
|
||||
{ CopyAs((SCLP23(Application_instance_ptr)) &e); }
|
||||
{ CopyAs((SDAI_Application_instance_ptr) &e); }
|
||||
SdaiFile_description::~SdaiFile_description () { }
|
||||
|
||||
SdaiFile_description::SdaiFile_description( SCLP23(Application_instance) *se, int *addAttrs)
|
||||
SdaiFile_description::SdaiFile_description( SDAI_Application_instance *se, int *addAttrs)
|
||||
{
|
||||
/* Set this to point to the head entity. */
|
||||
HeadEntity(se);
|
||||
@@ -551,14 +551,14 @@ SdaiFile_description::description_ (const StringAggregate_ptr x)
|
||||
|
||||
{ _description.ShallowCopy (*x); }
|
||||
|
||||
const SCLP23(String)
|
||||
const SDAI_String
|
||||
SdaiFile_description::implementation_level_() const
|
||||
{
|
||||
return (const SCLP23(String)) _implementation_level;
|
||||
return (const SDAI_String) _implementation_level;
|
||||
}
|
||||
|
||||
void
|
||||
SdaiFile_description::implementation_level_ (const SCLP23(String) x)
|
||||
SdaiFile_description::implementation_level_ (const SDAI_String x)
|
||||
|
||||
{
|
||||
_implementation_level = x;
|
||||
@@ -582,10 +582,10 @@ SdaiFile_schema::SdaiFile_schema( )
|
||||
attributes.push (a);
|
||||
}
|
||||
SdaiFile_schema::SdaiFile_schema (SdaiFile_schema& e )
|
||||
{ CopyAs((SCLP23(Application_instance_ptr)) &e); }
|
||||
{ CopyAs((SDAI_Application_instance_ptr) &e); }
|
||||
SdaiFile_schema::~SdaiFile_schema () { }
|
||||
|
||||
SdaiFile_schema::SdaiFile_schema( SCLP23(Application_instance) *se, int *addAttrs)
|
||||
SdaiFile_schema::SdaiFile_schema( SDAI_Application_instance *se, int *addAttrs)
|
||||
{
|
||||
/* Set this to point to the head entity. */
|
||||
HeadEntity(se);
|
||||
@@ -618,34 +618,34 @@ SdaiFile_schema::schema_identifiers_ (const StringAggregate_ptr x)
|
||||
///////// END_ENTITY file_schema
|
||||
|
||||
|
||||
SCLP23(Model_contents_ptr) create_SdaiModel_contents_header_section_schema()
|
||||
SDAI_Model_contents_ptr create_SdaiModel_contents_header_section_schema()
|
||||
{ return new SdaiModel_contents_header_section_schema ; }
|
||||
|
||||
SdaiModel_contents_header_section_schema::SdaiModel_contents_header_section_schema()
|
||||
{
|
||||
SCLP23(Entity_extent_ptr) eep = (SCLP23(Entity_extent_ptr))0;
|
||||
SDAI_Entity_extent_ptr eep = (SDAI_Entity_extent_ptr)0;
|
||||
|
||||
eep = new SCLP23(Entity_extent);
|
||||
eep = new SDAI_Entity_extent;
|
||||
eep->definition_(header_section_schemae_section_language);
|
||||
_folders.Append(eep);
|
||||
|
||||
eep = new SCLP23(Entity_extent);
|
||||
eep = new SDAI_Entity_extent;
|
||||
eep->definition_(header_section_schemae_file_population);
|
||||
_folders.Append(eep);
|
||||
|
||||
eep = new SCLP23(Entity_extent);
|
||||
eep = new SDAI_Entity_extent;
|
||||
eep->definition_(header_section_schemae_file_name);
|
||||
_folders.Append(eep);
|
||||
|
||||
eep = new SCLP23(Entity_extent);
|
||||
eep = new SDAI_Entity_extent;
|
||||
eep->definition_(header_section_schemae_section_context);
|
||||
_folders.Append(eep);
|
||||
|
||||
eep = new SCLP23(Entity_extent);
|
||||
eep = new SDAI_Entity_extent;
|
||||
eep->definition_(header_section_schemae_file_description);
|
||||
_folders.Append(eep);
|
||||
|
||||
eep = new SCLP23(Entity_extent);
|
||||
eep = new SDAI_Entity_extent;
|
||||
eep->definition_(header_section_schemae_file_schema);
|
||||
_folders.Append(eep);
|
||||
|
||||
|
||||
@@ -15,14 +15,14 @@
|
||||
extern AttrDescriptor *a_0section;
|
||||
extern AttrDescriptor *a_1default_language;
|
||||
|
||||
class SdaiSection_language : public SCLP23(Application_instance) {
|
||||
class SdaiSection_language : public SDAI_Application_instance {
|
||||
protected:
|
||||
SCLP23(String) _section ; // OPTIONAL
|
||||
SCLP23(String) _default_language ;
|
||||
SDAI_String _section ; // OPTIONAL
|
||||
SDAI_String _default_language ;
|
||||
public:
|
||||
|
||||
SdaiSection_language ( );
|
||||
SdaiSection_language (SCLP23(Application_instance) *se, int *addAttrs = 0);
|
||||
SdaiSection_language (SDAI_Application_instance *se, int *addAttrs = 0);
|
||||
SdaiSection_language (SdaiSection_language& e );
|
||||
~SdaiSection_language ();
|
||||
|
||||
@@ -47,16 +47,16 @@ extern AttrDescriptor *a_2governing_schema;
|
||||
extern AttrDescriptor *a_3determination_method;
|
||||
extern AttrDescriptor *a_4governed_sections;
|
||||
|
||||
class SdaiFile_population : public SCLP23(Application_instance) {
|
||||
class SdaiFile_population : public SDAI_Application_instance {
|
||||
protected:
|
||||
SCLP23(String) _governing_schema ;
|
||||
SCLP23(String) _determination_method ;
|
||||
SDAI_String _governing_schema ;
|
||||
SDAI_String _determination_method ;
|
||||
StringAggregate _governed_sections ; // OPTIONAL // of section_name
|
||||
|
||||
public:
|
||||
|
||||
SdaiFile_population ( );
|
||||
SdaiFile_population (SCLP23(Application_instance) *se, int *addAttrs = 0);
|
||||
SdaiFile_population (SDAI_Application_instance *se, int *addAttrs = 0);
|
||||
SdaiFile_population (SdaiFile_population& e );
|
||||
~SdaiFile_population ();
|
||||
|
||||
@@ -88,25 +88,25 @@ extern AttrDescriptor *a_9preprocessor_version;
|
||||
extern AttrDescriptor *a_10originating_system;
|
||||
extern AttrDescriptor *a_11authorization;
|
||||
|
||||
class SdaiFile_name : public SCLP23(Application_instance) {
|
||||
class SdaiFile_name : public SDAI_Application_instance {
|
||||
protected:
|
||||
SCLP23(String) _name ;
|
||||
SCLP23(String) _time_stamp ;
|
||||
SDAI_String _name ;
|
||||
SDAI_String _time_stamp ;
|
||||
StringAggregate _author ;
|
||||
StringAggregate _organization ;
|
||||
SCLP23(String) _preprocessor_version ;
|
||||
SCLP23(String) _originating_system ;
|
||||
SCLP23(String) _authorization ;
|
||||
SDAI_String _preprocessor_version ;
|
||||
SDAI_String _originating_system ;
|
||||
SDAI_String _authorization ;
|
||||
public:
|
||||
|
||||
SdaiFile_name ( );
|
||||
SdaiFile_name (SCLP23(Application_instance) *se, int *addAttrs = 0);
|
||||
SdaiFile_name (SDAI_Application_instance *se, int *addAttrs = 0);
|
||||
SdaiFile_name (SdaiFile_name& e );
|
||||
~SdaiFile_name ();
|
||||
|
||||
int opcode () { return 2 ; }
|
||||
const SCLP23(String) name_() const;
|
||||
void name_ (const SCLP23(String) x);
|
||||
const SDAI_String name_() const;
|
||||
void name_ (const SDAI_String x);
|
||||
|
||||
const SdaiTime_stamp_text time_stamp_() const;
|
||||
void time_stamp_ (const SdaiTime_stamp_text x);
|
||||
@@ -117,14 +117,14 @@ class SdaiFile_name : public SCLP23(Application_instance) {
|
||||
const StringAggregate_ptr organization_() const;
|
||||
void organization_ (const StringAggregate_ptr x);
|
||||
|
||||
const SCLP23(String) preprocessor_version_() const;
|
||||
void preprocessor_version_ (const SCLP23(String) x);
|
||||
const SDAI_String preprocessor_version_() const;
|
||||
void preprocessor_version_ (const SDAI_String x);
|
||||
|
||||
const SCLP23(String) originating_system_() const;
|
||||
void originating_system_ (const SCLP23(String) x);
|
||||
const SDAI_String originating_system_() const;
|
||||
void originating_system_ (const SDAI_String x);
|
||||
|
||||
const SCLP23(String) authorization_() const;
|
||||
void authorization_ (const SCLP23(String) x);
|
||||
const SDAI_String authorization_() const;
|
||||
void authorization_ (const SDAI_String x);
|
||||
|
||||
};
|
||||
|
||||
@@ -139,15 +139,15 @@ create_SdaiFile_name () { return new SdaiFile_name ; }
|
||||
extern AttrDescriptor *a_12section;
|
||||
extern AttrDescriptor *a_13context_identifiers;
|
||||
|
||||
class SdaiSection_context : public SCLP23(Application_instance) {
|
||||
class SdaiSection_context : public SDAI_Application_instance {
|
||||
protected:
|
||||
SCLP23(String) _section ; // OPTIONAL
|
||||
SDAI_String _section ; // OPTIONAL
|
||||
StringAggregate _context_identifiers ; // of context_name
|
||||
|
||||
public:
|
||||
|
||||
SdaiSection_context ( );
|
||||
SdaiSection_context (SCLP23(Application_instance) *se, int *addAttrs = 0);
|
||||
SdaiSection_context (SDAI_Application_instance *se, int *addAttrs = 0);
|
||||
SdaiSection_context (SdaiSection_context& e );
|
||||
~SdaiSection_context ();
|
||||
|
||||
@@ -171,14 +171,14 @@ create_SdaiSection_context () { return new SdaiSection_context ; }
|
||||
extern AttrDescriptor *a_14description;
|
||||
extern AttrDescriptor *a_15implementation_level;
|
||||
|
||||
class SdaiFile_description : public SCLP23(Application_instance) {
|
||||
class SdaiFile_description : public SDAI_Application_instance {
|
||||
protected:
|
||||
StringAggregate _description ;
|
||||
SCLP23(String) _implementation_level ;
|
||||
SDAI_String _implementation_level ;
|
||||
public:
|
||||
|
||||
SdaiFile_description ( );
|
||||
SdaiFile_description (SCLP23(Application_instance) *se, int *addAttrs = 0);
|
||||
SdaiFile_description (SDAI_Application_instance *se, int *addAttrs = 0);
|
||||
SdaiFile_description (SdaiFile_description& e );
|
||||
~SdaiFile_description ();
|
||||
|
||||
@@ -186,8 +186,8 @@ class SdaiFile_description : public SCLP23(Application_instance) {
|
||||
const StringAggregate_ptr description_() const;
|
||||
void description_ (const StringAggregate_ptr x);
|
||||
|
||||
const SCLP23(String) implementation_level_() const;
|
||||
void implementation_level_ (const SCLP23(String) x);
|
||||
const SDAI_String implementation_level_() const;
|
||||
void implementation_level_ (const SDAI_String x);
|
||||
|
||||
};
|
||||
|
||||
@@ -201,14 +201,14 @@ create_SdaiFile_description () { return new SdaiFile_description ; }
|
||||
|
||||
extern AttrDescriptor *a_16schema_identifiers;
|
||||
|
||||
class SdaiFile_schema : public SCLP23(Application_instance) {
|
||||
class SdaiFile_schema : public SDAI_Application_instance {
|
||||
protected:
|
||||
StringAggregate _schema_identifiers ; // of schema_name
|
||||
|
||||
public:
|
||||
|
||||
SdaiFile_schema ( );
|
||||
SdaiFile_schema (SCLP23(Application_instance) *se, int *addAttrs = 0);
|
||||
SdaiFile_schema (SDAI_Application_instance *se, int *addAttrs = 0);
|
||||
SdaiFile_schema (SdaiFile_schema& e );
|
||||
~SdaiFile_schema ();
|
||||
|
||||
@@ -226,7 +226,7 @@ create_SdaiFile_schema () { return new SdaiFile_schema ; }
|
||||
|
||||
// ***** generate Model related pieces
|
||||
|
||||
class SdaiModel_contents_header_section_schema : public SCLP23(Model_contents) {
|
||||
class SdaiModel_contents_header_section_schema : public SDAI_Model_contents {
|
||||
|
||||
public:
|
||||
SdaiModel_contents_header_section_schema();
|
||||
@@ -248,5 +248,5 @@ class SdaiModel_contents_header_section_schema : public SCLP23(Model_contents) {
|
||||
|
||||
typedef SdaiModel_contents_header_section_schema * SdaiModel_contents_header_section_schema_ptr;
|
||||
typedef SdaiModel_contents_header_section_schema_ptr SdaiModel_contents_header_section_schema_var;
|
||||
SCLP23(Model_contents_ptr) create_SdaiModel_contents_header_section_schema();
|
||||
SDAI_Model_contents_ptr create_SdaiModel_contents_header_section_schema();
|
||||
#endif
|
||||
|
||||
@@ -8,17 +8,17 @@
|
||||
extern Schema * s_header_section_schema;
|
||||
|
||||
// Types:
|
||||
typedef SCLP23(String) SdaiTime_stamp_text;
|
||||
typedef SDAI_String SdaiTime_stamp_text;
|
||||
extern TypeDescriptor *header_section_schemat_time_stamp_text;
|
||||
typedef SCLP23(String) SdaiSection_name;
|
||||
typedef SDAI_String SdaiSection_name;
|
||||
extern TypeDescriptor *header_section_schemat_section_name;
|
||||
typedef SCLP23(String) SdaiContext_name;
|
||||
typedef SDAI_String SdaiContext_name;
|
||||
extern TypeDescriptor *header_section_schemat_context_name;
|
||||
typedef SCLP23(String) SdaiSchema_name;
|
||||
typedef SDAI_String SdaiSchema_name;
|
||||
extern TypeDescriptor *header_section_schemat_schema_name;
|
||||
typedef SCLP23(String) SdaiLanguage_name;
|
||||
typedef SDAI_String SdaiLanguage_name;
|
||||
extern TypeDescriptor *header_section_schemat_language_name;
|
||||
typedef SCLP23(String) SdaiExchange_structure_identifier;
|
||||
typedef SDAI_String SdaiExchange_structure_identifier;
|
||||
extern TypeDescriptor *header_section_schemat_exchange_structure_identifier;
|
||||
|
||||
// Entities:
|
||||
@@ -26,48 +26,48 @@ class SdaiSection_language;
|
||||
typedef SdaiSection_language * SdaiSection_languageH;
|
||||
typedef SdaiSection_language * SdaiSection_language_ptr;
|
||||
typedef SdaiSection_language_ptr SdaiSection_language_var;
|
||||
#define SdaiSection_language__set SCLP23(DAObject__set)
|
||||
#define SdaiSection_language__set_var SCLP23(DAObject__set_var)
|
||||
#define SdaiSection_language__set SDAI_DAObject__set
|
||||
#define SdaiSection_language__set_var SDAI_DAObject__set_var
|
||||
extern EntityDescriptor *header_section_schemae_section_language;
|
||||
|
||||
class SdaiFile_population;
|
||||
typedef SdaiFile_population * SdaiFile_populationH;
|
||||
typedef SdaiFile_population * SdaiFile_population_ptr;
|
||||
typedef SdaiFile_population_ptr SdaiFile_population_var;
|
||||
#define SdaiFile_population__set SCLP23(DAObject__set)
|
||||
#define SdaiFile_population__set_var SCLP23(DAObject__set_var)
|
||||
#define SdaiFile_population__set SDAI_DAObject__set
|
||||
#define SdaiFile_population__set_var SDAI_DAObject__set_var
|
||||
extern EntityDescriptor *header_section_schemae_file_population;
|
||||
|
||||
class SdaiFile_name;
|
||||
typedef SdaiFile_name * SdaiFile_nameH;
|
||||
typedef SdaiFile_name * SdaiFile_name_ptr;
|
||||
typedef SdaiFile_name_ptr SdaiFile_name_var;
|
||||
#define SdaiFile_name__set SCLP23(DAObject__set)
|
||||
#define SdaiFile_name__set_var SCLP23(DAObject__set_var)
|
||||
#define SdaiFile_name__set SDAI_DAObject__set
|
||||
#define SdaiFile_name__set_var SDAI_DAObject__set_var
|
||||
extern EntityDescriptor *header_section_schemae_file_name;
|
||||
|
||||
class SdaiSection_context;
|
||||
typedef SdaiSection_context * SdaiSection_contextH;
|
||||
typedef SdaiSection_context * SdaiSection_context_ptr;
|
||||
typedef SdaiSection_context_ptr SdaiSection_context_var;
|
||||
#define SdaiSection_context__set SCLP23(DAObject__set)
|
||||
#define SdaiSection_context__set_var SCLP23(DAObject__set_var)
|
||||
#define SdaiSection_context__set SDAI_DAObject__set
|
||||
#define SdaiSection_context__set_var SDAI_DAObject__set_var
|
||||
extern EntityDescriptor *header_section_schemae_section_context;
|
||||
|
||||
class SdaiFile_description;
|
||||
typedef SdaiFile_description * SdaiFile_descriptionH;
|
||||
typedef SdaiFile_description * SdaiFile_description_ptr;
|
||||
typedef SdaiFile_description_ptr SdaiFile_description_var;
|
||||
#define SdaiFile_description__set SCLP23(DAObject__set)
|
||||
#define SdaiFile_description__set_var SCLP23(DAObject__set_var)
|
||||
#define SdaiFile_description__set SDAI_DAObject__set
|
||||
#define SdaiFile_description__set_var SDAI_DAObject__set_var
|
||||
extern EntityDescriptor *header_section_schemae_file_description;
|
||||
|
||||
class SdaiFile_schema;
|
||||
typedef SdaiFile_schema * SdaiFile_schemaH;
|
||||
typedef SdaiFile_schema * SdaiFile_schema_ptr;
|
||||
typedef SdaiFile_schema_ptr SdaiFile_schema_var;
|
||||
#define SdaiFile_schema__set SCLP23(DAObject__set)
|
||||
#define SdaiFile_schema__set_var SCLP23(DAObject__set_var)
|
||||
#define SdaiFile_schema__set SDAI_DAObject__set
|
||||
#define SdaiFile_schema__set_var SDAI_DAObject__set_var
|
||||
extern EntityDescriptor *header_section_schemae_file_schema;
|
||||
|
||||
#endif
|
||||
|
||||
+9
-46
@@ -10,8 +10,6 @@
|
||||
* and is not subject to copyright.
|
||||
*/
|
||||
|
||||
/* $Id: cmdmgr.cc,v 3.0.1.2 1997/11/05 22:11:41 sauderd DP3.1 $ */
|
||||
|
||||
#include <cmdmgr.h>
|
||||
|
||||
|
||||
@@ -27,61 +25,45 @@ ReplicateLinkNode * ReplicateList::FindNode( MgrNode * mn ) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
BOOLEAN ReplicateList::IsOnList( MgrNode * mn ) {
|
||||
bool ReplicateList::IsOnList( MgrNode * mn ) {
|
||||
return ( FindNode( mn ) != 0 );
|
||||
/*
|
||||
ReplicateLinkNode *rln = (ReplicateLinkNode *)GetHead();
|
||||
int numEntries = EntryCount();
|
||||
int found = 0;
|
||||
while(numEntries--)
|
||||
{
|
||||
if(rln->ReplicateNode() == mn)
|
||||
{
|
||||
found = 1;
|
||||
numEntries = 0;
|
||||
}
|
||||
rln = (ReplicateLinkNode *)rln->NextNode();
|
||||
}
|
||||
return found;
|
||||
*/
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// returns true if it could delete the node
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
BOOLEAN ReplicateList::Remove( ReplicateLinkNode * rln ) {
|
||||
bool ReplicateList::Remove( ReplicateLinkNode * rln ) {
|
||||
ReplicateLinkNode * rnFollow = ( ReplicateLinkNode * )GetHead();
|
||||
if( !rnFollow || !rln ) {
|
||||
return 0;
|
||||
return false;
|
||||
} else {
|
||||
if( rnFollow == rln ) {
|
||||
head = rln->NextNode();
|
||||
delete rln;
|
||||
return 1;
|
||||
return true;
|
||||
} else {
|
||||
ReplicateLinkNode * rn = ( ReplicateLinkNode * )rnFollow->NextNode();
|
||||
while( rn ) {
|
||||
if( rn == rln ) {
|
||||
rnFollow->next = ( SingleLinkNode * )rln->NextNode();
|
||||
delete rln;
|
||||
return 1;
|
||||
return true;
|
||||
}
|
||||
rnFollow = rn;
|
||||
rn = ( ReplicateLinkNode * )rn->NextNode();
|
||||
} // end while(rn)
|
||||
} // end else
|
||||
} // end else
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
BOOLEAN ReplicateList::Remove( MgrNode * rn ) {
|
||||
bool ReplicateList::Remove( MgrNode * rn ) {
|
||||
return Remove( FindNode( rn ) );
|
||||
}
|
||||
|
||||
CmdMgr::CmdMgr() {
|
||||
completeList = new MgrNodeList( completeSE );
|
||||
incompleteList = new MgrNodeList( incompleteSE );
|
||||
// newList = new MgrNodeList(newSE);
|
||||
deleteList = new MgrNodeList( deleteSE );
|
||||
|
||||
mappedWriteList = new DisplayNodeList( mappedWrite );
|
||||
@@ -90,30 +72,12 @@ CmdMgr::CmdMgr() {
|
||||
replicateList = new ReplicateList();
|
||||
}
|
||||
|
||||
int CmdMgr::ReplicateCmdList( MgrNode * mn ) {
|
||||
void CmdMgr::ReplicateCmdList( MgrNode * mn ) {
|
||||
if( !( replicateList->IsOnList( mn ) ) ) {
|
||||
replicateList->AddNode( mn );
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*
|
||||
void CmdMgr::ModifyCmdList(MgrNode *mn)
|
||||
{
|
||||
mn->ChangeList(mappedWriteList);
|
||||
}
|
||||
|
||||
void CmdMgr::ViewCmdList(MgrNode *mn)
|
||||
{
|
||||
mn->ChangeList(mappedViewList);
|
||||
}
|
||||
|
||||
void CmdMgr::CloseCmdList(MgrNode *mn)
|
||||
{
|
||||
mn->ChangeList(closeList);
|
||||
}
|
||||
*/
|
||||
|
||||
void CmdMgr::ClearInstances() {
|
||||
completeList->ClearEntries();
|
||||
incompleteList->ClearEntries();
|
||||
@@ -121,9 +85,8 @@ void CmdMgr::ClearInstances() {
|
||||
deleteList->ClearEntries();
|
||||
replicateList->Empty();
|
||||
|
||||
// newList->ClearEntries();
|
||||
}
|
||||
// searches current list for fileId
|
||||
/// searches current list for fileId
|
||||
MgrNode * CmdMgr::StateFindFileId( stateEnum s, int fileId ) {
|
||||
switch( s ) {
|
||||
case completeSE:
|
||||
|
||||
+59
-73
@@ -12,15 +12,9 @@
|
||||
* and is not subject to copyright.
|
||||
*/
|
||||
|
||||
/* $Id: cmdmgr.h,v 3.0.1.2 1997/11/05 22:11:41 sauderd DP3.1 $ */
|
||||
|
||||
#ifdef __O3DB__
|
||||
#include <OpenOODB.h>
|
||||
#endif
|
||||
|
||||
#include <gennode.h>
|
||||
#include <gennodelist.h>
|
||||
//#include <gennode.inline.h>
|
||||
#include <gennodearray.h>
|
||||
|
||||
#include <editordefines.h>
|
||||
@@ -30,58 +24,56 @@
|
||||
#include <dispnodelist.h>
|
||||
#include <SingleLinkList.h>
|
||||
|
||||
typedef unsigned short BOOLEAN;
|
||||
|
||||
//#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.
|
||||
#define SAVE_COMPLETE_CMD_CHAR 's'
|
||||
#define SAVE_COMPLETE_CMD_COL 0
|
||||
#define SAVE_COMPLETE_STATE_CHAR ' '
|
||||
#define SAVE_COMPLETE_STATE_COL 4
|
||||
#define SAVE_COMPLETE_CMD_CHAR 's'
|
||||
#define SAVE_COMPLETE_CMD_COL 0
|
||||
#define SAVE_COMPLETE_STATE_CHAR ' '
|
||||
#define SAVE_COMPLETE_STATE_COL 4
|
||||
|
||||
#define SAVE_INCOMPLETE_CMD_CHAR 'i'
|
||||
#define SAVE_INCOMPLETE_CMD_COL 0
|
||||
#define SAVE_INCOMPLETE_STATE_CHAR 'I'
|
||||
#define SAVE_INCOMPLETE_STATE_COL 4
|
||||
#define SAVE_INCOMPLETE_CMD_CHAR 'i'
|
||||
#define SAVE_INCOMPLETE_CMD_COL 0
|
||||
#define SAVE_INCOMPLETE_STATE_CHAR 'I'
|
||||
#define SAVE_INCOMPLETE_STATE_COL 4
|
||||
|
||||
// backup to last save
|
||||
//#define CANCEL_CMD_CHAR 'c'
|
||||
//#define CANCEL_CMD_COL 0
|
||||
//#define CANCEL_CMD_CHAR 'c'
|
||||
//#define CANCEL_CMD_COL 0
|
||||
|
||||
#define NEW_STATE_CHAR 'N'
|
||||
#define NEW_STATE_COL 4
|
||||
#define NEW_STATE_CHAR 'N'
|
||||
#define NEW_STATE_COL 4
|
||||
|
||||
#define DELETE_CMD_CHAR 'd'
|
||||
#define DELETE_CMD_COL 0
|
||||
#define DELETE_STATE_CHAR 'D'
|
||||
#define DELETE_STATE_COL 4
|
||||
#define DELETE_CMD_CHAR 'd'
|
||||
#define DELETE_CMD_COL 0
|
||||
#define DELETE_STATE_CHAR 'D'
|
||||
#define DELETE_STATE_COL 4
|
||||
|
||||
// close will try to save it to its previous status
|
||||
#define CLOSE_CMD_CHAR 'c'
|
||||
#define CLOSE_CMD_COL 2
|
||||
// close will try to save it to its previous status
|
||||
#define CLOSE_CMD_CHAR 'c'
|
||||
#define CLOSE_CMD_COL 2
|
||||
|
||||
#define MODIFY_CMD_CHAR 'm'
|
||||
#define MODIFY_CMD_COL 2
|
||||
#define MODIFY_STATE_CHAR 'M'
|
||||
#define MODIFY_STATE_COL 3
|
||||
#define MODIFY_CMD_CHAR 'm'
|
||||
#define MODIFY_CMD_COL 2
|
||||
#define MODIFY_STATE_CHAR 'M'
|
||||
#define MODIFY_STATE_COL 3
|
||||
|
||||
#define VIEW_CMD_CHAR 'v'
|
||||
#define VIEW_CMD_COL 2
|
||||
#define VIEW_STATE_CHAR 'V'
|
||||
#define VIEW_STATE_COL 3
|
||||
#define VIEW_CMD_CHAR 'v'
|
||||
#define VIEW_CMD_COL 2
|
||||
#define VIEW_STATE_CHAR 'V'
|
||||
#define VIEW_STATE_COL 3
|
||||
|
||||
#define REPLICATE_CMD_CHAR 'r'
|
||||
#define REPLICATE_CMD_COL 1
|
||||
#define REPLICATE_CMD_CHAR 'r'
|
||||
#define REPLICATE_CMD_COL 1
|
||||
|
||||
#define EXECUTE_CMD_CHAR 'x'
|
||||
#define EXECUTE_CMD_COL 5
|
||||
#define EXECUTE_CMD_CHAR 'x'
|
||||
#define EXECUTE_CMD_COL 5
|
||||
|
||||
#define UNMARK_CMD_CHAR 'u'
|
||||
#define UNMARK_CMD_COL 5
|
||||
#define UNMARK_CMD_CHAR 'u'
|
||||
#define UNMARK_CMD_COL 5
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -108,18 +100,18 @@ class ReplicateList : public SingleLinkList {
|
||||
|
||||
virtual SingleLinkNode * NewNode () { return new ReplicateLinkNode; }
|
||||
|
||||
BOOLEAN IsOnList(MgrNode *mn);
|
||||
bool IsOnList(MgrNode *mn);
|
||||
ReplicateLinkNode *FindNode(MgrNode *mn);
|
||||
|
||||
ReplicateLinkNode * AddNode (MgrNode * rn) {
|
||||
ReplicateLinkNode *node = (ReplicateLinkNode *) NewNode();
|
||||
node->ReplicateNode(rn);
|
||||
SingleLinkList::AppendNode(node);
|
||||
return node;
|
||||
ReplicateLinkNode *node = (ReplicateLinkNode *) NewNode();
|
||||
node->ReplicateNode(rn);
|
||||
SingleLinkList::AppendNode(node);
|
||||
return node;
|
||||
}
|
||||
|
||||
BOOLEAN Remove(ReplicateLinkNode *rln);
|
||||
BOOLEAN Remove(MgrNode *rn);
|
||||
bool Remove(ReplicateLinkNode *rln);
|
||||
bool Remove(MgrNode *rn);
|
||||
|
||||
const char *ClassName () { return "ReplicateList"; }
|
||||
};
|
||||
@@ -146,44 +138,38 @@ protected:
|
||||
// STATE LIST OPERATIONS
|
||||
MgrNode *GetHead(stateEnum listType);
|
||||
DisplayNode *GetHead(displayStateEnum listType);
|
||||
ReplicateLinkNode *GetReplicateHead()
|
||||
{ return (ReplicateLinkNode *)(replicateList->GetHead()); }
|
||||
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
|
||||
// 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
|
||||
// returns stateNext or statePrev member variables
|
||||
// i.e. next or previous node on curr state list
|
||||
|
||||
int SaveCompleteCmdList(MgrNode *mn)
|
||||
{ return mn->ChangeList(completeList); }
|
||||
{ return mn->ChangeList(completeList); }
|
||||
int SaveIncompleteCmdList(MgrNode *mn)
|
||||
{ return mn->ChangeList(incompleteList); }
|
||||
{ return mn->ChangeList(incompleteList); }
|
||||
int CancelCmdList(MgrNode *mn)
|
||||
{ return mn->ChangeList(cancelList); }
|
||||
{ return mn->ChangeList(cancelList); }
|
||||
int DeleteCmdList(MgrNode *mn)
|
||||
{ return mn->ChangeList(deleteList); }
|
||||
{ return mn->ChangeList(deleteList); }
|
||||
int ModifyCmdList(MgrNode *mn)
|
||||
{ return mn->ChangeList(mappedWriteList); }
|
||||
{ return mn->ChangeList(mappedWriteList); }
|
||||
int ViewCmdList(MgrNode *mn)
|
||||
{ return mn->ChangeList(mappedViewList); }
|
||||
{ return mn->ChangeList(mappedViewList); }
|
||||
int CloseCmdList(MgrNode *mn)
|
||||
{ return ( ( mn->DisplayState() == mappedWrite ) ||
|
||||
( mn->DisplayState() == mappedView ) ) ?
|
||||
mn->ChangeList(closeList) : 0;
|
||||
}
|
||||
/*
|
||||
// { if(mn->DisplayState() == mappedWrite ||
|
||||
// mn->DisplayState() == mappedView)
|
||||
// return mn->ChangeList(closeList);
|
||||
// else return 0;
|
||||
// }
|
||||
*/
|
||||
int ReplicateCmdList(MgrNode *mn);
|
||||
{ return ( ( mn->DisplayState() == mappedWrite ) ||
|
||||
( mn->DisplayState() == mappedView ) ) ?
|
||||
mn->ChangeList(closeList) : 0;
|
||||
}
|
||||
|
||||
void ReplicateCmdList(MgrNode *mn);
|
||||
|
||||
void ClearInstances();
|
||||
protected:
|
||||
|
||||
+12
-12
@@ -92,7 +92,7 @@ InstMgr::VerifyInstances( ErrorDescriptor & err ) {
|
||||
|
||||
int n = InstanceCount();
|
||||
MgrNode * mn;
|
||||
SCLP23( Application_instance )* se;
|
||||
SDAI_Application_instance* se;
|
||||
enum Severity rval = SEVERITY_NULL;
|
||||
|
||||
//for each instance on the list,
|
||||
@@ -169,7 +169,7 @@ MgrNode * InstMgr::FindFileId( int fileId ) {
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// get the index into display list given a SCLP23(Application_instance)
|
||||
// get the index into display list given a SDAI_Application_instance
|
||||
// called by see initiated functions
|
||||
int InstMgr::GetIndex( MgrNode * mn ) {
|
||||
return mn->ArrayIndex();
|
||||
@@ -177,7 +177,7 @@ int InstMgr::GetIndex( MgrNode * mn ) {
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
int InstMgr::GetIndex( SCLP23( 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( SCLP23( 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( SCLP23( 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;
|
||||
SCLP23( Application_instance )* se;
|
||||
SDAI_Application_instance* se;
|
||||
int n = InstanceCount();
|
||||
for( int j = 0; j < n; ++j ) {
|
||||
node = GetMgrNode( j );
|
||||
@@ -328,7 +328,7 @@ InstMgr::EntityKeywordCount( const char * name ) {
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
SCLP23( Application_instance ) *
|
||||
SDAI_Application_instance *
|
||||
InstMgr::GetApplication_instance( int index ) {
|
||||
MgrNode * mn = ( MgrNode * )( *master )[index];
|
||||
if( mn ) {
|
||||
@@ -338,7 +338,7 @@ InstMgr::GetApplication_instance( int index ) {
|
||||
}
|
||||
}
|
||||
|
||||
SCLP23( Application_instance ) *
|
||||
SDAI_Application_instance *
|
||||
InstMgr::GetSTEPentity( int index ) {
|
||||
MgrNode * mn = ( MgrNode * )( *master )[index];
|
||||
if( mn ) {
|
||||
@@ -360,10 +360,10 @@ InstMgr::GetSTEPentity( int index ) {
|
||||
does not wrap around to search indices before the
|
||||
starting_index.
|
||||
**************************************************/
|
||||
SCLP23( Application_instance ) *
|
||||
SDAI_Application_instance *
|
||||
InstMgr::GetApplication_instance( const char * entityKeyword, int starting_index ) {
|
||||
MgrNode * node;
|
||||
SCLP23( Application_instance ) *se;
|
||||
SDAI_Application_instance *se;
|
||||
|
||||
int count = InstanceCount();
|
||||
for( int j = starting_index; j < count; ++j ) {
|
||||
@@ -377,10 +377,10 @@ InstMgr::GetApplication_instance( const char * entityKeyword, int starting_index
|
||||
return ENTITY_NULL;
|
||||
}
|
||||
|
||||
SCLP23( Application_instance ) *
|
||||
SDAI_Application_instance *
|
||||
InstMgr::GetSTEPentity( const char * entityKeyword, int starting_index ) {
|
||||
MgrNode * node;
|
||||
SCLP23( Application_instance ) *se;
|
||||
SDAI_Application_instance *se;
|
||||
|
||||
int count = InstanceCount();
|
||||
for( int j = starting_index; j < count; ++j ) {
|
||||
|
||||
+10
-11
@@ -21,7 +21,6 @@
|
||||
/////////////////////
|
||||
|
||||
|
||||
typedef unsigned boolean;
|
||||
extern char * EntityClassName ( char *);
|
||||
|
||||
// IT IS VERY IMPORTANT THAT THE ORDER OF THE FOLLOWING INCLUDE FILES
|
||||
@@ -73,17 +72,17 @@ public:
|
||||
{ return &(*master) [index]; }
|
||||
|
||||
MgrNode *FindFileId(int fileId);
|
||||
// get the index into display list given a SCLP23(Application_instance)
|
||||
// get the index into display list given a SDAI_Application_instance
|
||||
// called by see initiated functions
|
||||
int GetIndex(SCLP23(Application_instance) *se);
|
||||
int GetIndex(SDAI_Application_instance *se);
|
||||
int GetIndex(MgrNode *mn);
|
||||
int VerifyEntity(int fileId, const char *expectedType);
|
||||
|
||||
// void Append(MgrNode *node);
|
||||
MgrNode *Append(SCLP23(Application_instance) *se, stateEnum listState);
|
||||
MgrNode *Append(SDAI_Application_instance *se, stateEnum listState);
|
||||
// deletes node from master list structure
|
||||
void Delete(MgrNode *node);
|
||||
void Delete(SCLP23(Application_instance) *se);
|
||||
void Delete(SDAI_Application_instance *se);
|
||||
|
||||
void ChangeState(MgrNode *node, stateEnum listState);
|
||||
|
||||
@@ -91,11 +90,11 @@ public:
|
||||
int NextFileId() { return maxFileId = maxFileId +1; }
|
||||
int EntityKeywordCount(const char* name);
|
||||
|
||||
SCLP23(Application_instance) *GetApplication_instance(int index);
|
||||
SCLP23(Application_instance) *
|
||||
SDAI_Application_instance *GetApplication_instance(int index);
|
||||
SDAI_Application_instance *
|
||||
GetApplication_instance(const char* entityKeyword,
|
||||
int starting_index =0);
|
||||
SCLP23(Application_instance) *GetApplication_instance(MgrNode *node)
|
||||
SDAI_Application_instance *GetApplication_instance(MgrNode *node)
|
||||
{ return node->GetApplication_instance(); };
|
||||
|
||||
void *GetSEE(int index);
|
||||
@@ -104,10 +103,10 @@ public:
|
||||
void PrintSortedFileIds();
|
||||
|
||||
// OBSOLETE
|
||||
SCLP23(Application_instance) *GetSTEPentity(int index);
|
||||
SCLP23(Application_instance) *GetSTEPentity(const char* entityKeyword,
|
||||
SDAI_Application_instance *GetSTEPentity(int index);
|
||||
SDAI_Application_instance *GetSTEPentity(const char* entityKeyword,
|
||||
int starting_index =0);
|
||||
SCLP23(Application_instance) *GetSTEPentity(MgrNode *node)
|
||||
SDAI_Application_instance *GetSTEPentity(MgrNode *node)
|
||||
{ return node->GetApplication_instance(); };
|
||||
|
||||
};
|
||||
|
||||
@@ -147,7 +147,7 @@ int MgrNode::ChangeState( stateEnum s ) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
void MgrNode::Init( SCLP23( 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( SCLP23( 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( SCLP23( 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( SCLP23( 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( SCLP23( Application_instance ) *StepEntPtr, stateEnum listStat
|
||||
// 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( SCLP23( 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)
|
||||
|
||||
+10
-10
@@ -21,7 +21,7 @@
|
||||
class GenericNode;
|
||||
class DisplayNode;
|
||||
#include <sdai.h>
|
||||
//class SCLP23(Application_instance);
|
||||
//class SDAI_Application_instance;
|
||||
|
||||
#include <gennode.h>
|
||||
#include <gennodelist.h>
|
||||
@@ -33,7 +33,7 @@ class InstMgr;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// class MgrNode
|
||||
// If you delete this object, it deletes the SCLP23(Application_instance) it represents,
|
||||
// If you delete this object, it deletes the SDAI_Application_instance it represents,
|
||||
// the DisplayNode, and removes itself from any list it is in.
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -50,8 +50,8 @@ protected:
|
||||
// every node will be on one of the four lists implemented by these:
|
||||
stateEnum currState;
|
||||
|
||||
// SCLP23(Application_instance) this node is representing info for
|
||||
SCLP23(Application_instance) *se;
|
||||
// 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;
|
||||
@@ -62,13 +62,13 @@ protected:
|
||||
public:
|
||||
// used for sentinel node on lists of MgrNodes
|
||||
MgrNode();
|
||||
MgrNode(SCLP23(Application_instance) *se);
|
||||
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(SCLP23(Application_instance) *se, stateEnum listState);
|
||||
MgrNode(SCLP23(Application_instance) *se, stateEnum listState, MgrNodeList *list);
|
||||
MgrNode(SDAI_Application_instance *se, stateEnum listState);
|
||||
MgrNode(SDAI_Application_instance *se, stateEnum listState, MgrNodeList *list);
|
||||
virtual ~MgrNode();
|
||||
|
||||
// STATE LIST OPERATIONS
|
||||
@@ -113,17 +113,17 @@ public:
|
||||
|
||||
// ACCESS FUNCTIONS
|
||||
int GetFileId();
|
||||
SCLP23(Application_instance) *GetApplication_instance() { return se; }
|
||||
SDAI_Application_instance *GetApplication_instance() { return se; }
|
||||
DisplayNode *&displayNode() { return di; }
|
||||
int ArrayIndex() { return arrayIndex; }
|
||||
void ArrayIndex(int index) { arrayIndex = index; }
|
||||
|
||||
// OBSOLETE
|
||||
SCLP23(Application_instance) *GetSTEPentity() { return se; }
|
||||
SDAI_Application_instance *GetSTEPentity() { return se; }
|
||||
protected:
|
||||
|
||||
private:
|
||||
void Init(SCLP23(Application_instance) *s, stateEnum listState, MgrNodeList *list);
|
||||
void Init(SDAI_Application_instance *s, stateEnum listState, MgrNodeList *list);
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -23,7 +23,7 @@ class MgrNode;
|
||||
class DisplayNode;
|
||||
class DisplayNodelist;
|
||||
#include <sdai.h>
|
||||
//class SCLP23(Application_instance);
|
||||
//class SDAI_Application_instance;
|
||||
|
||||
#include <editordefines.h>
|
||||
|
||||
@@ -31,13 +31,13 @@ class seeInfo : public DisplayNode
|
||||
{
|
||||
public:
|
||||
seeInfo(MgrNode *node,
|
||||
SCLP23(Application_instance) *se,
|
||||
SDAI_Application_instance *se,
|
||||
DisplayNodeList *dnl, displayStateEnum displaySt = mappedWrite);
|
||||
|
||||
void *GetSEE() { return see; }
|
||||
};
|
||||
|
||||
inline seeInfo::seeInfo(MgrNode *node, SCLP23(Application_instance) *se,
|
||||
inline seeInfo::seeInfo(MgrNode *node, SDAI_Application_instance *se,
|
||||
DisplayNodeList *dnl, displayStateEnum displaySt)
|
||||
{
|
||||
mn = node;
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
/* $Id: probe.cc,v 3.0.1.6 1997/11/05 23:01:07 sauderd DP3.2 $ */
|
||||
|
||||
#include <sclprefixes.h>
|
||||
|
||||
|
||||
#ifdef __O3DB__
|
||||
#include <OpenOODB.h>
|
||||
|
||||
@@ -71,10 +71,6 @@ include_directories(
|
||||
${SCL_SOURCE_DIR}/src/clutils
|
||||
)
|
||||
|
||||
add_definitions(
|
||||
-DHAVE_CONFIG_H
|
||||
)
|
||||
|
||||
SCL_ADDLIB(stepcore "${LIBSTEPCORE_SRCS} ${LIBDEPEND_SRCS}" "express steputils")
|
||||
if(APPLE)
|
||||
set_target_properties(stepcore PROPERTIES LINK_FLAGS "-flat_namespace -undefined suppress")
|
||||
|
||||
@@ -723,7 +723,7 @@ EnumTypeDescriptor::EnumTypeDescriptor( const char * nm, PrimitiveType ft,
|
||||
: TypeDescriptor( nm, ft, origSchema, d ), CreateNewEnum( f ) {
|
||||
}
|
||||
|
||||
SCLP23( Enum ) * EnumTypeDescriptor::CreateEnum() {
|
||||
SDAI_Enum * EnumTypeDescriptor::CreateEnum() {
|
||||
if( CreateNewEnum ) {
|
||||
return CreateNewEnum();
|
||||
} else {
|
||||
@@ -1653,7 +1653,7 @@ const TypeDescriptor * TypeDescriptor::BaseTypeDescriptor() const {
|
||||
// SelectTypeDescriptor functions
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
SCLP23( Select ) * SelectTypeDescriptor::CreateSelect() {
|
||||
SDAI_Select * SelectTypeDescriptor::CreateSelect() {
|
||||
if( CreateNewSelect ) {
|
||||
return CreateNewSelect();
|
||||
} else {
|
||||
@@ -1764,8 +1764,8 @@ AggrTypeDescriptor::AggrTypeDescriptor( ) :
|
||||
_aggrDomainType = 0;
|
||||
}
|
||||
|
||||
AggrTypeDescriptor::AggrTypeDescriptor( SCLP23( Integer ) b1,
|
||||
SCLP23( Integer ) b2,
|
||||
AggrTypeDescriptor::AggrTypeDescriptor( SDAI_Integer b1,
|
||||
SDAI_Integer b2,
|
||||
Logical uniqElem,
|
||||
TypeDescriptor * aggrDomType )
|
||||
: _bound1( b1 ), _bound2( b2 ), _uniqueElements( uniqElem ) {
|
||||
|
||||
+50
-50
@@ -14,7 +14,7 @@
|
||||
|
||||
#include <sdai.h>
|
||||
|
||||
typedef SCLP23(Application_instance) * (* Creator) () ;
|
||||
typedef SDAI_Application_instance * (* Creator) () ;
|
||||
|
||||
enum AttrType_Enum {
|
||||
AttrType_Explicit = 0,
|
||||
@@ -563,7 +563,7 @@ private:
|
||||
typedef Uniqueness_rule__set* Uniqueness_rule__set_ptr;
|
||||
typedef Uniqueness_rule__set_ptr Uniqueness_rule__set_var;
|
||||
|
||||
typedef SCLP23(Model_contents_ptr) (* ModelContentsCreator) () ;
|
||||
typedef SDAI_Model_contents_ptr (* ModelContentsCreator) () ;
|
||||
|
||||
/**
|
||||
* \class Schema (was SchemaDescriptor) - a class of this type is generated and contains schema info.
|
||||
@@ -737,8 +737,8 @@ class AttrDescriptor {
|
||||
const char * _name ; // the attributes name
|
||||
// this defines the domain of the attribute
|
||||
const TypeDescriptor * _domainType ;
|
||||
SCLP23(LOGICAL) _optional;
|
||||
SCLP23(LOGICAL) _unique;
|
||||
SDAI_LOGICAL _optional;
|
||||
SDAI_LOGICAL _unique;
|
||||
AttrType_Enum _attrType; // former attribute _derived
|
||||
const EntityDescriptor & _owner ; // the owning entityDescriptor
|
||||
public:
|
||||
@@ -810,14 +810,14 @@ class AttrDescriptor {
|
||||
void DomainType (const TypeDescriptor *td) { _domainType = td; }
|
||||
void ReferentType(const TypeDescriptor *td) { _domainType = td; }
|
||||
|
||||
const SCLP23(LOGICAL) & Optional() const { return _optional; }
|
||||
void Optional (SCLP23(LOGICAL) &opt) { _optional.put(opt.asInt()); }
|
||||
const SDAI_LOGICAL & Optional() const { return _optional; }
|
||||
void Optional (SDAI_LOGICAL &opt) { _optional.put(opt.asInt()); }
|
||||
|
||||
void Optional (Logical opt) { _optional.put(opt); }
|
||||
void Optional (const char *opt) { _optional.put(opt); }
|
||||
|
||||
const SCLP23(LOGICAL) & Unique() const { return _unique; }
|
||||
void Unique (SCLP23(LOGICAL) uniq) { _unique.put(uniq.asInt()); }
|
||||
const SDAI_LOGICAL & Unique() const { return _unique; }
|
||||
void Unique (SDAI_LOGICAL uniq) { _unique.put(uniq.asInt()); }
|
||||
void Unique (Logical uniq) { _unique.put(uniq); }
|
||||
void Unique (const char *uniq) { _unique.put(uniq); }
|
||||
|
||||
@@ -832,16 +832,16 @@ class AttrDescriptor {
|
||||
//outdated functions, use AttrType func above, new support of redefined
|
||||
Logical Derived() const { return Deriving(); }
|
||||
void Derived (Logical x); // outdated DAS
|
||||
void Derived (SCLP23(LOGICAL) x); // outdated DAS
|
||||
void Derived (SDAI_LOGICAL x); // outdated DAS
|
||||
void Derived (const char *x); // outdated DAS
|
||||
|
||||
const SCLP23(LOGICAL) & Optionality() const { return _optional; }
|
||||
void Optionality (SCLP23(LOGICAL) &opt) { _optional.put(opt.asInt()); }
|
||||
const SDAI_LOGICAL & Optionality() const { return _optional; }
|
||||
void Optionality (SDAI_LOGICAL &opt) { _optional.put(opt.asInt()); }
|
||||
void Optionality (Logical opt) { _optional.put(opt); }
|
||||
void Optionality (const char *opt) { _optional.put(opt); }
|
||||
|
||||
const SCLP23(LOGICAL) & Uniqueness() const { return _unique; }
|
||||
void Uniqueness (SCLP23(LOGICAL) uniq) { _unique.put(uniq.asInt()); }
|
||||
const SDAI_LOGICAL & Uniqueness() const { return _unique; }
|
||||
void Uniqueness (SDAI_LOGICAL uniq) { _unique.put(uniq.asInt()); }
|
||||
void Uniqueness (Logical uniq) { _unique.put(uniq); }
|
||||
void Uniqueness (const char *uniq) { _unique.put(uniq); }
|
||||
|
||||
@@ -1094,9 +1094,9 @@ class TypeDescriptor {
|
||||
protected:
|
||||
// Functions used to check the current name of the type (may
|
||||
// != _name if altNames has diff name for current schema).
|
||||
int PossName (const char *) const;
|
||||
int OurName (const char *) const;
|
||||
int AltName (const char *) const;
|
||||
bool PossName (const char *) const;
|
||||
bool OurName (const char *) const;
|
||||
bool AltName (const char *) const;
|
||||
|
||||
public:
|
||||
|
||||
@@ -1201,13 +1201,13 @@ class TypeDescriptor {
|
||||
virtual const TypeDescriptor * CanBeSet (const char *n,
|
||||
const char *schNm =0) const
|
||||
{ return ( CurrName( n, schNm ) ? this : 0 ); }
|
||||
int CurrName( const char *, const char * =0 ) const;
|
||||
bool CurrName( const char *, const char * =0 ) const;
|
||||
void addAltName( const char *schnm, const char *newnm );
|
||||
// Adds an additional name, newnm, to be use when schema schnm
|
||||
// is USE/REFERENCE'ing us (added to altNames).
|
||||
};
|
||||
|
||||
typedef SCLP23(Enum) * (* EnumCreator) () ;
|
||||
typedef SDAI_Enum * (* EnumCreator) () ;
|
||||
|
||||
class EnumTypeDescriptor : public TypeDescriptor {
|
||||
public:
|
||||
@@ -1220,7 +1220,7 @@ class EnumTypeDescriptor : public TypeDescriptor {
|
||||
CreateNewEnum = f;
|
||||
}
|
||||
|
||||
SCLP23(Enum) *CreateEnum();
|
||||
SDAI_Enum *CreateEnum();
|
||||
|
||||
EnumTypeDescriptor ( ) { }
|
||||
EnumTypeDescriptor (const char * nm, PrimitiveType ft,
|
||||
@@ -1244,8 +1244,8 @@ class EnumTypeDescriptor : public TypeDescriptor {
|
||||
class EntityDescriptor : public TypeDescriptor {
|
||||
|
||||
protected:
|
||||
SCLP23(LOGICAL) _abstractEntity;
|
||||
SCLP23(LOGICAL) _extMapping;
|
||||
SDAI_LOGICAL _abstractEntity;
|
||||
SDAI_LOGICAL _extMapping;
|
||||
// does external mapping have to be used to create an instance of
|
||||
// us (see STEP Part 21, sect 11.2.5.1)
|
||||
|
||||
@@ -1257,7 +1257,7 @@ class EntityDescriptor : public TypeDescriptor {
|
||||
public:
|
||||
Uniqueness_rule__set_var _uniqueness_rules; // initially a null pointer
|
||||
|
||||
// pointer to a function that will create a new instance of a SCLP23(Application_instance)
|
||||
// pointer to a function that will create a new instance of a SDAI_Application_instance
|
||||
Creator NewSTEPentity;
|
||||
|
||||
EntityDescriptor ( );
|
||||
@@ -1274,12 +1274,12 @@ class EntityDescriptor : public TypeDescriptor {
|
||||
|
||||
const char * QualifiedName(std::string &s) const;
|
||||
|
||||
const SCLP23(LOGICAL) & AbstractEntity() const
|
||||
const SDAI_LOGICAL & AbstractEntity() const
|
||||
{ return _abstractEntity;}
|
||||
const SCLP23(LOGICAL) & ExtMapping() const { return _extMapping; }
|
||||
void AbstractEntity (SCLP23(LOGICAL) &ae)
|
||||
const SDAI_LOGICAL & ExtMapping() const { return _extMapping; }
|
||||
void AbstractEntity (SDAI_LOGICAL &ae)
|
||||
{ _abstractEntity.put(ae.asInt()); }
|
||||
void ExtMapping (SCLP23(LOGICAL) &em)
|
||||
void ExtMapping (SDAI_LOGICAL &em)
|
||||
{ _extMapping.put(em.asInt()); }
|
||||
void AbstractEntity (Logical ae) { _abstractEntity.put(ae); }
|
||||
void ExtMapping (Logical em) { _extMapping.put(em); }
|
||||
@@ -1403,9 +1403,9 @@ class AggrTypeDescriptor : public TypeDescriptor {
|
||||
|
||||
protected:
|
||||
|
||||
SCLP23(Integer) _bound1 ;
|
||||
SCLP23(Integer) _bound2 ;
|
||||
SCLP23(LOGICAL) _uniqueElements ;
|
||||
SDAI_Integer _bound1 ;
|
||||
SDAI_Integer _bound2 ;
|
||||
SDAI_LOGICAL _uniqueElements ;
|
||||
TypeDescriptor * _aggrDomainType ;
|
||||
AggregateCreator CreateNewAggr;
|
||||
|
||||
@@ -1419,7 +1419,7 @@ class AggrTypeDescriptor : public TypeDescriptor {
|
||||
STEPaggregate *CreateAggregate();
|
||||
|
||||
AggrTypeDescriptor ( );
|
||||
AggrTypeDescriptor(SCLP23(Integer) b1, SCLP23(Integer) b2,
|
||||
AggrTypeDescriptor(SDAI_Integer b1, SDAI_Integer b2,
|
||||
Logical uniqElem,
|
||||
TypeDescriptor *aggrDomType);
|
||||
AggrTypeDescriptor (const char * nm, PrimitiveType ft,
|
||||
@@ -1429,14 +1429,14 @@ class AggrTypeDescriptor : public TypeDescriptor {
|
||||
virtual ~AggrTypeDescriptor ();
|
||||
|
||||
|
||||
SCLP23(Integer) & Bound1() { return _bound1; }
|
||||
void Bound1 (SCLP23(Integer) b1) { _bound1 = b1; }
|
||||
SDAI_Integer & Bound1() { return _bound1; }
|
||||
void Bound1 (SDAI_Integer b1) { _bound1 = b1; }
|
||||
|
||||
SCLP23(Integer) & Bound2() { return _bound2; }
|
||||
void Bound2 (SCLP23(Integer) b2) { _bound2 = b2; }
|
||||
SDAI_Integer & Bound2() { return _bound2; }
|
||||
void Bound2 (SDAI_Integer b2) { _bound2 = b2; }
|
||||
|
||||
SCLP23(LOGICAL)& UniqueElements() { return _uniqueElements; }
|
||||
void UniqueElements (SCLP23(LOGICAL) &ue)
|
||||
SDAI_LOGICAL& UniqueElements() { return _uniqueElements; }
|
||||
void UniqueElements (SDAI_LOGICAL &ue)
|
||||
{ _uniqueElements.put(ue.asInt()); }
|
||||
void UniqueElements (Logical ue) { _uniqueElements.put(ue); }
|
||||
void UniqueElements (const char *ue) { _uniqueElements.put(ue); }
|
||||
@@ -1451,7 +1451,7 @@ class AggrTypeDescriptor : public TypeDescriptor {
|
||||
class ArrayTypeDescriptor : public AggrTypeDescriptor {
|
||||
|
||||
protected:
|
||||
SCLP23(LOGICAL) _optionalElements ;
|
||||
SDAI_LOGICAL _optionalElements ;
|
||||
public:
|
||||
|
||||
ArrayTypeDescriptor ( ) : _optionalElements((char *)"UNKNOWN_TYPE") { }
|
||||
@@ -1467,8 +1467,8 @@ class ArrayTypeDescriptor : public AggrTypeDescriptor {
|
||||
virtual ~ArrayTypeDescriptor () {}
|
||||
|
||||
|
||||
SCLP23(LOGICAL)& OptionalElements() { return _optionalElements; }
|
||||
void OptionalElements (SCLP23(LOGICAL) &oe)
|
||||
SDAI_LOGICAL& OptionalElements() { return _optionalElements; }
|
||||
void OptionalElements (SDAI_LOGICAL &oe)
|
||||
{ _optionalElements.put(oe.asInt()); }
|
||||
void OptionalElements (Logical oe) { _optionalElements.put(oe); }
|
||||
void OptionalElements (const char *oe) { _optionalElements.put(oe); }
|
||||
@@ -1515,7 +1515,7 @@ class BagTypeDescriptor : public AggrTypeDescriptor {
|
||||
|
||||
};
|
||||
|
||||
typedef SCLP23(Select) * (* SelectCreator) () ;
|
||||
typedef SDAI_Select * (* SelectCreator) () ;
|
||||
|
||||
class SelectTypeDescriptor : public TypeDescriptor {
|
||||
|
||||
@@ -1532,7 +1532,7 @@ class SelectTypeDescriptor : public TypeDescriptor {
|
||||
CreateNewSelect = f;
|
||||
}
|
||||
|
||||
SCLP23(Select) *CreateSelect();
|
||||
SDAI_Select *CreateSelect();
|
||||
|
||||
SelectTypeDescriptor (int b, const char * nm, PrimitiveType ft,
|
||||
Schema *origSchema,
|
||||
@@ -1557,33 +1557,33 @@ class SelectTypeDescriptor : public TypeDescriptor {
|
||||
class StringTypeDescriptor : public TypeDescriptor {
|
||||
|
||||
protected:
|
||||
SCLP23(Integer) _width ; // OPTIONAL
|
||||
SCLP23(LOGICAL) _fixedSize ;
|
||||
SDAI_Integer _width ; // OPTIONAL
|
||||
SDAI_LOGICAL _fixedSize ;
|
||||
public:
|
||||
|
||||
StringTypeDescriptor ( ) : _fixedSize((char *)"UNKNOWN_TYPE") { _width = 0; }
|
||||
virtual ~StringTypeDescriptor () { }
|
||||
|
||||
|
||||
SCLP23(Integer) Width() { return _width; }
|
||||
void Width (SCLP23(Integer) w) { _width = w; }
|
||||
SDAI_Integer Width() { return _width; }
|
||||
void Width (SDAI_Integer w) { _width = w; }
|
||||
|
||||
SCLP23(LOGICAL)& FixedSize() { return _fixedSize; }
|
||||
void FixedSize (SCLP23(LOGICAL) fs) { _fixedSize.put(fs.asInt()); }
|
||||
SDAI_LOGICAL& FixedSize() { return _fixedSize; }
|
||||
void FixedSize (SDAI_LOGICAL fs) { _fixedSize.put(fs.asInt()); }
|
||||
void FixedSize (Logical fs) { _fixedSize.put(fs); }
|
||||
};
|
||||
|
||||
class RealTypeDescriptor : public TypeDescriptor {
|
||||
|
||||
protected:
|
||||
SCLP23(Integer) _precisionSpec ; // OPTIONAL
|
||||
SDAI_Integer _precisionSpec ; // OPTIONAL
|
||||
public:
|
||||
|
||||
RealTypeDescriptor ( ) { _precisionSpec = 0; }
|
||||
virtual ~RealTypeDescriptor () { }
|
||||
|
||||
SCLP23(Integer) PrecisionSpec() { return _precisionSpec; }
|
||||
void PrecisionSpec (SCLP23(Integer) ps) { _precisionSpec = ps; }
|
||||
SDAI_Integer PrecisionSpec() { return _precisionSpec; }
|
||||
void PrecisionSpec (SDAI_Integer ps) { _precisionSpec = ps; }
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -254,7 +254,7 @@ const TypeDescriptor * TypeDescriptor::BaseTypeIsA( const TypeDescriptor * td )
|
||||
* case if schNm USEs or REFERENCEs type and renames it in the process
|
||||
* (e.g., "USE (X as Y)".
|
||||
*/
|
||||
int TypeDescriptor::CurrName( const char * other, const char * schNm ) const {
|
||||
bool TypeDescriptor::CurrName( const char * other, const char * schNm ) const {
|
||||
if( !schNm || *schNm == '\0' ) {
|
||||
// If there's no current schema, accept any possible name of this.
|
||||
// (I.e., accept its actual name or any substitute):
|
||||
@@ -272,17 +272,17 @@ int TypeDescriptor::CurrName( const char * other, const char * schNm ) const {
|
||||
}
|
||||
|
||||
/**
|
||||
* return TRUE if nm is either our name or one of the possible alternates.
|
||||
* return true if nm is either our name or one of the possible alternates.
|
||||
*/
|
||||
int TypeDescriptor::PossName( const char * nm ) const {
|
||||
bool TypeDescriptor::PossName( const char * nm ) const {
|
||||
return ( OurName( nm ) || AltName( nm ) );
|
||||
}
|
||||
|
||||
int TypeDescriptor::OurName( const char * nm ) const {
|
||||
bool TypeDescriptor::OurName( const char * nm ) const {
|
||||
return !StrCmpIns( nm, _name );
|
||||
}
|
||||
|
||||
int TypeDescriptor::AltName( const char * nm ) const {
|
||||
bool TypeDescriptor::AltName( const char * nm ) const {
|
||||
if( altNames ) {
|
||||
return ( altNames->choice( nm ) );
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ class Registry {
|
||||
const ComplexCollect *CompCol() { return col; }
|
||||
void SetCompCollect( ComplexCollect *c ) { col = c; }
|
||||
|
||||
SCLP23(Application_instance)* ObjCreate (const char * nm, const char * =0,
|
||||
SDAI_Application_instance* ObjCreate (const char * nm, const char * =0,
|
||||
int check_case =0) const;
|
||||
};
|
||||
|
||||
|
||||
@@ -273,17 +273,17 @@ void Registry::RemoveClones( const EntityDescriptor & e )
|
||||
}
|
||||
|
||||
|
||||
SCLP23( Application_instance ) * Registry::ObjCreate( const char * nm, const char * schnm, int check_case ) const {
|
||||
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 ) {
|
||||
SCLP23( Application_instance ) *se =
|
||||
SDAI_Application_instance *se =
|
||||
( ( EntityDescriptor * )entd ) -> NewSTEPentity();
|
||||
|
||||
// See comment in previous function.
|
||||
if( entd->AbstractEntity().asInt() == TRUE ) {
|
||||
if( entd->AbstractEntity().asInt() == true ) {
|
||||
se->Error().severity( SEVERITY_WARNING );
|
||||
se->Error().UserMsg( "ENTITY is abstract supertype" );
|
||||
} else if( entd->ExtMapping().asInt() == TRUE ) {
|
||||
} else if( entd->ExtMapping().asInt() == true ) {
|
||||
se->Error().severity( SEVERITY_WARNING );
|
||||
se->Error().UserMsg( "ENTITY requires external mapping" );
|
||||
}
|
||||
|
||||
@@ -588,7 +588,7 @@ EntityNode::EntityNode() {
|
||||
EntityNode::~EntityNode() {
|
||||
}
|
||||
|
||||
EntityNode::EntityNode( SCLP23( Application_instance ) * e ) : node( e ) {
|
||||
EntityNode::EntityNode( SDAI_Application_instance * e ) : node( e ) {
|
||||
}
|
||||
|
||||
SingleLinkNode * EntityNode::NewNode() {
|
||||
@@ -599,7 +599,7 @@ SingleLinkNode * EntityNode::NewNode() {
|
||||
Severity EntityNode::StrToVal( const char * s, ErrorDescriptor * err,
|
||||
const TypeDescriptor * elem_type,
|
||||
InstMgr * insts, int addFileId ) {
|
||||
SCLP23( Application_instance ) *se = ReadEntityRef( s, err, ",)", insts,
|
||||
SDAI_Application_instance *se = ReadEntityRef( s, err, ",)", insts,
|
||||
addFileId );
|
||||
if( se != S_ENTITY_NULL ) {
|
||||
ErrorDescriptor error;
|
||||
@@ -633,7 +633,7 @@ Severity EntityNode::STEPread( const char * s, ErrorDescriptor * err,
|
||||
Severity EntityNode::STEPread( istream & in, ErrorDescriptor * err,
|
||||
const TypeDescriptor * elem_type,
|
||||
InstMgr * insts, int addFileId ) {
|
||||
SCLP23( Application_instance ) *se = ReadEntityRef( in, err, ",)", insts,
|
||||
SDAI_Application_instance *se = ReadEntityRef( in, err, ",)", insts,
|
||||
addFileId );
|
||||
if( se != S_ENTITY_NULL ) {
|
||||
ErrorDescriptor error;
|
||||
@@ -821,7 +821,7 @@ SingleLinkNode * SelectAggregate::NewNode() {
|
||||
// SelectNode
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
SelectNode::SelectNode( SCLP23( Select ) * s ) : node( s ) {
|
||||
SelectNode::SelectNode( SDAI_Select * s ) : node( s ) {
|
||||
}
|
||||
|
||||
SelectNode::SelectNode() {
|
||||
@@ -950,7 +950,7 @@ StringNode::StringNode( StringNode & sn ) {
|
||||
}
|
||||
|
||||
StringNode::StringNode( const char * sStr ) {
|
||||
// value is an SCLP23(String) (the memory is copied)
|
||||
// value is an SDAI_String (the memory is copied)
|
||||
value = sStr;
|
||||
}
|
||||
|
||||
@@ -1056,7 +1056,7 @@ BinaryNode::BinaryNode( BinaryNode & bn ) {
|
||||
}
|
||||
|
||||
BinaryNode::BinaryNode( const char * sStr ) {
|
||||
// value is an SCLP23(Binary) (the memory is copied)
|
||||
// value is an SDAI_Binary (the memory is copied)
|
||||
value = sStr;
|
||||
}
|
||||
|
||||
@@ -1164,7 +1164,7 @@ SingleLinkNode * EnumAggregate::NewNode() {
|
||||
// EnumNode
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
EnumNode::EnumNode( SCLP23( Enum ) * e ) : node( e ) {
|
||||
EnumNode::EnumNode( SDAI_Enum * e ) : node( e ) {
|
||||
}
|
||||
|
||||
EnumNode::EnumNode() {
|
||||
@@ -1242,7 +1242,7 @@ LOGICALS::~LOGICALS() {
|
||||
}
|
||||
|
||||
SingleLinkNode * LOGICALS::NewNode() {
|
||||
return new EnumNode( new SCLP23( LOGICAL ) );
|
||||
return new EnumNode( new SDAI_LOGICAL );
|
||||
}
|
||||
|
||||
LOGICALS * create_LOGICALS() {
|
||||
@@ -1260,7 +1260,7 @@ BOOLEANS::~BOOLEANS() {
|
||||
}
|
||||
|
||||
SingleLinkNode * BOOLEANS::NewNode() {
|
||||
return new EnumNode( new SCLP23( BOOLEAN ) );
|
||||
return new EnumNode( new SDAI_BOOLEAN );
|
||||
}
|
||||
|
||||
BOOLEANS * create_BOOLEANS() {
|
||||
|
||||
@@ -127,7 +127,7 @@ typedef EntityAggregate_ptr EntityAggregate_var;
|
||||
|
||||
/****************************************************************//**
|
||||
** \class SelectAggregate
|
||||
** This is a minimal represention for a collection of SCLP23(Select)
|
||||
** This is a minimal represention for a collection of SDAI_Select
|
||||
******************************************************************/
|
||||
class SelectAggregate : public STEPaggregate
|
||||
{
|
||||
@@ -186,7 +186,7 @@ typedef BinaryAggregate_ptr BinaryAggregate_var;
|
||||
|
||||
/**************************************************************//**
|
||||
** \class EnumAggregate
|
||||
** This is a minimal representions for a collection ofSCLP23(Enum)
|
||||
** This is a minimal representions for a collection ofSDAI_Enum
|
||||
******************************************************************/
|
||||
class EnumAggregate : public STEPaggregate
|
||||
{
|
||||
@@ -312,7 +312,7 @@ class GenericAggrNode : public STEPnode {
|
||||
|
||||
class EntityNode : public STEPnode {
|
||||
public:
|
||||
SCLP23(Application_instance) * node;
|
||||
SDAI_Application_instance * node;
|
||||
|
||||
// INPUT
|
||||
virtual Severity StrToVal(const char *s, ErrorDescriptor *err,
|
||||
@@ -334,7 +334,7 @@ class EntityNode : public STEPnode {
|
||||
virtual void STEPwrite (ostream& out =cout);
|
||||
|
||||
// CONSTRUCTORS
|
||||
EntityNode (SCLP23(Application_instance) * e);
|
||||
EntityNode (SDAI_Application_instance * e);
|
||||
EntityNode();
|
||||
~EntityNode();
|
||||
|
||||
@@ -368,11 +368,11 @@ class EntityNode : public STEPnode {
|
||||
|
||||
/**************************************************************//**
|
||||
** \class SelectNode
|
||||
** This is a minimal representions for node in lists of SCLP23(Select)
|
||||
** This is a minimal representions for node in lists of SDAI_Select
|
||||
******************************************************************/
|
||||
class SelectNode : public STEPnode {
|
||||
public:
|
||||
SCLP23(Select) * node;
|
||||
SDAI_Select * node;
|
||||
// INPUT
|
||||
virtual Severity StrToVal(const char *s, ErrorDescriptor *err,
|
||||
const TypeDescriptor *elem_type,
|
||||
@@ -395,7 +395,7 @@ class SelectNode : public STEPnode {
|
||||
virtual void STEPwrite (ostream& out =cout);
|
||||
|
||||
// CONSTRUCTORS
|
||||
SelectNode(SCLP23(Select) * s);
|
||||
SelectNode(SDAI_Select * s);
|
||||
SelectNode();
|
||||
~SelectNode();
|
||||
|
||||
@@ -431,7 +431,7 @@ class SelectNode : public STEPnode {
|
||||
******************************************************************/
|
||||
class StringNode : public STEPnode {
|
||||
public:
|
||||
SCLP23(String) value;
|
||||
SDAI_String value;
|
||||
// INPUT
|
||||
virtual Severity StrToVal(const char *s, ErrorDescriptor *err);
|
||||
virtual Severity StrToVal(istream &in, ErrorDescriptor *err);
|
||||
@@ -461,7 +461,7 @@ class StringNode : public STEPnode {
|
||||
******************************************************************/
|
||||
class BinaryNode : public STEPnode {
|
||||
public:
|
||||
SCLP23(Binary) value;
|
||||
SDAI_Binary value;
|
||||
// INPUT
|
||||
virtual Severity StrToVal(const char *s, ErrorDescriptor *err);
|
||||
virtual Severity StrToVal(istream &in, ErrorDescriptor *err);
|
||||
@@ -485,11 +485,11 @@ class BinaryNode : public STEPnode {
|
||||
|
||||
/**************************************************************//**
|
||||
** \class EnumNode
|
||||
** This is a minimal representions for node in lists of SCLP23(Enum)
|
||||
** This is a minimal representions for node in lists of SDAI_Enum
|
||||
******************************************************************/
|
||||
class EnumNode : public STEPnode {
|
||||
public:
|
||||
SCLP23(Enum) * node;
|
||||
SDAI_Enum * node;
|
||||
// INPUT
|
||||
virtual Severity StrToVal(const char *s, ErrorDescriptor *err);
|
||||
virtual Severity StrToVal(istream &in, ErrorDescriptor *err);
|
||||
@@ -503,7 +503,7 @@ class EnumNode : public STEPnode {
|
||||
virtual void STEPwrite (ostream& out =cout);
|
||||
|
||||
// CONSTRUCTORS
|
||||
EnumNode(SCLP23(Enum) * e);
|
||||
EnumNode(SDAI_Enum * e);
|
||||
EnumNode();
|
||||
~EnumNode();
|
||||
|
||||
@@ -512,7 +512,7 @@ class EnumNode : public STEPnode {
|
||||
|
||||
class RealNode : public STEPnode {
|
||||
public:
|
||||
SCLP23(Real) value; // double
|
||||
SDAI_Real value; // double
|
||||
// INPUT
|
||||
virtual Severity StrToVal(const char *s, ErrorDescriptor *err);
|
||||
virtual Severity StrToVal(istream &in, ErrorDescriptor *err);
|
||||
@@ -534,7 +534,7 @@ class RealNode : public STEPnode {
|
||||
|
||||
class IntNode : public STEPnode {
|
||||
public:
|
||||
SCLP23(Integer) value; // long int
|
||||
SDAI_Integer value; // long int
|
||||
// INPUT
|
||||
virtual Severity StrToVal(const char *s, ErrorDescriptor *err);
|
||||
virtual Severity StrToVal(istream &in, ErrorDescriptor *err);
|
||||
|
||||
@@ -131,7 +131,7 @@ Severity STEPattribute::StrToVal( const char * s, InstMgr * instances, int addFi
|
||||
}
|
||||
|
||||
case BINARY_TYPE: {
|
||||
ptr.b->StrToVal( s, &_error ); // call class SCLP23(Binary)::StrToVal()
|
||||
ptr.b->StrToVal( s, &_error ); // call class SDAI_Binary::StrToVal()
|
||||
break;
|
||||
}
|
||||
case STRING_TYPE: {
|
||||
@@ -267,7 +267,7 @@ Severity STEPattribute::STEPread( istream & in, InstMgr * instances, int addFile
|
||||
return _error.severity();
|
||||
}
|
||||
case BINARY_TYPE: {
|
||||
// call class SCLP23(Binary)::STEPread()
|
||||
// call class SDAI_Binary::STEPread()
|
||||
ptr.b->STEPread( in, &_error );
|
||||
CheckRemainingInput( in, &_error, "binary", ",)" );
|
||||
return _error.severity();
|
||||
@@ -352,7 +352,7 @@ Severity STEPattribute::STEPread( istream & in, InstMgr * instances, int addFile
|
||||
|
||||
/*****************************************************************//**
|
||||
** \fn asStr
|
||||
** \param currSch - used for select type writes. See commenting in SCLP23(Select)::STEPwrite().
|
||||
** \param currSch - used for select type writes. See commenting in SDAI_Select::STEPwrite().
|
||||
** \returns the value of the attribute
|
||||
** Status: complete 3/91
|
||||
*********************************************************************/
|
||||
@@ -507,7 +507,7 @@ void STEPattribute::STEPwrite( ostream & out, const char * currSch ) {
|
||||
_error.GreaterSeverity( SEVERITY_BUG );
|
||||
sprintf( errStr,
|
||||
" Warning: attribute '%s : %s' should be pointing at %s",
|
||||
Name(), TypeName(), "an SCLP23(String).\n" );
|
||||
Name(), TypeName(), "an SDAI_String.\n" );
|
||||
_error.AppendToUserMsg( errStr );
|
||||
_error.AppendToDetailMsg( errStr );
|
||||
}
|
||||
@@ -527,7 +527,7 @@ void STEPattribute::STEPwrite( ostream & out, const char * currSch ) {
|
||||
_error.GreaterSeverity( SEVERITY_BUG );
|
||||
sprintf( errStr,
|
||||
" Warning: attribute '%s : %s' should be pointing at %s",
|
||||
Name(), TypeName(), "an SCLP23(Binary).\n" );
|
||||
Name(), TypeName(), "an SDAI_Binary.\n" );
|
||||
_error.AppendToUserMsg( errStr );
|
||||
_error.AppendToDetailMsg( errStr );
|
||||
}
|
||||
@@ -556,7 +556,7 @@ void STEPattribute::STEPwrite( ostream & out, const char * currSch ) {
|
||||
_error.GreaterSeverity( SEVERITY_BUG );
|
||||
sprintf( errStr,
|
||||
" Warning: attribute '%s : %s' should be pointing at %s",
|
||||
Name(), TypeName(), "a SCLP23(Enum) class.\n" );
|
||||
Name(), TypeName(), "a SDAI_Enum class.\n" );
|
||||
_error.AppendToUserMsg( errStr );
|
||||
_error.AppendToDetailMsg( errStr );
|
||||
}
|
||||
@@ -575,7 +575,7 @@ void STEPattribute::STEPwrite( ostream & out, const char * currSch ) {
|
||||
_error.GreaterSeverity( SEVERITY_BUG );
|
||||
sprintf( errStr,
|
||||
" Warning: attribute '%s : %s' should be pointing at %s",
|
||||
Name(), TypeName(), "a SCLP23(Select) class.\n" );
|
||||
Name(), TypeName(), "a SDAI_Select class.\n" );
|
||||
_error.AppendToUserMsg( errStr );
|
||||
_error.AppendToDetailMsg( errStr );
|
||||
}
|
||||
@@ -642,8 +642,8 @@ int STEPattribute::ShallowCopy( STEPattribute * sa ) {
|
||||
}
|
||||
|
||||
/**
|
||||
* for a string attribute this means, make it not exist i.e. SCLP23(String)
|
||||
* will exist in member variable ptr but SCLP23(string) will be told to report
|
||||
* for a string attribute this means, make it not exist i.e. SDAI_String
|
||||
* will exist in member variable ptr but SDAI_string will be told to report
|
||||
* as not containing a value (even a value of no chars).
|
||||
*/
|
||||
Severity STEPattribute::set_null() {
|
||||
@@ -722,7 +722,7 @@ Severity STEPattribute::set_null() {
|
||||
|
||||
/**
|
||||
* For a string value this reports whether the string exists (as reported by
|
||||
* SCLP23(String) ) not whether SCLP23(String) contains a null string.
|
||||
* SDAI_String ) not whether SDAI_String contains a null string.
|
||||
*/
|
||||
int STEPattribute::is_null() const {
|
||||
if( _redefAttr ) {
|
||||
@@ -896,7 +896,7 @@ ostream & operator<< ( ostream & out, STEPattribute & a ) {
|
||||
/**************************************************************//**
|
||||
* This prepends attribute information to the detailed error msg. This
|
||||
* is intended to add information to the error msgs written by Enumerations,
|
||||
* Aggregates, and SCLP23(String)s which don't know they are a STEPattribute
|
||||
* Aggregates, and SDAI_Strings which don't know they are a STEPattribute
|
||||
* value.
|
||||
******************************************************************/
|
||||
void STEPattribute::AddErrorInfo() {
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
* and is not subject to copyright.
|
||||
*/
|
||||
|
||||
#include <sclprefixes.h>
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
#include <errordesc.h>
|
||||
@@ -29,7 +29,7 @@
|
||||
typedef double real;
|
||||
|
||||
class InstMgr;
|
||||
class SCLP23(Application_instance);
|
||||
class SDAI_Application_instance;
|
||||
class STEPaggregate;
|
||||
class SCLundefined;
|
||||
|
||||
@@ -45,13 +45,13 @@ extern Severity CheckRemainingInput(istream &in, ErrorDescriptor *err,
|
||||
const char *typeName, // used in error message
|
||||
const char *tokenList); // e.g. ",)"
|
||||
|
||||
extern SCLP23(Application_instance) * ReadEntityRef(istream &in, ErrorDescriptor *err, const char *tokenList,
|
||||
extern SDAI_Application_instance * ReadEntityRef(istream &in, ErrorDescriptor *err, const char *tokenList,
|
||||
InstMgr * instances, int addFileId);
|
||||
|
||||
extern SCLP23(Application_instance) * ReadEntityRef(const char * s, ErrorDescriptor *err, const char *tokenList,
|
||||
extern SDAI_Application_instance * ReadEntityRef(const char * s, ErrorDescriptor *err, const char *tokenList,
|
||||
InstMgr * instances, int addFileId);
|
||||
|
||||
extern Severity EntityValidLevel(SCLP23(Application_instance) *se,
|
||||
extern Severity EntityValidLevel(SDAI_Application_instance *se,
|
||||
const TypeDescriptor *ed, ///< entity type that entity se needs to match. (this must be an EntityDescriptor)
|
||||
ErrorDescriptor *err);
|
||||
|
||||
@@ -64,7 +64,7 @@ extern Severity EntityValidLevel(const char *attrValue, ///< string containing e
|
||||
////////////////////
|
||||
////////////////////
|
||||
|
||||
extern SCLP23(Application_instance) *STEPread_reference (const char * s, ErrorDescriptor *err,
|
||||
extern SDAI_Application_instance *STEPread_reference (const char * s, ErrorDescriptor *err,
|
||||
InstMgr * instances, int addFileId);
|
||||
////////////////////
|
||||
|
||||
@@ -80,7 +80,7 @@ extern void PushPastAggr1Dim(istream& in, std::string& s, ErrorDescriptor *err);
|
||||
|
||||
class STEPattribute {
|
||||
friend ostream &operator<< ( ostream&, STEPattribute& );
|
||||
friend class SCLP23(Application_instance);
|
||||
friend class SDAI_Application_instance;
|
||||
protected:
|
||||
ErrorDescriptor _error;
|
||||
unsigned int _derive : 1;
|
||||
@@ -96,17 +96,17 @@ class STEPattribute {
|
||||
** 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 SCLP23(Application_instance))
|
||||
** inherited from SDAI_Application_instance)
|
||||
*/
|
||||
union {
|
||||
SCLP23(String) *S; // STRING_TYPE
|
||||
SCLP23(Integer) *i; // INTEGER_TYPE (Integer is a long int)
|
||||
SCLP23(Binary) *b; // BINARY_TYPE
|
||||
SCLP23(Real) *r; // REAL_TYPE and NUMBER_TYPE (Real is a double)
|
||||
SCLP23(Application_instance)* *c; // ENTITY_TYPE
|
||||
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
|
||||
SCLP23(Enum) *e; // ENUM_TYPE, BOOLEAN_TYPE, and LOGICAL_TYPE
|
||||
SCLP23(Select) *sh; // SELECT_TYPE
|
||||
SDAI_Enum *e; // ENUM_TYPE, BOOLEAN_TYPE, and LOGICAL_TYPE
|
||||
SDAI_Select *sh; // SELECT_TYPE
|
||||
SCLundefined *u; // UNKNOWN_TYPE
|
||||
void *p;
|
||||
|
||||
@@ -162,21 +162,21 @@ class STEPattribute {
|
||||
~STEPattribute () {};
|
||||
|
||||
// INTEGER
|
||||
STEPattribute (const class AttrDescriptor& d, SCLP23(Integer) *p);
|
||||
STEPattribute (const class AttrDescriptor& d, SDAI_Integer *p);
|
||||
// BINARY
|
||||
STEPattribute (const class AttrDescriptor& d, SCLP23(Binary) *p);
|
||||
STEPattribute (const class AttrDescriptor& d, SDAI_Binary *p);
|
||||
// STRING
|
||||
STEPattribute (const class AttrDescriptor& d, SCLP23(String) *p);
|
||||
STEPattribute (const class AttrDescriptor& d, SDAI_String *p);
|
||||
// REAL & NUMBER
|
||||
STEPattribute (const class AttrDescriptor& d, SCLP23(Real) *p);
|
||||
STEPattribute (const class AttrDescriptor& d, SDAI_Real *p);
|
||||
// ENTITY
|
||||
STEPattribute (const class AttrDescriptor& d, SCLP23(Application_instance)* *p);
|
||||
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, SCLP23(Enum) *p);
|
||||
STEPattribute (const class AttrDescriptor& d, SDAI_Enum *p);
|
||||
// SELECT
|
||||
STEPattribute (const class AttrDescriptor& d, SCLP23(Select) *p);
|
||||
STEPattribute (const class AttrDescriptor& d, SDAI_Select *p);
|
||||
// UNDEFINED
|
||||
STEPattribute (const class AttrDescriptor& d, SCLundefined *p);
|
||||
|
||||
|
||||
@@ -19,32 +19,32 @@ STEPattribute::STEPattribute( const STEPattribute & a )
|
||||
: _derive( 0 ), _redefAttr( 0 ), aDesc( a.aDesc ) {}
|
||||
|
||||
/// INTEGER
|
||||
STEPattribute::STEPattribute( const class AttrDescriptor & d, SCLP23( Integer ) *p )
|
||||
STEPattribute::STEPattribute( const class AttrDescriptor & d, SDAI_Integer *p )
|
||||
: _derive( 0 ), _redefAttr( 0 ), aDesc( &d ) {
|
||||
ptr.i = p;
|
||||
}
|
||||
|
||||
/// BINARY
|
||||
STEPattribute::STEPattribute( const class AttrDescriptor & d, SCLP23( Binary ) *p )
|
||||
STEPattribute::STEPattribute( const class AttrDescriptor & d, SDAI_Binary *p )
|
||||
: _derive( 0 ), _redefAttr( 0 ), aDesc( &d ) {
|
||||
ptr.b = p;
|
||||
}
|
||||
|
||||
/// STRING
|
||||
STEPattribute::STEPattribute( const class AttrDescriptor & d, SCLP23( String ) *p )
|
||||
STEPattribute::STEPattribute( const class AttrDescriptor & d, SDAI_String *p )
|
||||
: _derive( 0 ), _redefAttr( 0 ), aDesc( &d ) {
|
||||
ptr.S = p;
|
||||
}
|
||||
|
||||
/// REAL & NUMBER
|
||||
STEPattribute::STEPattribute( const class AttrDescriptor & d, SCLP23( Real ) *p )
|
||||
STEPattribute::STEPattribute( const class AttrDescriptor & d, SDAI_Real *p )
|
||||
: _derive( 0 ), _redefAttr( 0 ), aDesc( &d ) {
|
||||
ptr.r = p;
|
||||
}
|
||||
|
||||
/// ENTITY
|
||||
STEPattribute::STEPattribute( const class AttrDescriptor & d,
|
||||
SCLP23( Application_instance )* *p )
|
||||
SDAI_Application_instance* *p )
|
||||
: _derive( 0 ), _redefAttr( 0 ), aDesc( &d ) {
|
||||
ptr.c = p;
|
||||
}
|
||||
@@ -56,14 +56,14 @@ STEPattribute::STEPattribute( const class AttrDescriptor & d, STEPaggregate * p
|
||||
}
|
||||
|
||||
/// ENUMERATION and Logical
|
||||
STEPattribute::STEPattribute( const class AttrDescriptor & d, SCLP23( Enum ) *p )
|
||||
STEPattribute::STEPattribute( const class AttrDescriptor & d, SDAI_Enum *p )
|
||||
: _derive( 0 ), _redefAttr( 0 ), aDesc( &d ) {
|
||||
ptr.e = p;
|
||||
}
|
||||
|
||||
/// SELECT
|
||||
STEPattribute::STEPattribute( const class AttrDescriptor & d,
|
||||
class SCLP23( Select ) *p )
|
||||
class SDAI_Select *p )
|
||||
: _derive( 0 ), _redefAttr( 0 ), aDesc( &d ) {
|
||||
ptr.sh = p;
|
||||
}
|
||||
|
||||
@@ -10,12 +10,12 @@ extern const char * ReadStdKeyword( istream & in, std::string & buf, int skipIni
|
||||
|
||||
|
||||
STEPcomplex::STEPcomplex( Registry * registry, int fileid )
|
||||
: SCLP23( Application_instance )( fileid, 1 ), sc( 0 ), head( this ), _registry( registry ), visited( 0 ) {
|
||||
: SDAI_Application_instance( fileid, 1 ), sc( 0 ), head( this ), _registry( registry ), visited( 0 ) {
|
||||
}
|
||||
|
||||
STEPcomplex::STEPcomplex( Registry * registry, const std::string ** names,
|
||||
int fileid, const char * schnm )
|
||||
: SCLP23( Application_instance )( fileid, 1 ), sc( 0 ), head( this ), _registry( registry ), visited( 0 ) {
|
||||
: SDAI_Application_instance( fileid, 1 ), sc( 0 ), head( this ), _registry( registry ), visited( 0 ) {
|
||||
char * nms[BUFSIZ];
|
||||
int j, k;
|
||||
|
||||
@@ -33,7 +33,7 @@ STEPcomplex::STEPcomplex( Registry * registry, const std::string ** names,
|
||||
|
||||
STEPcomplex::STEPcomplex( Registry * registry, const char ** names, int fileid,
|
||||
const char * schnm )
|
||||
: SCLP23( Application_instance )( fileid, 1 ), sc( 0 ), head( this ), _registry( registry ), visited( 0 ) {
|
||||
: SDAI_Application_instance( fileid, 1 ), sc( 0 ), head( this ), _registry( registry ), visited( 0 ) {
|
||||
Initialize( names, schnm );
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ void STEPcomplex::Initialize( const char ** names, const char * schnm ) {
|
||||
enDesc = _registry->FindEntity( *eptr, schnm );
|
||||
if( enDesc ) {
|
||||
if( enDesc->Supertypes().EntryCount() > 1 ) {
|
||||
eptr->multSuprs( TRUE );
|
||||
eptr->multSuprs( true );
|
||||
}
|
||||
if( StrCmpIns( *eptr, enDesc->Name() ) ) {
|
||||
// If this entity was referred by another name rather than the
|
||||
@@ -295,7 +295,7 @@ Severity STEPcomplex::STEPread( int id, int addFileId, class InstMgr * instance_
|
||||
|
||||
stepc = EntityPart( typeNm.c_str(), currSch );
|
||||
if( stepc )
|
||||
stepc->SCLP23( Application_instance )::STEPread( id, addFileId,
|
||||
stepc->SDAI_Application_instance::STEPread( id, addFileId,
|
||||
instance_set, in,
|
||||
currSch );
|
||||
else {
|
||||
@@ -363,7 +363,7 @@ Severity STEPcomplex::STEPread( int id, int addFileId, class InstMgr * instance_
|
||||
|
||||
cout << s << endl;
|
||||
BuildAttrs( s.c_str() );
|
||||
SCLP23( Application_instance )::STEPread( id, addFileId, instance_set,
|
||||
SDAI_Application_instance::STEPread( id, addFileId, instance_set,
|
||||
in, currSch );
|
||||
|
||||
in >> ws;
|
||||
@@ -394,7 +394,7 @@ Severity STEPcomplex::STEPread( int id, int addFileId, class InstMgr * instance_
|
||||
STEPcomplex * stepc = new STEPcomplex( _registry );
|
||||
AppendEntity( stepc );
|
||||
stepc->BuildAttrs( s.c_str() );
|
||||
stepc->SCLP23( Application_instance )::STEPread( id, addFileId,
|
||||
stepc->SDAI_Application_instance::STEPread( id, addFileId,
|
||||
instance_set, in,
|
||||
currSch );
|
||||
in >> ws;
|
||||
@@ -428,33 +428,33 @@ void STEPcomplex::BuildAttrs( const char * s ) {
|
||||
|
||||
switch( ad->NonRefType() ) {
|
||||
case INTEGER_TYPE:
|
||||
a = new STEPattribute( *ad, new SCLP23( Integer ) );
|
||||
a = new STEPattribute( *ad, new SDAI_Integer );
|
||||
break;
|
||||
|
||||
case STRING_TYPE:
|
||||
a = new STEPattribute( *ad, new SCLP23( String ) );
|
||||
a = new STEPattribute( *ad, new SDAI_String );
|
||||
break;
|
||||
|
||||
case BINARY_TYPE:
|
||||
a = new STEPattribute( *ad, new SCLP23( Binary ) );
|
||||
a = new STEPattribute( *ad, new SDAI_Binary );
|
||||
break;
|
||||
|
||||
case REAL_TYPE:
|
||||
case NUMBER_TYPE:
|
||||
a = new STEPattribute( *ad, new SCLP23( Real ) );
|
||||
a = new STEPattribute( *ad, new SDAI_Real );
|
||||
break;
|
||||
|
||||
case BOOLEAN_TYPE:
|
||||
a = new STEPattribute( *ad, new SCLP23( BOOLEAN ) );
|
||||
a = new STEPattribute( *ad, new SDAI_BOOLEAN );
|
||||
break;
|
||||
|
||||
case LOGICAL_TYPE:
|
||||
a = new STEPattribute( *ad, new SCLP23( LOGICAL ) );
|
||||
a = new STEPattribute( *ad, new SDAI_LOGICAL );
|
||||
break;
|
||||
|
||||
case ENTITY_TYPE:
|
||||
a = new STEPattribute( *ad,
|
||||
new( SCLP23( Application_instance ) * ) );
|
||||
new( SDAI_Application_instance * ) );
|
||||
break;
|
||||
|
||||
case ENUM_TYPE: {
|
||||
@@ -575,7 +575,7 @@ const char * STEPcomplex::WriteExtMapEntities( std::string & buf, const char * c
|
||||
return const_cast<char *>( buf.c_str() );
|
||||
}
|
||||
|
||||
void STEPcomplex::CopyAs( SCLP23( Application_instance ) *se ) {
|
||||
void STEPcomplex::CopyAs( SDAI_Application_instance *se ) {
|
||||
if( !se->IsComplex() ) {
|
||||
char errStr[BUFSIZ];
|
||||
cerr << "STEPcomplex::CopyAs() called with non-complex entity: "
|
||||
@@ -592,16 +592,16 @@ void STEPcomplex::CopyAs( SCLP23( Application_instance ) *se ) {
|
||||
STEPcomplex * scpartCpyTo = head;
|
||||
STEPcomplex * scpartCpyFrom = ( ( STEPcomplex * )se )->head;
|
||||
while( scpartCpyTo && scpartCpyFrom ) {
|
||||
scpartCpyTo->SCLP23( Application_instance )::CopyAs( scpartCpyFrom );
|
||||
scpartCpyTo->SDAI_Application_instance::CopyAs( scpartCpyFrom );
|
||||
scpartCpyTo = scpartCpyTo->sc;
|
||||
scpartCpyFrom = scpartCpyFrom->sc;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SCLP23( Application_instance ) * STEPcomplex::Replicate() {
|
||||
SDAI_Application_instance * STEPcomplex::Replicate() {
|
||||
if( !IsComplex() ) {
|
||||
return SCLP23( Application_instance )::Replicate();
|
||||
return SDAI_Application_instance::Replicate();
|
||||
} else if( !_registry ) {
|
||||
return S_ENTITY_NULL;
|
||||
} else {
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include <ExpDict.h>
|
||||
#include <Registry.h>
|
||||
|
||||
class STEPcomplex : public SCLP23(Application_instance) {
|
||||
class STEPcomplex : public SDAI_Application_instance {
|
||||
public:
|
||||
STEPcomplex * sc;
|
||||
STEPcomplex * head;
|
||||
@@ -43,7 +43,7 @@ class STEPcomplex : public SCLP23(Application_instance) {
|
||||
int writeComment = 1);
|
||||
virtual const char * STEPwrite(std::string &buf, const char *currSch =NULL);
|
||||
|
||||
SCLP23(Application_instance) *Replicate();
|
||||
SDAI_Application_instance *Replicate();
|
||||
|
||||
virtual void WriteExtMapEntities(ostream& out =cout,
|
||||
const char *currSch =NULL);
|
||||
@@ -52,7 +52,7 @@ class STEPcomplex : public SCLP23(Application_instance) {
|
||||
virtual void AppendEntity(STEPcomplex *stepc);
|
||||
|
||||
protected:
|
||||
virtual void CopyAs(SCLP23(Application_instance) *);
|
||||
virtual void CopyAs(SDAI_Application_instance *);
|
||||
void BuildAttrs(const char *s);
|
||||
void AddEntityPart(const char *name);
|
||||
void AssignDerives();
|
||||
|
||||
@@ -86,15 +86,15 @@ ComplexList * ComplexCollect::find( char * name ) {
|
||||
* Determines if the parent schema supports the instantiation of a complex
|
||||
* type consisting of the the entities named in ents. Does so by attempt-
|
||||
* ing to match ents against the ComplexLists in clists. If one of the
|
||||
* nodes of ents has multSupers set to TRUE (it has >1 supertype), it
|
||||
* nodes of ents has multSupers set to true (it has >1 supertype), it
|
||||
* should be included in >1 CList. A more complicated algorithm is applied
|
||||
* to match it, as described in the commenting.
|
||||
*/
|
||||
int ComplexCollect::supports( EntNode * ents ) const {
|
||||
bool ComplexCollect::supports( EntNode * ents ) const {
|
||||
EntNode * node = ents, *nextnode;
|
||||
AndList * alist = 0;
|
||||
ComplexList * clist = clists, *cl = NULL, *current;
|
||||
int retval;
|
||||
bool retval;
|
||||
EntList * elist, *next;
|
||||
|
||||
// Loop through the nodes of ents. If 1+ of them have >1 supertype, build
|
||||
@@ -137,15 +137,15 @@ int ComplexCollect::supports( EntNode * ents ) const {
|
||||
// which had mult supers. Simply go through each CList separately:
|
||||
while( clist != NULL ) {
|
||||
if( clist->matches( ents ) ) {
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
clist = clist->next;
|
||||
}
|
||||
// Went through whole list without match:
|
||||
return FALSE;
|
||||
return false;
|
||||
} else {
|
||||
// Use cl to test that the conditions of all supertypes are met:
|
||||
cl->multSupers = TRUE;
|
||||
cl->multSupers = true;
|
||||
cl->buildList();
|
||||
retval = cl->matches( ents );
|
||||
|
||||
|
||||
@@ -19,8 +19,6 @@
|
||||
using namespace std;
|
||||
#include "Str.h"
|
||||
|
||||
#define FALSE 0
|
||||
#define TRUE 1
|
||||
#define LISTEND 999
|
||||
/** \def LISTEND
|
||||
* signifies that an OrList has gone beyond its last viable choice
|
||||
@@ -86,11 +84,11 @@ class EntNode {
|
||||
EntNode( const char ** ); ///< given a list, create a linked list of EntNodes
|
||||
~EntNode() { if ( next ) delete next; }
|
||||
operator const char *() { return name; }
|
||||
int operator== ( EntNode &ent )
|
||||
bool operator== ( EntNode &ent )
|
||||
{ return ( strcmp( name, ent.name ) == 0 ); }
|
||||
int operator< ( EntNode &ent )
|
||||
bool operator< ( EntNode &ent )
|
||||
{ return ( strcmp( name, ent.name ) < 0 ); }
|
||||
int operator> ( EntNode &ent )
|
||||
bool operator> ( EntNode &ent )
|
||||
{ return ( strcmp( name, ent.name ) > 0 ); }
|
||||
EntNode &operator= ( EntNode &ent );
|
||||
void Name( const char *nm ) { strncpy( name, nm, BUFSIZ-1 ); }
|
||||
@@ -98,11 +96,11 @@ class EntNode {
|
||||
void setmark( MarkType stamp=MARK ) { mark = stamp; }
|
||||
void markAll( MarkType=MARK );
|
||||
void unmarkAll() { markAll( NOMARK ); }
|
||||
int marked( MarkType base=ORMARK ) { return ( mark >= base ); }
|
||||
int allMarked(); ///< returns TRUE if all nodes in list are marked
|
||||
bool marked( MarkType base=ORMARK ) { return ( mark >= base ); }
|
||||
bool allMarked(); ///< returns true if all nodes in list are marked
|
||||
int unmarkedCount();
|
||||
int multSuprs() { return multSupers; }
|
||||
void multSuprs( int j ) { multSupers = j; }
|
||||
bool multSuprs() { return multSupers; }
|
||||
void multSuprs( bool j ) { multSupers = j; }
|
||||
void sort( EntNode ** );
|
||||
|
||||
EntNode *next;
|
||||
@@ -110,7 +108,7 @@ class EntNode {
|
||||
private:
|
||||
MarkType mark;
|
||||
char name[BUFSIZ];
|
||||
int multSupers; ///< do I correspond to an entity with >1 supertype?
|
||||
bool multSupers; ///< do I correspond to an entity with >1 supertype?
|
||||
EntNode *lastSmaller( EntNode * ); ///< used by ::sort()
|
||||
};
|
||||
|
||||
@@ -129,10 +127,10 @@ class EntList {
|
||||
virtual ~EntList() {}
|
||||
MatchType viableVal() { return viable; }
|
||||
virtual void setLevel( int l ) { level = l; }
|
||||
virtual int contains( char * ) =0;
|
||||
virtual int hit( char * ) =0;
|
||||
virtual bool contains( char * ) =0;
|
||||
virtual bool hit( char * ) =0;
|
||||
virtual MatchType matchNonORs( EntNode * ) { return UNKNOWN; }
|
||||
virtual int acceptChoice( EntNode * ) =0;
|
||||
virtual bool acceptChoice( EntNode * ) =0;
|
||||
virtual void unmarkAll( EntNode * ) =0;
|
||||
virtual void reset() { viable = UNKNOWN; }
|
||||
int siblings();
|
||||
@@ -176,10 +174,10 @@ class SimpleList : public EntList {
|
||||
int operator== ( const char *nm )
|
||||
{ return ( strcmp( name, nm ) == 0 ); }
|
||||
const char *Name() { return name; }
|
||||
int contains( char *nm ) { return *this == nm; }
|
||||
int hit( char *nm ) { return *this == nm; }
|
||||
bool contains( char *nm ) { return *this == nm; }
|
||||
bool hit( char *nm ) { return *this == nm; }
|
||||
MatchType matchNonORs( EntNode * );
|
||||
int acceptChoice( EntNode * );
|
||||
bool acceptChoice( EntNode * );
|
||||
void unmarkAll( EntNode * );
|
||||
void reset() { viable = UNKNOWN; I_marked = NOMARK; }
|
||||
|
||||
@@ -203,8 +201,8 @@ class MultList : public EntList {
|
||||
childList(0) {}
|
||||
~MultList();
|
||||
void setLevel( int );
|
||||
int contains( char * );
|
||||
int hit( char * );
|
||||
bool contains( char * );
|
||||
bool hit( char * );
|
||||
void appendList( EntList * );
|
||||
EntList *copyList( EntList * );
|
||||
virtual MatchType matchORs( EntNode * ) =0;
|
||||
@@ -214,7 +212,7 @@ class MultList : public EntList {
|
||||
EntList *getChild( int );
|
||||
EntList *getLast() { return ( getChild( numchildren-1 ) ); }
|
||||
void unmarkAll( EntNode * );
|
||||
int prevKnown( EntList * );
|
||||
bool prevKnown( EntList * desc );
|
||||
void reset();
|
||||
|
||||
protected:
|
||||
@@ -238,7 +236,7 @@ class JoinList : public MultList {
|
||||
JoinList( JoinType j ) : MultList(j) {}
|
||||
~JoinList() {}
|
||||
void setViableVal( EntNode * );
|
||||
int acceptChoice( EntNode * );
|
||||
bool acceptChoice( EntNode * ents );
|
||||
};
|
||||
|
||||
class AndOrList : public JoinList {
|
||||
@@ -266,12 +264,12 @@ class OrList : public MultList {
|
||||
public:
|
||||
OrList() : MultList( OR ), choice(-1), choice1(-2), choiceCount(0) {}
|
||||
~OrList() {}
|
||||
int hit( char * );
|
||||
bool hit( char * nm );
|
||||
MatchType matchORs( EntNode * );
|
||||
MatchType tryNext( EntNode * );
|
||||
void unmarkAll( EntNode * );
|
||||
int acceptChoice( EntNode * );
|
||||
int acceptNextChoice( EntNode *ents )
|
||||
bool acceptChoice( EntNode * );
|
||||
bool acceptNextChoice( EntNode *ents )
|
||||
{ choice++; return ( acceptChoice( ents ) ); }
|
||||
void reset() { choice = -1; choice1 = -2; choiceCount = 0; MultList::reset(); }
|
||||
|
||||
@@ -308,9 +306,9 @@ class ComplexList {
|
||||
* Based on knowledge that ComplexList always created by ANDing supertype
|
||||
* with subtypes.
|
||||
*/
|
||||
int toplevel( const char * );
|
||||
int contains( EntNode * );
|
||||
int matches( EntNode * );
|
||||
bool toplevel( const char * name );
|
||||
bool contains( EntNode * ents );
|
||||
bool matches( EntNode * );
|
||||
|
||||
EntNode *list; /**< List of all entities contained in this complex type,
|
||||
* regardless of how. (Used as a quick way of determining
|
||||
@@ -322,10 +320,10 @@ class ComplexList {
|
||||
|
||||
private:
|
||||
void addChildren( EntList * );
|
||||
int hitMultNodes( EntNode * );
|
||||
bool hitMultNodes( EntNode * ents );
|
||||
int abstract; ///< is our supertype abstract?
|
||||
int dependent; ///< is our supertype also a subtype of other supertype(s)?
|
||||
int multSupers; ///< am I a combo-CList created to test a subtype which has >1 supertypes?
|
||||
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.
|
||||
@@ -337,7 +335,7 @@ class ComplexCollect {
|
||||
void insert( ComplexList * );
|
||||
void remove( ComplexList * ); ///< Remove this list but don't delete its hierarchy structure, because it's used elsewhere.
|
||||
ComplexList *find( char * );
|
||||
int supports( EntNode * ) const;
|
||||
bool supports( EntNode * ) const;
|
||||
|
||||
ComplexList *clists;
|
||||
|
||||
|
||||
@@ -38,24 +38,24 @@ void ComplexList::remove()
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns TRUE if name is already contained at the top level of our
|
||||
* Returns true if name is already contained at the top level of our
|
||||
* EntList hierarchy. By top level, we mean the level under head. This
|
||||
* is a highly specialized function which is used during the building of
|
||||
* a temporary CList to test entities which are subtypes of >1 supertype.
|
||||
*/
|
||||
int ComplexList::toplevel( const char * name ) {
|
||||
bool ComplexList::toplevel( const char * name ) {
|
||||
EntList * slist = head->childList;
|
||||
|
||||
while( slist ) {
|
||||
if( *( SimpleList * )slist == name ) {
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
slist = slist->next;
|
||||
if( slist ) {
|
||||
slist = slist->next;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -137,7 +137,7 @@ void ComplexList::addChildren( EntList * ent ) {
|
||||
* tion is simplified greatly because both EntNodes are ordered alphabeti-
|
||||
* cally.
|
||||
*/
|
||||
int ComplexList::contains( EntNode * ents ) {
|
||||
bool ComplexList::contains( EntNode * ents ) {
|
||||
EntNode * ours = list, *theirs = ents;
|
||||
|
||||
while( theirs != NULL ) {
|
||||
@@ -147,37 +147,37 @@ int ComplexList::contains( EntNode * ents ) {
|
||||
if( ours == NULL || *ours > *theirs ) {
|
||||
// If either of these occured, we couldn't find one of ours which
|
||||
// matched the current "theirs".
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
theirs = theirs->next;
|
||||
ours = ours->next;
|
||||
}
|
||||
// At this point we must have matched them all. (We may have extra, but
|
||||
// there's nothing wrong with that.)
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Receives as input an EntNode list, corresponding to a user request to
|
||||
* instantiate the corresponding complex type. Returns TRUE if such a list
|
||||
* instantiate the corresponding complex type. Returns true if such a list
|
||||
* can be instantiated based on the list of EntLists which were generated
|
||||
* when the schema was read; FALSE otherwise.
|
||||
* when the schema was read; false otherwise.
|
||||
*/
|
||||
int ComplexList::matches( EntNode * ents ) {
|
||||
bool ComplexList::matches( EntNode * ents ) {
|
||||
MatchType retval, otherChoices = NEWCHOICE;
|
||||
int result = FALSE;
|
||||
bool result = false;
|
||||
|
||||
// First check if this ComplexList at least contains all the nodes of ents.
|
||||
// If it does, we'll search in detail. If not, we're done.
|
||||
if( ! contains( ents ) ) {
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
// Now start a thorough search through this ComplexList:
|
||||
if( ( retval = head->matchNonORs( ents ) ) == MATCHALL ) {
|
||||
result = TRUE;
|
||||
result = true;
|
||||
} else if( retval != UNKNOWN ) {
|
||||
result = FALSE;
|
||||
result = false;
|
||||
// UNKNOWN is the return val if there are ORs matchNonORs can't
|
||||
// analyze. Unless we got a MATCHALL already, that's our only hope.
|
||||
} else {
|
||||
@@ -186,7 +186,7 @@ int ComplexList::matches( EntNode * ents ) {
|
||||
// hitMultNodes() checks that in case we're a combo-CList (see
|
||||
// CColect->supports()) we have a legal choice (see comments in
|
||||
// hitMultNodes()).
|
||||
result = TRUE;
|
||||
result = true;
|
||||
} else if( retval >= MATCHSOME ) {
|
||||
// We have a partial answer. Check if other solutions exist (i.e.,
|
||||
// if there are OR's with other choices):
|
||||
@@ -194,7 +194,7 @@ int ComplexList::matches( EntNode * ents ) {
|
||||
otherChoices = head->tryNext( ents );
|
||||
if( otherChoices == MATCHALL ) {
|
||||
if( hitMultNodes( ents ) ) {
|
||||
result = TRUE;
|
||||
result = true;
|
||||
} else {
|
||||
otherChoices = NEWCHOICE;
|
||||
}
|
||||
@@ -222,7 +222,7 @@ int ComplexList::matches( EntNode * ents ) {
|
||||
* valid. (This function is actually slightly more complicated because it
|
||||
* also deals with the possibility that >1 entities like C exist.)
|
||||
*/
|
||||
int ComplexList::hitMultNodes( EntNode * ents ) {
|
||||
bool ComplexList::hitMultNodes( EntNode * ents ) {
|
||||
EntNode * node;
|
||||
EntList * child;
|
||||
|
||||
@@ -230,7 +230,7 @@ int ComplexList::hitMultNodes( EntNode * ents ) {
|
||||
// we have nothing to check for. (CList::matches() routinely checks for
|
||||
// hitMultNodes in case we're a combo.)
|
||||
if( !multSupers ) {
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
for( node = ents; node != NULL; node = node->next ) {
|
||||
@@ -246,7 +246,7 @@ int ComplexList::hitMultNodes( EntNode * ents ) {
|
||||
// below.
|
||||
if( child->contains( node->name ) ) {
|
||||
if( ! child->hit( node->name ) ) {
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
child = child->next;
|
||||
@@ -258,6 +258,6 @@ int ComplexList::hitMultNodes( EntNode * ents ) {
|
||||
}
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
// If we got here, we didn't find any unmatched complex subtypes.
|
||||
}
|
||||
|
||||
@@ -108,10 +108,10 @@ void SimpleList::unmarkAll( EntNode * ents ) {
|
||||
/**
|
||||
* Marks whichever node we can mark. We assume there is a match because
|
||||
* this function is only called by a parent MultList if its child had a
|
||||
* viable val of MATCHSOME. Return TRUE if we mark a previously unmarked
|
||||
* node; otherwise FALSE.
|
||||
* viable val of MATCHSOME. Return true if we mark a previously unmarked
|
||||
* node; otherwise false.
|
||||
*/
|
||||
int SimpleList::acceptChoice( EntNode * ents ) {
|
||||
bool SimpleList::acceptChoice( EntNode * ents ) {
|
||||
EntNode * eptr = ents;
|
||||
int comp;
|
||||
|
||||
@@ -122,15 +122,15 @@ int SimpleList::acceptChoice( EntNode * ents ) {
|
||||
I_marked = ORMARK;
|
||||
// Remember that we're the one who marked this. (Nec. in case
|
||||
// we have to unmark later to try out another OR branch.)
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
return FALSE; // we didn't mark
|
||||
return false; // we didn't mark
|
||||
}
|
||||
if( comp < 0 ) {
|
||||
// We're beyond name in the ents list. No more checking to do.
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
eptr = eptr->next;
|
||||
}
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -90,18 +90,18 @@ void EntNode::markAll( MarkType stamp ) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns TRUE if this and all nodes following it are marked.
|
||||
* Returns true if this and all nodes following it are marked.
|
||||
*/
|
||||
int EntNode::allMarked() {
|
||||
bool EntNode::allMarked() {
|
||||
EntNode * node = this;
|
||||
|
||||
while( node != NULL ) {
|
||||
if( node->mark == NOMARK ) {
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
node = node->next;
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+14
-14
@@ -43,22 +43,22 @@ void MultList::setLevel( int l ) {
|
||||
/**
|
||||
* Check if one of this's descendants matches nm.
|
||||
*/
|
||||
int MultList::contains( char * nm ) {
|
||||
bool MultList::contains( char * nm ) {
|
||||
EntList * child = childList;
|
||||
|
||||
while( child ) {
|
||||
if( child->contains( nm ) ) {
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
child = child->next;
|
||||
}
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if one of our descendants matches nm.
|
||||
*/
|
||||
int MultList::hit( char * nm ) {
|
||||
bool MultList::hit( char * nm ) {
|
||||
EntList * child = childList;
|
||||
while( child ) {
|
||||
if( child->viable > UNSATISFIED && child->hit( nm ) ) {
|
||||
@@ -67,11 +67,11 @@ int MultList::hit( char * nm ) {
|
||||
// thing. If child->join = AND, we must skip child. One of its
|
||||
// children may "hit" nm, but it wouldn't be valid because overall
|
||||
// child is an UNSAT.
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
child = child->next;
|
||||
}
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -205,12 +205,12 @@ void JoinList::setViableVal( EntNode * ents ) {
|
||||
|
||||
/**
|
||||
* Accept the path we're a part of: Mark all nodes of ents we can. Mark
|
||||
* value will = mark (either MARK or ORMARK). Return TRUE if we mark any-
|
||||
* thing; FALSE otherwise.
|
||||
* value will = mark (either MARK or ORMARK). Return true if we mark any-
|
||||
* thing; false otherwise.
|
||||
*/
|
||||
int JoinList::acceptChoice( EntNode * ents ) {
|
||||
bool JoinList::acceptChoice( EntNode * ents ) {
|
||||
EntList * child;
|
||||
int result = FALSE;
|
||||
bool result = false;
|
||||
|
||||
for( child = childList; child != NULL; child = child->next ) {
|
||||
if( child->viable >= MATCHSOME ) {
|
||||
@@ -226,7 +226,7 @@ int JoinList::acceptChoice( EntNode * ents ) {
|
||||
// MATCHSOME'd when we originally went through the hierarchy.)
|
||||
result = child->acceptChoice( ents ) || result;
|
||||
// (NOTE - must run acceptChoice() first in above line. If result
|
||||
// were TRUE and we ||'ed it with acceptChoice(), aC() would never
|
||||
// were true and we ||'ed it with acceptChoice(), aC() would never
|
||||
// be run.)
|
||||
}
|
||||
}
|
||||
@@ -238,14 +238,14 @@ int JoinList::acceptChoice( EntNode * ents ) {
|
||||
* (a pointer to one of the EntLists of childList) have viable = UNKNOWN.
|
||||
* Used in MatchNonORs() (see).
|
||||
*/
|
||||
int MultList::prevKnown( EntList * desc ) {
|
||||
bool MultList::prevKnown( EntList * desc ) {
|
||||
EntList * child = childList;
|
||||
|
||||
while( child != NULL && child != desc ) {
|
||||
if( child->viable == UNKNOWN ) {
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
child = child->next;
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ MatchType SimpleList::matchNonORs( EntNode * ents ) {
|
||||
while( eptr != NULL ) {
|
||||
if( ( comp = strcmp( name, eptr->name ) ) == 0 ) {
|
||||
if( ! eptr->marked( MARK ) ) {
|
||||
// NOTE - this cond also returns TRUE if eptr did have an OR-
|
||||
// NOTE - this cond also returns true if eptr did have an OR-
|
||||
// MARK. We don't want to remark now (since we're also trying
|
||||
// out OR choices -- we know this because no OR's are done
|
||||
// until after all the non-OR's). But, we do want to return
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
* context of a sub w/ >1 super, in which case we build a combo-CList and
|
||||
* may need to check if all sub-CLists matched the multi-sub, C.)
|
||||
*/
|
||||
int OrList::hit( char * nm ) {
|
||||
bool OrList::hit( char * nm ) {
|
||||
EntList * child = getChild( choice );
|
||||
|
||||
if( child ) {
|
||||
@@ -35,12 +35,12 @@ int OrList::hit( char * nm ) {
|
||||
while( child ) {
|
||||
if( child->viable > UNSATISFIED && child->hit( nm ) ) {
|
||||
// See MultList::hit() on why we must skip UNSATs.
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
child = child->next;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -61,7 +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.
|
||||
*/
|
||||
int OrList::acceptChoice( EntNode * ents )
|
||||
bool OrList::acceptChoice( EntNode * ents )
|
||||
{
|
||||
EntList * child;
|
||||
|
||||
@@ -71,8 +71,8 @@ int OrList::acceptChoice( EntNode * ents )
|
||||
child = getChild( choice );
|
||||
while( child ) {
|
||||
if( child->viable >= MATCHSOME && child->acceptChoice( ents ) ) {
|
||||
// acceptChoice() returns TRUE if we marked something.
|
||||
return TRUE;
|
||||
// acceptChoice() returns true if we marked something.
|
||||
return true;
|
||||
}
|
||||
child = child->next;
|
||||
choice++;
|
||||
@@ -80,5 +80,5 @@ int OrList::acceptChoice( EntNode * ents )
|
||||
// If we got here, we must have gotten to the end of the childList without
|
||||
// finding a choice which marks something.
|
||||
choice = LISTEND;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
+16
-16
@@ -67,9 +67,9 @@ void IStreamState( istream & in ) {
|
||||
// by any characters other than white space (i.e. EOF must happen)
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
int ReadInteger( SCLP23( Integer ) &val, istream & in, ErrorDescriptor * err,
|
||||
int ReadInteger( SDAI_Integer &val, istream & in, ErrorDescriptor * err,
|
||||
const char * tokenList ) {
|
||||
SCLP23( Integer ) i = 0;
|
||||
SDAI_Integer i = 0;
|
||||
in >> ws;
|
||||
in >> i;
|
||||
|
||||
@@ -84,7 +84,7 @@ int ReadInteger( SCLP23( Integer ) &val, istream & in, ErrorDescriptor * err,
|
||||
}
|
||||
|
||||
/// same as above but reads from a const char *
|
||||
int ReadInteger( SCLP23( Integer ) &val, const char * s, ErrorDescriptor * err,
|
||||
int ReadInteger( SDAI_Integer &val, const char * s, ErrorDescriptor * err,
|
||||
const char * tokenList ) {
|
||||
istringstream in( ( char * )s );
|
||||
return ReadInteger( val, in, err, tokenList );
|
||||
@@ -130,7 +130,7 @@ Severity IntValidLevel( const char * attrValue, ErrorDescriptor * err,
|
||||
CheckRemainingInput( in, err, "integer", tokenList );
|
||||
return err->severity();
|
||||
} else {
|
||||
SCLP23( Integer ) val = 0;
|
||||
SDAI_Integer val = 0;
|
||||
int valAssigned = ReadInteger( val, in, err, tokenList );
|
||||
if( !valAssigned && !optional ) {
|
||||
err->GreaterSeverity( SEVERITY_INCOMPLETE );
|
||||
@@ -139,7 +139,7 @@ Severity IntValidLevel( const char * attrValue, ErrorDescriptor * err,
|
||||
return err->severity();
|
||||
}
|
||||
|
||||
std::string WriteReal( SCLP23( Real ) val ) {
|
||||
std::string WriteReal( SDAI_Real val ) {
|
||||
char rbuf[64];
|
||||
std::string s;
|
||||
|
||||
@@ -178,7 +178,7 @@ std::string WriteReal( SCLP23( Real ) val ) {
|
||||
return s;
|
||||
}
|
||||
|
||||
void WriteReal( SCLP23( Real ) val, ostream & out ) {
|
||||
void WriteReal( SDAI_Real val, ostream & out ) {
|
||||
out << WriteReal( val );
|
||||
}
|
||||
|
||||
@@ -207,9 +207,9 @@ void WriteReal( SCLP23( Real ) val, ostream & out ) {
|
||||
// an error), optional sign, at least one decimal digit if there is an E.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
int ReadReal( SCLP23( Real ) &val, istream & in, ErrorDescriptor * err,
|
||||
int ReadReal( SDAI_Real &val, istream & in, ErrorDescriptor * err,
|
||||
const char * tokenList ) {
|
||||
SCLP23( Real ) d = 0;
|
||||
SDAI_Real d = 0;
|
||||
|
||||
// Read the real's value into a string so we can make sure it is properly
|
||||
// formatted. e.g. a decimal point is present. If you use the stream to
|
||||
@@ -309,7 +309,7 @@ int ReadReal( SCLP23( Real ) &val, istream & in, ErrorDescriptor * err,
|
||||
}
|
||||
|
||||
/// same as above but reads from a const char *
|
||||
int ReadReal( SCLP23( Real ) &val, const char * s, ErrorDescriptor * err,
|
||||
int ReadReal( SDAI_Real &val, const char * s, ErrorDescriptor * err,
|
||||
const char * tokenList ) {
|
||||
istringstream in( ( char * )s );
|
||||
return ReadReal( val, in, err, tokenList );
|
||||
@@ -355,7 +355,7 @@ Severity RealValidLevel( const char * attrValue, ErrorDescriptor * err,
|
||||
CheckRemainingInput( in, err, "real", tokenList );
|
||||
return err->severity();
|
||||
} else {
|
||||
SCLP23( Real ) val = 0;
|
||||
SDAI_Real val = 0;
|
||||
int valAssigned = ReadReal( val, in, err, tokenList );
|
||||
if( !valAssigned && !optional ) {
|
||||
err->GreaterSeverity( SEVERITY_INCOMPLETE );
|
||||
@@ -383,9 +383,9 @@ 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( SCLP23( Real ) &val, istream & in, ErrorDescriptor * err,
|
||||
int ReadNumber( SDAI_Real &val, istream & in, ErrorDescriptor * err,
|
||||
const char * tokenList ) {
|
||||
SCLP23( Real ) d = 0;
|
||||
SDAI_Real d = 0;
|
||||
in >> ws;
|
||||
in >> d;
|
||||
|
||||
@@ -399,7 +399,7 @@ int ReadNumber( SCLP23( Real ) &val, istream & in, ErrorDescriptor * err,
|
||||
}
|
||||
|
||||
/// same as above but reads from a const char *
|
||||
int ReadNumber( SCLP23( Real ) &val, const char * s, ErrorDescriptor * err,
|
||||
int ReadNumber( SDAI_Real &val, const char * s, ErrorDescriptor * err,
|
||||
const char * tokenList ) {
|
||||
istringstream in( ( char * )s );
|
||||
return ReadNumber( val, in, err, tokenList );
|
||||
@@ -446,7 +446,7 @@ Severity NumberValidLevel( const char * attrValue, ErrorDescriptor * err,
|
||||
CheckRemainingInput( in, err, "number", tokenList );
|
||||
return err->severity();
|
||||
} else {
|
||||
SCLP23( Real ) val = 0;
|
||||
SDAI_Real val = 0;
|
||||
int valAssigned = ReadNumber( val, in, err, tokenList );
|
||||
if( !valAssigned && !optional ) {
|
||||
err->GreaterSeverity( SEVERITY_INCOMPLETE );
|
||||
@@ -548,7 +548,7 @@ void PushPastAggr1Dim( istream & in, std::string & s, ErrorDescriptor * err ) {
|
||||
Severity FindStartOfInstance( istream & in, std::string & inst ) {
|
||||
char c = 0;
|
||||
ErrorDescriptor errs;
|
||||
SCLP23( String ) tmp;
|
||||
SDAI_String tmp;
|
||||
|
||||
while( in.good() ) {
|
||||
in >> c;
|
||||
@@ -580,7 +580,7 @@ Severity FindStartOfInstance( istream & in, std::string & inst ) {
|
||||
Severity SkipInstance( istream & in, std::string & inst ) {
|
||||
char c = 0;
|
||||
ErrorDescriptor errs;
|
||||
SCLP23( String ) tmp;
|
||||
SDAI_String tmp;
|
||||
|
||||
while( in.good() ) {
|
||||
in >> c;
|
||||
|
||||
@@ -11,32 +11,32 @@ extern void PrintErrorState(ErrorDescriptor &err);
|
||||
// print istream error information for debugging purposes
|
||||
extern void IStreamState(istream &in);
|
||||
|
||||
extern int ReadInteger(SCLP23(Integer) &val, istream &in, ErrorDescriptor *err,
|
||||
extern int ReadInteger(SDAI_Integer &val, istream &in, ErrorDescriptor *err,
|
||||
const char *tokenList);
|
||||
|
||||
extern int ReadInteger(SCLP23(Integer) &val, const char *s, ErrorDescriptor *err,
|
||||
extern int ReadInteger(SDAI_Integer &val, const char *s, ErrorDescriptor *err,
|
||||
const char *tokenList);
|
||||
|
||||
extern Severity IntValidLevel (const char *attrValue, ErrorDescriptor *err,
|
||||
int clearError, int optional, char *tokenList);
|
||||
|
||||
extern std::string WriteReal(SCLP23(Real) val );
|
||||
extern std::string WriteReal(SDAI_Real val );
|
||||
|
||||
extern void WriteReal(SCLP23(Real) val, ostream &out);
|
||||
extern void WriteReal(SDAI_Real val, ostream &out);
|
||||
|
||||
extern int ReadReal(SCLP23(Real) &val, istream &in, ErrorDescriptor *err,
|
||||
extern int ReadReal(SDAI_Real &val, istream &in, ErrorDescriptor *err,
|
||||
const char *tokenList);
|
||||
|
||||
extern int ReadReal(SCLP23(Real) &val, const char *s, ErrorDescriptor *err,
|
||||
extern int ReadReal(SDAI_Real &val, const char *s, ErrorDescriptor *err,
|
||||
const char *tokenList);
|
||||
|
||||
extern Severity RealValidLevel (const char *attrValue, ErrorDescriptor *err,
|
||||
int clearError, int optional, char *tokenList);
|
||||
|
||||
extern int ReadNumber(SCLP23(Real) &val, istream &in, ErrorDescriptor *err,
|
||||
extern int ReadNumber(SDAI_Real &val, istream &in, ErrorDescriptor *err,
|
||||
const char *tokenList);
|
||||
|
||||
extern int ReadNumber(SCLP23(Real) &val, const char *s, ErrorDescriptor *err,
|
||||
extern int ReadNumber(SDAI_Real &val, const char *s, ErrorDescriptor *err,
|
||||
const char *tokenList);
|
||||
|
||||
extern Severity NumberValidLevel (const char *attrValue, ErrorDescriptor *err,
|
||||
|
||||
@@ -5,6 +5,6 @@
|
||||
|
||||
const char * SCLversion = "STEP Class Library, github.com/mpictor/StepClassLibrary";
|
||||
|
||||
const SCLP23( Integer ) SCLP23( INT_NULL ) = LONG_MAX;
|
||||
const SCLP23( Real ) SCLP23( REAL_NULL ) = FLT_MIN;
|
||||
const SCLP23( Real ) SCLP23( NUMBER_NULL ) = FLT_MIN;
|
||||
const SDAI_Integer SDAI_INT_NULL = LONG_MAX;
|
||||
const SDAI_Real SDAI_REAL_NULL = FLT_MIN;
|
||||
const SDAI_Real SDAI_NUMBER_NULL = FLT_MIN;
|
||||
|
||||
+104
-104
@@ -25,7 +25,7 @@ extern const char *SCLversion;
|
||||
#include <ctype.h>
|
||||
#include <string>
|
||||
|
||||
#include <sclprefixes.h>
|
||||
|
||||
#include <dictdefs.h>
|
||||
|
||||
#include <baseType.h>
|
||||
@@ -56,106 +56,106 @@ class STEPattribute;
|
||||
#define S_STRING_NULL ""
|
||||
|
||||
|
||||
typedef long SCLP23_NAME(Integer);
|
||||
typedef short SCLP23_NAME(Short);
|
||||
typedef unsigned short SCLP23_NAME(UShort);
|
||||
typedef unsigned long SCLP23_NAME(ULong);
|
||||
typedef double SCLP23_NAME(Real);
|
||||
typedef long SDAI_Integer;
|
||||
typedef short SDAI_Short;
|
||||
typedef unsigned short SDAI_UShort;
|
||||
typedef unsigned long SDAI_ULong;
|
||||
typedef double SDAI_Real;
|
||||
|
||||
// C++ from values.h DAS PORT
|
||||
extern const SCLP23_NAME(Integer) SCLP23_NAME(INT_NULL);
|
||||
extern const SCLP23_NAME(Real) SCLP23_NAME(REAL_NULL);
|
||||
extern const SDAI_Integer SDAI_INT_NULL;
|
||||
extern const SDAI_Real SDAI_REAL_NULL;
|
||||
// arbitrary choice by me for number DAS
|
||||
extern const SCLP23_NAME(Real) SCLP23_NAME(NUMBER_NULL);
|
||||
extern const SDAI_Real SDAI_NUMBER_NULL;
|
||||
|
||||
|
||||
enum SCLP23_NAME(Access_type) {
|
||||
SCLP23_NAME(sdaiRO),
|
||||
SCLP23_NAME(sdaiRW),
|
||||
SCLP23_NAME(Access_type_unset)
|
||||
enum SDAI_Access_type {
|
||||
SDAI_sdaiRO,
|
||||
SDAI_sdaiRW,
|
||||
SDAI_Access_type_unset
|
||||
};
|
||||
|
||||
enum SCLP23_NAME(Commit_mode) {
|
||||
SCLP23_NAME(sdaiCOMMIT),
|
||||
SCLP23_NAME(sdaiABORT)
|
||||
enum SDAI_Commit_mode {
|
||||
SDAI_sdaiCOMMIT,
|
||||
SDAI_sdaiABORT
|
||||
} ;
|
||||
|
||||
enum SCLP23_NAME(AttrFlag) {
|
||||
SCLP23_NAME(sdaiSET),
|
||||
SCLP23_NAME(sdaiUNSET)
|
||||
enum SDAI_AttrFlag {
|
||||
SDAI_sdaiSET,
|
||||
SDAI_sdaiUNSET
|
||||
} ;
|
||||
|
||||
enum SCLP23_NAME(ImplementationClass) {
|
||||
SCLP23_NAME(sdaiCLASS1),
|
||||
SCLP23_NAME(sdaiCLASS2),
|
||||
SCLP23_NAME(sdaiCLASS3),
|
||||
SCLP23_NAME(sdaiCLASS4),
|
||||
SCLP23_NAME(sdaiCLASS5)
|
||||
enum SDAI_ImplementationClass {
|
||||
SDAI_sdaiCLASS1,
|
||||
SDAI_sdaiCLASS2,
|
||||
SDAI_sdaiCLASS3,
|
||||
SDAI_sdaiCLASS4,
|
||||
SDAI_sdaiCLASS5
|
||||
}; // conflict with part 22 EXPRESS:
|
||||
|
||||
enum SCLP23_NAME(Error_id) {
|
||||
enum SDAI_Error_id {
|
||||
//
|
||||
// error codes taken from 10303-23, Jan 28, 1997.
|
||||
// ISO TC184/SC4/WG11 N 004
|
||||
//
|
||||
SCLP23_NAME(sdaiNO_ERR) = 0, // No error
|
||||
SCLP23_NAME(sdaiSS_OPN) = 10, // Session open
|
||||
SCLP23_NAME(sdaiSS_NAVL) = 20, // Session not available
|
||||
SCLP23_NAME(sdaiSS_NOPN) = 30, // Session is not open
|
||||
SCLP23_NAME(sdaiRP_NEXS) = 40, // Repository does not exist
|
||||
SCLP23_NAME(sdaiRP_NAVL) = 50, // Repository not available
|
||||
SCLP23_NAME(sdaiRP_OPN) = 60, // Repository already opened
|
||||
SCLP23_NAME(sdaiRP_NOPN) = 70, // Repository is not open
|
||||
SCLP23_NAME(sdaiTR_EAB) = 80, // Transaction ended abnormally so it no longer exists
|
||||
SCLP23_NAME(sdaiTR_EXS) = 90, // Transaction exists
|
||||
SCLP23_NAME(sdaiTR_NAVL) = 100, // Transaction not available
|
||||
SCLP23_NAME(sdaiTR_RW) = 110, // Transaction read-write
|
||||
SCLP23_NAME(sdaiTR_NRW) = 120, // Transaction not read-write
|
||||
SCLP23_NAME(sdaiTR_NEXS) = 130, // Transaction does not exist
|
||||
SCLP23_NAME(sdaiMO_NDEQ) = 140, // SDAI-model not domain-equivalent
|
||||
SCLP23_NAME(sdaiMO_NEXS) = 150, // SDAI-model does not exist
|
||||
SCLP23_NAME(sdaiMO_NVLD) = 160, // SDAI-model invalid
|
||||
SCLP23_NAME(sdaiMO_DUP) = 170, // SDAI-model duplicate
|
||||
SCLP23_NAME(sdaiMX_NRW) = 180, // SDAI-model access not read-write
|
||||
SCLP23_NAME(sdaiMX_NDEF) = 190, // SDAI-model access is not defined
|
||||
SCLP23_NAME(sdaiMX_RW) = 200, // SDAI-model access read-write
|
||||
SCLP23_NAME(sdaiMX_RO) = 210, // SDAI-model access read-only
|
||||
SCLP23_NAME(sdaiSD_NDEF) = 220, // Schema definition is not defined
|
||||
SCLP23_NAME(sdaiED_NDEF) = 230, // Entity definition not defined
|
||||
SCLP23_NAME(sdaiED_NDEQ) = 240, // Entity definition not domain equivalent
|
||||
SCLP23_NAME(sdaiED_NVLD) = 250, // Entity definition invalid
|
||||
// SCLP23_NAME(sdaiED_NAVL) = 250, // Entity definition not available
|
||||
SCLP23_NAME(sdaiRU_NDEF) = 260, // Rule not defined
|
||||
SCLP23_NAME(sdaiEX_NSUP) = 270, // Expression evaluation not supported
|
||||
SCLP23_NAME(sdaiAT_NVLD) = 280, // Attribute invalid
|
||||
SCLP23_NAME(sdaiAT_NDEF) = 290, // Attribute not defined
|
||||
SCLP23_NAME(sdaiSI_DUP) = 300, // Schema instance duplicate
|
||||
SCLP23_NAME(sdaiSI_NEXS) = 310, // Schema instance does not exist
|
||||
SCLP23_NAME(sdaiEI_NEXS) = 320, // Entity instance does not exist
|
||||
SCLP23_NAME(sdaiEI_NAVL) = 330, // Entity instance not available
|
||||
SCLP23_NAME(sdaiEI_NVLD) = 340, // Entity instance invalid
|
||||
SCLP23_NAME(sdaiEI_NEXP) = 350, // Entity instance not exported
|
||||
SCLP23_NAME(sdaiSC_NEXS) = 360, // Scope does not exist
|
||||
SCLP23_NAME(sdaiSC_EXS) = 370, // Scope exists
|
||||
SCLP23_NAME(sdaiAI_NEXS) = 380, // Aggregate instance does not exist
|
||||
SCLP23_NAME(sdaiAI_NVLD) = 390, // Aggregate instance invalid
|
||||
SCLP23_NAME(sdaiAI_NSET) = 400, // Aggregate instance is empty
|
||||
SCLP23_NAME(sdaiVA_NVLD) = 410, // Value invalid
|
||||
SCLP23_NAME(sdaiVA_NEXS) = 420, // Value does not exist
|
||||
SCLP23_NAME(sdaiVA_NSET) = 430, // Value not set
|
||||
SCLP23_NAME(sdaiVT_NVLD) = 440, // Value type invalid
|
||||
SCLP23_NAME(sdaiIR_NEXS) = 450, // Iterator does not exist
|
||||
SCLP23_NAME(sdaiIR_NSET) = 460, // Current member is not defined
|
||||
SCLP23_NAME(sdaiIX_NVLD) = 470, // Index invalid
|
||||
SCLP23_NAME(sdaiER_NSET) = 480, // Event recording not set
|
||||
SCLP23_NAME(sdaiOP_NVLD) = 490, // Operator invalid
|
||||
SCLP23_NAME(sdaiFN_NAVL) = 500, // Function not available
|
||||
SCLP23_NAME(sdaiSY_ERR) = 1000 // Underlying system error
|
||||
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
|
||||
};
|
||||
|
||||
typedef char * SCLP23_NAME(Time_stamp);
|
||||
typedef char * SCLP23_NAME(Entity_name);
|
||||
typedef char * SCLP23_NAME(Schema_name);
|
||||
typedef char * SDAI_Time_stamp;
|
||||
typedef char * SDAI_Entity_name;
|
||||
typedef char * SDAI_Schema_name;
|
||||
|
||||
#include <sdaiString.h>
|
||||
|
||||
@@ -196,15 +196,15 @@ BOOLEAN and LOGICAL
|
||||
/******************************************************************************
|
||||
SELECT
|
||||
|
||||
Selects are represented as subclasses of the SCLP23(Select) class in
|
||||
Selects are represented as subclasses of the SDAI_Select class in
|
||||
sdaiSelect.h
|
||||
|
||||
******************************************************************************/
|
||||
#include <sdaiSelect.h>
|
||||
|
||||
class SCLP23_NAME(Model_contents);
|
||||
typedef SCLP23_NAME(Model_contents) * SCLP23_NAME(Model_contents_ptr);
|
||||
typedef SCLP23_NAME(Model_contents_ptr) SCLP23_NAME(Model_contents_var);
|
||||
class SDAI_Model_contents;
|
||||
typedef SDAI_Model_contents * SDAI_Model_contents_ptr;
|
||||
typedef SDAI_Model_contents_ptr SDAI_Model_contents_var;
|
||||
|
||||
#include <sdaiModel_contents_list.h>
|
||||
|
||||
@@ -214,34 +214,34 @@ typedef SCLP23_NAME(Model_contents_ptr) SCLP23_NAME(Model_contents_var);
|
||||
#include <sdaiModel_contents.h>
|
||||
|
||||
// ENTITY
|
||||
extern SCLP23(Application_instance) NilSTEPentity;
|
||||
extern SDAI_Application_instance NilSTEPentity;
|
||||
#define ENTITY_NULL &NilSTEPentity
|
||||
#define NULL_ENTITY &NilSTEPentity
|
||||
#define S_ENTITY_NULL &NilSTEPentity
|
||||
|
||||
|
||||
typedef SCLP23(Application_instance) STEPentity;
|
||||
typedef SCLP23(Application_instance)* STEPentity_ptr;
|
||||
typedef SDAI_Application_instance STEPentity;
|
||||
typedef SDAI_Application_instance* STEPentity_ptr;
|
||||
typedef STEPentity_ptr STEPentity_var;
|
||||
|
||||
typedef SCLP23(Application_instance)* STEPentityPtr;
|
||||
typedef SCLP23(Application_instance)* STEPentityH;
|
||||
typedef SDAI_Application_instance* STEPentityPtr;
|
||||
typedef SDAI_Application_instance* STEPentityH;
|
||||
|
||||
extern SCLP23(Application_instance) *
|
||||
extern SDAI_Application_instance *
|
||||
ReadEntityRef(istream &in, ErrorDescriptor *err, const char *tokenList,
|
||||
InstMgr * instances, int addFileId);
|
||||
|
||||
#define SdaiInteger SCLP23(Integer)
|
||||
#define SdaiReal SCLP23(Real)
|
||||
#define SdaiInteger SDAI_Integer
|
||||
#define SdaiReal SDAI_Real
|
||||
|
||||
#define STEPenumeration SCLP23(Enum)
|
||||
#define SdaiSelect SCLP23(Select)
|
||||
#define SdaiString SCLP23(String)
|
||||
#define SdaiBinary SCLP23(Binary)
|
||||
#define STEPenumeration SDAI_Enum
|
||||
#define SdaiSelect SDAI_Select
|
||||
#define SdaiString SDAI_String
|
||||
#define SdaiBinary SDAI_Binary
|
||||
|
||||
#define S_INT_NULL SCLP23(INT_NULL)
|
||||
#define S_REAL_NULL SCLP23(REAL_NULL)
|
||||
#define S_NUMBER_NULL SCLP23(NUMBER_NULL)
|
||||
#define S_INT_NULL SDAI_INT_NULL
|
||||
#define S_REAL_NULL SDAI_REAL_NULL
|
||||
#define S_NUMBER_NULL SDAI_NUMBER_NULL
|
||||
|
||||
/******************************************************************************
|
||||
AGGREGATE TYPES
|
||||
@@ -252,11 +252,11 @@ AGGREGATE TYPES
|
||||
|
||||
******************************************************************************/
|
||||
|
||||
inline SCLP23(BOOLEAN) *create_BOOLEAN() { return new SCLP23(BOOLEAN) ; }
|
||||
inline SDAI_BOOLEAN *create_BOOLEAN() { return new SDAI_BOOLEAN ; }
|
||||
|
||||
inline SCLP23(LOGICAL) *create_LOGICAL() { return new SCLP23(LOGICAL) ; }
|
||||
inline SDAI_LOGICAL *create_LOGICAL() { return new SDAI_LOGICAL ; }
|
||||
|
||||
// below is outdated
|
||||
typedef SCLP23(Select) * SdaiSelectH;
|
||||
typedef SDAI_Select * SdaiSelectH;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -16,12 +16,12 @@
|
||||
#include <STEPcomplex.h>
|
||||
#include <STEPattribute.h>
|
||||
|
||||
SCLP23( Application_instance ) NilSTEPentity;
|
||||
SDAI_Application_instance NilSTEPentity;
|
||||
|
||||
/**************************************************************//**
|
||||
** \file sdaiApplication_instance.cc Functions for manipulating entities
|
||||
**
|
||||
** KNOWN BUGs: the SCLP23(Application_instance) is not aware of the STEPfile;
|
||||
** KNOWN BUGs: the SDAI_Application_instance is not aware of the STEPfile;
|
||||
** therefore it can not read comments which may be embedded in the instance.
|
||||
** The following are known problems:
|
||||
** -- does not handle comments embedded in an instance ==> bombs
|
||||
@@ -29,16 +29,16 @@ SCLP23( Application_instance ) NilSTEPentity;
|
||||
** -- error reporting does not include line number information
|
||||
*/
|
||||
|
||||
SCLP23( Application_instance )::SCLP23_NAME( Application_instance )()
|
||||
SDAI_Application_instance::SDAI_Application_instance()
|
||||
: _cur( 0 ), STEPfile_id( 0 ), headMiEntity( 0 ), nextMiEntity( 0 ),
|
||||
_complex( 0 ) {
|
||||
}
|
||||
|
||||
SCLP23( Application_instance )::SCLP23_NAME( Application_instance )( int fileid, int complex )
|
||||
SDAI_Application_instance::SDAI_Application_instance( int fileid, int complex )
|
||||
: _cur( 0 ), STEPfile_id( fileid ), headMiEntity( 0 ), nextMiEntity( 0 ), _complex( complex ) {
|
||||
}
|
||||
|
||||
SCLP23( Application_instance )::~SCLP23_NAME( Application_instance )() {
|
||||
SDAI_Application_instance::~SDAI_Application_instance() {
|
||||
ResetAttributes();
|
||||
|
||||
if( MultipleInheritance() ) {
|
||||
@@ -46,13 +46,13 @@ SCLP23( Application_instance )::~SCLP23_NAME( Application_instance )() {
|
||||
}
|
||||
}
|
||||
|
||||
SCLP23( Application_instance ) * SCLP23( Application_instance )::Replicate() {
|
||||
SDAI_Application_instance * SDAI_Application_instance::Replicate() {
|
||||
char errStr[BUFSIZ];
|
||||
if( IsComplex() ) {
|
||||
cerr << "STEPcomplex::Replicate() should be called: " << __FILE__
|
||||
<< __LINE__ << "\n" << _POC_ "\n";
|
||||
sprintf( errStr,
|
||||
"SCLP23(Application_instance)::Replicate(): %s - entity #%d.\n",
|
||||
"SDAI_Application_instance::Replicate(): %s - entity #%d.\n",
|
||||
"Programming ERROR - STEPcomplex::Replicate() should be called",
|
||||
STEPfile_id );
|
||||
_error.AppendToDetailMsg( errStr );
|
||||
@@ -60,13 +60,13 @@ SCLP23( Application_instance ) * SCLP23( Application_instance )::Replicate() {
|
||||
_error.GreaterSeverity( SEVERITY_BUG );
|
||||
return S_ENTITY_NULL;
|
||||
} else {
|
||||
SCLP23( Application_instance ) *seNew = eDesc->NewSTEPentity();
|
||||
SDAI_Application_instance *seNew = eDesc->NewSTEPentity();
|
||||
seNew -> CopyAs( this );
|
||||
return seNew;
|
||||
}
|
||||
}
|
||||
|
||||
void SCLP23( Application_instance )::AddP21Comment( const char * s, bool replace ) {
|
||||
void SDAI_Application_instance::AddP21Comment( const char * s, bool replace ) {
|
||||
if( replace ) {
|
||||
p21Comment.clear();
|
||||
}
|
||||
@@ -78,7 +78,7 @@ void SCLP23( Application_instance )::AddP21Comment( const char * s, bool replace
|
||||
}
|
||||
}
|
||||
|
||||
void SCLP23( Application_instance )::AddP21Comment( const std::string & s, bool replace ) {
|
||||
void SDAI_Application_instance::AddP21Comment( const std::string & s, bool replace ) {
|
||||
if( replace ) {
|
||||
p21Comment.clear();
|
||||
}
|
||||
@@ -88,23 +88,23 @@ void SCLP23( Application_instance )::AddP21Comment( const std::string & s, bool
|
||||
p21Comment.append( s );
|
||||
}
|
||||
|
||||
void SCLP23( Application_instance )::STEPwrite_reference( ostream & out ) {
|
||||
void SDAI_Application_instance::STEPwrite_reference( ostream & out ) {
|
||||
out << "#" << STEPfile_id;
|
||||
}
|
||||
|
||||
const char * SCLP23( Application_instance )::STEPwrite_reference( std::string & buf ) {
|
||||
const char * SDAI_Application_instance::STEPwrite_reference( std::string & buf ) {
|
||||
char tmp[64];
|
||||
sprintf( tmp, "#%d", STEPfile_id );
|
||||
buf = tmp;
|
||||
return const_cast<char *>( buf.c_str() );
|
||||
}
|
||||
|
||||
void SCLP23( Application_instance )::AppendMultInstance( SCLP23( Application_instance ) *se ) {
|
||||
void SDAI_Application_instance::AppendMultInstance( SDAI_Application_instance *se ) {
|
||||
if( nextMiEntity == 0 ) {
|
||||
nextMiEntity = se;
|
||||
} else {
|
||||
SCLP23( Application_instance ) *link = nextMiEntity;
|
||||
SCLP23( Application_instance ) *linkTrailing = 0;
|
||||
SDAI_Application_instance *link = nextMiEntity;
|
||||
SDAI_Application_instance *linkTrailing = 0;
|
||||
while( link ) {
|
||||
linkTrailing = link;
|
||||
link = link->nextMiEntity;
|
||||
@@ -115,7 +115,7 @@ void SCLP23( Application_instance )::AppendMultInstance( SCLP23( Application_ins
|
||||
|
||||
// BUG implement this -- FIXME function is never used
|
||||
|
||||
SCLP23( Application_instance ) * SCLP23( Application_instance )::GetMiEntity( char * EntityName ) {
|
||||
SDAI_Application_instance * SDAI_Application_instance::GetMiEntity( char * EntityName ) {
|
||||
std::string s1, s2;
|
||||
|
||||
const EntityDescLinkNode * edln = 0;
|
||||
@@ -142,7 +142,7 @@ SCLP23( Application_instance ) * SCLP23( Application_instance )::GetMiEntity( ch
|
||||
|
||||
|
||||
|
||||
STEPattribute * SCLP23( Application_instance )::GetSTEPattribute( const char * nm ) {
|
||||
STEPattribute * SDAI_Application_instance::GetSTEPattribute( const char * nm ) {
|
||||
if( !nm ) {
|
||||
return 0;
|
||||
}
|
||||
@@ -157,7 +157,7 @@ STEPattribute * SCLP23( Application_instance )::GetSTEPattribute( const char * n
|
||||
return a;
|
||||
}
|
||||
|
||||
STEPattribute * SCLP23( Application_instance )::MakeRedefined( STEPattribute * redefiningAttr, const char * nm ) {
|
||||
STEPattribute * SDAI_Application_instance::MakeRedefined( STEPattribute * redefiningAttr, const char * nm ) {
|
||||
// find the attribute being redefined
|
||||
STEPattribute * a = GetSTEPattribute( nm );
|
||||
|
||||
@@ -168,7 +168,7 @@ STEPattribute * SCLP23( Application_instance )::MakeRedefined( STEPattribute * r
|
||||
return a;
|
||||
}
|
||||
|
||||
STEPattribute * SCLP23( Application_instance )::MakeDerived( const char * nm ) {
|
||||
STEPattribute * SDAI_Application_instance::MakeDerived( const char * nm ) {
|
||||
STEPattribute * a = GetSTEPattribute( nm );
|
||||
if( a ) {
|
||||
a ->Derive();
|
||||
@@ -176,7 +176,7 @@ STEPattribute * SCLP23( Application_instance )::MakeDerived( const char * nm ) {
|
||||
return a;
|
||||
}
|
||||
|
||||
void SCLP23( Application_instance )::CopyAs( SCLP23( Application_instance ) * other ) {
|
||||
void SDAI_Application_instance::CopyAs( SDAI_Application_instance * other ) {
|
||||
int numAttrs = AttributeCount();
|
||||
ResetAttributes();
|
||||
other -> ResetAttributes();
|
||||
@@ -191,22 +191,22 @@ void SCLP23( Application_instance )::CopyAs( SCLP23( Application_instance ) * ot
|
||||
}
|
||||
|
||||
|
||||
const char * SCLP23( Application_instance )::EntityName( const char * schnm ) const {
|
||||
const char * SDAI_Application_instance::EntityName( const char * schnm ) const {
|
||||
return eDesc->Name( schnm );
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if a given SCLP23(Application_instance) is the same
|
||||
* Checks if a given SDAI_Application_instance is the same
|
||||
* type as this one
|
||||
*/
|
||||
const EntityDescriptor * SCLP23( Application_instance )::IsA( const EntityDescriptor * ed ) const {
|
||||
const EntityDescriptor * SDAI_Application_instance::IsA( const EntityDescriptor * ed ) const {
|
||||
return ( eDesc->IsA( ed ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks the validity of the current attribute values for the entity
|
||||
*/
|
||||
Severity SCLP23( Application_instance )::ValidLevel( ErrorDescriptor * error, InstMgr * im,
|
||||
Severity SDAI_Application_instance::ValidLevel( ErrorDescriptor * error, InstMgr * im,
|
||||
int clearError ) {
|
||||
ErrorDescriptor err;
|
||||
if( clearError ) {
|
||||
@@ -225,7 +225,7 @@ Severity SCLP23( Application_instance )::ValidLevel( ErrorDescriptor * error, In
|
||||
/**
|
||||
* clears all attr's errors
|
||||
*/
|
||||
void SCLP23( Application_instance )::ClearAttrError() {
|
||||
void SDAI_Application_instance::ClearAttrError() {
|
||||
int n = attributes.list_length();
|
||||
for( int i = 0 ; i < n; i++ ) {
|
||||
attributes[i].Error().ClearErrorMsg();
|
||||
@@ -235,7 +235,7 @@ void SCLP23( Application_instance )::ClearAttrError() {
|
||||
/**
|
||||
* clears entity's error and optionally all attr's errors
|
||||
*/
|
||||
void SCLP23( Application_instance )::ClearError( int clearAttrs ) {
|
||||
void SDAI_Application_instance::ClearError( int clearAttrs ) {
|
||||
_error.ClearErrorMsg();
|
||||
if( clearAttrs ) {
|
||||
ClearAttrError();
|
||||
@@ -248,7 +248,7 @@ void SCLP23( Application_instance )::ClearError( int clearAttrs ) {
|
||||
** Side Effects: writes out the SCOPE section for an entity
|
||||
** Status: stub FIXME
|
||||
*******************************************************************/
|
||||
void SCLP23( Application_instance )::beginSTEPwrite( ostream & out ) {
|
||||
void SDAI_Application_instance::beginSTEPwrite( ostream & out ) {
|
||||
out << "begin STEPwrite ... \n" ;
|
||||
out.flush();
|
||||
|
||||
@@ -269,7 +269,7 @@ void SCLP23( Application_instance )::beginSTEPwrite( ostream & out ) {
|
||||
** Problems: does not print out the SCOPE section of an entity
|
||||
**
|
||||
*******************************************************************/
|
||||
void SCLP23( Application_instance )::STEPwrite( ostream & out, const char * currSch,
|
||||
void SDAI_Application_instance::STEPwrite( ostream & out, const char * currSch,
|
||||
int writeComments ) {
|
||||
std::string tmp;
|
||||
if( writeComments && !p21Comment.empty() ) {
|
||||
@@ -290,12 +290,12 @@ void SCLP23( Application_instance )::STEPwrite( ostream & out, const char * curr
|
||||
out << ");\n";
|
||||
}
|
||||
|
||||
void SCLP23( Application_instance )::endSTEPwrite( ostream & out ) {
|
||||
void SDAI_Application_instance::endSTEPwrite( ostream & out ) {
|
||||
out << "end STEPwrite ... \n" ;
|
||||
out.flush();
|
||||
}
|
||||
|
||||
void SCLP23( Application_instance )::WriteValuePairs( ostream & out,
|
||||
void SDAI_Application_instance::WriteValuePairs( ostream & out,
|
||||
const char * currSch,
|
||||
int writeComments, int mixedCase ) {
|
||||
std::string s, tmp, tmp2;
|
||||
@@ -334,7 +334,7 @@ void SCLP23( Application_instance )::WriteValuePairs( ostream & out,
|
||||
/**************************************************************//**
|
||||
** Problems: does not print out the SCOPE section of an entity
|
||||
******************************************************************/
|
||||
const char * SCLP23( Application_instance )::STEPwrite( std::string & buf, const char * currSch ) {
|
||||
const char * SDAI_Application_instance::STEPwrite( std::string & buf, const char * currSch ) {
|
||||
buf.clear();
|
||||
|
||||
char instanceInfo[BUFSIZ];
|
||||
@@ -359,7 +359,7 @@ const char * SCLP23( Application_instance )::STEPwrite( std::string & buf, const
|
||||
return const_cast<char *>( buf.c_str() );
|
||||
}
|
||||
|
||||
void SCLP23( Application_instance )::PrependEntityErrMsg() {
|
||||
void SDAI_Application_instance::PrependEntityErrMsg() {
|
||||
char errStr[BUFSIZ];
|
||||
errStr[0] = '\0';
|
||||
|
||||
@@ -378,7 +378,7 @@ void SCLP23( Application_instance )::PrependEntityErrMsg() {
|
||||
** instance. i.e. a close quote followed by a semicolon optionally having
|
||||
** whitespace between them.
|
||||
******************************************************************/
|
||||
void SCLP23( Application_instance )::STEPread_error( char c, int i, istream & in ) {
|
||||
void SDAI_Application_instance::STEPread_error( char c, int i, istream & in ) {
|
||||
char errStr[BUFSIZ];
|
||||
errStr[0] = '\0';
|
||||
|
||||
@@ -424,7 +424,7 @@ void SCLP23( Application_instance )::STEPread_error( char c, int i, istream & in
|
||||
** Side Effects: gobbles up input stream
|
||||
** Status:
|
||||
******************************************************************/
|
||||
Severity SCLP23( Application_instance )::STEPread( int id, int idIncr,
|
||||
Severity SDAI_Application_instance::STEPread( int id, int idIncr,
|
||||
InstMgr * instance_set, istream & in,
|
||||
const char * currSch, int useTechCor ) {
|
||||
STEPfile_id = id;
|
||||
@@ -576,8 +576,8 @@ Severity SCLP23( Application_instance )::STEPread( int id, int idIncr,
|
||||
return _error.severity();
|
||||
}
|
||||
|
||||
/// read an entity reference and return a pointer to the SCLP23(Application_instance)
|
||||
SCLP23( Application_instance ) * ReadEntityRef( istream & in, ErrorDescriptor * err, const char * tokenList,
|
||||
/// 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 ) {
|
||||
char c;
|
||||
char errStr[BUFSIZ];
|
||||
@@ -620,8 +620,8 @@ SCLP23( Application_instance ) * ReadEntityRef( istream & in, ErrorDescriptor *
|
||||
}
|
||||
|
||||
// lookup which object has id as its instance id
|
||||
SCLP23( Application_instance )* inst;
|
||||
/* If there is a ManagerNode it should have a SCLP23(Application_instance) */
|
||||
SDAI_Application_instance* inst;
|
||||
/* If there is a ManagerNode it should have a SDAI_Application_instance */
|
||||
MgrNode * mn = 0;
|
||||
mn = instances->FindFileId( id );
|
||||
if( mn ) {
|
||||
@@ -660,15 +660,15 @@ SCLP23( Application_instance ) * ReadEntityRef( istream & in, ErrorDescriptor *
|
||||
}
|
||||
}
|
||||
|
||||
/// read an entity reference and return a pointer to the SCLP23(Application_instance)
|
||||
SCLP23( Application_instance ) * ReadEntityRef( const char * s, ErrorDescriptor * err, const char * tokenList,
|
||||
/// 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 ) {
|
||||
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( SCLP23( Application_instance ) *se,
|
||||
Severity EntityValidLevel( SDAI_Application_instance *se,
|
||||
const TypeDescriptor * ed, // entity type that entity se needs
|
||||
// to match. (this must be an
|
||||
// EntityDescriptor)
|
||||
@@ -691,7 +691,7 @@ Severity EntityValidLevel( SCLP23( Application_instance ) *se,
|
||||
err->GreaterSeverity( SEVERITY_BUG );
|
||||
sprintf( messageBuf,
|
||||
" BUG: EntityValidLevel() called with null pointer %s\n",
|
||||
"for SCLP23(Application_instance) argument." );
|
||||
"for SDAI_Application_instance argument." );
|
||||
err->AppendToUserMsg( messageBuf );
|
||||
err->AppendToDetailMsg( messageBuf );
|
||||
cerr << "Internal error: " << __FILE__ << __LINE__
|
||||
@@ -727,7 +727,7 @@ Severity EntityValidLevel( SCLP23( Application_instance ) *se,
|
||||
} else {
|
||||
err->GreaterSeverity( SEVERITY_BUG );
|
||||
sprintf( messageBuf,
|
||||
" BUG: EntityValidLevel(): SCLP23(Application_instance) #%d has a %s",
|
||||
" BUG: EntityValidLevel(): SDAI_Application_instance #%d has a %s",
|
||||
se->STEPfile_id, "missing or invalid EntityDescriptor\n" );
|
||||
err->AppendToUserMsg( messageBuf );
|
||||
err->AppendToDetailMsg( messageBuf );
|
||||
@@ -792,7 +792,7 @@ Severity EntityValidLevel( const char * attrValue, // string contain entity ref
|
||||
}
|
||||
mn = im->FindFileId( fileId );
|
||||
if( mn ) {
|
||||
SCLP23( Application_instance ) *se = mn->GetSTEPentity();
|
||||
SDAI_Application_instance *se = mn->GetSTEPentity();
|
||||
return EntityValidLevel( se, ed, err );
|
||||
} else {
|
||||
sprintf( messageBuf,
|
||||
@@ -824,7 +824,7 @@ Severity EntityValidLevel( const char * attrValue, // string contain entity ref
|
||||
** Status: untested 7/31/90
|
||||
** \Returns reference to an attribute pointer
|
||||
******************************************************************/
|
||||
STEPattribute * SCLP23( Application_instance )::NextAttribute() {
|
||||
STEPattribute * SDAI_Application_instance::NextAttribute() {
|
||||
int i = AttributeCount();
|
||||
++_cur;
|
||||
if( i < _cur ) {
|
||||
@@ -834,6 +834,6 @@ STEPattribute * SCLP23( Application_instance )::NextAttribute() {
|
||||
|
||||
}
|
||||
|
||||
int SCLP23( Application_instance )::AttributeCount() {
|
||||
int SDAI_Application_instance::AttributeCount() {
|
||||
return attributes.list_length();
|
||||
}
|
||||
|
||||
@@ -14,9 +14,9 @@
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// SCLP23(Application_instance) used to be STEPentity
|
||||
// SDAI_Application_instance used to be STEPentity
|
||||
|
||||
class SCLP23_NAME(Application_instance) : public SCLP23_NAME(DAObject_SDAI)
|
||||
class SDAI_Application_instance : public SDAI_DAObject_SDAI
|
||||
{
|
||||
private:
|
||||
int _cur; // provides a built-in way of accessing attributes in order.
|
||||
@@ -31,22 +31,22 @@ class SCLP23_NAME(Application_instance) : public SCLP23_NAME(DAObject_SDAI)
|
||||
|
||||
/**
|
||||
** head entity for multiple inheritance. If it is null then this
|
||||
** SCLP23_NAME(Application_instance) is not part of a multiply inherited entity. If it
|
||||
** points to a SCLP23_NAME(Application_instance) then this SCLP23_NAME(Application_instance) is part of a mi entity
|
||||
** and head points at the root SCLP23_NAME(Application_instance) of the primary inheritance
|
||||
** 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).
|
||||
*/
|
||||
SCLP23_NAME(Application_instance) *headMiEntity;
|
||||
SDAI_Application_instance *headMiEntity;
|
||||
/// these form a chain of other entity parents for multiple inheritance
|
||||
SCLP23_NAME(Application_instance) *nextMiEntity;
|
||||
SDAI_Application_instance *nextMiEntity;
|
||||
|
||||
protected:
|
||||
int _complex;
|
||||
|
||||
public:
|
||||
SCLP23_NAME(Application_instance) ();
|
||||
SCLP23_NAME(Application_instance) (int fileid, int complex = 0);
|
||||
virtual ~SCLP23_NAME(Application_instance)();
|
||||
SDAI_Application_instance ();
|
||||
SDAI_Application_instance (int fileid, int complex = 0);
|
||||
virtual ~SDAI_Application_instance();
|
||||
|
||||
int IsComplex() const { return _complex; }
|
||||
|
||||
@@ -71,7 +71,7 @@ class SCLP23_NAME(Application_instance) : public SCLP23_NAME(DAObject_SDAI)
|
||||
// clears all attr's errors
|
||||
void ClearAttrError();
|
||||
|
||||
virtual SCLP23_NAME(Application_instance) *Replicate();
|
||||
virtual SDAI_Application_instance *Replicate();
|
||||
|
||||
// ACCESS attributes in order.
|
||||
int AttributeCount();
|
||||
@@ -102,12 +102,12 @@ class SCLP23_NAME(Application_instance) : public SCLP23_NAME(DAObject_SDAI)
|
||||
// MULTIPLE INHERITANCE
|
||||
int MultipleInheritance() { return !(headMiEntity == 0); }
|
||||
|
||||
void HeadEntity(SCLP23_NAME(Application_instance) *se) { headMiEntity = se; }
|
||||
SCLP23_NAME(Application_instance) * HeadEntity() { return headMiEntity; }
|
||||
void HeadEntity(SDAI_Application_instance *se) { headMiEntity = se; }
|
||||
SDAI_Application_instance * HeadEntity() { return headMiEntity; }
|
||||
|
||||
SCLP23_NAME(Application_instance) *GetNextMiEntity() { return nextMiEntity; }
|
||||
SCLP23_NAME(Application_instance) *GetMiEntity(char *EntityName);
|
||||
void AppendMultInstance(SCLP23_NAME(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 *);
|
||||
@@ -115,12 +115,12 @@ class SCLP23_NAME(Application_instance) : public SCLP23_NAME(DAObject_SDAI)
|
||||
STEPattribute * MakeRedefined (STEPattribute *redefiningAttr,
|
||||
const char * nm);
|
||||
|
||||
virtual void CopyAs (SCLP23_NAME(Application_instance) *);
|
||||
virtual void CopyAs (SDAI_Application_instance *);
|
||||
void PrependEntityErrMsg();
|
||||
};
|
||||
|
||||
// current style of CORBA handles for Part 23 - NOTE - used for more than CORBA
|
||||
typedef SCLP23_NAME(Application_instance)* SCLP23_NAME(Application_instance_ptr);
|
||||
typedef SCLP23_NAME(Application_instance_ptr) SCLP23_NAME(Application_instance_var);
|
||||
typedef SDAI_Application_instance* SDAI_Application_instance_ptr;
|
||||
typedef SDAI_Application_instance_ptr SDAI_Application_instance_var;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -16,12 +16,12 @@ extern Severity CheckRemainingInput( istream & in, ErrorDescriptor * err,
|
||||
const char * typeName, // used in error message
|
||||
const char * tokenList ); // e.g. ",)"
|
||||
|
||||
SCLP23( Binary ) & SCLP23( Binary )::operator= ( const char * s ) {
|
||||
SDAI_Binary & SDAI_Binary::operator= ( const char * s ) {
|
||||
std::string::operator= ( s );
|
||||
return *this;
|
||||
}
|
||||
|
||||
void SCLP23( Binary )::STEPwrite( ostream & out ) const {
|
||||
void SDAI_Binary::STEPwrite( ostream & out ) const {
|
||||
const char * str = 0;
|
||||
if( empty() ) {
|
||||
out << "$";
|
||||
@@ -36,7 +36,7 @@ void SCLP23( Binary )::STEPwrite( ostream & out ) const {
|
||||
}
|
||||
}
|
||||
|
||||
const char * SCLP23( Binary )::STEPwrite( std::string & s ) const {
|
||||
const char * SDAI_Binary::STEPwrite( std::string & s ) const {
|
||||
const char * str = 0;
|
||||
if( empty() ) {
|
||||
s = "$";
|
||||
@@ -52,7 +52,7 @@ const char * SCLP23( Binary )::STEPwrite( std::string & s ) const {
|
||||
return const_cast<char *>( s.c_str() );
|
||||
}
|
||||
|
||||
Severity SCLP23( Binary )::ReadBinary( istream & in, ErrorDescriptor * err, int AssignVal,
|
||||
Severity SDAI_Binary::ReadBinary( istream & in, ErrorDescriptor * err, int AssignVal,
|
||||
int needDelims ) {
|
||||
if( AssignVal ) {
|
||||
clear();
|
||||
@@ -123,7 +123,7 @@ Severity SCLP23( Binary )::ReadBinary( istream & in, ErrorDescriptor * err, int
|
||||
return err->severity();
|
||||
}
|
||||
|
||||
Severity SCLP23( Binary )::StrToVal( const char * s, ErrorDescriptor * err ) {
|
||||
Severity SDAI_Binary::StrToVal( const char * s, ErrorDescriptor * err ) {
|
||||
istringstream in( ( char * )s ); // sz defaults to length of s
|
||||
return ReadBinary( in, err, 1, 0 );
|
||||
}
|
||||
@@ -131,11 +131,11 @@ Severity SCLP23( Binary )::StrToVal( const char * s, ErrorDescriptor * err ) {
|
||||
/////////////////////////////////////////////////
|
||||
|
||||
/// reads a binary in exchange file format delimited by double quotes
|
||||
Severity SCLP23( Binary )::STEPread( istream & in, ErrorDescriptor * err ) {
|
||||
Severity SDAI_Binary::STEPread( istream & in, ErrorDescriptor * err ) {
|
||||
return ReadBinary( in, err, 1, 1 );
|
||||
}
|
||||
|
||||
Severity SCLP23( Binary )::STEPread( const char * s, ErrorDescriptor * err ) {
|
||||
Severity SDAI_Binary::STEPread( const char * s, ErrorDescriptor * err ) {
|
||||
istringstream in( ( char * )s );
|
||||
return STEPread( in, err );
|
||||
}
|
||||
@@ -159,7 +159,7 @@ Severity SCLP23( Binary )::STEPread( const char * s, ErrorDescriptor * err ) {
|
||||
** null then attrValue must only contain a valid value and nothing else
|
||||
** following.
|
||||
******************************************************************************/
|
||||
Severity SCLP23( Binary )::BinaryValidLevel( istream & in, ErrorDescriptor * err,
|
||||
Severity SDAI_Binary::BinaryValidLevel( istream & in, ErrorDescriptor * err,
|
||||
int optional, char * tokenList,
|
||||
int needDelims, int clearError ) {
|
||||
if( clearError ) {
|
||||
@@ -194,7 +194,7 @@ Severity SCLP23( Binary )::BinaryValidLevel( istream & in, ErrorDescriptor * err
|
||||
return err->severity();
|
||||
}
|
||||
|
||||
Severity SCLP23( Binary )::BinaryValidLevel( const char * value, ErrorDescriptor * err,
|
||||
Severity SDAI_Binary::BinaryValidLevel( const char * value, ErrorDescriptor * err,
|
||||
int optional, char * tokenList,
|
||||
int needDelims, int clearError ) {
|
||||
istringstream in( ( char * )value );
|
||||
|
||||
@@ -13,21 +13,21 @@
|
||||
* and is not subject to copyright.
|
||||
*/
|
||||
|
||||
class SCLP23_NAME(Binary) : public std::string
|
||||
class SDAI_Binary : public std::string
|
||||
{
|
||||
public:
|
||||
|
||||
//constructor(s) & destructor
|
||||
SCLP23_NAME(Binary) (const char * str = 0, int max =0)
|
||||
SDAI_Binary (const char * str = 0, int max =0)
|
||||
: std::string (str,max) { }
|
||||
|
||||
SCLP23_NAME(Binary) (const std::string& s) : std::string (s) { }
|
||||
SDAI_Binary (const std::string& s) : std::string (s) { }
|
||||
|
||||
|
||||
~SCLP23_NAME(Binary) () { }
|
||||
~SDAI_Binary () { }
|
||||
|
||||
// operators
|
||||
SCLP23_NAME(Binary)& operator= (const char* s);
|
||||
SDAI_Binary& operator= (const char* s);
|
||||
|
||||
// format for STEP
|
||||
const char * asStr () const { return c_str(); }
|
||||
|
||||
+51
-51
@@ -18,19 +18,19 @@
|
||||
// class Logical
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
SCLP23( LOGICAL )::SCLP23_NAME( LOGICAL )( char * val ) {
|
||||
SDAI_LOGICAL::SDAI_LOGICAL( char * val ) {
|
||||
set_value( val );
|
||||
}
|
||||
|
||||
SCLP23( LOGICAL )::SCLP23_NAME( LOGICAL )( Logical state ) {
|
||||
SDAI_LOGICAL::SDAI_LOGICAL( Logical state ) {
|
||||
set_value( state );
|
||||
}
|
||||
|
||||
SCLP23( LOGICAL )::SCLP23_NAME( LOGICAL )( const SCLP23( LOGICAL )& source ) {
|
||||
SDAI_LOGICAL::SDAI_LOGICAL( const SDAI_LOGICAL& source ) {
|
||||
set_value( source.asInt() );
|
||||
}
|
||||
|
||||
SCLP23( LOGICAL )::SCLP23_NAME( LOGICAL )( int i ) {
|
||||
SDAI_LOGICAL::SDAI_LOGICAL( int i ) {
|
||||
if( i == 0 ) {
|
||||
v = LFalse ;
|
||||
} else {
|
||||
@@ -38,18 +38,18 @@ SCLP23( LOGICAL )::SCLP23_NAME( LOGICAL )( int i ) {
|
||||
}
|
||||
}
|
||||
|
||||
SCLP23( LOGICAL )::~SCLP23_NAME( LOGICAL )() {
|
||||
SDAI_LOGICAL::~SDAI_LOGICAL() {
|
||||
}
|
||||
|
||||
const char * SCLP23( LOGICAL )::Name() const {
|
||||
const char * SDAI_LOGICAL::Name() const {
|
||||
return "Logical";
|
||||
}
|
||||
|
||||
int SCLP23( LOGICAL )::no_elements() const {
|
||||
int SDAI_LOGICAL::no_elements() const {
|
||||
return 3;
|
||||
}
|
||||
|
||||
const char * SCLP23( LOGICAL )::element_at( int n ) const {
|
||||
const char * SDAI_LOGICAL::element_at( int n ) const {
|
||||
switch( n ) {
|
||||
case LUnknown :
|
||||
return "U";
|
||||
@@ -62,15 +62,15 @@ const char * SCLP23( LOGICAL )::element_at( int n ) const {
|
||||
}
|
||||
}
|
||||
|
||||
int SCLP23( LOGICAL )::exists() const { // return 0 if unset otherwise return 1
|
||||
int SDAI_LOGICAL::exists() const { // return 0 if unset otherwise return 1
|
||||
return !( v == 2 );
|
||||
}
|
||||
|
||||
void SCLP23( LOGICAL )::nullify() { // change the receiver to an unset status
|
||||
void SDAI_LOGICAL::nullify() { // change the receiver to an unset status
|
||||
v = 2;
|
||||
}
|
||||
|
||||
SCLP23( LOGICAL )::operator Logical() const {
|
||||
SDAI_LOGICAL::operator Logical() const {
|
||||
switch( v ) {
|
||||
case LFalse :
|
||||
return LFalse ;
|
||||
@@ -86,19 +86,19 @@ SCLP23( LOGICAL )::operator Logical() const {
|
||||
|
||||
|
||||
|
||||
SCLP23( LOGICAL ) & SCLP23( LOGICAL )::operator= ( const SCLP23( LOGICAL )& t ) {
|
||||
SDAI_LOGICAL & SDAI_LOGICAL::operator= ( const SDAI_LOGICAL& t ) {
|
||||
set_value( t.asInt() );
|
||||
return *this;
|
||||
}
|
||||
|
||||
SCLP23( LOGICAL ) SCLP23( LOGICAL )::operator ==( const SCLP23( LOGICAL )& t ) const {
|
||||
SDAI_LOGICAL SDAI_LOGICAL::operator ==( const SDAI_LOGICAL& t ) const {
|
||||
if( v == t.asInt() ) {
|
||||
return LTrue ;
|
||||
}
|
||||
return LFalse ;
|
||||
}
|
||||
|
||||
int SCLP23( LOGICAL )::set_value( const int i ) {
|
||||
int SDAI_LOGICAL::set_value( const int i ) {
|
||||
if( i > no_elements() + 1 ) {
|
||||
v = 2;
|
||||
return v;
|
||||
@@ -114,7 +114,7 @@ int SCLP23( LOGICAL )::set_value( const int i ) {
|
||||
return no_elements() + 1 ;
|
||||
}
|
||||
|
||||
int SCLP23( LOGICAL )::set_value( const char * n ) {
|
||||
int SDAI_LOGICAL::set_value( const char * n ) {
|
||||
// assigns the appropriate value based on n
|
||||
if( !n || ( !strcmp( n, "" ) ) ) {
|
||||
nullify();
|
||||
@@ -136,7 +136,7 @@ int SCLP23( LOGICAL )::set_value( const char * n ) {
|
||||
}
|
||||
|
||||
|
||||
Severity SCLP23( LOGICAL )::ReadEnum( istream & in, ErrorDescriptor * err, int AssignVal,
|
||||
Severity SDAI_LOGICAL::ReadEnum( istream & in, ErrorDescriptor * err, int AssignVal,
|
||||
int needDelims ) {
|
||||
if( AssignVal ) {
|
||||
set_null();
|
||||
@@ -259,30 +259,30 @@ Severity SCLP23( LOGICAL )::ReadEnum( istream & in, ErrorDescriptor * err, int A
|
||||
// class BOOLEAN Jan 97
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
const char * SCLP23( BOOLEAN )::Name() const {
|
||||
const char * SDAI_BOOLEAN::Name() const {
|
||||
return "Bool";
|
||||
}
|
||||
|
||||
SCLP23( BOOLEAN )::SCLP23_NAME( BOOLEAN )( char * val ) {
|
||||
SDAI_BOOLEAN::SDAI_BOOLEAN( char * val ) {
|
||||
set_value( val );
|
||||
}
|
||||
|
||||
SCLP23( BOOLEAN )::SCLP23_NAME( BOOLEAN )( Boolean state ) {
|
||||
SDAI_BOOLEAN::SDAI_BOOLEAN( Boolean state ) {
|
||||
set_value( state );
|
||||
}
|
||||
|
||||
SCLP23( BOOLEAN )::SCLP23_NAME( BOOLEAN )( const SCLP23_NAME( BOOLEAN )& source ) {
|
||||
SDAI_BOOLEAN::SDAI_BOOLEAN( const SDAI_BOOLEAN& source ) {
|
||||
set_value( source.asInt() );
|
||||
}
|
||||
|
||||
SCLP23( BOOLEAN )::~SCLP23_NAME( BOOLEAN )() {
|
||||
SDAI_BOOLEAN::~SDAI_BOOLEAN() {
|
||||
}
|
||||
|
||||
int SCLP23( BOOLEAN )::no_elements() const {
|
||||
int SDAI_BOOLEAN::no_elements() const {
|
||||
return 2;
|
||||
}
|
||||
|
||||
SCLP23( BOOLEAN )::SCLP23_NAME( BOOLEAN )( int i ) {
|
||||
SDAI_BOOLEAN::SDAI_BOOLEAN( int i ) {
|
||||
if( i == 0 ) {
|
||||
v = BFalse ;
|
||||
} else {
|
||||
@@ -290,7 +290,7 @@ SCLP23( BOOLEAN )::SCLP23_NAME( BOOLEAN )( int i ) {
|
||||
}
|
||||
}
|
||||
|
||||
SCLP23( BOOLEAN )::SCLP23_NAME( BOOLEAN )( const SCLP23( 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;
|
||||
@@ -299,7 +299,7 @@ SCLP23( BOOLEAN )::SCLP23_NAME( BOOLEAN )( const SCLP23( LOGICAL )& val ) {
|
||||
set_value( val );
|
||||
}
|
||||
|
||||
SCLP23( BOOLEAN )::operator Boolean() const {
|
||||
SDAI_BOOLEAN::operator Boolean() const {
|
||||
switch( v ) {
|
||||
case BFalse :
|
||||
return BFalse ;
|
||||
@@ -311,17 +311,17 @@ SCLP23( BOOLEAN )::operator Boolean() const {
|
||||
}
|
||||
}
|
||||
|
||||
SCLP23( BOOLEAN ) & SCLP23( BOOLEAN )::operator= ( const SCLP23( LOGICAL )& t ) {
|
||||
SDAI_BOOLEAN & SDAI_BOOLEAN::operator= ( const SDAI_LOGICAL& t ) {
|
||||
set_value( t.asInt() );
|
||||
return *this;
|
||||
}
|
||||
|
||||
SCLP23( BOOLEAN ) & SCLP23( BOOLEAN )::operator= ( const Boolean t ) {
|
||||
SDAI_BOOLEAN & SDAI_BOOLEAN::operator= ( const Boolean t ) {
|
||||
v = t;
|
||||
return *this;
|
||||
}
|
||||
|
||||
const char * SCLP23( BOOLEAN )::element_at( int n ) const {
|
||||
const char * SDAI_BOOLEAN::element_at( int n ) const {
|
||||
switch( n ) {
|
||||
case BFalse :
|
||||
return "F";
|
||||
@@ -332,7 +332,7 @@ const char * SCLP23( BOOLEAN )::element_at( int n ) const {
|
||||
}
|
||||
}
|
||||
|
||||
SCLP23( LOGICAL ) SCLP23( BOOLEAN )::operator ==( const SCLP23( LOGICAL )& t ) const {
|
||||
SDAI_LOGICAL SDAI_BOOLEAN::operator ==( const SDAI_LOGICAL& t ) const {
|
||||
if( v == t.asInt() ) {
|
||||
return LTrue ;
|
||||
}
|
||||
@@ -341,36 +341,36 @@ SCLP23( LOGICAL ) SCLP23( BOOLEAN )::operator ==( const SCLP23( LOGICAL )& t ) c
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
SCLP23( Enum )::SCLP23_NAME( Enum )() {
|
||||
SDAI_Enum::SDAI_Enum() {
|
||||
v = 0;
|
||||
}
|
||||
|
||||
SCLP23( Enum )::~SCLP23_NAME( Enum )() {
|
||||
SDAI_Enum::~SDAI_Enum() {
|
||||
}
|
||||
|
||||
/**
|
||||
* \copydoc set_value( const char * n )
|
||||
*/
|
||||
int SCLP23( Enum )::put( int val ) {
|
||||
int SDAI_Enum::put( int val ) {
|
||||
return set_value( val );
|
||||
}
|
||||
|
||||
/**
|
||||
* \copydoc set_value( const char * n )
|
||||
*/
|
||||
int SCLP23( Enum )::put( const char * n ) {
|
||||
int SDAI_Enum::put( const char * n ) {
|
||||
return set_value( n );
|
||||
}
|
||||
|
||||
/// return 0 if unset otherwise return 1
|
||||
int SCLP23( Enum )::exists() const {
|
||||
int SDAI_Enum::exists() const {
|
||||
return !( v > no_elements() );
|
||||
}
|
||||
/**
|
||||
* change the receiver to an unset status
|
||||
* unset is generated to be 1 greater than last element
|
||||
*/
|
||||
void SCLP23( Enum )::nullify() {
|
||||
void SDAI_Enum::nullify() {
|
||||
set_value( no_elements() + 1 );
|
||||
}
|
||||
|
||||
@@ -379,7 +379,7 @@ void SCLP23( Enum )::nullify() {
|
||||
** debugging purposes
|
||||
** Status: ok 2/1/91
|
||||
******************************************************************/
|
||||
void SCLP23( Enum )::DebugDisplay( ostream & out ) const {
|
||||
void SDAI_Enum::DebugDisplay( ostream & out ) const {
|
||||
std::string tmp;
|
||||
out << "Current " << Name() << " value: " << endl
|
||||
<< " cardinal: " << v << endl
|
||||
@@ -405,14 +405,14 @@ void SCLP23( Enum )::DebugDisplay( ostream & out ) const {
|
||||
** \returns Severity of the error.
|
||||
** \param err error message and error Severity is written to ErrorDescriptor *err.
|
||||
** \param AssignVal is:
|
||||
** true => value is assigned to the SCLP23(Enum);
|
||||
** true => value is assigned to the SDAI_Enum;
|
||||
** true or false => value is read and appropriate error info is set and returned.
|
||||
** \param int needDelims is:
|
||||
** false => absence of the period delimiters is not an error;
|
||||
** true => delimiters must be valid;
|
||||
** true or false => non-matching delimiters are flagged as an error
|
||||
*/
|
||||
Severity SCLP23( Enum )::ReadEnum( istream & in, ErrorDescriptor * err, int AssignVal,
|
||||
Severity SDAI_Enum::ReadEnum( istream & in, ErrorDescriptor * err, int AssignVal,
|
||||
int needDelims ) {
|
||||
if( AssignVal ) {
|
||||
set_null();
|
||||
@@ -531,7 +531,7 @@ Severity SCLP23( Enum )::ReadEnum( istream & in, ErrorDescriptor * err, int Assi
|
||||
return err->severity();
|
||||
}
|
||||
|
||||
Severity SCLP23( Enum )::StrToVal( const char * s, ErrorDescriptor * err, int optional ) {
|
||||
Severity SDAI_Enum::StrToVal( const char * s, ErrorDescriptor * err, int optional ) {
|
||||
istringstream in( ( char * )s ); // sz defaults to length of s
|
||||
|
||||
ReadEnum( in, err, 1, 0 );
|
||||
@@ -543,13 +543,13 @@ Severity SCLP23( Enum )::StrToVal( const char * s, ErrorDescriptor * err, int op
|
||||
}
|
||||
|
||||
/// reads an enumerated value in STEP file format
|
||||
Severity SCLP23( Enum )::STEPread( const char * s, ErrorDescriptor * err, int optional ) {
|
||||
Severity SDAI_Enum::STEPread( const char * s, ErrorDescriptor * err, int optional ) {
|
||||
istringstream in( ( char * )s );
|
||||
return STEPread( in, err, optional );
|
||||
}
|
||||
|
||||
/// reads an enumerated value in STEP file format
|
||||
Severity SCLP23( Enum )::STEPread( istream & in, ErrorDescriptor * err, int optional ) {
|
||||
Severity SDAI_Enum::STEPread( istream & in, ErrorDescriptor * err, int optional ) {
|
||||
ReadEnum( in, err, 1, 1 );
|
||||
if( ( err->severity() == SEVERITY_INCOMPLETE ) && optional ) {
|
||||
err->severity( SEVERITY_NULL );
|
||||
@@ -558,7 +558,7 @@ Severity SCLP23( Enum )::STEPread( istream & in, ErrorDescriptor * err, int opti
|
||||
return err->severity();
|
||||
}
|
||||
|
||||
const char * SCLP23( Enum )::asStr( std::string & s ) const {
|
||||
const char * SDAI_Enum::asStr( std::string & s ) const {
|
||||
if( exists() ) {
|
||||
return const_cast<char *>( ( s = element_at( v ) ).c_str() );
|
||||
} else {
|
||||
@@ -566,7 +566,7 @@ const char * SCLP23( Enum )::asStr( std::string & s ) const {
|
||||
}
|
||||
}
|
||||
|
||||
void SCLP23( Enum )::STEPwrite( ostream & out ) const {
|
||||
void SDAI_Enum::STEPwrite( ostream & out ) const {
|
||||
if( is_null() ) {
|
||||
out << '$';
|
||||
} else {
|
||||
@@ -575,7 +575,7 @@ void SCLP23( Enum )::STEPwrite( ostream & out ) const {
|
||||
}
|
||||
}
|
||||
|
||||
const char * SCLP23( Enum )::STEPwrite( std::string & s ) const {
|
||||
const char * SDAI_Enum::STEPwrite( std::string & s ) const {
|
||||
if( is_null() ) {
|
||||
s.clear();
|
||||
} else {
|
||||
@@ -587,7 +587,7 @@ const char * SCLP23( Enum )::STEPwrite( std::string & s ) const {
|
||||
return const_cast<char *>( s.c_str() );
|
||||
}
|
||||
|
||||
Severity SCLP23( Enum )::EnumValidLevel( istream & in, ErrorDescriptor * err,
|
||||
Severity SDAI_Enum::EnumValidLevel( istream & in, ErrorDescriptor * err,
|
||||
int optional, char * tokenList,
|
||||
int needDelims, int clearError ) {
|
||||
if( clearError ) {
|
||||
@@ -624,7 +624,7 @@ Severity SCLP23( Enum )::EnumValidLevel( istream & in, ErrorDescriptor * err,
|
||||
return err->severity();
|
||||
}
|
||||
|
||||
Severity SCLP23( Enum )::EnumValidLevel( const char * value, ErrorDescriptor * err,
|
||||
Severity SDAI_Enum::EnumValidLevel( const char * value, ErrorDescriptor * err,
|
||||
int optional, char * tokenList,
|
||||
int needDelims, int clearError ) {
|
||||
istringstream in( ( char * )value );
|
||||
@@ -643,7 +643,7 @@ Severity SCLP23( Enum )::EnumValidLevel( const char * value, ErrorDescriptor * e
|
||||
** Status: ok 2.91
|
||||
** \returns: value set
|
||||
******************************************************************/
|
||||
int SCLP23( Enum )::set_value( const char * n ) {
|
||||
int SDAI_Enum::set_value( const char * n ) {
|
||||
// assigns the appropriate value based on n
|
||||
// if ( !n || (!strcmp (n, "")) ) return set_value (ENUM_NULL);
|
||||
if( !n || ( !strcmp( n, "" ) ) ) {
|
||||
@@ -668,7 +668,7 @@ int SCLP23( Enum )::set_value( const char * n ) {
|
||||
/**
|
||||
* \copydoc set_value( const char * n )
|
||||
*/
|
||||
int SCLP23( Enum )::set_value( const int i ) {
|
||||
int SDAI_Enum::set_value( const int i ) {
|
||||
if( i > no_elements() ) {
|
||||
v = no_elements() + 1;
|
||||
return v;
|
||||
@@ -685,17 +685,17 @@ int SCLP23( Enum )::set_value( const int i ) {
|
||||
|
||||
}
|
||||
|
||||
SCLP23( Enum ) & SCLP23( Enum )::operator= ( const int i ) {
|
||||
SDAI_Enum & SDAI_Enum::operator= ( const int i ) {
|
||||
put( i );
|
||||
return *this;
|
||||
}
|
||||
|
||||
SCLP23( Enum ) & SCLP23( Enum )::operator= ( const SCLP23( Enum )& Senum ) {
|
||||
SDAI_Enum & SDAI_Enum::operator= ( const SDAI_Enum& Senum ) {
|
||||
put( Senum.asInt() );
|
||||
return *this;
|
||||
}
|
||||
|
||||
ostream & operator<< ( ostream & out, const SCLP23( Enum )& a ) {
|
||||
ostream & operator<< ( ostream & out, const SDAI_Enum& a ) {
|
||||
std::string tmp;
|
||||
out << a.asStr( tmp );
|
||||
return out;
|
||||
|
||||
+32
-32
@@ -13,16 +13,16 @@
|
||||
*/
|
||||
|
||||
|
||||
class SCLP23_NAME(Enum) {
|
||||
friend ostream &operator<< ( ostream&, const SCLP23_NAME(Enum)& );
|
||||
class 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
|
||||
|
||||
virtual int set_value (const char * n);
|
||||
virtual int set_value (const int n);
|
||||
SCLP23_NAME(Enum)();
|
||||
virtual ~SCLP23_NAME(Enum)();
|
||||
SDAI_Enum();
|
||||
virtual ~SDAI_Enum();
|
||||
|
||||
public:
|
||||
|
||||
@@ -57,8 +57,8 @@ class SCLP23_NAME(Enum) {
|
||||
int is_null () const
|
||||
{ return ! (exists()); }
|
||||
void set_null() { nullify(); }
|
||||
SCLP23_NAME(Enum)& operator= (const int);
|
||||
SCLP23_NAME(Enum)& operator= (const SCLP23_NAME(Enum)&);
|
||||
SDAI_Enum& operator= (const int);
|
||||
SDAI_Enum& operator= (const SDAI_Enum&);
|
||||
|
||||
virtual int exists() const;
|
||||
virtual void nullify();
|
||||
@@ -71,31 +71,31 @@ class SCLP23_NAME(Enum) {
|
||||
|
||||
|
||||
|
||||
class SCLP23_NAME(LOGICAL);
|
||||
class SCLP23_NAME(BOOLEAN);
|
||||
class SDAI_LOGICAL;
|
||||
class SDAI_BOOLEAN;
|
||||
|
||||
enum Boolean { BFalse, BTrue, BUnset };
|
||||
enum Logical { LFalse, LTrue, LUnset, LUnknown };
|
||||
|
||||
class SCLP23_NAME(LOGICAL) :
|
||||
public SCLP23_NAME(Enum) {
|
||||
class SDAI_LOGICAL :
|
||||
public SDAI_Enum {
|
||||
public:
|
||||
const char * Name() const;
|
||||
|
||||
SCLP23_NAME(LOGICAL) (char * val =0);
|
||||
SCLP23_NAME(LOGICAL) (Logical state);
|
||||
SCLP23_NAME(LOGICAL) (const SCLP23_NAME(LOGICAL)& source);
|
||||
SCLP23_NAME(LOGICAL) (int i);
|
||||
SDAI_LOGICAL (char * val =0);
|
||||
SDAI_LOGICAL (Logical state);
|
||||
SDAI_LOGICAL (const SDAI_LOGICAL& source);
|
||||
SDAI_LOGICAL (int i);
|
||||
|
||||
virtual ~SCLP23_NAME(LOGICAL) ();
|
||||
virtual ~SDAI_LOGICAL ();
|
||||
|
||||
virtual int no_elements () const;
|
||||
virtual const char * element_at (int n) const;
|
||||
|
||||
operator Logical () const;
|
||||
SCLP23_NAME(LOGICAL)& operator=(const SCLP23_NAME(LOGICAL)& t);
|
||||
SDAI_LOGICAL& operator=(const SDAI_LOGICAL& t);
|
||||
|
||||
SCLP23_NAME(LOGICAL) operator==( const SCLP23_NAME(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
|
||||
@@ -109,33 +109,33 @@ public SCLP23_NAME(Enum) {
|
||||
|
||||
};
|
||||
|
||||
class SCLP23_NAME(BOOLEAN) :
|
||||
public SCLP23_NAME(Enum) {
|
||||
class SDAI_BOOLEAN :
|
||||
public SDAI_Enum {
|
||||
public:
|
||||
const char * Name() const;
|
||||
|
||||
SCLP23_NAME(BOOLEAN) (char * val = 0);
|
||||
SCLP23_NAME(BOOLEAN) (Boolean state);
|
||||
SCLP23_NAME(BOOLEAN) (const SCLP23_NAME(BOOLEAN)& source);
|
||||
SCLP23_NAME(BOOLEAN) (int i);
|
||||
SCLP23_NAME(BOOLEAN) (const SCLP23_NAME(LOGICAL)& val);
|
||||
virtual ~SCLP23_NAME(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;
|
||||
|
||||
operator Boolean() const;
|
||||
SCLP23_NAME(BOOLEAN)& operator=(const SCLP23_NAME(LOGICAL)& t);
|
||||
SDAI_BOOLEAN& operator=(const SDAI_LOGICAL& t);
|
||||
|
||||
SCLP23_NAME(BOOLEAN)& operator=(const Boolean t);
|
||||
SCLP23_NAME(LOGICAL) operator==( const SCLP23_NAME(LOGICAL)& t ) const;
|
||||
SDAI_BOOLEAN& operator=(const Boolean t);
|
||||
SDAI_LOGICAL operator==( const SDAI_LOGICAL& t ) const;
|
||||
|
||||
};
|
||||
|
||||
static const SCLP23_NAME(BOOLEAN) SCLP23_NAME(TRUE);
|
||||
static const SCLP23_NAME(BOOLEAN) SCLP23_NAME(FALSE);
|
||||
static const SCLP23_NAME(BOOLEAN) SCLP23_NAME(UNSET);
|
||||
static const SCLP23_NAME(LOGICAL) SCLP23_NAME(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
|
||||
|
||||
@@ -23,47 +23,47 @@ extern ofstream * logStream;
|
||||
#endif
|
||||
|
||||
/**********
|
||||
(member) functions for the select class SCLP23(Select)
|
||||
(member) functions for the select class SDAI_Select
|
||||
**********/
|
||||
SCLP23( Select )::SCLP23_NAME( Select )( const SelectTypeDescriptor * s,
|
||||
SDAI_Select::SDAI_Select( const SelectTypeDescriptor * s,
|
||||
const TypeDescriptor * td )
|
||||
: _type( s ), underlying_type( td ) {
|
||||
#ifdef SCL_LOGGING
|
||||
*logStream << "Exiting SCLP23(Select) constructor." << endl;
|
||||
*logStream << "Exiting SDAI_Select constructor." << endl;
|
||||
#endif
|
||||
}
|
||||
|
||||
SCLP23( Select )::~SCLP23_NAME( Select )() {
|
||||
SDAI_Select::~SDAI_Select() {
|
||||
}
|
||||
|
||||
Severity SCLP23( Select )::severity() const {
|
||||
Severity SDAI_Select::severity() const {
|
||||
return _error.severity();
|
||||
}
|
||||
|
||||
Severity SCLP23( Select )::severity( Severity s ) {
|
||||
Severity SDAI_Select::severity( Severity s ) {
|
||||
return _error.severity( s );
|
||||
}
|
||||
|
||||
const std::string SCLP23( Select )::Error() {
|
||||
const std::string SDAI_Select::Error() {
|
||||
return _error.DetailMsg();
|
||||
}
|
||||
|
||||
void SCLP23( Select )::Error( const char * e ) {
|
||||
void SDAI_Select::Error( const char * e ) {
|
||||
_error.DetailMsg( e );
|
||||
}
|
||||
|
||||
void SCLP23( Select )::ClearError() {
|
||||
void SDAI_Select::ClearError() {
|
||||
_error.ClearErrorMsg();
|
||||
}
|
||||
|
||||
const TypeDescriptor *
|
||||
SCLP23( Select )::CanBe( const char * n ) const {
|
||||
SDAI_Select::CanBe( const char * n ) const {
|
||||
return _type -> CanBe( n );
|
||||
}
|
||||
|
||||
|
||||
const TypeDescriptor *
|
||||
SCLP23( Select )::CanBe( BASE_TYPE bt ) const {
|
||||
SDAI_Select::CanBe( BASE_TYPE bt ) const {
|
||||
const TypeDescLinkNode * tdn =
|
||||
( const TypeDescLinkNode * ) _type -> GetElements().GetHead();
|
||||
const TypeDescriptor * td = tdn -> TypeDesc();
|
||||
@@ -84,17 +84,17 @@ SCLP23( Select )::CanBe( BASE_TYPE bt ) const {
|
||||
}
|
||||
|
||||
const TypeDescriptor *
|
||||
SCLP23( Select )::CanBe( const TypeDescriptor * td ) const {
|
||||
SDAI_Select::CanBe( const TypeDescriptor * td ) const {
|
||||
return _type -> CanBe( td );
|
||||
}
|
||||
|
||||
const TypeDescriptor *
|
||||
SCLP23( Select )::CanBeSet( const char * n, const char * schnm ) const {
|
||||
SDAI_Select::CanBeSet( const char * n, const char * schnm ) const {
|
||||
return _type -> CanBeSet( n, schnm );
|
||||
}
|
||||
|
||||
const int
|
||||
SCLP23( Select )::IsUnique( const BASE_TYPE bt ) const {
|
||||
SDAI_Select::IsUnique( const BASE_TYPE bt ) const {
|
||||
if( bt == ARRAY_TYPE ||
|
||||
bt == LIST_TYPE ||
|
||||
bt == BAG_TYPE ||
|
||||
@@ -106,16 +106,16 @@ SCLP23( Select )::IsUnique( const BASE_TYPE bt ) const {
|
||||
}
|
||||
|
||||
|
||||
SCLP23( String ) SCLP23( Select )::UnderlyingTypeName() const {
|
||||
SDAI_String SDAI_Select::UnderlyingTypeName() const {
|
||||
return underlying_type -> Name();
|
||||
}
|
||||
|
||||
const TypeDescriptor * SCLP23( Select )::CurrentUnderlyingType() const {
|
||||
const TypeDescriptor * SDAI_Select::CurrentUnderlyingType() const {
|
||||
return underlying_type;
|
||||
}
|
||||
|
||||
const TypeDescriptor *
|
||||
SCLP23( Select )::SetUnderlyingType( const TypeDescriptor * td ) {
|
||||
SDAI_Select::SetUnderlyingType( const TypeDescriptor * td ) {
|
||||
// don\'t do anything if the descriptor is bad
|
||||
if( !td || !( _type -> CanBe( td ) ) ) {
|
||||
return 0;
|
||||
@@ -126,17 +126,17 @@ SCLP23( Select )::SetUnderlyingType( const TypeDescriptor * td ) {
|
||||
return underlying_type = td;
|
||||
}
|
||||
|
||||
bool SCLP23( Select )::exists() const {
|
||||
bool SDAI_Select::exists() const {
|
||||
return underlying_type != NULL;
|
||||
}
|
||||
|
||||
void SCLP23( Select )::nullify() {
|
||||
void SDAI_Select::nullify() {
|
||||
underlying_type = 0;
|
||||
}
|
||||
|
||||
Severity SCLP23( Select )::SelectValidLevel( const char * attrValue, ErrorDescriptor * err,
|
||||
Severity SDAI_Select::SelectValidLevel( const char * attrValue, ErrorDescriptor * err,
|
||||
InstMgr * im, int clearError ) {
|
||||
SCLP23( Select ) * tmp = NewSelect();
|
||||
SDAI_Select * tmp = NewSelect();
|
||||
Severity s = SEVERITY_NULL;
|
||||
|
||||
istringstream strtmp( attrValue );
|
||||
@@ -145,7 +145,7 @@ Severity SCLP23( Select )::SelectValidLevel( const char * attrValue, ErrorDescri
|
||||
return s;
|
||||
}
|
||||
|
||||
Severity SCLP23( Select )::StrToVal( const char * Val, const char * selectType,
|
||||
Severity SDAI_Select::StrToVal( const char * Val, const char * selectType,
|
||||
ErrorDescriptor * err, InstMgr * instances ) {
|
||||
severity( SEVERITY_NULL );
|
||||
if( SetUnderlyingType( CanBe( selectType ) ) )
|
||||
@@ -207,14 +207,14 @@ Severity SCLP23( Select )::StrToVal( const char * Val, const char * selectType,
|
||||
/** updated to Technical Corrigendum. DAS 2/4/97
|
||||
* This function does the following:
|
||||
*/
|
||||
Severity SCLP23( Select )::STEPread( istream & in, ErrorDescriptor * err,
|
||||
Severity SDAI_Select::STEPread( istream & in, ErrorDescriptor * err,
|
||||
InstMgr * instances, const char * utype,
|
||||
int addFileId, const char * currSch ) {
|
||||
char c = '\0';
|
||||
std::string tmp;
|
||||
|
||||
#ifdef SCL_LOGGING
|
||||
// *logStream << "DAVE ERR Entering SCLP23(Select)::STEPread." << endl;
|
||||
// *logStream << "DAVE ERR Entering SDAI_Select::STEPread." << endl;
|
||||
#endif
|
||||
// find out what case we have
|
||||
// NOTE case C falls out of recursive calls in cases A and B
|
||||
@@ -314,7 +314,7 @@ Severity SCLP23( Select )::STEPread( istream & in, ErrorDescriptor * err,
|
||||
STEPread_content( in, instances, tmp.c_str(), addFileId,
|
||||
currSch );
|
||||
// STEPread_content uses the ErrorDesc data member from the
|
||||
// SCLP23(Select) class
|
||||
// SDAI_Select class
|
||||
}
|
||||
err->AppendToDetailMsg( Error() );
|
||||
err->GreaterSeverity( severity() );
|
||||
@@ -325,19 +325,19 @@ Severity SCLP23( Select )::STEPread( istream & in, ErrorDescriptor * err,
|
||||
err->GreaterSeverity( SEVERITY_WARNING );
|
||||
in.putback( c );
|
||||
#ifdef SCL_LOGGING
|
||||
// *logStream << "DAVE ERR Exiting SCLP23(Select)::STEPread for " << _type->Name() << endl;
|
||||
// *logStream << "DAVE ERR Exiting SDAI_Select::STEPread for " << _type->Name() << endl;
|
||||
#endif
|
||||
return SEVERITY_WARNING;
|
||||
}
|
||||
#ifdef SCL_LOGGING
|
||||
// *logStream << "DAVE ERR Exiting SCLP23(Select)::STEPread for " << _type->Name() << endl;
|
||||
// *logStream << "DAVE ERR Exiting SDAI_Select::STEPread for " << _type->Name() << endl;
|
||||
#endif
|
||||
return err->severity();
|
||||
} else { // ERROR -- the type wasn't one of the choices
|
||||
if( !in.good() ) {
|
||||
err->GreaterSeverity( SEVERITY_INPUT_ERROR );
|
||||
#ifdef SCL_LOGGING
|
||||
// *logStream << "DAVE ERR Exiting SCLP23(Select)::STEPread for " << _type->Name() << endl;
|
||||
// *logStream << "DAVE ERR Exiting SDAI_Select::STEPread for " << _type->Name() << endl;
|
||||
#endif
|
||||
return SEVERITY_INPUT_ERROR;
|
||||
} else {
|
||||
@@ -345,7 +345,7 @@ Severity SCLP23( Select )::STEPread( istream & in, ErrorDescriptor * err,
|
||||
"The type name for the SELECT type is not valid.\n" );
|
||||
err->GreaterSeverity( SEVERITY_WARNING );
|
||||
#ifdef SCL_LOGGING
|
||||
// *logStream << "DAVE ERR Exiting SCLP23(Select)::STEPread for " << _type->Name() << endl;
|
||||
// *logStream << "DAVE ERR Exiting SDAI_Select::STEPread for " << _type->Name() << endl;
|
||||
#endif
|
||||
return SEVERITY_WARNING;
|
||||
}
|
||||
@@ -365,7 +365,7 @@ Severity SCLP23( Select )::STEPread( istream & in, ErrorDescriptor * err,
|
||||
nullify();
|
||||
err->GreaterSeverity( SEVERITY_INCOMPLETE );
|
||||
#ifdef SCL_LOGGING
|
||||
// *logStream << "DAVE ERR Exiting SCLP23(Select)::STEPread for " << _type->Name() << endl;
|
||||
// *logStream << "DAVE ERR Exiting SDAI_Select::STEPread for " << _type->Name() << endl;
|
||||
#endif
|
||||
return SEVERITY_INCOMPLETE;
|
||||
|
||||
@@ -376,7 +376,7 @@ Severity SCLP23( Select )::STEPread( istream & in, ErrorDescriptor * err,
|
||||
err->AppendToDetailMsg( "No value found for SELECT type.\n" );
|
||||
err->GreaterSeverity( SEVERITY_WARNING );
|
||||
#ifdef SCL_LOGGING
|
||||
// *logStream << "DAVE ERR Exiting SCLP23(Select)::STEPread for " << _type->Name() << endl;
|
||||
// *logStream << "DAVE ERR Exiting SDAI_Select::STEPread for " << _type->Name() << endl;
|
||||
#endif
|
||||
return SEVERITY_WARNING;
|
||||
|
||||
@@ -455,7 +455,7 @@ Severity SCLP23( Select )::STEPread( istream & in, ErrorDescriptor * err,
|
||||
in.putback( c );
|
||||
err->GreaterSeverity( SEVERITY_WARNING );
|
||||
#ifdef SCL_LOGGING
|
||||
// *logStream << "DAVE ERR Exiting SCLP23(Select)::STEPread for " << _type->Name() << endl;
|
||||
// *logStream << "DAVE ERR Exiting SDAI_Select::STEPread for " << _type->Name() << endl;
|
||||
#endif
|
||||
return SEVERITY_WARNING;
|
||||
}
|
||||
@@ -477,7 +477,7 @@ Severity SCLP23( Select )::STEPread( istream & in, ErrorDescriptor * err,
|
||||
ReadEntityRef( in, err, ",)", instances, addFileId );
|
||||
if( tmp && ( tmp != ENTITY_NULL ) && AssignEntity( tmp ) ) {
|
||||
#ifdef SCL_LOGGING
|
||||
// *logStream << "DAVE ERR Exiting SCLP23(Select)::STEPread for " << _type->Name() << endl;
|
||||
// *logStream << "DAVE ERR Exiting SDAI_Select::STEPread for " << _type->Name() << endl;
|
||||
#endif
|
||||
return SEVERITY_NULL;
|
||||
} else {
|
||||
@@ -486,7 +486,7 @@ Severity SCLP23( Select )::STEPread( istream & in, ErrorDescriptor * err,
|
||||
nullify();
|
||||
err->GreaterSeverity( SEVERITY_WARNING );
|
||||
#ifdef SCL_LOGGING
|
||||
// *logStream << "DAVE ERR Exiting SCLP23(Select)::STEPread for " << _type->Name() << endl;
|
||||
// *logStream << "DAVE ERR Exiting SDAI_Select::STEPread for " << _type->Name() << endl;
|
||||
#endif
|
||||
return SEVERITY_WARNING;
|
||||
}
|
||||
@@ -499,21 +499,21 @@ Severity SCLP23( Select )::STEPread( istream & in, ErrorDescriptor * err,
|
||||
"The type of the SELECT type is not valid.\n" );
|
||||
err->GreaterSeverity( SEVERITY_WARNING );
|
||||
#ifdef SCL_LOGGING
|
||||
// *logStream << "DAVE ERR Exiting SCLP23(Select)::STEPread for " << _type->Name() << endl;
|
||||
// *logStream << "DAVE ERR Exiting SDAI_Select::STEPread for " << _type->Name() << endl;
|
||||
#endif
|
||||
return SEVERITY_WARNING;
|
||||
}
|
||||
}
|
||||
// if (!in.good()) severity (SEVERITY_INPUT_ERROR);
|
||||
#ifdef SCL_LOGGING
|
||||
// *logStream << "DAVE ERR Exiting SCLP23(Select)::STEPread for " << _type->Name() << endl;
|
||||
// *logStream << "DAVE ERR Exiting SDAI_Select::STEPread for " << _type->Name() << endl;
|
||||
#endif
|
||||
return err->severity();
|
||||
}
|
||||
|
||||
|
||||
/// updated to Technical Corrigendum DAS Feb 4, 1997
|
||||
void SCLP23( Select )::STEPwrite( ostream & out, const char * currSch ) const {
|
||||
void SDAI_Select::STEPwrite( ostream & out, const char * currSch ) const {
|
||||
if( !exists() ) {
|
||||
out << "$";
|
||||
return;
|
||||
@@ -552,19 +552,19 @@ void SCLP23( Select )::STEPwrite( ostream & out, const char * currSch ) const {
|
||||
}
|
||||
case REFERENCE_TYPE: // this should never happen? DAS
|
||||
default:
|
||||
out << "ERROR Should not have gone here in SCLP23(Select)::STEPwrite()"
|
||||
out << "ERROR Should not have gone here in SDAI_Select::STEPwrite()"
|
||||
<< endl;
|
||||
}
|
||||
}
|
||||
|
||||
void SCLP23( Select )::STEPwrite_verbose( ostream & out, const char * currSch ) const {
|
||||
void SDAI_Select::STEPwrite_verbose( ostream & out, const char * currSch ) const {
|
||||
std::string tmp;
|
||||
out << StrToUpper( CurrentUnderlyingType()->Name( currSch ), tmp ) << "(";
|
||||
STEPwrite_content( out );
|
||||
out << ")";
|
||||
}
|
||||
|
||||
const char * SCLP23( Select )::STEPwrite( std::string & s, const char * currSch ) const {
|
||||
const char * SDAI_Select::STEPwrite( std::string & s, const char * currSch ) const {
|
||||
ostringstream buf;
|
||||
STEPwrite( buf, currSch );
|
||||
buf << ends; // add the terminating \0 char
|
||||
@@ -572,11 +572,11 @@ const char * SCLP23( Select )::STEPwrite( std::string & s, const char * currSch
|
||||
return const_cast<char *>( s.c_str() );
|
||||
}
|
||||
|
||||
int SCLP23( Select )::set_null() {
|
||||
int SDAI_Select::set_null() {
|
||||
nullify();
|
||||
return 1;
|
||||
}
|
||||
|
||||
int SCLP23( Select )::is_null() {
|
||||
int SDAI_Select::is_null() {
|
||||
return ( !exists() );
|
||||
}
|
||||
|
||||
+11
-11
@@ -13,16 +13,16 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
** \file sdaiSelect.h class definition for the select superclass SCLP23_NAME(Select).
|
||||
** \file sdaiSelect.h class definition for the select superclass SDAI_Select.
|
||||
**/
|
||||
class SCLP23_NAME(Select) {
|
||||
class SDAI_Select {
|
||||
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
|
||||
SCLP23_NAME(String) val;
|
||||
SDAI_String val;
|
||||
ErrorDescriptor _error;
|
||||
|
||||
const TypeDescriptor * SetUnderlyingType (const TypeDescriptor *);
|
||||
@@ -34,8 +34,8 @@ class SCLP23_NAME(Select) {
|
||||
|
||||
const int IsUnique(const BASE_TYPE bt) const;
|
||||
|
||||
virtual const TypeDescriptor * AssignEntity (SCLP23_NAME(Application_instance) * se) =0;
|
||||
virtual SCLP23_NAME(Select) * NewSelect () =0;
|
||||
virtual const TypeDescriptor * AssignEntity (SDAI_Application_instance * se) =0;
|
||||
virtual SDAI_Select * NewSelect () =0;
|
||||
public:
|
||||
Severity severity() const;
|
||||
Severity severity( Severity );
|
||||
@@ -48,12 +48,12 @@ class SCLP23_NAME(Select) {
|
||||
virtual BASE_TYPE ValueType() const =0;
|
||||
|
||||
// constructors
|
||||
SCLP23_NAME(Select) (const SelectTypeDescriptor * s =0,
|
||||
SDAI_Select (const SelectTypeDescriptor * s =0,
|
||||
const TypeDescriptor * td =0);
|
||||
virtual ~SCLP23_NAME(Select) ();
|
||||
virtual ~SDAI_Select ();
|
||||
|
||||
// from SDAI binding
|
||||
SCLP23_NAME(String) UnderlyingTypeName () const;
|
||||
SDAI_String UnderlyingTypeName () const;
|
||||
const TypeDescriptor * CurrentUnderlyingType() const;
|
||||
bool exists() const;
|
||||
void nullify();
|
||||
@@ -89,14 +89,14 @@ class SCLP23_NAME(Select) {
|
||||
int addFileId =0,
|
||||
const char *currSch =0) =0;
|
||||
|
||||
virtual SCLP23_NAME(Select)& operator =( const SCLP23_NAME(Select)& ) =0;
|
||||
virtual SDAI_Select& operator =( const SDAI_Select& ) =0;
|
||||
|
||||
int set_null();
|
||||
int is_null();
|
||||
|
||||
}; /** end class **/
|
||||
|
||||
typedef SCLP23_NAME(Select) * SCLP23_NAME(Select_ptr) ;
|
||||
typedef SCLP23_NAME(Select_ptr) SCLP23_NAME(Select_var) ;
|
||||
typedef SDAI_Select * SDAI_Select_ptr ;
|
||||
typedef SDAI_Select_ptr SDAI_Select_var ;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -12,20 +12,20 @@
|
||||
#include <sdai.h>
|
||||
#include <sstream>
|
||||
|
||||
SCLP23( String ) & SCLP23( String )::operator= ( const char * s ) {
|
||||
SDAI_String & SDAI_String::operator= ( const char * s ) {
|
||||
std::string::operator= ( s );
|
||||
return *this;
|
||||
}
|
||||
|
||||
void SCLP23( String )::STEPwrite( ostream & out ) const {
|
||||
void SDAI_String::STEPwrite( ostream & out ) const {
|
||||
out << c_str();
|
||||
}
|
||||
|
||||
void SCLP23( String )::STEPwrite( std::string & s ) const {
|
||||
void SDAI_String::STEPwrite( std::string & s ) const {
|
||||
s += c_str();
|
||||
}
|
||||
|
||||
Severity SCLP23( String )::StrToVal( const char * s ) {
|
||||
Severity SDAI_String::StrToVal( const char * s ) {
|
||||
operator= ( s );
|
||||
if( ! strcmp( c_str(), s ) ) {
|
||||
return SEVERITY_NULL ;
|
||||
@@ -38,7 +38,7 @@ Severity SCLP23( String )::StrToVal( const char * s ) {
|
||||
* STEPread reads a string in exchange file format
|
||||
* starting with a single quote
|
||||
*/
|
||||
Severity SCLP23( String )::STEPread( istream & in, ErrorDescriptor * err ) {
|
||||
Severity SDAI_String::STEPread( istream & in, ErrorDescriptor * err ) {
|
||||
clear(); // clear the old string
|
||||
// remember the current format state to restore the previous settings
|
||||
ios_base::fmtflags flags = in.flags();
|
||||
@@ -69,7 +69,7 @@ Severity SCLP23( String )::STEPread( istream & in, ErrorDescriptor * err ) {
|
||||
/**
|
||||
* \copydoc STEPread( istream & in, ErrorDescriptor * err )
|
||||
*/
|
||||
Severity SCLP23( String )::STEPread( const char * s, ErrorDescriptor * err ) {
|
||||
Severity SDAI_String::STEPread( const char * s, ErrorDescriptor * err ) {
|
||||
istringstream in( ( char * )s );
|
||||
return STEPread( in, err );
|
||||
}
|
||||
|
||||
@@ -11,17 +11,17 @@
|
||||
* and is not subject to copyright.
|
||||
*/
|
||||
|
||||
class SCLP23_NAME(String) : public std::string {
|
||||
class SDAI_String : public std::string {
|
||||
public:
|
||||
|
||||
//constructor(s) & destructor
|
||||
SCLP23_NAME(String) (const char * str = 0, int max =0) : std::string (str,max) { }
|
||||
SCLP23_NAME(String) (const std::string& s) : std::string (s) { }
|
||||
SCLP23_NAME(String) (const SCLP23_NAME(String)& s) : std::string (s) { }
|
||||
~SCLP23_NAME(String) () { }
|
||||
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
|
||||
SCLP23_NAME(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(); }
|
||||
|
||||
@@ -29,13 +29,12 @@ include_directories(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
|
||||
add_definitions(
|
||||
-DHAVE_CONFIG_H
|
||||
)
|
||||
|
||||
SCL_ADDLIB(steputils "${LIBSTEPUTILS_SRCS}" "")
|
||||
|
||||
IF(MINGW)
|
||||
TARGET_LINK_LIBRARIES(steputils shlwapi.lib)
|
||||
TARGET_LINK_LIBRARIES(steputils shlwapi.lib)
|
||||
ENDIF(MINGW)
|
||||
|
||||
if(APPLE)
|
||||
set_target_properties(steputils PROPERTIES LINK_FLAGS "-flat_namespace -undefined suppress")
|
||||
endif(APPLE)
|
||||
|
||||
@@ -42,9 +42,7 @@
|
||||
#include <dirobj.h>
|
||||
#include <dirent.h>
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <scl_cf.h>
|
||||
#endif
|
||||
|
||||
/* for stat() file status */
|
||||
#ifdef HAVE_SYS_STAT_H
|
||||
|
||||
@@ -10,11 +10,8 @@
|
||||
* and is not subject to copyright.
|
||||
*/
|
||||
|
||||
/* $Id: gennodearray.cc,v 3.0.1.4 1997/11/05 22:33:48 sauderd DP3.1 $ */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <scl_cf.h>
|
||||
#endif
|
||||
|
||||
#include <gennode.h>
|
||||
#include <gennodelist.h>
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <scl_cf.h>
|
||||
#endif
|
||||
|
||||
#include <memory.h>
|
||||
#include <math.h>
|
||||
|
||||
@@ -12,12 +12,11 @@ include_directories(
|
||||
${SCL_SOURCE_DIR}/include/exppp
|
||||
)
|
||||
|
||||
add_definitions(
|
||||
-DHAVE_CONFIG_H
|
||||
)
|
||||
|
||||
SCL_ADDLIB(libexppp "${LIBEXPPP_SOURCES}" express)
|
||||
set_target_properties(libexppp PROPERTIES PREFIX "")
|
||||
|
||||
#SCL_ADDEXEC(exppp "${EXPPP_SOURCES}" "libexppp express")
|
||||
|
||||
if(APPLE)
|
||||
set_target_properties(libexppp PROPERTIES LINK_FLAGS "-flat_namespace -undefined suppress")
|
||||
endif(APPLE)
|
||||
|
||||
@@ -62,9 +62,7 @@ include_directories(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
|
||||
add_definitions(
|
||||
-DHAVE_CONFIG_H -DFLEX
|
||||
)
|
||||
add_definitions( -DFLEX )
|
||||
|
||||
SCL_ADDLIB(express "${EXPRESS_SOURCES}" "")
|
||||
|
||||
|
||||
+32
-59
@@ -55,15 +55,8 @@ DICTprint( Dictionary dict ) {
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
** Procedure: DICTinitialize
|
||||
** Parameters: -- none --
|
||||
** Returns: void
|
||||
** Description: Initialize the Dictionary module
|
||||
*/
|
||||
|
||||
void
|
||||
DICTinitialize( void ) {
|
||||
/** Initialize the Dictionary module */
|
||||
void DICTinitialize( void ) {
|
||||
ERROR_duplicate_decl = ERRORcreate(
|
||||
"Redeclaration of %s. Previous declaration was on line %d.", SEVERITY_ERROR );
|
||||
ERROR_duplicate_decl_diff_file = ERRORcreate(
|
||||
@@ -75,21 +68,17 @@ DICTinitialize( void ) {
|
||||
** Parameters: int size - estimated (initial) max # of entries
|
||||
** Returns: Dictionary - a new dictionary of the specified size
|
||||
*/
|
||||
|
||||
/* now a macro */
|
||||
|
||||
/*
|
||||
** Procedure: DICTdefine
|
||||
** Parameters: Dictionary dictionary - dictionary to modify
|
||||
** Generic entry - entry to be added
|
||||
** Error* experrc - buffer for error code
|
||||
** Returns: int failure - 0 on success, 1 on failure
|
||||
** Description: Define anything in a dictionary. Generates an error
|
||||
** directly if there is a duplicate value.
|
||||
*/
|
||||
|
||||
int
|
||||
DICTdefine( Dictionary dict, char * name, Generic obj, Symbol * sym, char type ) {
|
||||
/**
|
||||
* Define anything in a dictionary. Generates an
|
||||
* error directly if there is a duplicate value.
|
||||
* \param dictionary dictionary to modify
|
||||
* \param entry entry to be added
|
||||
* \param experrc buffer for error code
|
||||
* \return 0 on success, 1 on failure
|
||||
*/
|
||||
int DICTdefine( Dictionary dict, char * name, Generic obj, Symbol * sym, char type ) {
|
||||
struct Element_ new, *old;
|
||||
|
||||
new.key = name;
|
||||
@@ -101,17 +90,23 @@ DICTdefine( Dictionary dict, char * name, Generic obj, Symbol * sym, char type )
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
/* allow multiple definitions of an enumeration id in its */
|
||||
/* first scope of visibility. *don't* allow enum id to be */
|
||||
/* shadowed by another type of symbol in the first scope */
|
||||
/* of visibility. this changed (back) in the IS. */
|
||||
/* allow multiple definitions of an enumeration id in its
|
||||
* first scope of visibility. *don't* allow enum id to be
|
||||
* shadowed by another type of symbol in the first scope
|
||||
* of visibility. this changed (back) in the IS.
|
||||
*
|
||||
* Nov 2011 - Apparently, this changed again; I (MP) am
|
||||
* told that it is legal for an enum value and an entity
|
||||
* to have the same name. To fix this, I replaced the
|
||||
* || with && in the else-if below.
|
||||
*/
|
||||
if( ( type == OBJ_ENUM ) && ( old->type == OBJ_ENUM ) ) {
|
||||
/* if we're adding an enum, but we've already seen one */
|
||||
/* (and only one enum), mark it ambiguous */
|
||||
DICTchange_type( old, OBJ_AMBIG_ENUM );
|
||||
} else if( ( type != OBJ_ENUM ) || ( !IS_ENUM( old->type ) ) ) {
|
||||
/* if we're adding a non-enum, or we've already added a */
|
||||
/* non-enum, complain */
|
||||
} else if( ( type != OBJ_ENUM ) && ( !IS_ENUM( old->type ) ) ) {
|
||||
/* if we're adding a non-enum, and we've *
|
||||
* already added a non-enum, complain */
|
||||
if( sym->filename == old->symbol->filename ) {
|
||||
ERRORreport_with_symbol( ERROR_duplicate_decl, sym, name, old->symbol->line );
|
||||
} else {
|
||||
@@ -121,38 +116,16 @@ DICTdefine( Dictionary dict, char * name, Generic obj, Symbol * sym, char type )
|
||||
return( 1 );
|
||||
}
|
||||
return 0;
|
||||
|
||||
#if 0
|
||||
/* following code is a little tricky and accounts for the fact */
|
||||
/* that enumerations are entered into their first scope of */
|
||||
/* visibility but may be shadowed by other objects that are declared */
|
||||
/* in that scope */
|
||||
if( type == OBJ_ENUM ) {
|
||||
if( old->type == OBJ_ENUM ) {
|
||||
DICTchange( old, obj, sym, OBJ_AMBIG_ENUM );
|
||||
}
|
||||
} else if( IS_ENUM( old->type ) ) {
|
||||
DICTchange( old, obj, sym, type );
|
||||
} else {
|
||||
if( sym->filename == old->symbol->filename ) {
|
||||
ERRORreport_with_symbol( ERROR_duplicate_decl, sym, name, old->symbol->line );
|
||||
} else {
|
||||
ERRORreport_with_symbol( ERROR_duplicate_decl_diff_file, sym, name, old->symbol->line, old->symbol->filename );
|
||||
}
|
||||
experrc = ERROR_subordinate_failed;
|
||||
return( 1 );
|
||||
}
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* this version is used for defining things within an enumeration scope */
|
||||
/* I.e., the only error it would pick up would be an error such as */
|
||||
/* ENUMERATION OF ( A, A ) which has happened! */
|
||||
/* This is the way DICTdefine used to look before enumerations gained */
|
||||
/* their unusual behavior with respect to scoping and visibility rules */
|
||||
int
|
||||
DICT_define( Dictionary dict, char * name, Generic obj, Symbol * sym, char type ) {
|
||||
/**
|
||||
* This version is used for defining things within an enumeration scope
|
||||
* I.e., the only error it would pick up would be an error such as
|
||||
* ENUMERATION OF ( A, A ) which has happened!
|
||||
* This is the way DICTdefine used to look before enumerations gained
|
||||
* their unusual behavior with respect to scoping and visibility rules
|
||||
*/
|
||||
int DICT_define( Dictionary dict, char * name, Generic obj, Symbol * sym, char type ) {
|
||||
struct Element_ e, *e2;
|
||||
|
||||
e.key = name;
|
||||
|
||||
@@ -1405,8 +1405,10 @@ local_body : /* no local_variables */
|
||||
| local_variable local_body
|
||||
;
|
||||
|
||||
local_decl : TOK_LOCAL local_body TOK_END_LOCAL semicolon
|
||||
{ }
|
||||
local_decl : TOK_LOCAL
|
||||
{ tag_count = 0; /* for generic_type */}
|
||||
local_body TOK_END_LOCAL semicolon
|
||||
{ tag_count = -1; }
|
||||
/* | TOK_LOCAL error TOK_END_LOCAL semicolon
|
||||
{ }*/
|
||||
;
|
||||
|
||||
@@ -27,8 +27,6 @@ include_directories(
|
||||
${SCL_SOURCE_DIR}/include/express
|
||||
)
|
||||
|
||||
add_definitions( -DHAVE_CONFIG_H )
|
||||
|
||||
IF ("${CMAKE_BUILD_TYPE}" MATCHES "Debug")
|
||||
add_definitions( -DYYDEBUG ) #-Ddebugging )
|
||||
ENDIF()
|
||||
|
||||
+32
-36
@@ -330,14 +330,14 @@ TYPEget_idl_type( const Type t ) {
|
||||
|
||||
/* case TYPE_INTEGER: */
|
||||
if( class == Class_Integer_Type ) {
|
||||
return ( "SCLP23(Integer)" );
|
||||
return ( "SDAI_Integer" );
|
||||
}
|
||||
/* return ("CORBA::Long");*/
|
||||
|
||||
/* case TYPE_REAL:
|
||||
case TYPE_NUMBER: */
|
||||
if( ( class == Class_Number_Type ) || ( class == Class_Real_Type ) ) {
|
||||
return ( "SCLP23(Real)" );
|
||||
return ( "SDAI_Real" );
|
||||
}
|
||||
/* return ("CORBA::Double"); */
|
||||
|
||||
@@ -357,7 +357,7 @@ TYPEget_idl_type( const Type t ) {
|
||||
strcpy( retval, IdlEntityTypeName( t ) );
|
||||
strcat( retval, "_ptr" );
|
||||
return retval;
|
||||
/* return ("SCLP23(Application_instance_ptr)"); */
|
||||
/* return ("SDAI_Application_instance_ptr"); */
|
||||
}
|
||||
/* case TYPE_ENUM: */
|
||||
/* case TYPE_SELECT: */
|
||||
@@ -402,39 +402,35 @@ int Handle_FedPlus_Args( int i, char * arg ) {
|
||||
** Side Effects:
|
||||
** Status: complete 8/5/93
|
||||
******************************************************************/
|
||||
char *
|
||||
generate_attribute_name( Variable a, char * out ) {
|
||||
char * temp, *p, *q;
|
||||
int j;
|
||||
char * generate_attribute_name( Variable a, char * out ) {
|
||||
char * temp, *p, *q = out;
|
||||
|
||||
temp = EXPRto_string( VARget_name( a ) );
|
||||
p = temp;
|
||||
if( ! strncmp( StrToLower( p ), "self\\", 5 ) ) {
|
||||
p = p + 5;
|
||||
p = (char*)StrToLower(temp);
|
||||
if( ! strncmp(p, "self\\", 5 ) ) {
|
||||
p += 5;
|
||||
}
|
||||
/* copy p to out */
|
||||
/* DAR - fixed so that '\n's removed */
|
||||
for( j = 0, q = out; j < BUFSIZ; p++ ) {
|
||||
while (*p) {
|
||||
/* copy p to out, 1 char at time. Skip \n's and spaces, convert */
|
||||
/* '.' to '_', and convert to lowercase. */
|
||||
if( ( *p != '\n' ) && ( *p != ' ' ) ) {
|
||||
if( *p == '.' ) {
|
||||
*q = '_';
|
||||
} else {
|
||||
*q = tolower( *p );
|
||||
*q = *p;
|
||||
}
|
||||
j++;
|
||||
q++;
|
||||
}
|
||||
p++;
|
||||
}
|
||||
*q = '\0';
|
||||
free( temp );
|
||||
return out;
|
||||
}
|
||||
|
||||
char *
|
||||
generate_attribute_func_name( Variable a, char * out ) {
|
||||
char * generate_attribute_func_name( Variable a, char * out ) {
|
||||
generate_attribute_name( a, out );
|
||||
strncpy( out, CheckWord( StrToLower( out ) ), BUFSIZ );
|
||||
strncpy( out, StrToLower( out ), BUFSIZ );
|
||||
if( old_accessors ) {
|
||||
out[0] = toupper( out[0] );
|
||||
} else {
|
||||
@@ -1694,7 +1690,7 @@ ENTITYhead_print( Entity entity, FILE * file, Schema schema ) {
|
||||
fprintf( file, "\nclass %s : ", entnm );
|
||||
|
||||
/* inherit from either supertype entity class or root class of
|
||||
all - i.e. SCLP23(Application_instance) */
|
||||
all - i.e. SDAI_Application_instance */
|
||||
|
||||
if( multiple_inheritance ) {
|
||||
list = ENTITYget_supertypes( entity );
|
||||
@@ -1708,7 +1704,7 @@ ENTITYhead_print( Entity entity, FILE * file, Schema schema ) {
|
||||
if( super ) {
|
||||
fprintf( file, " public %s {\n ", ENTITYget_classname( super ) );
|
||||
} else {
|
||||
fprintf( file, " public SCLP23(Application_instance) {\n" );
|
||||
fprintf( file, " public SDAI_Application_instance {\n" );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1733,7 +1729,7 @@ void DataMemberPrintAttr (Entity entity, Variable a, FILE * file) {
|
||||
printf( "\tthe type for attribute %s is not fully implemented\n", attrnm );
|
||||
}
|
||||
if( TYPEis_entity( VARget_type( a ) ) ) {
|
||||
fprintf( file, "\tSCLP23(Application_instance_ptr) _%s ;", attrnm );
|
||||
fprintf( file, "\tSDAI_Application_instance_ptr _%s ;", attrnm );
|
||||
} else {
|
||||
fprintf( file, "\t%s _%s ;", ctype, attrnm );
|
||||
}
|
||||
@@ -1852,7 +1848,7 @@ MemberFunctionSign( Entity entity, Linked_List nonInheritedAttrList, FILE * file
|
||||
/* constructor: */
|
||||
fprintf( file, "\n %s ( ); \n", entnm );
|
||||
|
||||
fprintf( file, "\t%s (SCLP23(Application_instance) *se, int *addAttrs = 0); \n", entnm );
|
||||
fprintf( file, "\t%s (SDAI_Application_instance *se, int *addAttrs = 0); \n", entnm );
|
||||
/* copy constructor*/
|
||||
fprintf( file, " %s (%s& e ); \n", entnm, entnm );
|
||||
/* destructor: */
|
||||
@@ -1904,7 +1900,7 @@ MemberFunctionSign( Entity entity, Linked_List nonInheritedAttrList, FILE * file
|
||||
|
||||
/* print creation function for class */
|
||||
fprintf( file, "\n#if defined(__O3DB__)\n" );
|
||||
fprintf( file, "inline SCLP23(Application_instance_ptr) \ncreate_%s () { return (SCLP23(Application_instance_ptr)) new %s ; }\n",
|
||||
fprintf( file, "inline SDAI_Application_instance_ptr \ncreate_%s () { return (SDAI_Application_instance_ptr) new %s ; }\n",
|
||||
entnm, entnm );
|
||||
fprintf( file, "#else\n" );
|
||||
fprintf( file, "inline %s *\ncreate_%s () { return new %s ; }\n",
|
||||
@@ -2102,7 +2098,7 @@ LIBcopy_constructor( Entity ent, FILE * file ) {
|
||||
fprintf( file, "\n\t(new STEPattribute(*%s%d%s, %s &_%s));\n",
|
||||
ATTR_PREFIX, count,
|
||||
attrnm,
|
||||
( TYPEis_entity( t ) ? "(SCLP23(Application_instance_ptr) *)" : "" ),
|
||||
( TYPEis_entity( t ) ? "(SDAI_Application_instance_ptr *)" : "" ),
|
||||
attrnm );
|
||||
++count;
|
||||
|
||||
@@ -2276,7 +2272,7 @@ LIBstructor_print( Entity entity, FILE * file, Schema schema ) {
|
||||
ATTR_PREFIX, count,
|
||||
( VARis_type_shifter( a ) ? "R" : "" ),
|
||||
attrnm,
|
||||
( TYPEis_entity( t ) ? "(SCLP23(Application_instance_ptr) *)" : "" ),
|
||||
( TYPEis_entity( t ) ? "(SDAI_Application_instance_ptr *)" : "" ),
|
||||
attrnm );
|
||||
if( first ) {
|
||||
first = 0 ;
|
||||
@@ -2315,7 +2311,7 @@ LIBstructor_print( Entity entity, FILE * file, Schema schema ) {
|
||||
/* LIBcopy_constructor (entity, file); */
|
||||
entnm = ENTITYget_classname( entity );
|
||||
fprintf( file, "%s::%s (%s& e ) \n", entnm, entnm, entnm );
|
||||
fprintf( file, "\t{ CopyAs((SCLP23(Application_instance_ptr)) &e);\t}\n" );
|
||||
fprintf( file, "\t{ CopyAs((SDAI_Application_instance_ptr) &e);\t}\n" );
|
||||
|
||||
/* print destructor */
|
||||
/* currently empty, but should check to see if any attributes need
|
||||
@@ -2355,7 +2351,7 @@ LIBstructor_print( Entity entity, FILE * file, Schema schema ) {
|
||||
}
|
||||
|
||||
/********************/
|
||||
/* print the constructor that accepts a SCLP23(Application_instance) as an argument used
|
||||
/* print the constructor that accepts a SDAI_Application_instance as an argument used
|
||||
when building multiply inherited entities.
|
||||
*/
|
||||
|
||||
@@ -2400,10 +2396,10 @@ LIBstructor_print_w_args( Entity entity, FILE * file, Schema schema ) {
|
||||
entnm = ENTITYget_classname( entity );
|
||||
/* constructor definition */
|
||||
if( parent )
|
||||
fprintf( file, "%s::%s (SCLP23(Application_instance) *se, int *addAttrs) : %s(se, (addAttrs ? &addAttrs[1] : 0)) \n", entnm, entnm,
|
||||
fprintf( file, "%s::%s (SDAI_Application_instance *se, int *addAttrs) : %s(se, (addAttrs ? &addAttrs[1] : 0)) \n", entnm, entnm,
|
||||
parentnm );
|
||||
else {
|
||||
fprintf( file, "%s::%s( SCLP23(Application_instance) *se, int *addAttrs)\n", entnm, entnm );
|
||||
fprintf( file, "%s::%s( SDAI_Application_instance *se, int *addAttrs)\n", entnm, entnm );
|
||||
}
|
||||
|
||||
fprintf( file, "{\n" );
|
||||
@@ -2490,7 +2486,7 @@ LIBstructor_print_w_args( Entity entity, FILE * file, Schema schema ) {
|
||||
ATTR_PREFIX, count,
|
||||
( VARis_type_shifter( a ) ? "R" : "" ),
|
||||
attrnm,
|
||||
( TYPEis_entity( t ) ? "(SCLP23(Application_instance_ptr) *)" : "" ),
|
||||
( TYPEis_entity( t ) ? "(SDAI_Application_instance_ptr *)" : "" ),
|
||||
attrnm );
|
||||
|
||||
if( first ) {
|
||||
@@ -3025,7 +3021,7 @@ MODELPrintConstructorBody( Entity entity, FILES * files, Schema schema
|
||||
|
||||
n = ENTITYget_classname( entity );
|
||||
|
||||
fprintf( files->lib, " eep = new SCLP23(Entity_extent);\n" );
|
||||
fprintf( files->lib, " eep = new SDAI_Entity_extent;\n" );
|
||||
|
||||
|
||||
fprintf( files->lib, " eep->definition_(%s%s%s);\n",
|
||||
@@ -3231,10 +3227,10 @@ ENTITYprint_new( Entity entity, FILES * files, Schema schema, int externMap ) {
|
||||
fprintf( files->classes, "typedef %s_ptr\t%s_var;\n", n, n );
|
||||
|
||||
fprintf( files->classes,
|
||||
"#define %s__set \tSCLP23(DAObject__set)\n", n );
|
||||
"#define %s__set \tSDAI_DAObject__set\n", n );
|
||||
|
||||
fprintf( files->classes,
|
||||
"#define %s__set_var \tSCLP23(DAObject__set_var)\n", n );
|
||||
"#define %s__set_var \tSDAI_DAObject__set_var\n", n );
|
||||
|
||||
fprintf( files ->classes, "extern EntityDescriptor \t*%s%s%s;\n",
|
||||
SCHEMAget_name( schema ), ENT_PREFIX, ENTITYget_name( entity ) );
|
||||
@@ -3339,7 +3335,7 @@ TYPEenum_inc_print( const Type type, FILE * inc ) {
|
||||
|
||||
/* print class for enumeration */
|
||||
n = TYPEget_ctype( type );
|
||||
fprintf( inc, "\nclass %s : public SCLP23(Enum) {\n", n );
|
||||
fprintf( inc, "\nclass %s : public SDAI_Enum {\n", n );
|
||||
|
||||
fprintf( inc, " protected:\n\tEnumTypeDescriptor *type;\n\n" );
|
||||
|
||||
@@ -3938,7 +3934,7 @@ printEnumCreateHdr( FILE * inc, const Type type )
|
||||
{
|
||||
const char * nm = TYPEget_ctype( type );
|
||||
|
||||
fprintf( inc, " SCLP23(Enum) * create_%s ();\n", nm );
|
||||
fprintf( inc, " SDAI_Enum * create_%s ();\n", nm );
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -3952,7 +3948,7 @@ printEnumCreateBody( FILE * lib, const Type type )
|
||||
|
||||
strncpy( tdnm, TYPEtd_name( type ), BUFSIZ );
|
||||
|
||||
fprintf( lib, "\nSCLP23(Enum) * \ncreate_%s () \n{\n", nm );
|
||||
fprintf( lib, "\nSDAI_Enum * \ncreate_%s () \n{\n", nm );
|
||||
fprintf( lib, " return new %s( \"\", %s );\n}\n\n", nm, tdnm );
|
||||
}
|
||||
|
||||
|
||||
@@ -26,62 +26,6 @@ extern int multiple_inheritance;
|
||||
*** through out the the program fedex_plus ***/
|
||||
|
||||
|
||||
/******************************************************************
|
||||
** Procedure: CheckWord
|
||||
** Description: if word is a reserved word, it is capitalized
|
||||
** Parameters: word -- string to be checked
|
||||
** Returns: altered word if word is reserved; otherwise the original word
|
||||
** Side Effects: the word is altered in memory
|
||||
** Status: started 12/1
|
||||
******************************************************************/
|
||||
const char *
|
||||
CheckWord( const char * word ) {
|
||||
#ifdef NOT_USING_SDAI_BINDING
|
||||
/* obsolete with proposed c++ binding */
|
||||
|
||||
static char * reserved_words [] = {
|
||||
"application_marker", "asm", "attributes", "auto",
|
||||
"break", "case", "char", "class", "const", "continue",
|
||||
"default", "delete", "do", "double",
|
||||
"else", "enum", "extern",
|
||||
"float", "for", "friend", "goto", "handle",
|
||||
"if", "inline", "instance_id", "int", "long",
|
||||
"new", "nullable", "opcode", "operator", "overload",
|
||||
"private", "protected", "public", "register", "return",
|
||||
"shared", "short", "sizeof", "static", "struct", "switch",
|
||||
"this", "template", "type", "typedef", "type_name",
|
||||
"union", "unsigned",
|
||||
"val", "virtual", "void", "volatile"
|
||||
};
|
||||
int nwords = ( sizeof reserved_words / sizeof reserved_words[0] );
|
||||
int cond,
|
||||
i,
|
||||
low = 0,
|
||||
high = nwords - 1;
|
||||
|
||||
/* word is obviously not in list, if it is longer than any of the words in the list */
|
||||
if( strlen( word ) > 12 ) {
|
||||
return ( word );
|
||||
}
|
||||
|
||||
while( low <= high ) {
|
||||
i = ( low + high ) / 2;
|
||||
if( ( cond = strcmp( word, reserved_words [i] ) ) < 0 ) {
|
||||
high = i - 1;
|
||||
} else if( cond > 0 ) {
|
||||
low = i + 1;
|
||||
} else { /* word is a reserved word, capitalize it */
|
||||
printf( "** warning: reserved word %s ", word );
|
||||
*( word + 0 ) = toupper( *( word + 0 ) );
|
||||
printf( "is changed to %s **\n", word );
|
||||
|
||||
}
|
||||
}
|
||||
#endif
|
||||
return ( word );
|
||||
|
||||
}
|
||||
|
||||
/******************************************************************
|
||||
** Procedure: string functions
|
||||
** Description: These functions take a character or a string and return
|
||||
@@ -317,33 +261,33 @@ TYPEget_ctype( const Type t ) {
|
||||
|
||||
/* case TYPE_LOGICAL: */
|
||||
if( class == Class_Logical_Type ) {
|
||||
return ( "SCLP23(LOGICAL)" );
|
||||
return ( "SDAI_LOGICAL" );
|
||||
}
|
||||
|
||||
/* case TYPE_BOOLEAN: */
|
||||
if( class == Class_Boolean_Type ) {
|
||||
return ( "SCLP23(BOOLEAN)" );
|
||||
return ( "SDAI_BOOLEAN" );
|
||||
}
|
||||
|
||||
/* case TYPE_INTEGER: */
|
||||
if( class == Class_Integer_Type ) {
|
||||
return ( "SCLP23(Integer)" );
|
||||
return ( "SDAI_Integer" );
|
||||
}
|
||||
|
||||
/* case TYPE_REAL:
|
||||
case TYPE_NUMBER: */
|
||||
if( ( class == Class_Number_Type ) || ( class == Class_Real_Type ) ) {
|
||||
return ( "SCLP23(Real)" ) ;
|
||||
return ( "SDAI_Real" ) ;
|
||||
}
|
||||
|
||||
/* case TYPE_STRING: */
|
||||
if( class == Class_String_Type ) {
|
||||
return ( "SCLP23(String)" );
|
||||
return ( "SDAI_String" );
|
||||
}
|
||||
|
||||
/* case TYPE_BINARY: */
|
||||
if( class == Class_Binary_Type ) {
|
||||
return ( "SCLP23(Binary)" );
|
||||
return ( "SDAI_Binary" );
|
||||
}
|
||||
|
||||
/* case TYPE_ENTITY: */
|
||||
|
||||
@@ -286,7 +286,7 @@ SCOPEPrint( Scope scope, FILES * files, Schema schema, Express model,
|
||||
// Do the model stuff:
|
||||
fprintf( files->inc, "\n//\t***** generate Model related pieces\n" );
|
||||
fprintf( files->inc,
|
||||
"\nclass SdaiModel_contents_%s : public SCLP23(Model_contents) {\n",
|
||||
"\nclass SdaiModel_contents_%s : public SDAI_Model_contents {\n",
|
||||
SCHEMAget_name( schema ) );
|
||||
fprintf( files -> inc, "\n public:\n" );
|
||||
fprintf( files -> inc, " SdaiModel_contents_%s();\n",
|
||||
@@ -301,10 +301,10 @@ SCOPEPrint( Scope scope, FILES * files, Schema schema, Express model,
|
||||
fprintf( files->inc, "typedef SdaiModel_contents_%s_ptr SdaiModel_contents_%s_var;\n", SCHEMAget_name( schema ), SCHEMAget_name( schema ) );
|
||||
|
||||
fprintf( files -> inc,
|
||||
"SCLP23(Model_contents_ptr) create_SdaiModel_contents_%s();\n",
|
||||
"SDAI_Model_contents_ptr create_SdaiModel_contents_%s();\n",
|
||||
SCHEMAget_name( schema ) );
|
||||
fprintf( files -> lib,
|
||||
"\nSCLP23(Model_contents_ptr) create_SdaiModel_contents_%s()\n",
|
||||
"\nSDAI_Model_contents_ptr create_SdaiModel_contents_%s()\n",
|
||||
SCHEMAget_name( schema ) );
|
||||
fprintf( files -> lib, "{ return new SdaiModel_contents_%s ; }\n",
|
||||
SCHEMAget_name( schema ) );
|
||||
@@ -312,7 +312,7 @@ SCOPEPrint( Scope scope, FILES * files, Schema schema, Express model,
|
||||
fprintf( files -> lib, "\nSdaiModel_contents_%s::SdaiModel_contents_%s()\n",
|
||||
SCHEMAget_name( schema ), SCHEMAget_name( schema ) );
|
||||
fprintf( files -> lib,
|
||||
"{\n SCLP23(Entity_extent_ptr) eep = (SCLP23(Entity_extent_ptr))0;\n\n" );
|
||||
"{\n SDAI_Entity_extent_ptr eep = (SDAI_Entity_extent_ptr)0;\n\n" );
|
||||
LISTdo( list, e, Entity );
|
||||
MODELPrintConstructorBody( e, files, schema );
|
||||
LISTod;
|
||||
@@ -681,7 +681,7 @@ getMCPrint( Express express, FILE * schema_h, FILE * schema_cc ) {
|
||||
Schema schema;
|
||||
|
||||
fprintf( schema_h,
|
||||
"\nSCLP23(Model_contents_ptr) GetModelContents(char *schemaName);\n" );
|
||||
"\nSDAI_Model_contents_ptr GetModelContents(char *schemaName);\n" );
|
||||
fprintf( schema_cc, "/* Generated at %s:%d. */\n\n", __FILE__, __LINE__);
|
||||
fprintf( schema_cc, "%s%s%s%s",
|
||||
"// Generate a function to be called by Model to help it\n",
|
||||
@@ -689,24 +689,24 @@ getMCPrint( Express express, FILE * schema_h, FILE * schema_cc ) {
|
||||
"// dictionary (Registry) handle since it doesn't have a\n",
|
||||
"// predetermined way to access to the handle.\n" );
|
||||
fprintf( schema_cc,
|
||||
"\nSCLP23(Model_contents_ptr) GetModelContents(char *schemaName)\n{\n" );
|
||||
"\nSDAI_Model_contents_ptr GetModelContents(char *schemaName)\n{\n" );
|
||||
DICTdo_type_init( express->symbol_table, &de, OBJ_SCHEMA );
|
||||
schema = ( Scope )DICTdo( &de );
|
||||
fprintf( schema_cc,
|
||||
" if(!strcmp(schemaName, \"%s\"))\n",
|
||||
SCHEMAget_name( schema ) );
|
||||
fprintf( schema_cc,
|
||||
" return (SCLP23(Model_contents_ptr)) new SdaiModel_contents_%s; \n",
|
||||
" return (SDAI_Model_contents_ptr) new SdaiModel_contents_%s; \n",
|
||||
SCHEMAget_name( schema ) );
|
||||
while( ( schema = ( Scope )DICTdo( &de ) ) != 0 ) {
|
||||
fprintf( schema_cc,
|
||||
" else if(!strcmp(schemaName, \"%s\"))\n",
|
||||
SCHEMAget_name( schema ) );
|
||||
fprintf( schema_cc,
|
||||
" return (SCLP23(Model_contents_ptr)) new SdaiModel_contents_%s; \n",
|
||||
" return (SDAI_Model_contents_ptr) new SdaiModel_contents_%s; \n",
|
||||
SCHEMAget_name( schema ) );
|
||||
}
|
||||
fprintf( schema_cc, " else return (SCLP23(Model_contents_ptr)) 0;\n}\n" );
|
||||
fprintf( schema_cc, " else return (SDAI_Model_contents_ptr) 0;\n}\n" );
|
||||
}
|
||||
|
||||
/******************************************************************
|
||||
|
||||
+26
-23
@@ -32,7 +32,7 @@ char * generate_attribute_func_name( Variable a, char * out );
|
||||
void ATTRprint_access_methods_get_head( const char * classnm, Variable a, FILE * file );
|
||||
void ATTRprint_access_methods_put_head( const char * entnm, Variable a, FILE * file );
|
||||
|
||||
#define BASE_SELECT "SCLP23(Select)"
|
||||
#define BASE_SELECT "SDAI_Select"
|
||||
|
||||
#define TYPEis_primitive(t) ( !( TYPEis_entity(t) || \
|
||||
TYPEis_select (t) || \
|
||||
@@ -79,7 +79,7 @@ SEL_ITEMget_enumtype( Type t ) {
|
||||
|
||||
const char *
|
||||
TYPEget_utype( Type t ) {
|
||||
return ( TYPEis_entity( t ) ? "SCLP23(Application_instance_ptr)" : TYPEget_ctype( t ) );
|
||||
return ( TYPEis_entity( t ) ? "SDAI_Application_instance_ptr" : TYPEget_ctype( t ) );
|
||||
}
|
||||
|
||||
/*******************
|
||||
@@ -156,13 +156,16 @@ utype_member( const Linked_List list, const Type check, int rename ) {
|
||||
static char r [BUFSIZ];
|
||||
|
||||
LISTdo( list, t, Type )
|
||||
strncpy( r, TYPEget_utype( t ), BUFSIZ );
|
||||
if( strcmp( r, TYPEget_utype( check ) ) == 0 ) {
|
||||
return r;
|
||||
}
|
||||
if( rename && compareOrigTypes( check, t ) ) {
|
||||
return r;
|
||||
}
|
||||
if( TYPEis_entity( t ) && TYPEis_entity( check ) ) {
|
||||
return "SDAI_Application_instance_ptr";
|
||||
}
|
||||
strncpy( r, TYPEget_utype( t ), BUFSIZ );
|
||||
if( strcmp( r, TYPEget_utype( check ) ) == 0 ) {
|
||||
return r;
|
||||
}
|
||||
if( rename && compareOrigTypes( check, t ) ) {
|
||||
return r;
|
||||
}
|
||||
LISTod;
|
||||
return 0;
|
||||
}
|
||||
@@ -312,8 +315,8 @@ duplicate_utype_member( const Linked_List list, const Type check ) {
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
if( ! strcmp( b, "SCLP23(Integer)" ) &&
|
||||
( ! strcmp( TYPEget_utype( check ), "SCLP23(Real)" ) ) )
|
||||
if( ! strcmp( b, "SDAI_Integer" ) &&
|
||||
( ! strcmp( TYPEget_utype( check ), "SDAI_Real" ) ) )
|
||||
/* integer\'s and real\'s are not unique */
|
||||
{
|
||||
return TRUE;
|
||||
@@ -609,8 +612,8 @@ TYPEselect_inc_print_vars( const Type type, FILE * f, Linked_List dups ) {
|
||||
|
||||
fprintf( f, "\n public:\n" );
|
||||
fprintf( f,
|
||||
"\tvirtual const TypeDescriptor * AssignEntity (SCLP23(Application_instance) * se);\n"
|
||||
"\tvirtual SCLP23(Select) * NewSelect ();\n"
|
||||
"\tvirtual const TypeDescriptor * AssignEntity (SDAI_Application_instance * se);\n"
|
||||
"\tvirtual SDAI_Select * NewSelect ();\n"
|
||||
);
|
||||
|
||||
fprintf( f, "\n\tvirtual BASE_TYPE ValueType() const;\n" );
|
||||
@@ -732,7 +735,7 @@ TYPEselect_inc_print( const Type type, FILE * f ) {
|
||||
|
||||
fprintf( f, "\n#ifdef COMPILER_DEFINES_OPERATOR_EQ\n#else\n" );
|
||||
fprintf( f, "\t%s& operator =( %s * const & );\n", n, n );
|
||||
fprintf( f, "\tSCLP23(Select)& operator =( const SCLP23(Select)& );\n" );
|
||||
fprintf( f, "\tSDAI_Select& operator =( const SDAI_Select& );\n" );
|
||||
/* fprintf( f, "\t%s& operator =( const %s& );\n", n, n );*/
|
||||
fprintf( f, "#endif\n" );
|
||||
|
||||
@@ -743,8 +746,8 @@ TYPEselect_inc_print( const Type type, FILE * f ) {
|
||||
LISTod;
|
||||
|
||||
fprintf( f, "\n\t// part 6 ... UnderlyingTypeName () implemented in"
|
||||
" SCLP23(Select) class ...\n" );
|
||||
/* fprintf( f, "\tSCLP23(String) UnderlyingTypeName() const;\n" );*/
|
||||
" SDAI_Select class ...\n" );
|
||||
/* fprintf( f, "\tSDAI_String UnderlyingTypeName() const;\n" );*/
|
||||
/* fprintf( f, "\tconst EntityDescriptor * CurrentUnderlyingType();\n" );*/
|
||||
|
||||
if( dup_result ) {
|
||||
@@ -763,7 +766,7 @@ TYPEselect_inc_print( const Type type, FILE * f ) {
|
||||
|
||||
fprintf( f, "};\n" );
|
||||
|
||||
fprintf( f, "\ninline SCLP23(Select) * create_%s () { return new %s; }\n", n, n );
|
||||
fprintf( f, "\ninline SDAI_Select * create_%s () { return new %s; }\n", n, n );
|
||||
|
||||
/* DAR - moved from SCOPEPrint() */
|
||||
fprintf( f, "typedef %s * %sH;\n", n, n );
|
||||
@@ -1293,7 +1296,7 @@ TYPEselect_lib_print_part_four( const Type type, FILE * f, Schema schema,
|
||||
fprintf( f, " return *this;\n}\n\n" );
|
||||
|
||||
/* fprintf( f, "%s& %s::operator =( const %s& o )\n{\n", n,n,n );*/
|
||||
fprintf( f, "SCLP23(Select)& %s::operator =( const SCLP23(Select)& o )\n{\n", n );
|
||||
fprintf( f, "SDAI_Select& %s::operator =( const SDAI_Select& o )\n{\n", n );
|
||||
|
||||
firsttime = 1;
|
||||
LISTdo( SEL_TYPEget_items( type ), t, Type )
|
||||
@@ -1344,7 +1347,7 @@ TYPEselect_lib_print_part_four( const Type type, FILE * f, Schema schema,
|
||||
|
||||
#ifdef JNK
|
||||
/* define ShallowCopy because operator= does not always act virtual */
|
||||
fprintf( f, "SCLP23(Select)& %s::ShallowCopy ( const SCLP23(Select)& o )\n{\n", n );
|
||||
fprintf( f, "SDAI_Select& %s::ShallowCopy ( const SDAI_Select& o )\n{\n", n );
|
||||
|
||||
LISTdo( SEL_TYPEget_items( type ), t, Type )
|
||||
strncpy( x, TYPEget_name( t ), BUFSIZ );
|
||||
@@ -1762,7 +1765,7 @@ SELlib_print_protected( const Type type, FILE * f, const Schema schema ) {
|
||||
const char * snm;
|
||||
|
||||
/* SELECT::AssignEntity */
|
||||
fprintf( f, "\nconst TypeDescriptor * \n%s::AssignEntity (SCLP23(Application_instance) * se)\n"
|
||||
fprintf( f, "\nconst TypeDescriptor * \n%s::AssignEntity (SDAI_Application_instance * se)\n"
|
||||
"{\n",
|
||||
SelectName( TYPEget_name( type ) )
|
||||
);
|
||||
@@ -1812,7 +1815,7 @@ SELlib_print_protected( const Type type, FILE * f, const Schema schema ) {
|
||||
|
||||
/* SELECT::NewSelect */
|
||||
snm = SelectName( TYPEget_name( type ) );
|
||||
fprintf( f, "\nSCLP23(Select) * \n%s::NewSelect ()\n{\n", snm );
|
||||
fprintf( f, "\nSDAI_Select * \n%s::NewSelect ()\n{\n", snm );
|
||||
|
||||
fprintf( f, " %s * tmp = new %s();\n", snm, snm );
|
||||
fprintf( f, " return tmp;\n}\n" );
|
||||
@@ -1921,7 +1924,7 @@ TYPEselect_lib_print( const Type type, FILE * f, Schema schema ) {
|
||||
|
||||
#ifdef UNDERLYINGTYPE
|
||||
fprintf( f, "\n\t// part 6\n" );
|
||||
fprintf( f, "SCLP23(String) %s::UnderlyingTypeName() const\n{\n", n );
|
||||
fprintf( f, "SDAI_String %s::UnderlyingTypeName() const\n{\n", n );
|
||||
fprintf( f, " if( exists() )\n" );
|
||||
fprintf( f, " {\n" );
|
||||
LISTdo( SEL_TYPEget_items( type ), t, Type )
|
||||
@@ -2007,7 +2010,7 @@ TYPEselect_print( Type t, FILES * files, Schema schema ) {
|
||||
// structor, passing the new sel's typedescriptor to create a hybrid
|
||||
// entity - the original select pointing to a new typedesc. These fns
|
||||
// give the user an easy way to create the renamed type properly. */
|
||||
fprintf( inc, "inline SCLP23(Select) *\ncreate_%s ()", nm );
|
||||
fprintf( inc, "inline SDAI_Select *\ncreate_%s ()", nm );
|
||||
fprintf( inc, " { return new %s( %s ); }\n\n", nm, tdnm );
|
||||
fprintf( inc, "inline STEPaggregate *\ncreate_%s_agg ()", nm );
|
||||
fprintf( inc, " { return new %s_agg( %s ); }\n\n", nm, tdnm );
|
||||
|
||||
@@ -61,7 +61,7 @@ void checkSchemaName( Registry & reg, STEPfile & sf, bool ignoreErr ) {
|
||||
const Schema * sc;
|
||||
reg.ResetSchemas();
|
||||
//file id 3 is always the schema name
|
||||
SCLP23_NAME(Application_instance) *ai =
|
||||
SDAI_Application_instance *ai =
|
||||
sf.HeaderInstances()->FindFileId(3)->GetApplication_instance();
|
||||
while( ( attr = ai->NextAttribute() ) ) {
|
||||
attr->asStr(sname);
|
||||
@@ -142,4 +142,8 @@ int main( int argc, char * argv[] ) {
|
||||
sfile.WriteExchangeFile( flnm );
|
||||
sfile.Error().PrintContents(cout);
|
||||
cout << flnm << " written" << endl;
|
||||
|
||||
if( sfile.Error().severity() <= SEVERITY_INCOMPLETE ) { //lower is worse
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -115,7 +115,7 @@ int PrintAttrsHTML( const EntityDescriptor * ent, ofstream & outhtml ) {
|
||||
while( attrDesc != 0 ) {
|
||||
attrCount++;
|
||||
outhtml << "<LI>" << attrDesc->Name() << " : ";
|
||||
if( ( SCLP23( Logical ) )( attrDesc->Optional() ) == SCLLOG( LTrue ) ) {
|
||||
if( ( SDAI_Logical )( attrDesc->Optional() ) == SCLLOG( LTrue ) ) {
|
||||
outhtml << "optional ";
|
||||
}
|
||||
PrintAttrTypeWithAnchor( attrDesc->ReferentType(), outhtml );
|
||||
|
||||
@@ -9,4 +9,7 @@ FOREACH(UNITARY_SCHEMA ${UNITARY_SCHEMAS})
|
||||
SET(TEST_NAME test${SCHEMA_NAME})
|
||||
# add test
|
||||
ADD_TEST(${TEST_NAME} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/check-express ${UNITARY_SCHEMA})
|
||||
set_tests_properties( ${TEST_NAME} PROPERTIES LABELS unitary_schemas )
|
||||
ENDFOREACH(UNITARY_SCHEMA ${UNITARY_SCHEMAS})
|
||||
|
||||
add_subdirectory(p21)
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
|
||||
|
||||
#test part 21 files
|
||||
#currently, the only tests are for the schema name
|
||||
|
||||
set( schema_name_tests_head "
|
||||
ISO-10303-21;
|
||||
HEADER;
|
||||
FILE_DESCRIPTION(('SCL test file'),'2;1');
|
||||
FILE_NAME('test.stp','2011-11-29T',('mp'),(''),'0','1','2');
|
||||
")
|
||||
set( schema_name_tests_tail "
|
||||
ENDSEC;
|
||||
DATA;
|
||||
#1=DRAUGHTING_PRE_DEFINED_COLOUR('green');
|
||||
#2=COLOUR_RGB('',1.1E-2,1.2E-2,1.E0);
|
||||
ENDSEC;
|
||||
END-ISO-10303-21;
|
||||
")
|
||||
|
||||
set( schema_name_good "FILE_SCHEMA(('AUTOMOTIVE_DESIGN'));" )
|
||||
set( schema_name_good_asn "FILE_SCHEMA(('AUTOMOTIVE_DESIGN { 1 0 10303 214 1 1 1 1 }'));" )
|
||||
set( schema_name_mismatch "FILE_SCHEMA(('DOES_NOT_MATCH'));" )
|
||||
|
||||
set( p21read_ap214 "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/p21read_sdai_AP214E3_2010" )
|
||||
|
||||
file( WRITE ${CMAKE_CURRENT_BINARY_DIR}/exch_file_good.p21 "${schema_name_tests_head}${schema_name_good}${schema_name_tests_tail}" )
|
||||
file( WRITE ${CMAKE_CURRENT_BINARY_DIR}/exch_file_good_asn.p21 "${schema_name_tests_head}${schema_name_good_asn}${schema_name_tests_tail}" )
|
||||
file( WRITE ${CMAKE_CURRENT_BINARY_DIR}/exch_file_mismatch.p21 "${schema_name_tests_head}${schema_name_mismatch}${schema_name_tests_tail}" )
|
||||
|
||||
add_test( test_good_schema_name ${p21read_ap214} ${CMAKE_CURRENT_BINARY_DIR}/exch_file_good.p21 )
|
||||
add_test( test_good_schema_name_asn ${p21read_ap214} ${CMAKE_CURRENT_BINARY_DIR}/exch_file_good_asn.p21 )
|
||||
add_test( test_mismatch_schema_name ${p21read_ap214} ${CMAKE_CURRENT_BINARY_DIR}/exch_file_mismatch.p21 )
|
||||
add_test( test_ignore_schema_name ${p21read_ap214} -i ${CMAKE_CURRENT_BINARY_DIR}/exch_file_mismatch.p21 )
|
||||
|
||||
#not sure how multiple schema names should be handled for testing, by p21read, or by the schema and stepeditor libs
|
||||
#add_test( multi_schema )
|
||||
#rotator_asm:
|
||||
# FILE_SCHEMA(('CONFIG_CONTROL_DESIGN', 'GEOMETRIC_VALIDATION_PROPERTIES_MIM','SHAPE_APPEARANCE_LAYER_MIM'));
|
||||
|
||||
set_tests_properties( test_good_schema_name test_good_schema_name_asn test_mismatch_schema_name test_ignore_schema_name
|
||||
PROPERTIES DEPENDS build_cpp_sdai_AP214E3_2010 LABELS exchange_file )
|
||||
set_tests_properties( test_mismatch_schema_name PROPERTIES WILL_FAIL TRUE )
|
||||
@@ -1,7 +1,7 @@
|
||||
SCHEMA test_array;
|
||||
|
||||
ENTITY point
|
||||
coords = ARRAY[1:3] OF REAL;
|
||||
ENTITY point;
|
||||
coords : ARRAY[1:3] OF REAL;
|
||||
END_ENTITY;
|
||||
|
||||
END_SCHEMA;
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
SCHEMA test_enum_entity_name;
|
||||
|
||||
TYPE simple_datum_reference_modifier = ENUMERATION OF (
|
||||
line,
|
||||
translation);
|
||||
END_TYPE;
|
||||
|
||||
ENTITY line;
|
||||
END_ENTITY;
|
||||
|
||||
END_SCHEMA;
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user