Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4d68ec0b19 | ||
|
|
69e0813cf7 | ||
|
|
d0e2c156a1 | ||
|
|
b84921e9d8 | ||
|
|
d3418ed48c | ||
|
|
96f5f28058 | ||
|
|
ca155ce50d | ||
|
|
1bbbc219ba | ||
|
|
59cf7ec1ed | ||
|
|
f053df82db | ||
|
|
8cad6ec2aa | ||
|
|
5f345c700e | ||
|
|
37594fc4a2 | ||
|
|
d6da97ec30 | ||
|
|
5f88f509b2 | ||
|
|
d87d07a26c | ||
|
|
50b9032d32 | ||
|
|
d56795946c | ||
|
|
117ba3972f | ||
|
|
8595a291cb | ||
|
|
ee78ba9c52 | ||
|
|
575c77dda9 | ||
|
|
bd9942dc36 | ||
|
|
10999e7a48 | ||
|
|
becb8405ba | ||
|
|
dca5e0c843 | ||
|
|
47ecd2088f | ||
|
|
1cc2774b52 | ||
|
|
f12e16b3a7 | ||
|
|
ee689a10e1 | ||
|
|
3fd222218f | ||
|
|
212c11453e | ||
|
|
92d83ef14a | ||
|
|
950407a067 | ||
|
|
fb79eb2183 | ||
|
|
572e9adc0b | ||
|
|
ac702af7f3 | ||
|
|
c316f21fe6 | ||
|
|
14926414c3 | ||
|
|
260fd55f10 | ||
|
|
d94a44944b | ||
|
|
2be1cc40be | ||
|
|
809e1dd495 | ||
|
|
3aee5f353c | ||
|
|
6e6fb8197c | ||
|
|
235b1e6ca3 | ||
|
|
e99240a780 | ||
|
|
ca0824dd0d | ||
|
|
5dc04396ad | ||
|
|
3e8c11661d | ||
|
|
a63ac738af | ||
|
|
7a6ba24f81 | ||
|
|
1481950409 | ||
|
|
0073b386ef | ||
|
|
2d7ed17697 | ||
|
|
ffdeac2552 | ||
|
|
8dcfec46c9 | ||
|
|
14985062f7 | ||
|
|
e9e576e4f8 | ||
|
|
fad0cf4b3d | ||
|
|
4cd7e7c806 | ||
|
|
22cbb3efcf | ||
|
|
c415e49894 | ||
|
|
064a2b41b5 | ||
|
|
fffaba61f2 | ||
|
|
4ab01a7773 | ||
|
|
873a86de8b | ||
|
|
3a9fa997b3 | ||
|
|
2d26da7d24 | ||
|
|
c0c423c625 | ||
|
|
555a574eef | ||
|
|
82898d74a4 | ||
|
|
09f347234b | ||
|
|
3ce06bce27 | ||
|
|
e7d3c2a075 | ||
|
|
e1b374a7d6 | ||
|
|
33c66b0954 | ||
|
|
eb61193bcf | ||
|
|
2535a4f8b2 | ||
|
|
ed76f0b625 | ||
|
|
f3a82debec | ||
|
|
1da31f6501 | ||
|
|
67f8897429 | ||
|
|
81b82cdd24 | ||
|
|
28a988854f | ||
|
|
e36a1a69bd | ||
|
|
defd675944 | ||
|
|
ec97362602 | ||
|
|
586b8f8996 | ||
|
|
c1b57435b2 | ||
|
|
2b0da3fd41 | ||
|
|
15f9c40c54 | ||
|
|
0aa9b5dd97 | ||
|
|
97ef6d97ed | ||
|
|
d0293fd0c7 | ||
|
|
355f08f50e | ||
|
|
f688f2a0c9 | ||
|
|
07ed8f6968 | ||
|
|
993167ede1 | ||
|
|
870edbffa8 | ||
|
|
0f3b6262cd | ||
|
|
03fd892382 | ||
|
|
7712b9bb23 | ||
|
|
dcdd77a49d | ||
|
|
166425a9b8 | ||
|
|
ca4940e6e9 | ||
|
|
3156ea7fb6 | ||
|
|
2179c8a83b | ||
|
|
80208dcdd6 | ||
|
|
737c53ef28 | ||
|
|
ae9dbbd70e | ||
|
|
4ddce869b2 | ||
|
|
3bff65bc9b | ||
|
|
81dc369b03 | ||
|
|
388901d20c | ||
|
|
90dc1d6592 | ||
|
|
d0a425f403 | ||
|
|
2647e16a53 | ||
|
|
0869e41b28 | ||
|
|
5e9dfd7e94 | ||
|
|
dc302ea085 | ||
|
|
c771b270f3 | ||
|
|
5c8c5aaca6 | ||
|
|
2e01a01bf5 | ||
|
|
0705c500a5 | ||
|
|
c409145b25 | ||
|
|
457d51e303 | ||
|
|
69acdf329d | ||
|
|
c3f9ff563f | ||
|
|
d6b1570894 | ||
|
|
f853b997d7 | ||
|
|
ba12196a88 | ||
|
|
879f5092b7 | ||
|
|
6226717d18 | ||
|
|
784285605e | ||
|
|
71bd7b235a | ||
|
|
13204e4027 | ||
|
|
48dff49299 | ||
|
|
3ed8797097 | ||
|
|
a13ba2152a | ||
|
|
ed8474e132 | ||
|
|
da0a395c2d | ||
|
|
0bb182b4e7 | ||
|
|
1cfb41d6b3 | ||
|
|
65791a2812 | ||
|
|
ca50d5352f | ||
|
|
cb35164af7 | ||
|
|
88e9634541 | ||
|
|
e54780743a | ||
|
|
6aa4695322 | ||
|
|
deb55618fe | ||
|
|
c4dd81a0bc | ||
|
|
402225e3e8 | ||
|
|
73cc97f8ff | ||
|
|
86b9f12098 | ||
|
|
d6aa13f4b2 | ||
|
|
93678232d8 | ||
|
|
04d29c0bfb | ||
|
|
4dc08910c6 | ||
|
|
4c5a8e038d | ||
|
|
d06753403c | ||
|
|
d35f73f87f | ||
|
|
d190a1e042 | ||
|
|
dc30ee21fd | ||
|
|
fa615a1786 | ||
|
|
59349657da | ||
|
|
dbdf7a99f1 | ||
|
|
ee908d69ed | ||
|
|
d2e40ddf91 | ||
|
|
c6bc7ec185 | ||
|
|
f491d500a6 | ||
|
|
3ed94ababd | ||
|
|
96fdcf9e54 | ||
|
|
dd4538ce50 | ||
|
|
373d415a07 | ||
|
|
de3495d03f | ||
|
|
6871bc4eca | ||
|
|
6b95067732 | ||
|
|
99abb18825 | ||
|
|
c4971681e5 | ||
|
|
b277759f58 |
+39
-17
@@ -48,7 +48,7 @@ ENDIF(COMMAND CMAKE_POLICY)
|
||||
PROJECT(SCL)
|
||||
|
||||
if( CMAKE_BUILD_TYPE STREQUAL "" )
|
||||
message( "Debug build - to override, rerun cmake with '-DCMAKE_BUILD_TYPE=Release'." )
|
||||
message( "-- Debug build - to override, rerun cmake with '-DCMAKE_BUILD_TYPE=Release'." )
|
||||
set( CMAKE_BUILD_TYPE Debug )
|
||||
endif()
|
||||
|
||||
@@ -58,6 +58,9 @@ OPTION(BUILD_SHARED_LIBS "Build shared libraries" ON)
|
||||
# build static libs by default
|
||||
OPTION(BUILD_STATIC_LIBS "Build static libraries" OFF)
|
||||
|
||||
OPTION(PYTHON_GENERATOR "Compile fedex_plus_python" ON)
|
||||
OPTION(CPP_GENERATOR "Compile fedex_plus" ON)
|
||||
|
||||
# Set version
|
||||
SET(SCL_VERSION_MAJOR "3")
|
||||
SET(SCL_VERSION_MINOR "2")
|
||||
@@ -176,8 +179,8 @@ IF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
|
||||
IF ("${CMAKE_BUILD_TYPE}" MATCHES "Release")
|
||||
SET(CMAKE_INSTALL_PREFIX "/usr")
|
||||
ELSEIF ("${CMAKE_BUILD_TYPE}" MATCHES "Debug")
|
||||
MESSAGE("setting debug output dir")
|
||||
SET(CMAKE_INSTALL_PREFIX "${SCL_SOURCE_DIR}/../scl-install")
|
||||
MESSAGE("--- Setting debug install dir to ${CMAKE_INSTALL_PREFIX}")
|
||||
ELSE("${CMAKE_BUILD_TYPE}" MATCHES "Release")
|
||||
SET(CMAKE_INSTALL_PREFIX "/usr/local")
|
||||
ENDIF ("${CMAKE_BUILD_TYPE}" MATCHES "Release")
|
||||
@@ -204,33 +207,51 @@ INCLUDE(${SCL_CMAKE_DIR}/FindYACC.cmake)
|
||||
CHECK_INCLUDE_FILE(ndir.h HAVE_NDIR_H)
|
||||
CHECK_INCLUDE_FILE(stdarg.h HAVE_STDARG_H)
|
||||
CHECK_INCLUDE_FILE(sys/stat.h HAVE_SYS_STAT_H)
|
||||
CHECK_INCLUDE_FILE(sys/param.h HAVE_SYS_PARAM_H)
|
||||
CHECK_INCLUDE_FILE(sysent.h HAVE_SYSENT_H)
|
||||
CHECK_INCLUDE_FILE(unistd.h HAVE_UNISTD_H)
|
||||
CHECK_INCLUDE_FILE(dirent.h HAVE_DIRENT_H)
|
||||
CHECK_INCLUDE_FILE(stdbool.h HAVE_STDBOOL_H)
|
||||
CHECK_INCLUDE_FILE(process.h HAVE_PROCESS_H)
|
||||
CHECK_INCLUDE_FILE(io.h HAVE_IO_H)
|
||||
|
||||
CHECK_FUNCTION_EXISTS(abs HAVE_ABS)
|
||||
CHECK_FUNCTION_EXISTS(memcpy HAVE_MEMCPY)
|
||||
CHECK_FUNCTION_EXISTS(memmove HAVE_MEMMOVE)
|
||||
CHECK_FUNCTION_EXISTS(getopt HAVE_GETOPT)
|
||||
|
||||
CHECK_TYPE_SIZE("ssize_t" SSIZE_T)
|
||||
|
||||
#set GIT_COMMIT_ID to the output of `git describe`
|
||||
find_package(Git)
|
||||
if(GIT_FOUND)
|
||||
execute_process(COMMAND ${GIT_EXECUTABLE} describe --tags RESULT_VARIABLE res_var OUTPUT_VARIABLE GIT_COM_ID )
|
||||
if( NOT ${res_var} EQUAL 0 )
|
||||
set( GIT_COMMIT_ID "unknown (git failed!)")
|
||||
message( WARNING "Git failed (not a repo?). Build will not contain git revision info." )
|
||||
endif()
|
||||
string( REPLACE "\n" "" GIT_COMMIT_ID ${GIT_COM_ID} )
|
||||
else()
|
||||
set( GIT_COMMIT_ID "unknown (git not found!)")
|
||||
message( WARNING "Git not found. Build will not contain git revision info." )
|
||||
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( -Wall )
|
||||
################ create scl_version_string.h, http://stackoverflow.com/questions/3780667
|
||||
# Using 'ver_string' instead of 'scl_version_string.h' is a trick to force the
|
||||
# command to always execute when the custom target is built. It works because
|
||||
# a file by that name never exists.
|
||||
add_custom_target(version_string ALL
|
||||
DEPENDS ver_string )
|
||||
# creates scl_version_string.h using cmake script
|
||||
add_custom_command(OUTPUT ver_string ${CMAKE_CURRENT_BINARY_DIR}/include/scl_version_string.h
|
||||
COMMAND ${CMAKE_COMMAND} -DSOURCE_DIR=${SCL_SOURCE_DIR}
|
||||
-DBINARY_DIR=${SCL_BINARY_DIR}
|
||||
-P ${SCL_CMAKE_DIR}/scl_version_string.cmake)
|
||||
# scl_version_string.h is a generated file
|
||||
set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/include/scl_version_string.h
|
||||
PROPERTIES GENERATED TRUE
|
||||
HEADER_FILE_ONLY TRUE )
|
||||
################
|
||||
|
||||
if(MSVC)
|
||||
# add_definitions( -Wall )
|
||||
add_definitions( -D__MSVC__ -D__WIN32__ )
|
||||
# Disable warning for preferred usage of secure functions (example strcpy should be strcpy_s, ...)
|
||||
add_definitions( -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS )
|
||||
elseif(BORLAND)
|
||||
add_definitions( -D__BORLAND__ -D__WIN32__ )
|
||||
else()
|
||||
add_definitions( -pedantic -W -Wall -Wundef -Wfloat-equal -Wshadow -Winline -Wno-long-long )
|
||||
endif()
|
||||
|
||||
include_directories(
|
||||
${SCL_SOURCE_DIR}/include
|
||||
@@ -240,6 +261,7 @@ include_directories(
|
||||
ADD_SUBDIRECTORY(src/express)
|
||||
ADD_SUBDIRECTORY(src/exppp)
|
||||
ADD_SUBDIRECTORY(src/fedex_plus)
|
||||
ADD_SUBDIRECTORY(src/fedex_python)
|
||||
ADD_SUBDIRECTORY(src/clstepcore)
|
||||
ADD_SUBDIRECTORY(src/cleditor)
|
||||
ADD_SUBDIRECTORY(src/cldai)
|
||||
|
||||
@@ -6,7 +6,7 @@ STEP Class Library.
|
||||
These installation requires that you have the following software
|
||||
available:
|
||||
|
||||
- C and C++ compilers (only gcc has been tested recently)
|
||||
- C and C++ compilers (Tested with GCC, MSVC, Embarcadero)
|
||||
- bison, byacc, or yacc (only bison has been tested recently)
|
||||
- flex or lex (only flex has been tested recently)
|
||||
- CMake
|
||||
@@ -21,12 +21,22 @@ Installation
|
||||
* Build system uses CMake now: configure, Makefile, and all
|
||||
autotools files have been removed, as has mkProbe.
|
||||
|
||||
* To build:
|
||||
cd scl
|
||||
mkdir build
|
||||
cd build
|
||||
cmake ..
|
||||
make
|
||||
* Building SCL from the command prompt:
|
||||
- cd scl
|
||||
- mkdir build
|
||||
- cd build
|
||||
- cmake ..
|
||||
- make
|
||||
- make install # optional
|
||||
|
||||
* Building SCL from the GUI:
|
||||
- Run cmake-gui, set it to build in scl/build
|
||||
- Select the correct build file generator
|
||||
- Press Configure
|
||||
- Change options as necessary, configuring again afterwards
|
||||
- If there are errors, some options may not be visible until the error is resolved
|
||||
- Press Generate
|
||||
- Open the main build file using your preferred build tool
|
||||
|
||||
* Build options (append to the 'cmake ..' line):
|
||||
-DBUILD_SCHEMAS="path/to/schema.exp;path/to/schema2.exp"
|
||||
@@ -45,3 +55,16 @@ Installation
|
||||
-DCMAKE_BUILD_TYPE=Release
|
||||
- this causes binaries to be built without debugging information
|
||||
- without this, cmake defaults to a Debug build
|
||||
|
||||
* Using CTest to test SCL:
|
||||
- Read the comments in run_ctest.cmake
|
||||
- (OPTIONAL) Create scl/../.SCL_CTEST_PREFS.cmake, and set variables
|
||||
in it (this file is required for CDash submission to be enabled)
|
||||
- Run tests with `ctest -S run_ctest.cmake`
|
||||
|
||||
* Using CTest to regenerate the schema matrix on the github SCL wiki:
|
||||
- Requires:
|
||||
- git
|
||||
- python
|
||||
- a clone of the git repo for the wiki at scl/../wiki-scl
|
||||
- run `ctest -S ctest_matrix.cmake`
|
||||
|
||||
@@ -1,5 +1,23 @@
|
||||
STEP Class Library ------ http://github.com/mpictor/StepClassLibrary
|
||||
************************************************************************
|
||||
Release 0.5 (Feb 23, 2012)
|
||||
|
||||
New since v0.4:
|
||||
* MSVC and Embarcadero support, along with many warning fixes
|
||||
* Experimental Python support
|
||||
* Now handles most features of EXPRESS - all included schemas,
|
||||
with the exception of AP209 CD, are parsed without error. Enums are
|
||||
now in their own dictionary. Allow indexing on aggregates, generics,
|
||||
and binaries.
|
||||
* Changes to fedex_plus that improve the generated c++ - use a
|
||||
namespace, break up large static strings, make EXPRESS multiple
|
||||
inheritance work by not printing multiple copies of inherited members.
|
||||
All schemas now compile without error, but there are numerous warnings.
|
||||
* Exchange files: handle all comments, fill in some missing attributes.
|
||||
* More cleanup of source code, more documentation in scl/doc
|
||||
* Special thanks to @davyw and @tpaviot for their large contributions
|
||||
(MSVC and Python, respectively)
|
||||
************************************************************************
|
||||
Release 0.4 (Nov 13, 2011)
|
||||
|
||||
New since v0.3:
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
***********************************************************************
|
||||
Step Class Library v0.4 -- http://github.com/mpictor/StepClassLibrary
|
||||
Step Class Library v0.5 -- 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
|
||||
to that schema. SCL once worked with ObjectStore, OODB, and
|
||||
CORBA IDL - but that code has not been used in a very long time.
|
||||
We are in the process of removing this code because ObjectStore,
|
||||
CORBA, etc. are no longer part of the STEP standard.
|
||||
C++ source code that can read and write Part 21 files conforming
|
||||
to that schema. In addition to C++, v0.5 includes experimental
|
||||
support for Python.
|
||||
|
||||
* SCL is packaged along with some other tools. See
|
||||
"THE NIST STEP TOOLSET", below. In particular, Data Probe
|
||||
@@ -21,36 +19,7 @@ Step Class Library v0.4 -- http://github.com/mpictor/StepClassLibrary
|
||||
* Build system uses only CMake now: configure, Makefile, and all
|
||||
autotools files have been removed, as has mkProbe.
|
||||
|
||||
* To build:
|
||||
cd scl
|
||||
mkdir build
|
||||
cd build
|
||||
cmake ..
|
||||
make
|
||||
|
||||
* Build options (append to the 'cmake ..' line):
|
||||
-DBUILD_SCHEMAS="path/to/schema.exp;path/to/schema2.exp"
|
||||
- this generates c++ for the schema, and compiles it into a
|
||||
library. Also works with directories, as long as each dir only
|
||||
has one express file.
|
||||
- multiple files/directories are separated by semicolons
|
||||
- this also builds a 'p21read' program, which reads one step file
|
||||
and writes another. It may change whitespace or remove comments;
|
||||
otherwise, the input and output files should be identical. If
|
||||
they are not identical, either the file does not match the
|
||||
schema, or SCL generated incorrect source code.
|
||||
-DBUILD_SCHEMAS=ALL
|
||||
- Added to make use of ctest easier. If BUILD_SCHEMAS == ALL,
|
||||
then CMake adds each *.exp file found in data/.
|
||||
-DCMAKE_BUILD_TYPE=Release
|
||||
- this causes binaries to be built without debugging information
|
||||
- without this, cmake defaults to a Debug build
|
||||
|
||||
* Using CTest to test SCL:
|
||||
- Read the comments in run_ctest.cmake
|
||||
- (OPTIONAL) Create scl/../.SCL_CTEST_PREFS.cmake, and set variables
|
||||
in it (this file is required for CDash submission to be enabled)
|
||||
- Run tests with `ctest -S run_ctest.cmake`
|
||||
* Building and testing SCL - see the INSTALL file
|
||||
|
||||
***********************************************************************
|
||||
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
0.5
|
||||
@@ -0,0 +1,48 @@
|
||||
#use git for a pretty commit id
|
||||
#uses 'git describe --tags', so tags are required in the repo
|
||||
#create a tag with 'git tag <name>' and 'git push --tags'
|
||||
|
||||
# http://stackoverflow.com/questions/3780667
|
||||
# http://www.cmake.org/pipermail/cmake/2009-February/027014.html
|
||||
|
||||
#scl_version_string.h defines scl_version() which returns a pretty commit description and a build timestamp.
|
||||
|
||||
set(VERS_FILE ${SOURCE_DIR}/SCL_VERSION.txt )
|
||||
if( EXISTS ${SOURCE_DIR}/.git )
|
||||
find_package(Git QUIET)
|
||||
if(GIT_FOUND)
|
||||
execute_process(COMMAND ${GIT_EXECUTABLE} describe --tags RESULT_VARIABLE res_var OUTPUT_VARIABLE GIT_COMMIT_ID )
|
||||
if( NOT ${res_var} EQUAL 0 )
|
||||
file( READ ${VERS_FILE} GIT_COMMIT_ID LIMIT 255 )
|
||||
message( WARNING "Git failed (probably no tags in repo). Build will contain revision info from ${VERS_FILE}." )
|
||||
endif()
|
||||
else(GIT_FOUND)
|
||||
file( READ ${VERS_FILE} GIT_COMMIT_ID LIMIT 255 )
|
||||
message( WARNING "Git not found. Build will contain revision info from ${VERS_FILE}." )
|
||||
endif(GIT_FOUND)
|
||||
else()
|
||||
file( READ ${VERS_FILE} GIT_COMMIT_ID LIMIT 255 )
|
||||
message( WARNING "Git failed ('.git' not found). Build will contain revision info from ${VERS_FILE}." )
|
||||
endif()
|
||||
|
||||
string( REPLACE "\n" "" GIT_COMMIT_ID ${GIT_COMMIT_ID} )
|
||||
|
||||
set( vstring "//scl_version_string.h - written by cmake. Changes will be lost!\n"
|
||||
"#ifndef SCL_VERSION_STRING\n"
|
||||
"#define SCL_VERSION_STRING\n\n"
|
||||
"/*\n** Returns a string like \"test-1-g5e1fb47, built on <timestamp>\", where test is the\n"
|
||||
"** name of the last tagged git revision, 1 is the number of commits since that tag,\n"
|
||||
"** 'g' is unknown, 5e1fb47 is the first 7 chars of the git sha1 commit id, and\n"
|
||||
"** <timestamp> is the output of your system's 'date' command.\n*/\n\n"
|
||||
"const char* scl_version() {\n"
|
||||
" return \"git commit id ${GIT_COMMIT_ID}, built at \"__TIME__\" on \"__DATE__\;\n"
|
||||
"}\n\n"
|
||||
"#endif\n"
|
||||
)
|
||||
|
||||
file(WRITE scl_version_string.h.txt ${vstring} )
|
||||
# copy the file to the final header only if the version changes
|
||||
# reduces needless rebuilds
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||
scl_version_string.h.txt ${BINARY_DIR}/include/scl_version_string.h)
|
||||
message("-- scl_version_string.h is up-to-date.")
|
||||
@@ -0,0 +1,57 @@
|
||||
# run_ctest.cmake
|
||||
# `ctest -S run_ctest.cmake`
|
||||
|
||||
set( CTEST_SOURCE_DIRECTORY . )
|
||||
set( CTEST_BINARY_DIRECTORY build_matrix )
|
||||
set( CTEST_CMAKE_GENERATOR "Unix Makefiles" )
|
||||
set( CTEST_MEMORYCHECK_COMMAND /usr/bin/valgrind )
|
||||
set( CTEST_INITIAL_CACHE "
|
||||
SITE:STRING=${CTEST_SITE}
|
||||
BUILDNAME:STRING=${CTEST_BUILD_NAME}
|
||||
ENABLE_TESTING:BOOL=ON
|
||||
CMAKE_BUILD_TYPE:STRING=Debug
|
||||
")
|
||||
|
||||
# find number of processors, for faster builds
|
||||
# from http://www.kitware.com/blog/home/post/63
|
||||
if(NOT DEFINED PROCESSOR_COUNT)
|
||||
# Unknown:
|
||||
set(PROCESSOR_COUNT 0)
|
||||
|
||||
# Linux:
|
||||
set(cpuinfo_file "/proc/cpuinfo")
|
||||
if(EXISTS "${cpuinfo_file}")
|
||||
file(STRINGS "${cpuinfo_file}" procs REGEX "^processor.: [0-9]+$")
|
||||
list(LENGTH procs PROCESSOR_COUNT)
|
||||
endif()
|
||||
|
||||
# Mac:
|
||||
if(APPLE)
|
||||
find_program(cmd_sys_pro "system_profiler")
|
||||
if(cmd_sys_pro)
|
||||
execute_process(COMMAND ${cmd_sys_pro} OUTPUT_VARIABLE info)
|
||||
string(REGEX REPLACE "^.*Total Number Of Cores: ([0-9]+).*$" "\\1"
|
||||
PROCESSOR_COUNT "${info}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Windows:
|
||||
if(WIN32)
|
||||
set(PROCESSOR_COUNT "$ENV{NUMBER_OF_PROCESSORS}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(CTEST_BUILD_FLAGS "-j${PROCESSOR_COUNT}")
|
||||
|
||||
|
||||
ctest_start(matrix)
|
||||
ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY})
|
||||
ctest_configure( BUILD "${CTEST_BINARY_DIRECTORY}" OPTIONS -DENABLE_TESTING=ON )
|
||||
ctest_build( BUILD "${CTEST_BINARY_DIRECTORY}" )
|
||||
message("running tests")
|
||||
ctest_test( BUILD "${CTEST_BINARY_DIRECTORY}" PARALLEL_LEVEL ${PROCESSOR_COUNT}
|
||||
INCLUDE_LABEL "cpp_schema_....*" )
|
||||
|
||||
message("running python script")
|
||||
execute_process( COMMAND python ../misc/wiki-scripts/update-matrix.py
|
||||
WORKING_DIRECTORY ${CTEST_BINARY_DIRECTORY} )
|
||||
+18
-2
@@ -63,11 +63,22 @@ FUNCTION(BUILD_A_SCHEMA SCHEMA_FILE)
|
||||
WORKING_DIRECTORY ${SCHEMA_OUTPUT_DIR}
|
||||
COMMENT "Running fedex_plus for ${SCHEMA_SHORT_NAME}..."
|
||||
VERBATIM )
|
||||
if(MSVC OR BORLAND)
|
||||
add_definitions( -DSCL_SCHEMA_DLL_EXPORTS )
|
||||
add_definitions( -DSCL_EXPRESS_DLL_IMPORTS )
|
||||
add_definitions( -DSCL_UTILS_DLL_IMPORTS )
|
||||
add_definitions( -DSCL_DAI_DLL_IMPORTS )
|
||||
add_definitions( -DSCL_CORE_DLL_IMPORTS )
|
||||
add_definitions( -DSCL_EDITOR_DLL_IMPORTS )
|
||||
endif()
|
||||
add_library( ${PROJECT_NAME} SHARED ${FEDEX_OUT} )
|
||||
target_link_libraries(${PROJECT_NAME} stepdai stepcore express stepeditor )
|
||||
target_link_libraries(${PROJECT_NAME} stepdai stepcore express stepeditor steputils )
|
||||
add_dependencies( ${PROJECT_NAME} generate_cpp_${SCHEMA_SHORT_NAME} )
|
||||
set_target_properties( ${PROJECT_NAME} PROPERTIES COMPILE_FLAGS
|
||||
${${PROJECT_NAME}_COMPILE_FLAGS} )
|
||||
if(APPLE)
|
||||
set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS "-flat_namespace -undefined suppress")
|
||||
endif(APPLE)
|
||||
TESTABLE_TARGET( ${PROJECT_NAME} )
|
||||
|
||||
add_test( NAME generate_cpp_${SCHEMA_SHORT_NAME}
|
||||
@@ -85,7 +96,12 @@ FUNCTION(BUILD_A_SCHEMA SCHEMA_FILE)
|
||||
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 )
|
||||
if(MSVC OR BORLAND)
|
||||
add_executable( p21read_${PROJECT_NAME} ${SCL_SOURCE_DIR}/src/test/p21read/p21read.cc ${SCL_SOURCE_DIR}/src/fedex_plus/xgetopt.cc )
|
||||
else()
|
||||
add_executable( p21read_${PROJECT_NAME} ${SCL_SOURCE_DIR}/src/test/p21read/p21read.cc )
|
||||
endif()
|
||||
add_dependencies( p21read_${PROJECT_NAME} version_string )
|
||||
target_link_libraries( p21read_${PROJECT_NAME} ${PROJECT_NAME} )
|
||||
set_target_properties( p21read_${PROJECT_NAME} PROPERTIES COMPILE_FLAGS
|
||||
${${PROJECT_NAME}_COMPILE_FLAGS} )
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
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
File diff suppressed because it is too large
Load Diff
+49
-48
@@ -1,57 +1,58 @@
|
||||
extern int exppp_nesting_indent; /* default nesting indent */
|
||||
extern int exppp_continuation_indent; /* default nesting indent for */
|
||||
#include <scl_export.h>
|
||||
|
||||
extern SCL_EXPPP_EXPORT int exppp_nesting_indent; /* default nesting indent */
|
||||
extern SCL_EXPPP_EXPORT int exppp_continuation_indent; /* default nesting indent for */
|
||||
/* continuation lines */
|
||||
extern int exppp_linelength; /* leave some slop for closing */
|
||||
extern SCL_EXPPP_EXPORT int exppp_linelength; /* leave some slop for closing */
|
||||
/* parens. \n is not included in */
|
||||
/* this count either */
|
||||
extern bool exppp_rmpp; /* if true, create rmpp */
|
||||
extern bool exppp_alphabetize; /* if true, alphabetize */
|
||||
extern bool exppp_terse; /* don't describe action to stdout */
|
||||
extern bool exppp_reference_info; /* if true, add commentary */
|
||||
extern SCL_EXPPP_EXPORT bool exppp_rmpp; /* if true, create rmpp */
|
||||
extern SCL_EXPPP_EXPORT bool exppp_alphabetize; /* if true, alphabetize */
|
||||
extern SCL_EXPPP_EXPORT bool exppp_terse; /* don't describe action to stdout */
|
||||
extern SCL_EXPPP_EXPORT bool exppp_reference_info; /* if true, add commentary */
|
||||
/* about where things came from */
|
||||
extern bool exppp_preserve_comments; /* if true, preserve comments where */
|
||||
extern SCL_EXPPP_EXPORT bool exppp_preserve_comments; /* if true, preserve comments where */
|
||||
/* possible */
|
||||
extern char * exppp_output_filename; /* force output filename */
|
||||
extern bool exppp_output_filename_reset; /* if true, force output filename */
|
||||
extern SCL_EXPPP_EXPORT char * exppp_output_filename; /* force output filename */
|
||||
|
||||
void EXPRESSout( Express e );
|
||||
SCL_EXPPP_EXPORT void EXPRESSout( Express e );
|
||||
|
||||
void ENTITYout( Entity e );
|
||||
void EXPRout( Expression expr );
|
||||
void FUNCout( Function f );
|
||||
void PROCout( Procedure p );
|
||||
void RULEout( Rule r );
|
||||
char * SCHEMAout( Schema s );
|
||||
void SCHEMAref_out( Schema s );
|
||||
void STMTout( Statement s );
|
||||
void TYPEout( Type t );
|
||||
void TYPEhead_out( Type t );
|
||||
void TYPEbody_out( Type t );
|
||||
void WHEREout( Linked_List w );
|
||||
SCL_EXPPP_EXPORT void ENTITYout( Entity e );
|
||||
SCL_EXPPP_EXPORT void EXPRout( Expression expr );
|
||||
SCL_EXPPP_EXPORT void FUNCout( Function f );
|
||||
SCL_EXPPP_EXPORT void PROCout( Procedure p );
|
||||
SCL_EXPPP_EXPORT void RULEout( Rule r );
|
||||
SCL_EXPPP_EXPORT char * SCHEMAout( Schema s );
|
||||
SCL_EXPPP_EXPORT void SCHEMAref_out( Schema s );
|
||||
SCL_EXPPP_EXPORT void STMTout( Statement s );
|
||||
SCL_EXPPP_EXPORT void TYPEout( Type t );
|
||||
SCL_EXPPP_EXPORT void TYPEhead_out( Type t );
|
||||
SCL_EXPPP_EXPORT void TYPEbody_out( Type t );
|
||||
SCL_EXPPP_EXPORT void WHEREout( Linked_List w );
|
||||
|
||||
char * REFto_string( Dictionary refdict, Linked_List reflist, char * type, int level );
|
||||
char * ENTITYto_string( Entity e );
|
||||
char * SUBTYPEto_string( Expression e );
|
||||
char * EXPRto_string( Expression expr );
|
||||
char * FUNCto_string( Function f );
|
||||
char * PROCto_string( Procedure p );
|
||||
char * RULEto_string( Rule r );
|
||||
char * SCHEMAref_to_string( Schema s );
|
||||
char * STMTto_string( Statement s );
|
||||
char * TYPEto_string( Type t );
|
||||
char * TYPEhead_to_string( Type t );
|
||||
char * TYPEbody_to_string( Type t );
|
||||
char * WHEREto_string( Linked_List w );
|
||||
SCL_EXPPP_EXPORT char * REFto_string( Dictionary refdict, Linked_List reflist, char * type, int level );
|
||||
SCL_EXPPP_EXPORT char * ENTITYto_string( Entity e );
|
||||
SCL_EXPPP_EXPORT char * SUBTYPEto_string( Expression e );
|
||||
SCL_EXPPP_EXPORT char * EXPRto_string( Expression expr );
|
||||
SCL_EXPPP_EXPORT char * FUNCto_string( Function f );
|
||||
SCL_EXPPP_EXPORT char * PROCto_string( Procedure p );
|
||||
SCL_EXPPP_EXPORT char * RULEto_string( Rule r );
|
||||
SCL_EXPPP_EXPORT char * SCHEMAref_to_string( Schema s );
|
||||
SCL_EXPPP_EXPORT char * STMTto_string( Statement s );
|
||||
SCL_EXPPP_EXPORT char * TYPEto_string( Type t );
|
||||
SCL_EXPPP_EXPORT char * TYPEhead_to_string( Type t );
|
||||
SCL_EXPPP_EXPORT char * TYPEbody_to_string( Type t );
|
||||
SCL_EXPPP_EXPORT char * WHEREto_string( Linked_List w );
|
||||
|
||||
int REFto_buffer( Dictionary refdict, Linked_List reflist, char * type, int level, char * buffer, int length );
|
||||
int ENTITYto_buffer( Entity e, char * buffer, int length );
|
||||
int EXPRto_buffer( Expression e, char * buffer, int length );
|
||||
int FUNCto_buffer( Function e, char * buffer, int length );
|
||||
int PROCto_buffer( Procedure e, char * buffer, int length );
|
||||
int RULEto_buffer( Rule e, char * buffer, int length );
|
||||
int SCHEMAref_to_buffer( Schema s, char * buffer, int length );
|
||||
int STMTto_buffer( Statement s, char * buffer, int length );
|
||||
int TYPEto_buffer( Type t, char * buffer, int length );
|
||||
int TYPEhead_to_buffer( Type t, char * buffer, int length );
|
||||
int TYPEbody_to_buffer( Type t, char * buffer, int length );
|
||||
int WHEREto_buffer( Linked_List w, char * buffer, int length );
|
||||
SCL_EXPPP_EXPORT int REFto_buffer( Dictionary refdict, Linked_List reflist, char * type, int level, char * buffer, int length );
|
||||
SCL_EXPPP_EXPORT int ENTITYto_buffer( Entity e, char * buffer, int length );
|
||||
SCL_EXPPP_EXPORT int EXPRto_buffer( Expression e, char * buffer, int length );
|
||||
SCL_EXPPP_EXPORT int FUNCto_buffer( Function e, char * buffer, int length );
|
||||
SCL_EXPPP_EXPORT int PROCto_buffer( Procedure e, char * buffer, int length );
|
||||
SCL_EXPPP_EXPORT int RULEto_buffer( Rule e, char * buffer, int length );
|
||||
SCL_EXPPP_EXPORT int SCHEMAref_to_buffer( Schema s, char * buffer, int length );
|
||||
SCL_EXPPP_EXPORT int STMTto_buffer( Statement s, char * buffer, int length );
|
||||
SCL_EXPPP_EXPORT int TYPEto_buffer( Type t, char * buffer, int length );
|
||||
SCL_EXPPP_EXPORT int TYPEhead_to_buffer( Type t, char * buffer, int length );
|
||||
SCL_EXPPP_EXPORT int TYPEbody_to_buffer( Type t, char * buffer, int length );
|
||||
SCL_EXPPP_EXPORT int WHEREto_buffer( Linked_List w, char * buffer, int length );
|
||||
|
||||
+22
-43
@@ -1,10 +1,8 @@
|
||||
#ifndef ALGORITHM_H
|
||||
#define ALGORITHM_H
|
||||
|
||||
/* $Id: alg.h,v 1.4 1997/01/21 19:17:11 dar Exp $ */
|
||||
|
||||
/************************************************************************
|
||||
** Module: Algorithm
|
||||
/** **********************************************************************
|
||||
** Module: Algorithm \file alg.h
|
||||
** Description: This module implements the Algorithm abstraction. An
|
||||
** algorithm can be a procedure, a function, or a rule. It consists
|
||||
** of a name, a return type (for functions and rules), a list of
|
||||
@@ -69,50 +67,47 @@ typedef struct Where_ * Where;
|
||||
/* hidden type definitions */
|
||||
/***************************/
|
||||
|
||||
/* each formal tag has one of these structs allocated to it */
|
||||
/* As each (real) call is resolved, the tag->type is temporarily borrowed */
|
||||
/** each formal tag has one of these structs allocated to it
|
||||
* As each (real) call is resolved, the tag->type is temporarily borrowed
|
||||
*/
|
||||
struct tag {
|
||||
char * name;
|
||||
Type type;
|
||||
};
|
||||
|
||||
/* location of fulltext of algorithm in source file */
|
||||
/** location of fulltext of algorithm in source file */
|
||||
struct FullText {
|
||||
char * filename;
|
||||
unsigned int start, end;
|
||||
};
|
||||
|
||||
/* 'parameters' are lists of lists of (type) expressions */
|
||||
/** 'parameters' are lists of lists of (type) expressions */
|
||||
struct Procedure_ {
|
||||
int pcount; /* # of parameters */
|
||||
int tag_count; /* # of different parameter tags */
|
||||
int pcount; /**< # of parameters */
|
||||
int tag_count; /**< # of different parameter tags */
|
||||
Linked_List parameters;
|
||||
Linked_List body;
|
||||
struct FullText text;
|
||||
int builtin; /* builtin if true */
|
||||
int builtin; /**< builtin if true */
|
||||
};
|
||||
|
||||
struct Function_ {
|
||||
int pcount; /* # of parameters */
|
||||
int tag_count; /* # of different parameter/return value tags */
|
||||
int pcount; /**< # of parameters */
|
||||
int tag_count; /**< # of different parameter/return value tags */
|
||||
Linked_List parameters;
|
||||
Linked_List body;
|
||||
Type return_type;
|
||||
struct FullText text;
|
||||
int builtin; /* builtin if true */
|
||||
int builtin; /**< builtin if true */
|
||||
};
|
||||
|
||||
struct Rule_ {
|
||||
Linked_List parameters;
|
||||
Linked_List body;
|
||||
struct FullText text;
|
||||
/*
|
||||
Linked_List where;
|
||||
moved to Scope - DEL 22-Jul-1993
|
||||
*/
|
||||
};
|
||||
|
||||
/* define a where clause */
|
||||
/** define a where clause */
|
||||
struct Where_ {
|
||||
Symbol * label;
|
||||
Expression expr;
|
||||
@@ -128,11 +123,11 @@ struct Where_ {
|
||||
#include "decstart.h"
|
||||
#endif /* ALGORITHM_C */
|
||||
|
||||
GLOBAL struct freelist_head ALG_fl;
|
||||
GLOBAL struct freelist_head FUNC_fl;
|
||||
GLOBAL struct freelist_head RULE_fl;
|
||||
GLOBAL struct freelist_head PROC_fl;
|
||||
GLOBAL struct freelist_head WHERE_fl;
|
||||
GLOBAL SCL_EXPRESS_EXPORT struct freelist_head ALG_fl;
|
||||
GLOBAL SCL_EXPRESS_EXPORT struct freelist_head FUNC_fl;
|
||||
GLOBAL SCL_EXPRESS_EXPORT struct freelist_head RULE_fl;
|
||||
GLOBAL SCL_EXPRESS_EXPORT struct freelist_head PROC_fl;
|
||||
GLOBAL SCL_EXPRESS_EXPORT struct freelist_head WHERE_fl;
|
||||
|
||||
#include "de_end.h"
|
||||
|
||||
@@ -175,32 +170,16 @@ GLOBAL struct freelist_head WHERE_fl;
|
||||
#define FUNCget_return_type(f) ((f)->u.func->return_type)
|
||||
#define RULEget_where(r) ((r)->where)
|
||||
#define RULEput_where(r,w) ((r)->where = (w))
|
||||
/*
|
||||
#define RULEget_where_clause(r) ((r)->u.rule->where)
|
||||
*/
|
||||
#define WHEREget_label(w) ((w)->label)
|
||||
#define WHEREget_expression(w) ((w)->expr)
|
||||
|
||||
#if 0
|
||||
extern void ALGput_parameters PROTO( ( Algorithm, Linked_List ) );
|
||||
extern void ALGput_body PROTO( ( Algorithm, Linked_List ) );
|
||||
extern void FUNCput_return_type PROTO( ( Algorithm, Type ) );
|
||||
extern void RULEput_where_clause PROTO( ( Algorithm, Linked_List ) );
|
||||
#endif
|
||||
|
||||
/***********************/
|
||||
/* function prototypes */
|
||||
/***********************/
|
||||
|
||||
extern Scope ALGcreate PROTO( ( char ) );
|
||||
extern void ALGinitialize PROTO( ( void ) );
|
||||
extern void ALGput_full_text PROTO( ( Scope, int, int ) );
|
||||
extern SCL_EXPRESS_EXPORT Scope ALGcreate PROTO( ( char ) );
|
||||
extern SCL_EXPRESS_EXPORT void ALGinitialize PROTO( ( void ) );
|
||||
extern SCL_EXPRESS_EXPORT void ALGput_full_text PROTO( ( Scope, int, int ) );
|
||||
|
||||
/********************/
|
||||
/* inline functions */
|
||||
/********************/
|
||||
|
||||
#if supports_inline_functions || defined(ALGORITHM_C)
|
||||
#endif /* supports_inline_functions || defined(ALGORITHM_C) */
|
||||
|
||||
#endif /* ALGORITHM_H */
|
||||
|
||||
+9
-16
@@ -1,7 +1,6 @@
|
||||
#ifndef BASIC_H
|
||||
#define BASIC_H
|
||||
|
||||
/* $Id: basic.h,v 1.8 1997/10/22 16:06:28 sauderd Exp $ */
|
||||
|
||||
/*
|
||||
* This work was supported by the United States Government, and is
|
||||
@@ -72,14 +71,19 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <scl_cf.h>
|
||||
#include <scl_export.h>
|
||||
#include <stdio.h>
|
||||
|
||||
/******************************/
|
||||
/* type Boolean and constants */
|
||||
/******************************/
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#ifdef HAVE_STDBOOL_H
|
||||
# include <stdbool.h>
|
||||
#else
|
||||
# include <scl_stdbool.h>
|
||||
#endif
|
||||
|
||||
/************************/
|
||||
/* Generic pointer type */
|
||||
@@ -107,7 +111,7 @@ typedef int ( *intFuncptr )();
|
||||
/******************************/
|
||||
|
||||
#if !defined(static_inline)
|
||||
#if !defined(__GNUC__) || defined(__STRICT_ANSI)
|
||||
#if (!defined(__GNUC__) && !defined(__MSVC__)) || defined(__STRICT_ANSI)
|
||||
#define static_inline
|
||||
#undef supports_inline_functions
|
||||
#else
|
||||
@@ -132,7 +136,7 @@ typedef int ( *intFuncptr )();
|
||||
# define PROTO(x) x
|
||||
# else
|
||||
|
||||
# ifdef __CLCC__
|
||||
# if defined(__CLCC__) || defined(__MSVC__) || defined(__BORLAND__)
|
||||
# define PROTO(x) x
|
||||
#else
|
||||
# define PROTO(x) ()
|
||||
@@ -141,17 +145,6 @@ typedef int ( *intFuncptr )();
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
/* pacify IBM's c89 */
|
||||
#if !defined(_POSIX_SOURCE)
|
||||
#define _POSIX_SOURCE
|
||||
#endif
|
||||
|
||||
/* backward compatibility */
|
||||
typedef char * String;
|
||||
#define STRINGequal(x,y) (0 == strcmp((x),(y)))
|
||||
|
||||
|
||||
#endif /* */
|
||||
|
||||
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
#ifndef CASE_ITEM_H
|
||||
#define CASE_ITEM_H
|
||||
|
||||
/* $Id: caseitem.h,v 1.3 1997/01/21 19:17:11 dar Exp $ */
|
||||
|
||||
/************************************************************************
|
||||
** Module: Case_Item
|
||||
/** **********************************************************************
|
||||
** Module: Case_Item \file caseitem.h
|
||||
** Description: This module implements the Case_Item abstraction. A
|
||||
** case item represents a single branch in a case statement; it
|
||||
** thus consists of a list of labels and a statement to execute
|
||||
@@ -78,7 +76,7 @@ struct Case_Item_ {
|
||||
#include "decstart.h"
|
||||
#endif /*CASE_ITEM_C*/
|
||||
|
||||
GLOBAL struct freelist_head CASE_IT_fl;
|
||||
GLOBAL SCL_EXPRESS_EXPORT struct freelist_head CASE_IT_fl;
|
||||
|
||||
#include "de_end.h"
|
||||
|
||||
@@ -96,14 +94,7 @@ GLOBAL struct freelist_head CASE_IT_fl;
|
||||
#define CASE_IT_new() (struct Case_Item_ *)MEM_new(&CASE_IT_fl)
|
||||
#define CASE_IT_destroy(x) MEM_destroy(&CASE_IT_fl,(Freelist *)(Generic)x)
|
||||
|
||||
extern Case_Item CASE_ITcreate PROTO( ( Linked_List, struct Statement_ * ) );
|
||||
extern void CASE_ITinitialize PROTO( ( void ) );
|
||||
|
||||
/********************/
|
||||
/* inline functions */
|
||||
/********************/
|
||||
|
||||
#if supports_inline_functions || defined(CASE_ITEM_C)
|
||||
#endif /* supports_inline_functions || defined(CASE_ITEM_C) */
|
||||
extern SCL_EXPRESS_EXPORT Case_Item CASE_ITcreate PROTO( ( Linked_List, struct Statement_ * ) );
|
||||
extern SCL_EXPRESS_EXPORT void CASE_ITinitialize PROTO( ( void ) );
|
||||
|
||||
#endif /*CASE_ITEM_H*/
|
||||
|
||||
+13
-24
@@ -1,10 +1,8 @@
|
||||
#ifndef DICTIONARY_H
|
||||
#define DICTIONARY_H
|
||||
|
||||
/* $Id: dict.h,v 1.4 1997/01/21 19:17:11 dar Exp $ */
|
||||
|
||||
/************************************************************************
|
||||
** Module: Dictionary
|
||||
/** **********************************************************************
|
||||
** Module: Dictionary \file dict.h
|
||||
** Description: This module implements the dictionary abstraction. A
|
||||
** dictionary is a repository for a number of objects, all of which
|
||||
** can be named using the same function. A dictionary is limited to
|
||||
@@ -52,7 +50,6 @@
|
||||
|
||||
#include "hash.h"
|
||||
#include "error.h"
|
||||
#include "dict.h"
|
||||
|
||||
/************/
|
||||
/* typedefs */
|
||||
@@ -81,8 +78,7 @@ typedef HashEntry DictionaryEntry;
|
||||
#include "decstart.h"
|
||||
#endif /*DICTIONARY_C*/
|
||||
|
||||
GLOBAL char DICT_type; /* set as a side-effect of DICT lookup routines */
|
||||
/* to type of object found */
|
||||
GLOBAL SCL_EXPRESS_EXPORT char DICT_type; /**< set as a side-effect of DICT lookup routines to type of object found */
|
||||
|
||||
#include "de_end.h"
|
||||
|
||||
@@ -91,12 +87,12 @@ GLOBAL char DICT_type; /* set as a side-effect of DICT lookup routines */
|
||||
/*******************************/
|
||||
|
||||
#define DICTcreate(estimated_max_size) HASHcreate(estimated_max_size)
|
||||
/* should really can DICTdo_init and rename do_type_init to do_init! */
|
||||
/** should really can DICTdo_init and rename do_type_init to do_init! */
|
||||
#define DICTdo_init(dict,de) HASHlistinit((dict),(de))
|
||||
#define DICTdo_type_init(dict,de,t) HASHlistinit_by_type((dict),(de),(t))
|
||||
#define DICTdo_end(hash_entry) HASHlistend(hash_entry)
|
||||
|
||||
/* modify dictionary entry in-place */
|
||||
/** modify dictionary entry in-place */
|
||||
#define DICTchange(e,obj,sym,typ) { \
|
||||
(e)->data = (obj); \
|
||||
(e)->symbol = (sym); \
|
||||
@@ -109,20 +105,13 @@ GLOBAL char DICT_type; /* set as a side-effect of DICT lookup routines */
|
||||
/* function prototypes */
|
||||
/***********************/
|
||||
|
||||
extern void DICTinitialize PROTO( ( void ) );
|
||||
extern int DICTdefine PROTO( ( Dictionary, char *, Generic, Symbol *, char ) );
|
||||
extern int DICT_define PROTO( ( Dictionary, char *, Generic, Symbol *, char ) );
|
||||
extern void DICTundefine PROTO( ( Dictionary, char * ) );
|
||||
extern Generic DICTlookup PROTO( ( Dictionary, char * ) );
|
||||
extern Generic DICTlookup_symbol PROTO( ( Dictionary, char *, Symbol ** ) );
|
||||
extern Generic DICTdo PROTO( ( DictionaryEntry * ) );
|
||||
extern void DICTprint PROTO( ( Dictionary ) );
|
||||
|
||||
/********************/
|
||||
/* inline functions */
|
||||
/********************/
|
||||
|
||||
#if supports_inline_functions || defined(DICTIONARY_C)
|
||||
#endif /*supports_inline_functions || defined(DICTIONARY_C)*/
|
||||
extern SCL_EXPRESS_EXPORT void DICTinitialize PROTO( ( void ) );
|
||||
extern SCL_EXPRESS_EXPORT int DICTdefine PROTO( ( Dictionary, char *, Generic, Symbol *, char ) );
|
||||
extern SCL_EXPRESS_EXPORT int DICT_define PROTO( ( Dictionary, char *, Generic, Symbol *, char ) );
|
||||
extern SCL_EXPRESS_EXPORT void DICTundefine PROTO( ( Dictionary, char * ) );
|
||||
extern SCL_EXPRESS_EXPORT Generic DICTlookup PROTO( ( Dictionary, char * ) );
|
||||
extern SCL_EXPRESS_EXPORT Generic DICTlookup_symbol PROTO( ( Dictionary, char *, Symbol ** ) );
|
||||
extern SCL_EXPRESS_EXPORT Generic DICTdo PROTO( ( DictionaryEntry * ) );
|
||||
extern SCL_EXPRESS_EXPORT void DICTprint PROTO( ( Dictionary ) );
|
||||
|
||||
#endif /*DICTIONARY_H*/
|
||||
|
||||
+31
-60
@@ -1,10 +1,8 @@
|
||||
#ifndef ENTITY_H
|
||||
#define ENTITY_H
|
||||
|
||||
/* $Id: entity.h,v 1.12 1997/01/21 19:17:11 dar Exp $ */
|
||||
|
||||
/************************************************************************
|
||||
** Module: Entity
|
||||
/** **********************************************************************
|
||||
** Module: Entity \file entity.h
|
||||
** Description: This module represents Express entity definitions. An
|
||||
** entity definition consists of a name, a list of attributes, a
|
||||
** collection of uniqueness sets, a specification of the entity's
|
||||
@@ -62,6 +60,7 @@
|
||||
/* packages used */
|
||||
/*****************/
|
||||
|
||||
#include <scl_export.h>
|
||||
#include "expbasic.h" /* get basic definitions */
|
||||
#include "symbol.h"
|
||||
#include "scope.h"
|
||||
@@ -85,25 +84,18 @@ typedef struct Scope_ * Entity;
|
||||
/***************************/
|
||||
|
||||
struct Entity_ {
|
||||
Linked_List supertype_symbols; /* linked list of original symbols*/
|
||||
/* as generated by parser */
|
||||
Linked_List supertypes; /* linked list of supertypes (as entities) */
|
||||
Linked_List subtypes; /* simple list of subtypes */
|
||||
/* useful for simple lookups */
|
||||
Expression subtype_expression; /* DAG of subtypes, with complete */
|
||||
/* information including, OR, AND, and ONEOF */
|
||||
Linked_List attributes; /* explicit attributes */
|
||||
int inheritance; /* total number of attributes */
|
||||
/* inherited from supertypes */
|
||||
int attribute_count;
|
||||
Linked_List unique; /* list of identifiers that are unique */
|
||||
Linked_List instances; /* hook for applications */
|
||||
int mark; /* usual hack - prevent traversing sub/super */
|
||||
/* graph twice */
|
||||
bool abstract;/* is this an abstract supertype? */
|
||||
Type type; /* type pointing back to ourself */
|
||||
/* Useful to have when evaluating */
|
||||
/* expressions involving entities */
|
||||
Linked_List supertype_symbols; /**< linked list of original symbols as generated by parser */
|
||||
Linked_List supertypes; /**< linked list of supertypes (as entities) */
|
||||
Linked_List subtypes; /**< simple list of subtypes useful for simple lookups */
|
||||
Expression subtype_expression; /**< DAG of subtypes, with complete information including, OR, AND, and ONEOF */
|
||||
Linked_List attributes; /**< explicit attributes */
|
||||
int inheritance; /**< total number of attributes inherited from supertypes */
|
||||
int attribute_count;
|
||||
Linked_List unique; /**< list of identifiers that are unique */
|
||||
Linked_List instances; /**< hook for applications */
|
||||
int mark; /**< usual hack - prevent traversing sub/super graph twice */
|
||||
bool abstract; /**< is this an abstract supertype? */
|
||||
Type type; /**< type pointing back to ourself, useful to have when evaluating expressions involving entities */
|
||||
};
|
||||
|
||||
/********************/
|
||||
@@ -116,9 +108,9 @@ struct Entity_ {
|
||||
#include "decstart.h"
|
||||
#endif /* ENTITY_C */
|
||||
|
||||
GLOBAL struct freelist_head ENTITY_fl;
|
||||
GLOBAL SCL_EXPRESS_EXPORT struct freelist_head ENTITY_fl;
|
||||
|
||||
GLOBAL int ENTITY_MARK INITIALLY( 0 );
|
||||
GLOBAL SCL_EXPRESS_EXPORT int ENTITY_MARK INITIALLY( 0 );
|
||||
|
||||
#include "de_end.h"
|
||||
|
||||
@@ -157,40 +149,19 @@ GLOBAL int ENTITY_MARK INITIALLY( 0 );
|
||||
/* function prototypes */
|
||||
/***********************/
|
||||
|
||||
extern struct Scope_ * ENTITYcreate PROTO( ( struct Symbol_ * ) );
|
||||
extern void ENTITYinitialize PROTO( ( void ) );
|
||||
extern void ENTITYadd_attribute PROTO( ( struct Scope_ *, struct Variable_ * ) );
|
||||
extern struct Scope_ * ENTITYcopy PROTO( ( struct Scope_ * ) );
|
||||
extern Entity ENTITYfind_inherited_entity PROTO( ( struct Scope_ *, char *, int ) );
|
||||
extern Variable ENTITYfind_inherited_attribute PROTO( ( struct Scope_ *, char *, struct Symbol_ ** ) );
|
||||
extern Variable ENTITYresolve_attr_ref PROTO( ( Entity, Symbol *, Symbol * ) );
|
||||
extern bool ENTITYhas_immediate_supertype PROTO( ( Entity, Entity ) );
|
||||
extern Variable ENTITYget_named_attribute PROTO( ( Entity, char * ) );
|
||||
extern Linked_List ENTITYget_all_attributes PROTO( ( Entity ) );
|
||||
extern bool ENTITYhas_supertype PROTO( ( Entity, Entity ) );
|
||||
extern void ENTITYadd_instance PROTO( ( Entity, Generic ) );
|
||||
extern int ENTITYget_initial_offset PROTO( ( Entity ) );
|
||||
extern bool ENTITYdeclares_variable PROTO( ( Entity, struct Variable_ * ) );
|
||||
|
||||
#if 0
|
||||
extern void ENTITYdelete_instance PROTO( ( Entity, Generic ) );
|
||||
extern bool ENTITYhas_subtype PROTO( ( Entity, Entity ) );
|
||||
extern Entity ENTITYget_supertype PROTO( ( Entity, String ) );
|
||||
extern Entity ENTITYget_subtype PROTO( ( Entity, String ) );
|
||||
extern bool ENTITYhas_immediate_subtype PROTO( ( Entity, Entity ) );
|
||||
extern Expression ENTITYget_subtype_expression PROTO( ( Entity ) );
|
||||
extern int ENTITYget_attribute_offset PROTO( ( Entity, Variable ) );
|
||||
extern int ENTITYget_named_attribute_offset PROTO( ( Entity, String ) );
|
||||
extern Linked_List ENTITYget_uniqueness_list PROTO( ( Entity ) );
|
||||
extern Linked_List ENTITYget_constraints PROTO( ( Entity ) );
|
||||
extern Linked_List ENTITYget_instances PROTO( ( Entity ) );
|
||||
#endif /*0*/
|
||||
|
||||
/********************/
|
||||
/* inline functions */
|
||||
/********************/
|
||||
|
||||
#if supports_inline_functions || defined(ENTITY_C)
|
||||
#endif /* supports_inline_functions || defined(ENTITY_C) */
|
||||
extern SCL_EXPRESS_EXPORT struct Scope_ * ENTITYcreate PROTO( ( struct Symbol_ * ) );
|
||||
extern SCL_EXPRESS_EXPORT void ENTITYinitialize PROTO( ( void ) );
|
||||
extern SCL_EXPRESS_EXPORT void ENTITYadd_attribute PROTO( ( struct Scope_ *, struct Variable_ * ) );
|
||||
extern SCL_EXPRESS_EXPORT struct Scope_ * ENTITYcopy PROTO( ( struct Scope_ * ) );
|
||||
extern SCL_EXPRESS_EXPORT Entity ENTITYfind_inherited_entity PROTO( ( struct Scope_ *, char *, int ) );
|
||||
extern SCL_EXPRESS_EXPORT Variable ENTITYfind_inherited_attribute PROTO( ( struct Scope_ *, char *, struct Symbol_ ** ) );
|
||||
extern SCL_EXPRESS_EXPORT Variable ENTITYresolve_attr_ref PROTO( ( Entity, Symbol *, Symbol * ) );
|
||||
extern SCL_EXPRESS_EXPORT bool ENTITYhas_immediate_supertype PROTO( ( Entity, Entity ) );
|
||||
extern SCL_EXPRESS_EXPORT Variable ENTITYget_named_attribute PROTO( ( Entity, char * ) );
|
||||
extern SCL_EXPRESS_EXPORT Linked_List ENTITYget_all_attributes PROTO( ( Entity ) );
|
||||
extern SCL_EXPRESS_EXPORT bool ENTITYhas_supertype PROTO( ( Entity, Entity ) );
|
||||
extern SCL_EXPRESS_EXPORT void ENTITYadd_instance PROTO( ( Entity, Generic ) );
|
||||
extern SCL_EXPRESS_EXPORT int ENTITYget_initial_offset PROTO( ( Entity ) );
|
||||
extern SCL_EXPRESS_EXPORT bool ENTITYdeclares_variable PROTO( ( Entity, struct Variable_ * ) );
|
||||
|
||||
#endif /* ENTITY_H */
|
||||
|
||||
+56
-59
@@ -1,10 +1,8 @@
|
||||
#ifndef ERROR_H
|
||||
#define ERROR_H
|
||||
|
||||
/* $Id: error.h,v 1.8 1997/01/21 19:16:55 dar Exp $ */
|
||||
|
||||
/************************************************************************
|
||||
** Module: Error
|
||||
/** **********************************************************************
|
||||
** Module: Error \file error.h
|
||||
** Description: This module implements the ERROR abstraction.
|
||||
************************************************************************/
|
||||
|
||||
@@ -30,8 +28,9 @@
|
||||
* prettied up interface to print_objects_when_running
|
||||
*/
|
||||
|
||||
#include <scl_export.h>
|
||||
#include "basic.h" /* get basic definitions */
|
||||
#include "setjmp.h"
|
||||
#include <setjmp.h>
|
||||
|
||||
/*************/
|
||||
/* constants */
|
||||
@@ -88,29 +87,29 @@ typedef struct Error_Warning_ {
|
||||
#include "decstart.h"
|
||||
#endif /* ERROR_C */
|
||||
|
||||
GLOBAL bool __ERROR_buffer_errors INITIALLY( false );
|
||||
GLOBAL char * current_filename INITIALLY( "stdin" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT bool __ERROR_buffer_errors INITIALLY( false );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * current_filename INITIALLY( "stdin" );
|
||||
|
||||
/* flag to remember whether non-warning errors have occurred */
|
||||
GLOBAL bool ERRORoccurred INITIALLY( false );
|
||||
GLOBAL SCL_EXPRESS_EXPORT bool ERRORoccurred INITIALLY( false );
|
||||
|
||||
|
||||
GLOBAL Error experrc INITIALLY( ERROR_none );
|
||||
GLOBAL Error ERROR_subordinate_failed INITIALLY( ERROR_none );
|
||||
GLOBAL Error ERROR_syntax_expecting INITIALLY( ERROR_none );
|
||||
GLOBAL SCL_EXPRESS_EXPORT Error experrc INITIALLY( ERROR_none );
|
||||
GLOBAL SCL_EXPRESS_EXPORT Error ERROR_subordinate_failed INITIALLY( ERROR_none );
|
||||
GLOBAL SCL_EXPRESS_EXPORT Error ERROR_syntax_expecting INITIALLY( ERROR_none );
|
||||
|
||||
/* all of these are 1 if true, 0 if false switches */
|
||||
/* for debugging fedex */
|
||||
GLOBAL int ERRORdebugging INITIALLY( 0 );
|
||||
GLOBAL SCL_EXPRESS_EXPORT int ERRORdebugging INITIALLY( 0 );
|
||||
/* for debugging malloc during resolution */
|
||||
GLOBAL int malloc_debug_resolve INITIALLY( 0 );
|
||||
GLOBAL SCL_EXPRESS_EXPORT int malloc_debug_resolve INITIALLY( 0 );
|
||||
/* for debugging yacc/lex */
|
||||
GLOBAL int debug INITIALLY( 0 );
|
||||
GLOBAL SCL_EXPRESS_EXPORT int debug INITIALLY( 0 );
|
||||
|
||||
GLOBAL struct Linked_List_ * ERRORwarnings;
|
||||
GLOBAL struct freelist_head ERROR_OPT_fl;
|
||||
GLOBAL SCL_EXPRESS_EXPORT struct Linked_List_ * ERRORwarnings;
|
||||
GLOBAL SCL_EXPRESS_EXPORT struct freelist_head ERROR_OPT_fl;
|
||||
|
||||
GLOBAL void ( *ERRORusage_function ) PROTO( ( void ) );
|
||||
GLOBAL SCL_EXPRESS_EXPORT void ( *ERRORusage_function ) PROTO( ( void ) );
|
||||
|
||||
#include "de_end.h"
|
||||
|
||||
@@ -121,6 +120,14 @@ GLOBAL void ( *ERRORusage_function ) PROTO( ( void ) );
|
||||
#define ERROR_OPT_new() (struct Error_Warning_ *)MEM_new(&ERROR_OPT_fl)
|
||||
#define ERROR_OPT_destroy(x) MEM_destroy(&ERROR_OPT_fl,(Freelist *)(Generic)x)
|
||||
|
||||
/***********************/
|
||||
/* function prototypes */
|
||||
/***********************/
|
||||
|
||||
#if defined(__MSVC__) || defined(__BORLAND__)
|
||||
extern SCL_EXPRESS_EXPORT void ERROR_start_message_buffer PROTO( ( void ) );
|
||||
extern SCL_EXPRESS_EXPORT void ERROR_flush_message_buffer PROTO( ( void ) );
|
||||
#endif
|
||||
|
||||
/********************/
|
||||
/* Inline functions */
|
||||
@@ -128,34 +135,27 @@ GLOBAL void ( *ERRORusage_function ) PROTO( ( void ) );
|
||||
|
||||
#if supports_inline_functions || defined(ERROR_C)
|
||||
|
||||
static_inline
|
||||
void
|
||||
ERRORdisable( Error error ) {
|
||||
static_inline void ERRORdisable( Error error ) {
|
||||
if( error != ERROR_none ) {
|
||||
error->enabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
static_inline
|
||||
void
|
||||
ERRORenable( Error error ) {
|
||||
static_inline void ERRORenable( Error error ) {
|
||||
if( error != ERROR_none ) {
|
||||
error->enabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
static_inline
|
||||
bool
|
||||
ERRORis_enabled( Error error ) {
|
||||
static_inline bool ERRORis_enabled( Error error ) {
|
||||
return error->enabled;
|
||||
}
|
||||
|
||||
static_inline
|
||||
void
|
||||
ERRORbuffer_messages( bool flag ) {
|
||||
static_inline void ERRORbuffer_messages( bool flag ) {
|
||||
#if !defined(__MSVC__) && !defined(__BORLAND__)
|
||||
extern void ERROR_start_message_buffer( void ),
|
||||
ERROR_flush_message_buffer( void );
|
||||
|
||||
#endif
|
||||
__ERROR_buffer_errors = flag;
|
||||
if( __ERROR_buffer_errors ) {
|
||||
ERROR_start_message_buffer();
|
||||
@@ -164,11 +164,11 @@ ERRORbuffer_messages( bool flag ) {
|
||||
}
|
||||
}
|
||||
|
||||
static_inline
|
||||
void
|
||||
ERRORflush_messages( void ) {
|
||||
static_inline void ERRORflush_messages( void ) {
|
||||
#if !defined(__MSVC__) && !defined(__BORLAND__)
|
||||
extern void ERROR_start_message_buffer( void ),
|
||||
ERROR_flush_message_buffer( void );
|
||||
#endif
|
||||
|
||||
if( __ERROR_buffer_errors ) {
|
||||
ERROR_flush_message_buffer();
|
||||
@@ -182,33 +182,30 @@ ERRORflush_messages( void ) {
|
||||
/* function prototypes */
|
||||
/***********************/
|
||||
|
||||
extern void ERRORinitialize PROTO( ( void ) );
|
||||
extern void ERRORinitialize_after_LIST PROTO( ( void ) );
|
||||
extern void ERRORnospace PROTO( ( void ) );
|
||||
extern void ERRORabort PROTO( ( int ) );
|
||||
extern Error ERRORcreate PROTO( ( char *, Severity ) );
|
||||
extern void ERRORreport PROTO( ( Error, ... ) );
|
||||
/*SUPPRESS 652*/ /* 1.? */
|
||||
/*SUPPRESS 842*/ /* 4.0.2 */
|
||||
extern SCL_EXPRESS_EXPORT void ERRORinitialize PROTO( ( void ) );
|
||||
extern SCL_EXPRESS_EXPORT void ERRORinitialize_after_LIST PROTO( ( void ) );
|
||||
extern SCL_EXPRESS_EXPORT void ERRORnospace PROTO( ( void ) );
|
||||
extern SCL_EXPRESS_EXPORT void ERRORabort PROTO( ( int ) );
|
||||
extern SCL_EXPRESS_EXPORT Error ERRORcreate PROTO( ( char *, Severity ) );
|
||||
extern SCL_EXPRESS_EXPORT void ERRORreport PROTO( ( Error, ... ) );
|
||||
|
||||
struct Symbol_; /* mention Symbol to avoid warning on following line */
|
||||
extern void ERRORreport_with_symbol PROTO( ( Error, struct Symbol_ *, ... ) );
|
||||
extern void ERRORreport_with_line PROTO( ( Error, int, ... ) );
|
||||
extern void ERRORbuffer_messages PROTO( ( bool ) );
|
||||
extern void ERRORflush_messages PROTO( ( void ) );
|
||||
|
||||
extern void ERROR_start_message_buffer PROTO( ( void ) );
|
||||
extern void ERROR_flush_message_buffer PROTO( ( void ) );
|
||||
|
||||
extern void ERRORcreate_warning PROTO( ( char *, Error ) );
|
||||
extern void ERRORset_warning PROTO( ( char *, int ) );
|
||||
extern void ERRORset_all_warnings PROTO( ( int ) );
|
||||
extern void ERRORsafe PROTO( ( jmp_buf env ) );
|
||||
extern void ERRORunsafe PROTO( ( void ) );
|
||||
|
||||
#if deprecated
|
||||
extern void ERRORdisable PROTO( ( Error ) );
|
||||
extern void ERRORenable PROTO( ( Error ) );
|
||||
extern Boolean ERRORis_enabled PROTO( ( Error ) );
|
||||
extern SCL_EXPRESS_EXPORT void ERRORreport_with_symbol PROTO( ( Error, struct Symbol_ *, ... ) );
|
||||
extern SCL_EXPRESS_EXPORT void ERRORreport_with_line PROTO( ( Error, int, ... ) );
|
||||
#if !supports_inline_functions
|
||||
extern SCL_EXPRESS_EXPORT void ERRORbuffer_messages PROTO( ( bool ) );
|
||||
extern SCL_EXPRESS_EXPORT void ERRORflush_messages PROTO( ( void ) );
|
||||
#endif
|
||||
|
||||
#if !defined(__MSVC__) && !defined(__BORLAND__)
|
||||
extern SCL_EXPRESS_EXPORT void ERROR_start_message_buffer PROTO( ( void ) );
|
||||
extern SCL_EXPRESS_EXPORT void ERROR_flush_message_buffer PROTO( ( void ) );
|
||||
#endif
|
||||
|
||||
extern SCL_EXPRESS_EXPORT void ERRORcreate_warning PROTO( ( char *, Error ) );
|
||||
extern SCL_EXPRESS_EXPORT void ERRORset_warning PROTO( ( char *, int ) );
|
||||
extern SCL_EXPRESS_EXPORT void ERRORset_all_warnings PROTO( ( int ) );
|
||||
extern SCL_EXPRESS_EXPORT void ERRORsafe PROTO( ( jmp_buf env ) );
|
||||
extern SCL_EXPRESS_EXPORT void ERRORunsafe PROTO( ( void ) );
|
||||
|
||||
#endif /* ERROR_H */
|
||||
|
||||
+29
-33
@@ -1,4 +1,3 @@
|
||||
/* $Id: expbasic.h,v 1.7 1997/01/21 19:17:11 dar Exp $ */
|
||||
|
||||
/*
|
||||
* This software was developed by U.S. Government employees as part of
|
||||
@@ -72,84 +71,81 @@ typedef char * Binary;
|
||||
#define UNRESOLVED 0x0
|
||||
#define RESOLVED 0x1
|
||||
#define RESOLVE_FAILED 0x2
|
||||
#define RESOLVE_IN_PROGRESS 0x4 /* only if actively being resolved */
|
||||
/* not if it's just between passes */
|
||||
#define RESOLVE_IN_PROGRESS 0x4 /**< only if actively being resolved not if it's just between passes */
|
||||
|
||||
/* used during rename resolution to catch recursive USE/REFs */
|
||||
/** used during rename resolution to catch recursive USE/REFs */
|
||||
#define is_resolve_in_progress_raw(x) ((x)->resolved & RESOLVE_IN_PROGRESS)
|
||||
#define resolve_in_progress_raw(x) (x)->resolved |= RESOLVE_IN_PROGRESS
|
||||
#define resolve_not_in_progress_raw(x) (x)->resolved &= ~RESOLVE_IN_PROGRESS
|
||||
|
||||
/* and type resolution to catch recursive types (A = B and B = A) */
|
||||
/** and type resolution to catch recursive types (A = B and B = A) */
|
||||
#define resolve_in_progress(x) (x)->symbol.resolved |= RESOLVE_IN_PROGRESS
|
||||
|
||||
/* test/set whether anything has failed resolution */
|
||||
/** test/set whether anything has failed resolution */
|
||||
#define is_resolve_failed(x) ((x)->symbol.resolved & RESOLVE_FAILED)
|
||||
#define is_resolve_failed_raw(x) ((x)->resolved & RESOLVE_FAILED)
|
||||
#define resolve_failed(x) (x)->symbol.resolved |= RESOLVE_FAILED
|
||||
#define resolve_failed_raw(x) (x)->resolved |= RESOLVE_FAILED
|
||||
|
||||
/* test/set whether anything has succeeded resolution */
|
||||
/** test/set whether anything has succeeded resolution */
|
||||
#define is_resolved(x) ((x)->symbol.resolved & RESOLVED)
|
||||
|
||||
/* test possibility of future resolution */
|
||||
/** test possibility of future resolution */
|
||||
#define is_resolvable(x) (!is_not_resolvable(x))
|
||||
#define is_not_resolvable(x) ((x)->symbol.resolved & (RESOLVE_FAILED|RESOLVED|RESOLVE_IN_PROGRESS))
|
||||
|
||||
/* mark something resolved */
|
||||
/** mark something resolved */
|
||||
#define resolved_all(x) x->symbol.resolved = RESOLVED
|
||||
|
||||
|
||||
/* define the object types that can appear in a symbol table */
|
||||
/* basically anything that is usefully named, but that cannot be */
|
||||
/* differentiated from another type when handed a generic pointer */
|
||||
/* Entity, schema and alg can be differentiated but it is just very */
|
||||
/* useful to be able to differentiate this way. */
|
||||
#define OBJ_ANY '*' /* Matches anything - special to DICT funcs */
|
||||
#define OBJ_EXPRESS '!' /* I can't figure out the mnemonic either! */
|
||||
/** define the object types that can appear in a symbol table
|
||||
* basically anything that is usefully named, but that cannot be
|
||||
* differentiated from another type when handed a generic pointer
|
||||
* Entity, schema and alg can be differentiated but it is just very
|
||||
* useful to be able to differentiate this way. */
|
||||
#define OBJ_ANY '*' /**< Matches anything - special to DICT funcs */
|
||||
#define OBJ_EXPRESS '!' /**< I can't figure out the mnemonic either! */
|
||||
#define OBJ_PASS '#'
|
||||
|
||||
/* The following are all odd-ball scopes, that aren't ever looked up by */
|
||||
/* type - but the data structures might as well be descriptive */
|
||||
/** The following are all odd-ball scopes, that aren't ever looked up by
|
||||
* type - but the data structures might as well be descriptive */
|
||||
#define OBJ_INCREMENT '+'
|
||||
#define OBJ_ALIAS 'a'
|
||||
#define OBJ_QUERY 'q' /* isn't even stored anywhere! */
|
||||
#define OBJ_QUERY 'q' /**< isn't even stored anywhere! */
|
||||
|
||||
#define OBJ_PROCEDURE 'p'
|
||||
#define OBJ_RENAME 'n'
|
||||
#define OBJ_RULE 'r'
|
||||
#define OBJ_FUNCTION 'f'
|
||||
#define OBJ_TAG 'g' /* a type, but only when used as a type tag */
|
||||
#define OBJ_TAG 'g' /**< a type, but only when used as a type tag */
|
||||
#define OBJ_ENTITY 'e'
|
||||
#define OBJ_SCHEMA 's'
|
||||
#define OBJ_TYPE 't'
|
||||
#define OBJ_UNKNOWN 'u' /*things that won't ever be looked up by type*/
|
||||
#define OBJ_UNKNOWN 'u' /**< things that won't ever be looked up by type*/
|
||||
#define OBJ_VARIABLE 'v'
|
||||
#define OBJ_WHERE 'w'
|
||||
#define OBJ_EXPRESSION 'x' /* so far only enums get looked up by name & */
|
||||
#define OBJ_ENUM 'x' /* appear this way, perhaps they should be */
|
||||
/* variables? */
|
||||
#define OBJ_AMBIG_ENUM 'z' /* enumerations of the same name which are */
|
||||
/* visible in the same scope when qualified */
|
||||
/* z is of no mnemonic significance (so far) */
|
||||
#define OBJ_EXPRESSION 'x' /**< so far only enums get looked up by name & */
|
||||
#define OBJ_ENUM 'x' /**< appear this way, perhaps they should be variables? */
|
||||
#define OBJ_AMBIG_ENUM 'z' /**< enumerations of the same name which are
|
||||
* visible in the same scope when qualified
|
||||
* z is of no mnemonic significance (so far) */
|
||||
#define IS_ENUM(x) (((x) == OBJ_ENUM) || ((x) == OBJ_AMBIG_ENUM))
|
||||
|
||||
/* these represent a different way of selecting classes of objects */
|
||||
/* these are particularly useful when looking for multiple types concurrently */
|
||||
/** these represent a different way of selecting classes of objects
|
||||
* these are particularly useful when looking for multiple types concurrently */
|
||||
#define OBJ_TYPE_BITS 0x1
|
||||
#define OBJ_ENTITY_BITS 0x2
|
||||
#define OBJ_FUNCTION_BITS 0x4
|
||||
#define OBJ_PROCEDURE_BITS 0x8
|
||||
#define OBJ_PASS_BITS 0x10 /* i.e., EXPRESSpass */
|
||||
#define OBJ_PASS_BITS 0x10 /**< i.e., EXPRESSpass */
|
||||
#define OBJ_RULE_BITS 0x20
|
||||
#define OBJ_EXPRESSION_BITS 0x40 /* as above, only used for */
|
||||
/* finding enums */
|
||||
#define OBJ_EXPRESSION_BITS 0x40 /**< as above, only used for finding enums */
|
||||
#define OBJ_SCHEMA_BITS 0x80
|
||||
#define OBJ_VARIABLE_BITS 0x100
|
||||
#define OBJ_WHERE_BITS 0x200
|
||||
|
||||
#define OBJ_ANYTHING_BITS 0x0fffffff
|
||||
#define OBJ_UNFINDABLE_BITS 0x10000000 /* should never be found */
|
||||
#define OBJ_UNFINDABLE_BITS 0x10000000 /**< should never be found */
|
||||
#define OBJ_ALGORITHM_BITS (OBJ_FUNCTION_BITS | OBJ_PROCEDURE_BITS | \
|
||||
OBJ_RULE_BITS)
|
||||
#define OBJ_SCOPE_BITS (OBJ_ALGORITHM_BITS | OBJ_ENTITY_BITS | \
|
||||
|
||||
+50
-57
@@ -1,10 +1,8 @@
|
||||
#ifndef EXPRESSION_H
|
||||
#define EXPRESSION_H
|
||||
|
||||
/* $Id: expr.h,v 1.4 1997/01/21 19:17:11 dar Exp $ */
|
||||
|
||||
/************************************************************************
|
||||
** Module: Expression
|
||||
/** **********************************************************************
|
||||
** Module: Expression \file expr.h
|
||||
** Description: This module implements the Expression abstraction.
|
||||
** Several types of expressions are supported: identifiers,
|
||||
** literals, operations (arithmetic, logical, array indexing,
|
||||
@@ -62,6 +60,7 @@
|
||||
/* packages used */
|
||||
/*****************/
|
||||
|
||||
#include <scl_export.h>
|
||||
#include <math.h>
|
||||
#include "expbasic.h" /* get basic definitions */
|
||||
|
||||
@@ -85,7 +84,7 @@ typedef enum {
|
||||
OP_NOT, OP_NOT_EQUAL, OP_OR,
|
||||
OP_PLUS, OP_REAL_DIV, OP_SUBCOMPONENT,
|
||||
OP_TIMES, OP_XOR, OP_UNKNOWN,
|
||||
OP_LAST /* must be last - used only to size tables */
|
||||
OP_LAST /**< must be last - used only to size tables */
|
||||
} Op_Code;
|
||||
|
||||
typedef struct Qualified_Attr Qualified_Attr;
|
||||
@@ -117,7 +116,7 @@ typedef Literal Aggregate_Literal, Integer_Literal,
|
||||
/* expression types */
|
||||
|
||||
struct Qualified_Attr {
|
||||
struct Expression_ * complex; /* complex entity instance */
|
||||
struct Expression_ * complex; /**< complex entity instance */
|
||||
Symbol * entity;
|
||||
Symbol * attribute;
|
||||
};
|
||||
@@ -131,22 +130,20 @@ struct Op_Subexpression {
|
||||
|
||||
struct Query_ {
|
||||
Variable local;
|
||||
Expression aggregate; /* set from which to test */
|
||||
Expression expression; /* logical expression */
|
||||
Expression aggregate; /**< set from which to test */
|
||||
Expression expression; /**< logical expression */
|
||||
struct Scope_ * scope;
|
||||
};
|
||||
|
||||
struct Funcall {
|
||||
struct Scope_ * function; /* can also be an entity because entities */
|
||||
/* can be called as functions */
|
||||
struct Scope_ * function; /**< can also be an entity because entities can be called as functions */
|
||||
Linked_List list;
|
||||
};
|
||||
|
||||
union expr_union {
|
||||
int integer;
|
||||
float real;
|
||||
/* char *string; find string name in symbol in Expression */
|
||||
char * attribute; /* inverse .... for 'attr' */
|
||||
char * attribute; /**< inverse .... for 'attr' */
|
||||
char * binary;
|
||||
int logical;
|
||||
bool boolean;
|
||||
@@ -156,35 +153,31 @@ union expr_union {
|
||||
/* if etype == aggregate, list of expressions */
|
||||
/* if etype == funcall, 1st element of list is funcall or entity */
|
||||
/* remaining elements are parameters */
|
||||
Linked_List list; /* aggregates (bags, lists, sets, arrays) */
|
||||
/* or lists for oneof expressions */
|
||||
Expression expression; /* derived value in derive attrs, or*/
|
||||
/* initializer in local vars, or */
|
||||
/* enumeration tags */
|
||||
/* or oneof value */
|
||||
struct Scope_ * entity; /* used by subtype exp, group expr */
|
||||
/* and self expr, some funcall's and any */
|
||||
/* expr that results in an entity */
|
||||
Variable variable; /* attribute reference */
|
||||
Linked_List list; /**< aggregates (bags, lists, sets, arrays) or lists for oneof expressions */
|
||||
Expression expression; /**< derived value in derive attrs, or
|
||||
* initializer in local vars, or
|
||||
* enumeration tags
|
||||
* or oneof value */
|
||||
struct Scope_ * entity; /**< used by subtype exp, group expr
|
||||
* and self expr, some funcall's and any
|
||||
* expr that results in an entity */
|
||||
Variable variable; /**< attribute reference */
|
||||
};
|
||||
|
||||
/** The difference between 'type' and 'return_type' is illustrated
|
||||
* by "func(a)". Here, 'type' is Type_Function while 'return_type'
|
||||
* might be Type_Integer (assuming func returns an integer). */
|
||||
struct Expression_ {
|
||||
Symbol symbol; /* contains things like funcall names */
|
||||
/* string names, binary values, */
|
||||
/* enumeration names */
|
||||
Symbol symbol; /**< contains things like funcall names, string names, binary values, enumeration names */
|
||||
Type type;
|
||||
Type return_type; /* type of value returned by expression */
|
||||
/* The difference between 'type' and 'return_type' is */
|
||||
/* illustrated by "func(a)". Here, 'type' is Type_Function */
|
||||
/* while 'return_type' might be Type_Integer (assuming func */
|
||||
/* returns an integer). */
|
||||
Type return_type; /**< type of value returned by expression */
|
||||
struct Op_Subexpression e;
|
||||
union expr_union u;
|
||||
};
|
||||
|
||||
/* indexed by the op enumeration values */
|
||||
/** indexed by the op enumeration values */
|
||||
struct EXPop_entry {
|
||||
char * token; /* literal token, e.g., "<>" */
|
||||
char * token; /**< literal token, e.g., "<>" */
|
||||
Type( *resolve ) PROTO( ( Expression, struct Scope_ * ) );
|
||||
};
|
||||
|
||||
@@ -198,23 +191,23 @@ struct EXPop_entry {
|
||||
#include "decstart.h"
|
||||
#endif /*EXPRESSION_C*/
|
||||
|
||||
GLOBAL struct EXPop_entry EXPop_table[OP_LAST];
|
||||
GLOBAL SCL_EXPRESS_EXPORT struct EXPop_entry EXPop_table[OP_LAST];
|
||||
|
||||
GLOBAL Expression LITERAL_E INITIALLY( EXPRESSION_NULL );
|
||||
GLOBAL Expression LITERAL_INFINITY INITIALLY( EXPRESSION_NULL );
|
||||
GLOBAL Expression LITERAL_PI INITIALLY( EXPRESSION_NULL );
|
||||
GLOBAL Expression LITERAL_ZERO INITIALLY( EXPRESSION_NULL );
|
||||
GLOBAL Expression LITERAL_ONE;
|
||||
GLOBAL SCL_EXPRESS_EXPORT Expression LITERAL_E INITIALLY( EXPRESSION_NULL );
|
||||
GLOBAL SCL_EXPRESS_EXPORT Expression LITERAL_INFINITY INITIALLY( EXPRESSION_NULL );
|
||||
GLOBAL SCL_EXPRESS_EXPORT Expression LITERAL_PI INITIALLY( EXPRESSION_NULL );
|
||||
GLOBAL SCL_EXPRESS_EXPORT Expression LITERAL_ZERO INITIALLY( EXPRESSION_NULL );
|
||||
GLOBAL SCL_EXPRESS_EXPORT Expression LITERAL_ONE;
|
||||
|
||||
GLOBAL Error ERROR_bad_qualification INITIALLY( ERROR_none );
|
||||
GLOBAL Error ERROR_integer_expression_expected INITIALLY( ERROR_none );
|
||||
GLOBAL Error ERROR_implicit_downcast INITIALLY( ERROR_none );
|
||||
GLOBAL Error ERROR_ambig_implicit_downcast INITIALLY( ERROR_none );
|
||||
GLOBAL SCL_EXPRESS_EXPORT Error ERROR_bad_qualification INITIALLY( ERROR_none );
|
||||
GLOBAL SCL_EXPRESS_EXPORT Error ERROR_integer_expression_expected INITIALLY( ERROR_none );
|
||||
GLOBAL SCL_EXPRESS_EXPORT Error ERROR_implicit_downcast INITIALLY( ERROR_none );
|
||||
GLOBAL SCL_EXPRESS_EXPORT Error ERROR_ambig_implicit_downcast INITIALLY( ERROR_none );
|
||||
|
||||
GLOBAL struct freelist_head EXP_fl;
|
||||
GLOBAL struct freelist_head OP_fl;
|
||||
GLOBAL struct freelist_head QUERY_fl;
|
||||
GLOBAL struct freelist_head QUAL_ATTR_fl;
|
||||
GLOBAL SCL_EXPRESS_EXPORT struct freelist_head EXP_fl;
|
||||
GLOBAL SCL_EXPRESS_EXPORT struct freelist_head OP_fl;
|
||||
GLOBAL SCL_EXPRESS_EXPORT struct freelist_head QUERY_fl;
|
||||
GLOBAL SCL_EXPRESS_EXPORT struct freelist_head QUAL_ATTR_fl;
|
||||
|
||||
#include "de_end.h"
|
||||
|
||||
@@ -244,7 +237,7 @@ GLOBAL struct freelist_head QUAL_ATTR_fl;
|
||||
#define FCALLget_parameters(e) ((e)->u.funcall.list)
|
||||
#define FCALLput_function(expr,func) ((e)->u.funcall.function = (func))
|
||||
#define FCALLget_function(e) ((e)->u.funcall.function)
|
||||
/* assumes the function is not an entity-function! */
|
||||
/** assumes the function is not an entity-function! */
|
||||
#define FCALLget_algorithm(e) ((e)->u.funcall.function->u.function->body)
|
||||
|
||||
#define INT_LITget_value(e) ((e)->u.integer)
|
||||
@@ -269,16 +262,16 @@ GLOBAL struct freelist_head QUAL_ATTR_fl;
|
||||
/* function prototypes */
|
||||
/***********************/
|
||||
|
||||
extern Expression EXPcreate PROTO( ( Type ) );
|
||||
extern Expression EXPcreate_simple PROTO( ( Type ) );
|
||||
extern Expression EXPcreate_from_symbol PROTO( ( Type, Symbol * ) );
|
||||
extern Expression UN_EXPcreate PROTO( ( Op_Code, Expression ) );
|
||||
extern Expression BIN_EXPcreate PROTO( ( Op_Code, Expression, Expression ) );
|
||||
extern Expression TERN_EXPcreate PROTO( ( Op_Code, Expression, Expression, Expression ) );
|
||||
extern Expression QUERYcreate PROTO( ( Symbol *, Expression ) );
|
||||
extern void EXPinitialize PROTO( ( void ) );
|
||||
extern Type EXPtype PROTO( ( Expression, struct Scope_ * ) );
|
||||
extern int EXPget_integer_value PROTO( ( Expression ) );
|
||||
extern SCL_EXPRESS_EXPORT Expression EXPcreate PROTO( ( Type ) );
|
||||
extern SCL_EXPRESS_EXPORT Expression EXPcreate_simple PROTO( ( Type ) );
|
||||
extern SCL_EXPRESS_EXPORT Expression EXPcreate_from_symbol PROTO( ( Type, Symbol * ) );
|
||||
extern SCL_EXPRESS_EXPORT Expression UN_EXPcreate PROTO( ( Op_Code, Expression ) );
|
||||
extern SCL_EXPRESS_EXPORT Expression BIN_EXPcreate PROTO( ( Op_Code, Expression, Expression ) );
|
||||
extern SCL_EXPRESS_EXPORT Expression TERN_EXPcreate PROTO( ( Op_Code, Expression, Expression, Expression ) );
|
||||
extern SCL_EXPRESS_EXPORT Expression QUERYcreate PROTO( ( Symbol *, Expression ) );
|
||||
extern SCL_EXPRESS_EXPORT void EXPinitialize PROTO( ( void ) );
|
||||
extern SCL_EXPRESS_EXPORT Type EXPtype PROTO( ( Expression, struct Scope_ * ) );
|
||||
extern SCL_EXPRESS_EXPORT int EXPget_integer_value PROTO( ( Expression ) );
|
||||
|
||||
/********************/
|
||||
/* inline functions */
|
||||
|
||||
+156
-161
@@ -1,8 +1,6 @@
|
||||
#ifndef EXPRESS_H
|
||||
#define EXPRESS_H
|
||||
|
||||
/* $Id: express.h,v 1.13 1997/01/21 19:16:42 dar Exp $ */
|
||||
|
||||
/*
|
||||
* Express package manager.
|
||||
*
|
||||
@@ -83,7 +81,7 @@ typedef struct Scope_ * Express;
|
||||
struct Express_ {
|
||||
FILE * file;
|
||||
char * filename;
|
||||
char * basename; /* name of file but without directory or .exp suffix */
|
||||
char * basename; /**< name of file but without directory or .exp suffix */
|
||||
};
|
||||
|
||||
/********************/
|
||||
@@ -98,150 +96,158 @@ struct Express_ {
|
||||
# define INITIALLY(value)
|
||||
#endif /*EXPRESS_C*/
|
||||
|
||||
GLOBAL Linked_List EXPRESS_path;
|
||||
GLOBAL int EXPRESSpass;
|
||||
#ifdef YYDEBUG
|
||||
extern SCL_EXPRESS_EXPORT int yydebug;
|
||||
extern SCL_EXPRESS_EXPORT int yydbg_upper_limit;
|
||||
extern SCL_EXPRESS_EXPORT int yydbg_lower_limit;
|
||||
extern SCL_EXPRESS_EXPORT int yydbg_verbose;
|
||||
#endif
|
||||
|
||||
GLOBAL void ( *EXPRESSinit_args ) PROTO( ( int, char ** ) ) INITIALLY( 0 );
|
||||
GLOBAL void ( *EXPRESSinit_parse ) PROTO( ( void ) ) INITIALLY( 0 );
|
||||
GLOBAL int ( *EXPRESSfail ) PROTO( ( Express ) ) INITIALLY( 0 );
|
||||
GLOBAL int ( *EXPRESSsucceed ) PROTO( ( Express ) ) INITIALLY( 0 );
|
||||
GLOBAL void ( *EXPRESSbackend ) PROTO( ( Express ) ) INITIALLY( 0 );
|
||||
GLOBAL char * EXPRESSprogram_name;
|
||||
extern char EXPRESSgetopt_options[]; /* initialized elsewhere */
|
||||
GLOBAL int ( *EXPRESSgetopt ) PROTO( ( int, char * ) ) INITIALLY( 0 );
|
||||
GLOBAL bool EXPRESSignore_duplicate_schemas INITIALLY( false );
|
||||
GLOBAL SCL_EXPRESS_EXPORT Linked_List EXPRESS_path;
|
||||
GLOBAL SCL_EXPRESS_EXPORT int EXPRESSpass;
|
||||
|
||||
GLOBAL Dictionary EXPRESSbuiltins; /* procedures/functions */
|
||||
GLOBAL SCL_EXPRESS_EXPORT void ( *EXPRESSinit_args ) PROTO( ( int, char ** ) ) INITIALLY( 0 );
|
||||
GLOBAL SCL_EXPRESS_EXPORT void ( *EXPRESSinit_parse ) PROTO( ( void ) ) INITIALLY( 0 );
|
||||
GLOBAL SCL_EXPRESS_EXPORT int ( *EXPRESSfail ) PROTO( ( Express ) ) INITIALLY( 0 );
|
||||
GLOBAL SCL_EXPRESS_EXPORT int ( *EXPRESSsucceed ) PROTO( ( Express ) ) INITIALLY( 0 );
|
||||
GLOBAL SCL_EXPRESS_EXPORT void ( *EXPRESSbackend ) PROTO( ( Express ) ) INITIALLY( 0 );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * EXPRESSprogram_name;
|
||||
extern char EXPRESSgetopt_options[256]; /**< initialized elsewhere */
|
||||
GLOBAL SCL_EXPRESS_EXPORT int ( *EXPRESSgetopt ) PROTO( ( int, char * ) ) INITIALLY( 0 );
|
||||
GLOBAL SCL_EXPRESS_EXPORT bool EXPRESSignore_duplicate_schemas INITIALLY( false );
|
||||
|
||||
GLOBAL Error ERROR_bail_out INITIALLY( ERROR_none );
|
||||
GLOBAL Error ERROR_syntax INITIALLY( ERROR_none );
|
||||
GLOBAL Error ERROR_unlabelled_param_type INITIALLY( ERROR_none );
|
||||
GLOBAL Error ERROR_file_unreadable;
|
||||
GLOBAL Error ERROR_file_unwriteable;
|
||||
GLOBAL SCL_EXPRESS_EXPORT Dictionary EXPRESSbuiltins; /**< procedures/functions */
|
||||
|
||||
GLOBAL struct Scope_ * FUNC_NVL;
|
||||
GLOBAL struct Scope_ * FUNC_USEDIN;
|
||||
GLOBAL SCL_EXPRESS_EXPORT Error ERROR_bail_out INITIALLY( ERROR_none );
|
||||
GLOBAL SCL_EXPRESS_EXPORT Error ERROR_syntax INITIALLY( ERROR_none );
|
||||
GLOBAL SCL_EXPRESS_EXPORT Error ERROR_unlabelled_param_type INITIALLY( ERROR_none );
|
||||
GLOBAL SCL_EXPRESS_EXPORT Error ERROR_file_unreadable;
|
||||
GLOBAL SCL_EXPRESS_EXPORT Error ERROR_file_unwriteable;
|
||||
GLOBAL SCL_EXPRESS_EXPORT Error ERROR_warn_unsupported_lang_feat;
|
||||
|
||||
GLOBAL char * KW_ABS INITIALLY( "ABS" );
|
||||
GLOBAL char * KW_ABSTRACT INITIALLY( "ABSTRACT" );
|
||||
GLOBAL char * KW_ACOS INITIALLY( "ACOS" );
|
||||
GLOBAL char * KW_AGGREGATE INITIALLY( "AGGREGATE" );
|
||||
GLOBAL char * KW_ALIAS INITIALLY( "ALIAS" );
|
||||
GLOBAL char * KW_AND INITIALLY( "AND" );
|
||||
GLOBAL char * KW_ANDOR INITIALLY( "ANDOR" );
|
||||
GLOBAL char * KW_ARRAY INITIALLY( "ARRAY" );
|
||||
GLOBAL char * KW_AS INITIALLY( "AS" );
|
||||
GLOBAL char * KW_ASIN INITIALLY( "ASIN" );
|
||||
GLOBAL char * KW_ATAN INITIALLY( "ATAN" );
|
||||
GLOBAL char * KW_BAG INITIALLY( "BAG" );
|
||||
GLOBAL char * KW_BEGIN INITIALLY( "BEGIN" );
|
||||
GLOBAL char * KW_BINARY INITIALLY( "BINARY" );
|
||||
GLOBAL char * KW_BLENGTH INITIALLY( "BLENGTH" );
|
||||
GLOBAL char * KW_BOOLEAN INITIALLY( "BOOLEAN" );
|
||||
GLOBAL char * KW_BY INITIALLY( "BY" );
|
||||
GLOBAL char * KW_CASE INITIALLY( "CASE" );
|
||||
GLOBAL char * KW_CONST_E INITIALLY( "CONST_E" );
|
||||
GLOBAL char * KW_CONSTANT INITIALLY( "CONSTANT" );
|
||||
GLOBAL char * KW_CONTEXT INITIALLY( "CONTEXT" );
|
||||
GLOBAL char * KW_COS INITIALLY( "COS" );
|
||||
GLOBAL char * KW_DERIVE INITIALLY( "DERIVE" );
|
||||
GLOBAL char * KW_DIV INITIALLY( "DIV" );
|
||||
GLOBAL char * KW_ELSE INITIALLY( "ELSE" );
|
||||
GLOBAL char * KW_END INITIALLY( "END" );
|
||||
GLOBAL char * KW_END_ALIAS INITIALLY( "END_ALIAS" );
|
||||
GLOBAL char * KW_END_CASE INITIALLY( "END_CASE" );
|
||||
GLOBAL char * KW_END_CONSTANT INITIALLY( "END_CONSTANT" );
|
||||
GLOBAL char * KW_END_CONTEXT INITIALLY( "END_CONTEXT" );
|
||||
GLOBAL char * KW_END_ENTITY INITIALLY( "END_ENTITY" );
|
||||
GLOBAL char * KW_END_FUNCTION INITIALLY( "END_FUNCTION" );
|
||||
GLOBAL char * KW_END_IF INITIALLY( "END_IF" );
|
||||
GLOBAL char * KW_END_LOCAL INITIALLY( "END_LOCAL" );
|
||||
GLOBAL char * KW_END_MODEL INITIALLY( "END_MODEL" );
|
||||
GLOBAL char * KW_END_PROCEDURE INITIALLY( "END_PROCEDURE" );
|
||||
GLOBAL char * KW_END_REPEAT INITIALLY( "END_REPEAT" );
|
||||
GLOBAL char * KW_END_RULE INITIALLY( "END_RULE" );
|
||||
GLOBAL char * KW_END_SCHEMA INITIALLY( "END_SCHEMA" );
|
||||
GLOBAL char * KW_END_TYPE INITIALLY( "END_TYPE" );
|
||||
GLOBAL char * KW_ENTITY INITIALLY( "ENTITY" );
|
||||
GLOBAL char * KW_ENUMERATION INITIALLY( "ENUMERATION" );
|
||||
GLOBAL char * KW_ESCAPE INITIALLY( "ESCAPE" );
|
||||
GLOBAL char * KW_EXISTS INITIALLY( "EXISTS" );
|
||||
GLOBAL char * KW_EXP INITIALLY( "EXP" );
|
||||
GLOBAL char * KW_FALSE INITIALLY( "FALSE" );
|
||||
GLOBAL char * KW_FIXED INITIALLY( "FIXED" );
|
||||
GLOBAL char * KW_FOR INITIALLY( "FOR" );
|
||||
GLOBAL char * KW_FORMAT INITIALLY( "FORMAT" );
|
||||
GLOBAL char * KW_FROM INITIALLY( "FROM" );
|
||||
GLOBAL char * KW_FUNCTION INITIALLY( "FUNCTION" );
|
||||
GLOBAL char * KW_GENERIC INITIALLY( "GENERIC" );
|
||||
GLOBAL char * KW_HIBOUND INITIALLY( "HIBOUND" );
|
||||
GLOBAL char * KW_HIINDEX INITIALLY( "HIINDEX" );
|
||||
GLOBAL char * KW_IF INITIALLY( "IF" );
|
||||
GLOBAL char * KW_IN INITIALLY( "IN" );
|
||||
GLOBAL char * KW_INCLUDE INITIALLY( "INCLUDE" );
|
||||
GLOBAL char * KW_INSERT INITIALLY( "INSERT" );
|
||||
GLOBAL char * KW_INTEGER INITIALLY( "INTEGER" );
|
||||
GLOBAL char * KW_INVERSE INITIALLY( "INVERSE" );
|
||||
GLOBAL char * KW_LENGTH INITIALLY( "LENGTH" );
|
||||
GLOBAL char * KW_LIKE INITIALLY( "LIKE" );
|
||||
GLOBAL char * KW_LIST INITIALLY( "LIST" );
|
||||
GLOBAL char * KW_LOBOUND INITIALLY( "LOBOUND" );
|
||||
GLOBAL char * KW_LOCAL INITIALLY( "LOCAL" );
|
||||
GLOBAL char * KW_LOG INITIALLY( "LOG" );
|
||||
GLOBAL char * KW_LOG10 INITIALLY( "LOG10" );
|
||||
GLOBAL char * KW_LOG2 INITIALLY( "LOG2" );
|
||||
GLOBAL char * KW_LOGICAL INITIALLY( "LOGICAL" );
|
||||
GLOBAL char * KW_LOINDEX INITIALLY( "LOINDEX" );
|
||||
GLOBAL char * KW_MOD INITIALLY( "MOD" );
|
||||
GLOBAL char * KW_MODEL INITIALLY( "MODEL" );
|
||||
GLOBAL char * KW_NOT INITIALLY( "NOT" );
|
||||
GLOBAL char * KW_NUMBER INITIALLY( "NUMBER" );
|
||||
GLOBAL char * KW_NVL INITIALLY( "NVL" );
|
||||
GLOBAL char * KW_ODD INITIALLY( "ODD" );
|
||||
GLOBAL char * KW_OF INITIALLY( "OF" );
|
||||
GLOBAL char * KW_ONEOF INITIALLY( "ONEOF" );
|
||||
GLOBAL char * KW_OPTIONAL INITIALLY( "OPTIONAL" );
|
||||
GLOBAL char * KW_OR INITIALLY( "OR" );
|
||||
GLOBAL char * KW_OTHERWISE INITIALLY( "OTHERWISE" );
|
||||
GLOBAL char * KW_PI INITIALLY( "PI" );
|
||||
GLOBAL char * KW_PROCEDURE INITIALLY( "PROCEDURE" );
|
||||
GLOBAL char * KW_QUERY INITIALLY( "QUERY" );
|
||||
GLOBAL char * KW_REAL INITIALLY( "REAL" );
|
||||
GLOBAL char * KW_REFERENCE INITIALLY( "REFERENCE" );
|
||||
GLOBAL char * KW_REMOVE INITIALLY( "REMOVE" );
|
||||
GLOBAL char * KW_REPEAT INITIALLY( "REPEAT" );
|
||||
GLOBAL char * KW_RETURN INITIALLY( "RETURN" );
|
||||
GLOBAL char * KW_ROLESOF INITIALLY( "ROLESOF" );
|
||||
GLOBAL char * KW_RULE INITIALLY( "RULE" );
|
||||
GLOBAL char * KW_SCHEMA INITIALLY( "SCHEMA" );
|
||||
GLOBAL char * KW_SELECT INITIALLY( "SELECT" );
|
||||
GLOBAL char * KW_SELF INITIALLY( "SELF" );
|
||||
GLOBAL char * KW_SET INITIALLY( "SET" );
|
||||
GLOBAL char * KW_SIN INITIALLY( "SIN" );
|
||||
GLOBAL char * KW_SIZEOF INITIALLY( "SIZEOF" );
|
||||
GLOBAL char * KW_SKIP INITIALLY( "SKIP" );
|
||||
GLOBAL char * KW_SQRT INITIALLY( "SQRT" );
|
||||
GLOBAL char * KW_STRING INITIALLY( "STRING" );
|
||||
GLOBAL char * KW_SUBTYPE INITIALLY( "SUBTYPE" );
|
||||
GLOBAL char * KW_SUPERTYPE INITIALLY( "SUPERTYPE" );
|
||||
GLOBAL char * KW_TAN INITIALLY( "TAN" );
|
||||
GLOBAL char * KW_THEN INITIALLY( "THEN" );
|
||||
GLOBAL char * KW_TO INITIALLY( "TO" );
|
||||
GLOBAL char * KW_TRUE INITIALLY( "TRUE" );
|
||||
GLOBAL char * KW_TYPE INITIALLY( "TYPE" );
|
||||
GLOBAL char * KW_TYPEOF INITIALLY( "TYPEOF" );
|
||||
GLOBAL char * KW_UNIQUE INITIALLY( "UNIQUE" );
|
||||
GLOBAL char * KW_UNKNOWN INITIALLY( "UNKNOWN" );
|
||||
GLOBAL char * KW_UNTIL INITIALLY( "UNTIL" );
|
||||
GLOBAL char * KW_USE INITIALLY( "USE" );
|
||||
GLOBAL char * KW_USEDIN INITIALLY( "USEDIN" );
|
||||
GLOBAL char * KW_VALUE INITIALLY( "VALUE" );
|
||||
GLOBAL char * KW_VALUE_IN INITIALLY( "VALUE_IN" );
|
||||
GLOBAL char * KW_VALUE_UNIQUE INITIALLY( "VALUE_UNIQUE" );
|
||||
GLOBAL char * KW_VAR INITIALLY( "VAR" );
|
||||
GLOBAL char * KW_WHERE INITIALLY( "WHERE" );
|
||||
GLOBAL char * KW_WHILE INITIALLY( "WHILE" );
|
||||
GLOBAL char * KW_XOR INITIALLY( "XOR" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT struct Scope_ * FUNC_NVL;
|
||||
GLOBAL SCL_EXPRESS_EXPORT struct Scope_ * FUNC_USEDIN;
|
||||
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_ABS INITIALLY( "ABS" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_ABSTRACT INITIALLY( "ABSTRACT" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_ACOS INITIALLY( "ACOS" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_AGGREGATE INITIALLY( "AGGREGATE" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_ALIAS INITIALLY( "ALIAS" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_AND INITIALLY( "AND" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_ANDOR INITIALLY( "ANDOR" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_ARRAY INITIALLY( "ARRAY" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_AS INITIALLY( "AS" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_ASIN INITIALLY( "ASIN" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_ATAN INITIALLY( "ATAN" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_BAG INITIALLY( "BAG" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_BEGIN INITIALLY( "BEGIN" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_BINARY INITIALLY( "BINARY" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_BLENGTH INITIALLY( "BLENGTH" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_BOOLEAN INITIALLY( "BOOLEAN" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_BY INITIALLY( "BY" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_CASE INITIALLY( "CASE" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_CONST_E INITIALLY( "CONST_E" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_CONSTANT INITIALLY( "CONSTANT" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_CONTEXT INITIALLY( "CONTEXT" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_COS INITIALLY( "COS" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_DERIVE INITIALLY( "DERIVE" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_DIV INITIALLY( "DIV" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_ELSE INITIALLY( "ELSE" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_END INITIALLY( "END" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_END_ALIAS INITIALLY( "END_ALIAS" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_END_CASE INITIALLY( "END_CASE" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_END_CONSTANT INITIALLY( "END_CONSTANT" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_END_CONTEXT INITIALLY( "END_CONTEXT" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_END_ENTITY INITIALLY( "END_ENTITY" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_END_FUNCTION INITIALLY( "END_FUNCTION" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_END_IF INITIALLY( "END_IF" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_END_LOCAL INITIALLY( "END_LOCAL" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_END_MODEL INITIALLY( "END_MODEL" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_END_PROCEDURE INITIALLY( "END_PROCEDURE" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_END_REPEAT INITIALLY( "END_REPEAT" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_END_RULE INITIALLY( "END_RULE" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_END_SCHEMA INITIALLY( "END_SCHEMA" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_END_TYPE INITIALLY( "END_TYPE" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_ENTITY INITIALLY( "ENTITY" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_ENUMERATION INITIALLY( "ENUMERATION" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_ESCAPE INITIALLY( "ESCAPE" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_EXISTS INITIALLY( "EXISTS" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_EXP INITIALLY( "EXP" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_FALSE INITIALLY( "FALSE" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_FIXED INITIALLY( "FIXED" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_FOR INITIALLY( "FOR" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_FORMAT INITIALLY( "FORMAT" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_FROM INITIALLY( "FROM" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_FUNCTION INITIALLY( "FUNCTION" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_GENERIC INITIALLY( "GENERIC" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_HIBOUND INITIALLY( "HIBOUND" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_HIINDEX INITIALLY( "HIINDEX" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_IF INITIALLY( "IF" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_IN INITIALLY( "IN" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_INCLUDE INITIALLY( "INCLUDE" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_INSERT INITIALLY( "INSERT" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_INTEGER INITIALLY( "INTEGER" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_INVERSE INITIALLY( "INVERSE" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_LENGTH INITIALLY( "LENGTH" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_LIKE INITIALLY( "LIKE" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_LIST INITIALLY( "LIST" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_LOBOUND INITIALLY( "LOBOUND" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_LOCAL INITIALLY( "LOCAL" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_LOG INITIALLY( "LOG" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_LOG10 INITIALLY( "LOG10" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_LOG2 INITIALLY( "LOG2" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_LOGICAL INITIALLY( "LOGICAL" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_LOINDEX INITIALLY( "LOINDEX" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_MOD INITIALLY( "MOD" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_MODEL INITIALLY( "MODEL" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_NOT INITIALLY( "NOT" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_NUMBER INITIALLY( "NUMBER" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_NVL INITIALLY( "NVL" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_ODD INITIALLY( "ODD" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_OF INITIALLY( "OF" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_ONEOF INITIALLY( "ONEOF" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_OPTIONAL INITIALLY( "OPTIONAL" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_OR INITIALLY( "OR" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_OTHERWISE INITIALLY( "OTHERWISE" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_PI INITIALLY( "PI" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_PROCEDURE INITIALLY( "PROCEDURE" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_QUERY INITIALLY( "QUERY" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_REAL INITIALLY( "REAL" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_REFERENCE INITIALLY( "REFERENCE" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_REMOVE INITIALLY( "REMOVE" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_REPEAT INITIALLY( "REPEAT" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_RETURN INITIALLY( "RETURN" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_ROLESOF INITIALLY( "ROLESOF" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_RULE INITIALLY( "RULE" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_SCHEMA INITIALLY( "SCHEMA" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_SELECT INITIALLY( "SELECT" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_SELF INITIALLY( "SELF" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_SET INITIALLY( "SET" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_SIN INITIALLY( "SIN" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_SIZEOF INITIALLY( "SIZEOF" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_SKIP INITIALLY( "SKIP" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_SQRT INITIALLY( "SQRT" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_STRING INITIALLY( "STRING" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_SUBTYPE INITIALLY( "SUBTYPE" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_SUPERTYPE INITIALLY( "SUPERTYPE" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_TAN INITIALLY( "TAN" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_THEN INITIALLY( "THEN" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_TO INITIALLY( "TO" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_TRUE INITIALLY( "TRUE" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_TYPE INITIALLY( "TYPE" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_TYPEOF INITIALLY( "TYPEOF" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_UNIQUE INITIALLY( "UNIQUE" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_UNKNOWN INITIALLY( "UNKNOWN" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_UNTIL INITIALLY( "UNTIL" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_USE INITIALLY( "USE" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_USEDIN INITIALLY( "USEDIN" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_VALUE INITIALLY( "VALUE" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_VALUE_IN INITIALLY( "VALUE_IN" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_VALUE_UNIQUE INITIALLY( "VALUE_UNIQUE" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_VAR INITIALLY( "VAR" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_WHERE INITIALLY( "WHERE" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_WHILE INITIALLY( "WHILE" );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * KW_XOR INITIALLY( "XOR" );
|
||||
|
||||
#undef GLOBAL
|
||||
#undef INITIALLY
|
||||
@@ -255,29 +261,18 @@ GLOBAL char * KW_XOR INITIALLY( "XOR" );
|
||||
#define EXPRESSput_basename(e,n) ((e)->u.express->basename = (n))
|
||||
#define EXPRESSput_filename(e,n) ((e)->u.express->filename = (n))
|
||||
|
||||
/********************/
|
||||
/* Inline functions */
|
||||
/********************/
|
||||
|
||||
#if supports_inline_functions || defined(EXPRESS_C)
|
||||
|
||||
#endif /*supports_inline_functions || defined(EXPRESS_C)*/
|
||||
|
||||
/***********************/
|
||||
/* function prototypes */
|
||||
/***********************/
|
||||
|
||||
extern Express EXPRESScreate PROTO( ( void ) );
|
||||
extern void EXPRESSparse PROTO( ( Express, FILE *, char * ) );
|
||||
extern void EXPRESSinitialize PROTO( ( void ) );
|
||||
extern void EXPRESSresolve PROTO( ( Express ) );
|
||||
extern char * EXPRESSversion PROTO( ( void ) );
|
||||
extern int EXPRESS_fail PROTO( ( Express ) );
|
||||
extern int EXPRESS_succeed PROTO( ( Express ) );
|
||||
extern SCL_EXPRESS_EXPORT Express EXPRESScreate PROTO( ( void ) );
|
||||
extern SCL_EXPRESS_EXPORT void EXPRESSparse PROTO( ( Express, FILE *, char * ) );
|
||||
extern SCL_EXPRESS_EXPORT void EXPRESSinitialize PROTO( ( void ) );
|
||||
extern SCL_EXPRESS_EXPORT void EXPRESSresolve PROTO( ( Express ) );
|
||||
extern SCL_EXPRESS_EXPORT char * EXPRESSversion PROTO( ( void ) );
|
||||
extern SCL_EXPRESS_EXPORT int EXPRESS_fail PROTO( ( Express ) );
|
||||
extern SCL_EXPRESS_EXPORT int EXPRESS_succeed PROTO( ( Express ) );
|
||||
extern void EXPRESSinit_init PROTO( ( void ) );
|
||||
#if 0
|
||||
extern void EXPRESSdump_model PROTO( ( Express ) );
|
||||
#endif /*0*/
|
||||
extern void build_complex( Express );
|
||||
extern SCL_EXPRESS_EXPORT void build_complex( Express );
|
||||
|
||||
#endif /*EXPRESS_H*/
|
||||
|
||||
+32
-38
@@ -1,9 +1,8 @@
|
||||
#ifndef HASH_H
|
||||
#define HASH_H
|
||||
|
||||
/* $Id: hash.h,v 1.6 1997/10/22 16:36:49 sauderd Exp $ */
|
||||
|
||||
/************************************************************************
|
||||
/** **********************************************************************
|
||||
* \file hash.h
|
||||
** Hash_Table: Hash_Table
|
||||
** Description:
|
||||
**
|
||||
@@ -90,9 +89,9 @@
|
||||
#define HASH_NULL (Hash_Table)NULL
|
||||
|
||||
#define SEGMENT_SIZE 256
|
||||
#define SEGMENT_SIZE_SHIFT 8 /* log2(SEGMENT_SIZE) */
|
||||
#define SEGMENT_SIZE_SHIFT 8 /**< log2(SEGMENT_SIZE) */
|
||||
#define DIRECTORY_SIZE 256
|
||||
#define DIRECTORY_SIZE_SHIFT 8 /* log2(DIRECTORY_SIZE) */
|
||||
#define DIRECTORY_SIZE_SHIFT 8 /**< log2(DIRECTORY_SIZE) */
|
||||
#define PRIME1 37
|
||||
#define PRIME2 1048583
|
||||
#define MAX_LOAD_FACTOR 5
|
||||
@@ -101,6 +100,7 @@
|
||||
/* packages used */
|
||||
/*****************/
|
||||
|
||||
#include <scl_export.h>
|
||||
#ifdef HASH_C
|
||||
#include <assert.h>
|
||||
#endif /*HASH_C*/
|
||||
@@ -123,42 +123,39 @@ typedef struct Element_ {
|
||||
char * key;
|
||||
char * data;
|
||||
struct Element_ * next;
|
||||
Symbol * symbol;/* for debugging hash conflicts */
|
||||
char type; /* user-supplied type */
|
||||
Symbol * symbol; /**< for debugging hash conflicts */
|
||||
char type; /**< user-supplied type */
|
||||
} * Element;
|
||||
|
||||
typedef Element * Segment;
|
||||
|
||||
typedef struct Hash_Table_ {
|
||||
#if 0
|
||||
int in_use; /* If someone is traversing the hash table */
|
||||
int in_use; /**< If someone is traversing the hash table */
|
||||
#endif
|
||||
unsigned int p; /* Next bucket to be split */
|
||||
unsigned int maxp; /* upper bound on p during expansion */
|
||||
long KeyCount; /* current # keys */
|
||||
unsigned int SegmentCount; /* current # segments */
|
||||
unsigned int p; /**< Next bucket to be split */
|
||||
unsigned int maxp; /**< upper bound on p during expansion */
|
||||
long KeyCount; /**< current # keys */
|
||||
unsigned int SegmentCount; /**< current # segments */
|
||||
unsigned int MinLoadFactor;
|
||||
unsigned int MaxLoadFactor;
|
||||
Segment Directory[DIRECTORY_SIZE];
|
||||
} * Hash_Table;
|
||||
|
||||
typedef struct {
|
||||
int i; /* segment index (i think) */
|
||||
int j; /* key index in segment (ditto) */
|
||||
Element p; /* usually the next element to be returned */
|
||||
unsigned int i; /**< segment index (i think) */
|
||||
unsigned int j; /**< key index in segment (ditto) */
|
||||
Element p; /**< usually the next element to be returned */
|
||||
Hash_Table table;
|
||||
char type;
|
||||
Element e; /* originally thought of as a place for */
|
||||
/* the caller of HASHlist to temporarily stash the return value */
|
||||
/* to allow the caller (i.e., DICTdo) to be macroized, but now */
|
||||
/* conveniently used by HASHlist, which both stores the ultimate */
|
||||
/* value here as well as returns it via the return value of HASHlist */
|
||||
Element e; /**< originally thought of as a place for
|
||||
* the caller of HASHlist to temporarily stash the return value
|
||||
* to allow the caller (i.e., DICTdo) to be macroized, but now
|
||||
* conveniently used by HASHlist, which both stores the ultimate
|
||||
* value here as well as returns it via the return value of HASHlist
|
||||
*/
|
||||
} HashEntry;
|
||||
|
||||
/****************/
|
||||
/* modules used */
|
||||
/****************/
|
||||
|
||||
/********************/
|
||||
/* global variables */
|
||||
/********************/
|
||||
@@ -171,8 +168,8 @@ typedef struct {
|
||||
# define INITIALLY(value)
|
||||
#endif /*HASH_C*/
|
||||
|
||||
GLOBAL struct freelist_head HASH_Table_fl;
|
||||
GLOBAL struct freelist_head HASH_Element_fl;
|
||||
GLOBAL SCL_EXPRESS_EXPORT struct freelist_head HASH_Table_fl;
|
||||
GLOBAL SCL_EXPRESS_EXPORT struct freelist_head HASH_Element_fl;
|
||||
|
||||
#undef GLOBAL
|
||||
#undef INITIALLY
|
||||
@@ -185,7 +182,7 @@ GLOBAL struct freelist_head HASH_Element_fl;
|
||||
** Fast arithmetic, relying on powers of 2
|
||||
*/
|
||||
|
||||
/*
|
||||
/**
|
||||
The centerline compiler was having problems with MUL and DIV. Where DIV
|
||||
was called like this DIV(NewAddress, SEGMENT_SIZE) it is now being called like
|
||||
DIV(NewAddress, SEGMENT_SIZE_SHIFT). The compiler was mentioning some kind of
|
||||
@@ -211,16 +208,13 @@ This change only seems to have affected hash.h and hash.c
|
||||
/* function prototypes */
|
||||
/***********************/
|
||||
|
||||
extern void HASHinitialize PROTO( ( void ) );
|
||||
extern Hash_Table HASHcreate PROTO( ( unsigned ) );
|
||||
extern Hash_Table HASHcopy PROTO( ( Hash_Table ) );
|
||||
extern void HASHdestroy PROTO( ( Hash_Table ) );
|
||||
extern Element HASHsearch PROTO( ( Hash_Table, Element, Action ) );
|
||||
extern void HASHlistinit PROTO( ( Hash_Table, HashEntry * ) );
|
||||
extern void HASHlistinit_by_type PROTO( ( Hash_Table, HashEntry *, char ) );
|
||||
extern Element HASHlist PROTO( ( HashEntry * ) );
|
||||
#if 0
|
||||
extern void HASHlistend PROTO( ( HashEntry * ) );
|
||||
#endif
|
||||
extern SCL_EXPRESS_EXPORT void HASHinitialize PROTO( ( void ) );
|
||||
extern SCL_EXPRESS_EXPORT Hash_Table HASHcreate PROTO( ( unsigned ) );
|
||||
extern SCL_EXPRESS_EXPORT Hash_Table HASHcopy PROTO( ( Hash_Table ) );
|
||||
extern SCL_EXPRESS_EXPORT void HASHdestroy PROTO( ( Hash_Table ) );
|
||||
extern SCL_EXPRESS_EXPORT Element HASHsearch PROTO( ( Hash_Table, Element, Action ) );
|
||||
extern SCL_EXPRESS_EXPORT void HASHlistinit PROTO( ( Hash_Table, HashEntry * ) );
|
||||
extern SCL_EXPRESS_EXPORT void HASHlistinit_by_type PROTO( ( Hash_Table, HashEntry *, char ) );
|
||||
extern SCL_EXPRESS_EXPORT Element HASHlist PROTO( ( HashEntry * ) );
|
||||
|
||||
#endif /*HASH_H*/
|
||||
|
||||
+35
-32
@@ -1,8 +1,6 @@
|
||||
#ifndef LEX_ACTIONS_H
|
||||
#define LEX_ACTIONS_H
|
||||
|
||||
/* $Id: lexact.h,v 1.5 1995/04/05 13:55:40 clark dec96 $ */
|
||||
|
||||
/*
|
||||
* This software was developed by U.S. Government employees as part of
|
||||
* their official duties and is not subject to copyright.
|
||||
@@ -40,6 +38,7 @@
|
||||
/* packages used */
|
||||
/*****************/
|
||||
|
||||
#include <scl_export.h>
|
||||
#include <ctype.h>
|
||||
#include "basic.h"
|
||||
#include "error.h"
|
||||
@@ -77,19 +76,19 @@ typedef struct Scan_Buffer {
|
||||
# define INITIALLY(value)
|
||||
#endif /* LEX_ACTIONS_C */
|
||||
|
||||
GLOBAL Scan_Buffer SCAN_buffers[SCAN_NESTING_DEPTH];
|
||||
GLOBAL int SCAN_current_buffer INITIALLY( 0 );
|
||||
GLOBAL char * SCANcurrent;
|
||||
GLOBAL SCL_EXPRESS_EXPORT Scan_Buffer SCAN_buffers[SCAN_NESTING_DEPTH];
|
||||
GLOBAL SCL_EXPRESS_EXPORT int SCAN_current_buffer INITIALLY( 0 );
|
||||
GLOBAL SCL_EXPRESS_EXPORT char * SCANcurrent;
|
||||
|
||||
GLOBAL Error ERROR_include_file INITIALLY( ERROR_none );
|
||||
GLOBAL Error ERROR_unmatched_close_comment INITIALLY( ERROR_none );
|
||||
GLOBAL Error ERROR_unmatched_open_comment INITIALLY( ERROR_none );
|
||||
GLOBAL Error ERROR_unterminated_string INITIALLY( ERROR_none );
|
||||
GLOBAL Error ERROR_encoded_string_bad_digit INITIALLY( ERROR_none );
|
||||
GLOBAL Error ERROR_encoded_string_bad_count INITIALLY( ERROR_none );
|
||||
GLOBAL Error ERROR_bad_identifier INITIALLY( ERROR_none );
|
||||
GLOBAL Error ERROR_unexpected_character INITIALLY( ERROR_none );
|
||||
GLOBAL Error ERROR_nonascii_char;
|
||||
GLOBAL SCL_EXPRESS_EXPORT Error ERROR_include_file INITIALLY( ERROR_none );
|
||||
GLOBAL SCL_EXPRESS_EXPORT Error ERROR_unmatched_close_comment INITIALLY( ERROR_none );
|
||||
GLOBAL SCL_EXPRESS_EXPORT Error ERROR_unmatched_open_comment INITIALLY( ERROR_none );
|
||||
GLOBAL SCL_EXPRESS_EXPORT Error ERROR_unterminated_string INITIALLY( ERROR_none );
|
||||
GLOBAL SCL_EXPRESS_EXPORT Error ERROR_encoded_string_bad_digit INITIALLY( ERROR_none );
|
||||
GLOBAL SCL_EXPRESS_EXPORT Error ERROR_encoded_string_bad_count INITIALLY( ERROR_none );
|
||||
GLOBAL SCL_EXPRESS_EXPORT Error ERROR_bad_identifier INITIALLY( ERROR_none );
|
||||
GLOBAL SCL_EXPRESS_EXPORT Error ERROR_unexpected_character INITIALLY( ERROR_none );
|
||||
GLOBAL SCL_EXPRESS_EXPORT Error ERROR_nonascii_char;
|
||||
|
||||
|
||||
#undef GLOBAL
|
||||
@@ -112,27 +111,27 @@ GLOBAL Error ERROR_nonascii_char;
|
||||
/* function prototypes */
|
||||
/***********************/
|
||||
|
||||
extern int yylex PROTO( ( void ) ); /* the scanner */
|
||||
extern SCL_EXPRESS_EXPORT int yylex PROTO( ( void ) ); /* the scanner */
|
||||
|
||||
extern void SCANinitialize PROTO( ( void ) );
|
||||
extern int SCANprocess_real_literal PROTO( ( void ) );
|
||||
extern int SCANprocess_integer_literal PROTO( ( void ) );
|
||||
extern int SCANprocess_binary_literal PROTO( ( void ) );
|
||||
extern int SCANprocess_logical_literal PROTO( ( char * ) );
|
||||
extern int SCANprocess_identifier_or_keyword PROTO( ( void ) );
|
||||
extern int SCANprocess_string PROTO( ( void ) );
|
||||
extern int SCANprocess_encoded_string PROTO( ( void ) );
|
||||
extern int SCANprocess_semicolon PROTO( ( int ) );
|
||||
extern void SCANsave_comment PROTO( ( void ) );
|
||||
extern bool SCANread PROTO( ( void ) );
|
||||
extern SCL_EXPRESS_EXPORT void SCANinitialize PROTO( ( void ) );
|
||||
extern SCL_EXPRESS_EXPORT int SCANprocess_real_literal PROTO( ( void ) );
|
||||
extern SCL_EXPRESS_EXPORT int SCANprocess_integer_literal PROTO( ( void ) );
|
||||
extern SCL_EXPRESS_EXPORT int SCANprocess_binary_literal PROTO( ( void ) );
|
||||
extern SCL_EXPRESS_EXPORT int SCANprocess_logical_literal PROTO( ( char * ) );
|
||||
extern SCL_EXPRESS_EXPORT int SCANprocess_identifier_or_keyword PROTO( ( void ) );
|
||||
extern SCL_EXPRESS_EXPORT int SCANprocess_string PROTO( ( void ) );
|
||||
extern SCL_EXPRESS_EXPORT int SCANprocess_encoded_string PROTO( ( void ) );
|
||||
extern SCL_EXPRESS_EXPORT int SCANprocess_semicolon PROTO( ( int ) );
|
||||
extern SCL_EXPRESS_EXPORT void SCANsave_comment PROTO( ( void ) );
|
||||
extern SCL_EXPRESS_EXPORT bool SCANread PROTO( ( void ) );
|
||||
#if macros_bit_the_dust
|
||||
extern void SCANdefine_macro PROTO( ( char *, char * ) );
|
||||
extern SCL_EXPRESS_EXPORT void SCANdefine_macro PROTO( ( char *, char * ) );
|
||||
#endif
|
||||
extern void SCANinclude_file PROTO( ( char * ) );
|
||||
void SCANlowerize PROTO( ( char * ) );
|
||||
void SCANupperize PROTO( ( char * ) );
|
||||
extern char * SCANstrdup PROTO( ( char * ) );
|
||||
extern long SCANtell PROTO( ( void ) );
|
||||
extern SCL_EXPRESS_EXPORT void SCANinclude_file PROTO( ( char * ) );
|
||||
SCL_EXPRESS_EXPORT void SCANlowerize PROTO( ( char * ) );
|
||||
SCL_EXPRESS_EXPORT void SCANupperize PROTO( ( char * ) );
|
||||
extern SCL_EXPRESS_EXPORT char * SCANstrdup PROTO( ( char * ) );
|
||||
extern SCL_EXPRESS_EXPORT long SCANtell PROTO( ( void ) );
|
||||
|
||||
/*******************************/
|
||||
/* inline function definitions */
|
||||
@@ -162,7 +161,11 @@ SCANnextchar( char * buffer ) {
|
||||
SCANbuffer.numRead--;
|
||||
#endif
|
||||
buffer[0] = *( SCANcurrent++ );
|
||||
#ifdef __MSVC__
|
||||
if( !__isascii( buffer[0] ) ) {
|
||||
#else
|
||||
if( !isascii( buffer[0] ) ) {
|
||||
#endif
|
||||
ERRORreport_with_line( ERROR_nonascii_char, yylineno,
|
||||
0xff & buffer[0] );
|
||||
buffer[0] = ' '; /* substitute space */
|
||||
|
||||
+42
-39
@@ -1,8 +1,6 @@
|
||||
#ifndef LINKED_LIST_H
|
||||
#define LINKED_LIST_H
|
||||
|
||||
/* $Id: linklist.h,v 1.3 1997/01/21 19:15:23 dar Exp $ */
|
||||
|
||||
/*
|
||||
* This work was supported by the United States Government, and is
|
||||
* not subject to copyright.
|
||||
@@ -38,6 +36,7 @@
|
||||
/* packages used */
|
||||
/*****************/
|
||||
|
||||
#include <scl_export.h>
|
||||
#include "basic.h"
|
||||
#include "memory.h"
|
||||
|
||||
@@ -47,10 +46,6 @@
|
||||
|
||||
typedef struct Linked_List_ * Linked_List;
|
||||
|
||||
#ifdef __STDC__
|
||||
#else /* old C */
|
||||
#endif /*__STDC__*/
|
||||
|
||||
/****************/
|
||||
/* modules used */
|
||||
/****************/
|
||||
@@ -81,10 +76,10 @@ struct Linked_List_ {
|
||||
#include "decstart.h"
|
||||
#endif /*LINKED_LIST_C*/
|
||||
|
||||
GLOBAL Error ERROR_empty_list INITIALLY( ERROR_none );
|
||||
GLOBAL struct freelist_head LINK_fl;
|
||||
GLOBAL struct freelist_head LIST_fl;
|
||||
GLOBAL Linked_List LINK__l; /* for LISTcreate_with macro - ugh */
|
||||
GLOBAL SCL_EXPRESS_EXPORT Error ERROR_empty_list INITIALLY( ERROR_none );
|
||||
GLOBAL SCL_EXPRESS_EXPORT struct freelist_head LINK_fl;
|
||||
GLOBAL SCL_EXPRESS_EXPORT struct freelist_head LIST_fl;
|
||||
GLOBAL SCL_EXPRESS_EXPORT Linked_List LINK__l; /* for LISTcreate_with macro - ugh */
|
||||
|
||||
#include "de_end.h"
|
||||
|
||||
@@ -97,37 +92,38 @@ GLOBAL Linked_List LINK__l; /* for LISTcreate_with macro - ugh */
|
||||
#define LIST_new() (struct Linked_List_ *)MEM_new(&LIST_fl)
|
||||
#define LIST_destroy(x) MEM_destroy(&LIST_fl,(Freelist *)(Generic)x)
|
||||
|
||||
/* following could be optimized */
|
||||
/** following could be optimized */
|
||||
#define LISTcreate_with(x) (LINK__l = LISTcreate()),\
|
||||
LISTadd(LINK__l,x),\
|
||||
LINK_l)
|
||||
|
||||
/* accessing links */
|
||||
/** accessing links */
|
||||
#define LINKdata(link) (link)->data
|
||||
#define LINKnext(link) (link)->next
|
||||
#define LINKprev(link) (link)->prev
|
||||
|
||||
/* iteration */
|
||||
#define LISTdo(list, elt, type) \
|
||||
{struct Linked_List_ * __l = (list); \
|
||||
type elt; \
|
||||
Link __p; \
|
||||
if (__l) { \
|
||||
/** iteration */
|
||||
#define LISTdo(list, elt, type) \
|
||||
{struct Linked_List_ * __l = (list); \
|
||||
type elt; \
|
||||
Link __p; \
|
||||
if (__l) { \
|
||||
for (__p = __l->mark; (__p = __p->next) != __l->mark; ) { \
|
||||
(elt) = (type)((__p)->data);
|
||||
|
||||
#define LISTdo_links(list, link) \
|
||||
{Linked_List __in = (list); \
|
||||
Link link; \
|
||||
if (__in != LIST_NULL) { \
|
||||
for ((link) = __in->mark; ((link) = (link)->next) != __in->mark; ) {
|
||||
{Linked_List __i = (list); \
|
||||
Link link; \
|
||||
if (__i != LIST_NULL) { \
|
||||
for ((link) = __i->mark; ((link) = (link)->next) != __i->mark; ) {
|
||||
|
||||
#define LISTod }}}
|
||||
|
||||
/* accessing */
|
||||
/** accessing */
|
||||
#define LISTpeek_first(list) \
|
||||
(((struct Linked_List_*)list)->mark->next->data)
|
||||
|
||||
/* function aliases */
|
||||
/** function aliases */
|
||||
#define LISTadd(list, item) LISTadd_last(list, item)
|
||||
#define LISTadd_all(list, items) \
|
||||
LISTdo(items, e, Generic) \
|
||||
@@ -138,26 +134,27 @@ GLOBAL Linked_List LINK__l; /* for LISTcreate_with macro - ugh */
|
||||
/* function prototypes */
|
||||
/***********************/
|
||||
|
||||
extern void LISTinitialize PROTO( ( void ) );
|
||||
extern Linked_List LISTcreate PROTO( ( void ) );
|
||||
/*extern Linked_List LISTcreate_with PROTO((Generic));*/
|
||||
extern Linked_List LISTcopy PROTO( ( Linked_List ) );
|
||||
extern Generic LISTadd_first PROTO( ( Linked_List, Generic ) );
|
||||
extern Generic LISTadd_last PROTO( ( Linked_List, Generic ) );
|
||||
extern Generic LISTadd_after PROTO( ( Linked_List, Link, Generic ) );
|
||||
extern Generic LISTadd_before PROTO( ( Linked_List, Link, Generic ) );
|
||||
extern Generic LISTremove_first PROTO( ( Linked_List ) );
|
||||
extern Generic LISTremove PROTO( ( Linked_List, Link ) );
|
||||
extern Generic LISTget_first PROTO( ( Linked_List ) );
|
||||
extern Generic LISTget_second PROTO( ( Linked_List ) );
|
||||
extern Generic LISTget_nth PROTO( ( Linked_List, int ) );
|
||||
extern void LISTfree PROTO( ( Linked_List ) );
|
||||
extern int LISTget_length PROTO( ( Linked_List ) );
|
||||
extern SCL_EXPRESS_EXPORT void LISTinitialize PROTO( ( void ) );
|
||||
extern SCL_EXPRESS_EXPORT Linked_List LISTcreate PROTO( ( void ) );
|
||||
extern SCL_EXPRESS_EXPORT Linked_List LISTcopy PROTO( ( Linked_List ) );
|
||||
extern SCL_EXPRESS_EXPORT Generic LISTadd_first PROTO( ( Linked_List, Generic ) );
|
||||
extern SCL_EXPRESS_EXPORT Generic LISTadd_last PROTO( ( Linked_List, Generic ) );
|
||||
extern SCL_EXPRESS_EXPORT Generic LISTadd_after PROTO( ( Linked_List, Link, Generic ) );
|
||||
extern SCL_EXPRESS_EXPORT Generic LISTadd_before PROTO( ( Linked_List, Link, Generic ) );
|
||||
extern SCL_EXPRESS_EXPORT Generic LISTremove_first PROTO( ( Linked_List ) );
|
||||
extern SCL_EXPRESS_EXPORT Generic LISTremove PROTO( ( Linked_List, Link ) );
|
||||
extern SCL_EXPRESS_EXPORT Generic LISTget_first PROTO( ( Linked_List ) );
|
||||
extern SCL_EXPRESS_EXPORT Generic LISTget_second PROTO( ( Linked_List ) );
|
||||
extern SCL_EXPRESS_EXPORT Generic LISTget_nth PROTO( ( Linked_List, int ) );
|
||||
extern SCL_EXPRESS_EXPORT void LISTfree PROTO( ( Linked_List ) );
|
||||
extern SCL_EXPRESS_EXPORT int LISTget_length PROTO( ( Linked_List ) );
|
||||
|
||||
/*******************************/
|
||||
/* inline function definitions */
|
||||
/*******************************/
|
||||
|
||||
#if !defined(__BORLAND__)
|
||||
|
||||
#if supports_inline_functions || defined(LINKED_LIST_C)
|
||||
|
||||
static_inline
|
||||
@@ -174,4 +171,10 @@ LISTempty( Linked_List list ) {
|
||||
|
||||
#endif /* supports_inline_functions || defined(LINKED_LIST_C) */
|
||||
|
||||
#else
|
||||
|
||||
extern SCL_EXPRESS_EXPORT bool LISTempty( Linked_List list );
|
||||
|
||||
#endif
|
||||
|
||||
#endif /*LINKED_LIST_H*/
|
||||
|
||||
+18
-19
@@ -1,8 +1,6 @@
|
||||
#ifndef MEMORY_H
|
||||
#define MEMORY_H
|
||||
|
||||
/* $Id: memory.h,v 1.5 1997/01/21 19:17:11 dar Exp $ */
|
||||
|
||||
/*
|
||||
* This work was supported by the United States Government, and is
|
||||
* not subject to copyright.
|
||||
@@ -30,29 +28,30 @@
|
||||
/* packages used */
|
||||
/*****************/
|
||||
|
||||
/* mem.h - defs for fixed size block memory allocator */
|
||||
#include <scl_export.h>
|
||||
|
||||
/** \file memory.h - defs for fixed size block memory allocator */
|
||||
|
||||
typedef long Align;
|
||||
|
||||
union freelist {
|
||||
union freelist * next; /* next block on freelist */
|
||||
char memory; /* user data */
|
||||
Align aligner; /* force alignment of blocks */
|
||||
union freelist * next; /**< next block on freelist */
|
||||
char memory; /**< user data */
|
||||
Align aligner; /**< force alignment of blocks */
|
||||
};
|
||||
|
||||
typedef union freelist Freelist;
|
||||
|
||||
struct freelist_head {
|
||||
int size_elt; /* size of a single elt */
|
||||
int size_elt; /**< size of a single elt */
|
||||
#ifndef NOSTAT
|
||||
int alloc; /* # of allocations */
|
||||
int alloc; /**< # of allocations */
|
||||
int dealloc;
|
||||
int create; /* number of calls to create a new freelist */
|
||||
Generic max; /* end of freelist */
|
||||
int create; /**< number of calls to create a new freelist */
|
||||
Generic max; /**< end of freelist */
|
||||
#endif
|
||||
int size; /* size of a single elt incl. next ptr */
|
||||
int bytes; /* if we run out, allocate memory by this
|
||||
many bytes */
|
||||
int size; /**< size of a single elt incl. next ptr */
|
||||
int bytes; /**< if we run out, allocate memory by this many bytes */
|
||||
Freelist * freelist;
|
||||
#if SPACE_PROFILE
|
||||
int count;
|
||||
@@ -76,17 +75,17 @@ char * nnew();
|
||||
|
||||
extern int yylineno;
|
||||
|
||||
/* CALLOC grabs and initializes to all 0s space for the indicated */
|
||||
/* number of instances of the indicated type */
|
||||
/** CALLOC grabs and initializes to all 0s space for the indicated
|
||||
* number of instances of the indicated type */
|
||||
#define CALLOC(ptr, num, type) \
|
||||
if (((ptr) = (type*)calloc((num), (unsigned)sizeof(type)))==NULL) { \
|
||||
fprintf(stderr,"fedex: out of space");\
|
||||
} else {}
|
||||
|
||||
void _MEMinitialize PROTO( ( void ) );
|
||||
void MEMinitialize PROTO( ( struct freelist_head *, int, int, int ) );
|
||||
void MEM_destroy PROTO( ( struct freelist_head *, Freelist * ) );
|
||||
Generic MEM_new PROTO( ( struct freelist_head * ) );
|
||||
SCL_EXPRESS_EXPORT void _MEMinitialize PROTO( ( void ) );
|
||||
SCL_EXPRESS_EXPORT void MEMinitialize PROTO( ( struct freelist_head *, int, int, int ) );
|
||||
SCL_EXPRESS_EXPORT void MEM_destroy PROTO( ( struct freelist_head *, Freelist * ) );
|
||||
SCL_EXPRESS_EXPORT Generic MEM_new PROTO( ( struct freelist_head * ) );
|
||||
|
||||
#include "de_end.h"
|
||||
|
||||
|
||||
+13
-29
@@ -1,10 +1,8 @@
|
||||
#ifndef OBJECT_H
|
||||
#define OBJECT_H
|
||||
|
||||
/* $Id: object.h,v 1.9 1997/01/21 19:17:11 dar Exp $ */
|
||||
|
||||
/************************************************************************
|
||||
** Module: Object
|
||||
/** **********************************************************************
|
||||
** Module: Object \file object.h
|
||||
** Description: This module implements the Object abstraction.
|
||||
** Constants:
|
||||
** OBJECT_NULL - the null class
|
||||
@@ -48,15 +46,16 @@
|
||||
/* constants */
|
||||
/*************/
|
||||
|
||||
/* each object has an index - current the index is a mnemonic character */
|
||||
/* hence the array is rather sparse, but the extra slop is only a hundred */
|
||||
/* or so bytes, so it's nothing to sweat about */
|
||||
/** each object has an index - current the index is a mnemonic character
|
||||
* hence the array is rather sparse, but the extra slop is only a hundred
|
||||
* or so bytes, so it's nothing to sweat about */
|
||||
#define MAX_OBJECT_TYPES 127 /* really could be a LOT less */
|
||||
|
||||
/*****************/
|
||||
/* packages used */
|
||||
/*****************/
|
||||
|
||||
#include <scl_export.h>
|
||||
#include "basic.h" /* get basic definitions */
|
||||
#include "symbol.h"
|
||||
|
||||
@@ -70,9 +69,8 @@
|
||||
|
||||
struct Object {
|
||||
struct Symbol_ * ( *get_symbol )();
|
||||
char * type; /* should complete the phrase "X is ..." */
|
||||
/* i.e., "an entity", "a type", "of unknown type" */
|
||||
int bits; /* a bitwise selector of a type, i.e. OBJ_XX_BITS */
|
||||
char * type; /**< should complete the phrase "X is ..." - i.e., "an entity", "a type", "of unknown type" */
|
||||
int bits; /**< a bitwise selector of a type, i.e. OBJ_XX_BITS */
|
||||
};
|
||||
|
||||
/****************/
|
||||
@@ -89,7 +87,7 @@ struct Object {
|
||||
#include "decstart.h"
|
||||
#endif /*OBJECT_C */
|
||||
|
||||
GLOBAL struct Object * OBJ;
|
||||
GLOBAL SCL_EXPRESS_EXPORT struct Object * OBJ;
|
||||
|
||||
#include "de_end.h"
|
||||
|
||||
@@ -103,28 +101,14 @@ GLOBAL struct Object * OBJ;
|
||||
#define OBJtype_is_oneof(_type_,class) (OBJ[(int)_type_].bits & (class))
|
||||
#define OBJget_name(obj,type) (OBJget_symbol(obj,type)->name)
|
||||
|
||||
/* for backwards compatibility */
|
||||
#define OBJequal(x,y) ((x) == (y))
|
||||
#define OBJfree(x)
|
||||
#define OBJreference(x) (x)
|
||||
#define OBJget_data(obj,type,err) (obj)
|
||||
/* removed #define statements for obsolete fn macros OBJequal OBJfree OBJreference OBJget_data */
|
||||
|
||||
/***********************/
|
||||
/* function prototypes */
|
||||
/***********************/
|
||||
|
||||
extern void OBJinitialize PROTO( ( void ) );
|
||||
extern void OBJcreate PROTO( ( char, struct Symbol_ * ( * )( Generic ), char *, int ) );
|
||||
extern Symbol * UNK_get_symbol PROTO( ( Generic x ) );
|
||||
#if 0
|
||||
extern void OBJcreate( char, struct Symbol * ( * )( Generic ), char *, int );
|
||||
#endif
|
||||
|
||||
/********************/
|
||||
/* inline functions */
|
||||
/********************/
|
||||
|
||||
#if supports_inline_functions || defined(OBJECT_C)
|
||||
#endif /* supports_inline_functions || defined(OBJECT_C) */
|
||||
extern SCL_EXPRESS_EXPORT void OBJinitialize PROTO( ( void ) );
|
||||
extern SCL_EXPRESS_EXPORT void OBJcreate PROTO( ( char, struct Symbol_ * ( * )( Generic ), char *, int ) );
|
||||
extern SCL_EXPRESS_EXPORT Symbol * UNK_get_symbol PROTO( ( Generic x ) );
|
||||
|
||||
#endif /*OBJECT_H*/
|
||||
|
||||
+19
-22
@@ -1,8 +1,6 @@
|
||||
#ifndef RESOLVE_H
|
||||
#define RESOLVE_H
|
||||
|
||||
/* $Id: resolve.h,v 1.6 1994/11/10 19:20:03 clark dec96 $ */
|
||||
|
||||
/*
|
||||
* This software was developed by U.S. Government employees as part of
|
||||
* their official duties and is not subject to copyright.
|
||||
@@ -30,6 +28,7 @@
|
||||
* Initial revision
|
||||
*/
|
||||
|
||||
#include <scl_export.h>
|
||||
#include "expbasic.h" /* get basic definitions */
|
||||
#include "type.h"
|
||||
#include "variable.h"
|
||||
@@ -54,17 +53,17 @@
|
||||
# define INITIALLY(value)
|
||||
#endif /*RESOLVE_C*/
|
||||
|
||||
GLOBAL int print_objects_while_running INITIALLY( 0 );
|
||||
GLOBAL SCL_EXPRESS_EXPORT int print_objects_while_running INITIALLY( 0 );
|
||||
|
||||
GLOBAL Error ERROR_undefined_attribute INITIALLY( ERROR_none );
|
||||
GLOBAL Error ERROR_undefined_type INITIALLY( ERROR_none );
|
||||
GLOBAL Error ERROR_undefined_schema INITIALLY( ERROR_none );
|
||||
GLOBAL Error ERROR_unknown_attr_in_entity INITIALLY( ERROR_none );
|
||||
GLOBAL Error ERROR_unknown_subtype INITIALLY( ERROR_none );
|
||||
GLOBAL Error ERROR_unknown_supertype INITIALLY( ERROR_none );
|
||||
GLOBAL Error ERROR_circular_reference INITIALLY( ERROR_none );
|
||||
GLOBAL Error ERROR_ambiguous_attribute INITIALLY( ERROR_none );
|
||||
GLOBAL Error ERROR_ambiguous_group INITIALLY( ERROR_none );
|
||||
GLOBAL SCL_EXPRESS_EXPORT Error ERROR_undefined_attribute INITIALLY( ERROR_none );
|
||||
GLOBAL SCL_EXPRESS_EXPORT Error ERROR_undefined_type INITIALLY( ERROR_none );
|
||||
GLOBAL SCL_EXPRESS_EXPORT Error ERROR_undefined_schema INITIALLY( ERROR_none );
|
||||
GLOBAL SCL_EXPRESS_EXPORT Error ERROR_unknown_attr_in_entity INITIALLY( ERROR_none );
|
||||
GLOBAL SCL_EXPRESS_EXPORT Error ERROR_unknown_subtype INITIALLY( ERROR_none );
|
||||
GLOBAL SCL_EXPRESS_EXPORT Error ERROR_unknown_supertype INITIALLY( ERROR_none );
|
||||
GLOBAL SCL_EXPRESS_EXPORT Error ERROR_circular_reference INITIALLY( ERROR_none );
|
||||
GLOBAL SCL_EXPRESS_EXPORT Error ERROR_ambiguous_attribute INITIALLY( ERROR_none );
|
||||
GLOBAL SCL_EXPRESS_EXPORT Error ERROR_ambiguous_group INITIALLY( ERROR_none );
|
||||
|
||||
#undef GLOBAL
|
||||
#undef INITIALLY
|
||||
@@ -73,7 +72,6 @@ GLOBAL Error ERROR_ambiguous_group INITIALLY( ERROR_none );
|
||||
|
||||
/* cheaper doing the check here, then inside the function call. Return */
|
||||
/* immediately for RESOLVED, FAILED_TO_RESOLVE, and RESOLVE_IN_PROGRESS */
|
||||
/*#define TYPEresolve(t,s) if (is_resolvable((*(t)))) TYPE_resolve((t),(s))*/
|
||||
#define TYPEresolve(t,s) if (is_resolvable((*(t)))) TYPE_resolve((t))
|
||||
#define VARresolve_types(v,s) if (is_resolvable((v)->name)) VAR_resolve_types((v),(s))
|
||||
#define VARresolve_expressions(v,s) if (is_resolvable((v)->name)) VAR_resolve_expressions((v),(s))
|
||||
@@ -83,14 +81,13 @@ GLOBAL Error ERROR_ambiguous_group INITIALLY( ERROR_none );
|
||||
/* function prototypes */
|
||||
/***********************/
|
||||
|
||||
extern void RESOLVEinitialize PROTO( ( void ) );
|
||||
extern void SCOPEresolve_expressions_statements PROTO( ( Scope ) );
|
||||
extern void SCOPEresolve_subsupers PROTO( ( Scope ) );
|
||||
extern void SCOPEresolve_types PROTO( ( Scope ) );
|
||||
/*extern void TYPE_resolve PROTO((Type *,Scope));*/
|
||||
extern void TYPE_resolve PROTO( ( Type * ) );
|
||||
extern void EXP_resolve PROTO( ( Expression, Scope, Type ) );
|
||||
extern void ALGresolve PROTO( ( Scope ) );
|
||||
extern void SCHEMAresolve PROTO( ( Scope ) );
|
||||
extern SCL_EXPRESS_EXPORT void RESOLVEinitialize PROTO( ( void ) );
|
||||
extern SCL_EXPRESS_EXPORT void SCOPEresolve_expressions_statements PROTO( ( Scope ) );
|
||||
extern SCL_EXPRESS_EXPORT void SCOPEresolve_subsupers PROTO( ( Scope ) );
|
||||
extern SCL_EXPRESS_EXPORT void SCOPEresolve_types PROTO( ( Scope ) );
|
||||
extern SCL_EXPRESS_EXPORT void TYPE_resolve PROTO( ( Type * ) );
|
||||
extern SCL_EXPRESS_EXPORT void EXP_resolve PROTO( ( Expression, Scope, Type ) );
|
||||
extern SCL_EXPRESS_EXPORT void ALGresolve PROTO( ( Scope ) );
|
||||
extern SCL_EXPRESS_EXPORT void SCHEMAresolve PROTO( ( Scope ) );
|
||||
|
||||
#endif /*RESOLVE_H*/
|
||||
|
||||
+33
-52
@@ -1,10 +1,8 @@
|
||||
#ifndef SCHEMA_H
|
||||
#define SCHEMA_H
|
||||
|
||||
/* $Id: schema.h,v 1.11 1997/02/25 19:49:01 dar Exp $ */
|
||||
|
||||
/************************************************************************
|
||||
** Module: Schema
|
||||
/** **********************************************************************
|
||||
** Module: Schema \file schema.h
|
||||
** Description: This module implements the Schema abstraction, which
|
||||
** basically amounts to a named symbol table.
|
||||
** Constants:
|
||||
@@ -48,23 +46,15 @@
|
||||
* prettied up interface to print_objects_when_running
|
||||
*/
|
||||
|
||||
/*************/
|
||||
/* constants */
|
||||
/*************/
|
||||
|
||||
/*****************/
|
||||
/* packages used */
|
||||
/*****************/
|
||||
|
||||
#include <scl_export.h>
|
||||
#include "expbasic.h" /* get basic definitions */
|
||||
#include "symbol.h"
|
||||
#include "scope.h"
|
||||
|
||||
/************/
|
||||
/* typedefs */
|
||||
/************/
|
||||
|
||||
/*typedef struct Scope *Schema;*/
|
||||
|
||||
/****************/
|
||||
/* modules used */
|
||||
@@ -86,30 +76,28 @@ typedef struct Rename {
|
||||
Schema schema;
|
||||
struct Symbol_ * old;
|
||||
struct Symbol_ * nnew;
|
||||
Generic object; /* once object has been looked up */
|
||||
char type; /* drat, need to remember this */
|
||||
/* once renames have been resolved to avoid */
|
||||
/* looking them up in the dictionary again */
|
||||
Generic object; /**< once object has been looked up */
|
||||
char type; /**< drat, need to remember this once renames have been
|
||||
* resolved to avoid looking them up in the dictionary again */
|
||||
enum rename_type rename_type;
|
||||
int userdata; /* generic for user */
|
||||
int userdata; /**< generic for user */
|
||||
} Rename;
|
||||
|
||||
struct Schema_ {
|
||||
Linked_List rules;
|
||||
#if 0
|
||||
struct Express_ * express;
|
||||
#endif
|
||||
Linked_List reflist;
|
||||
Linked_List uselist;
|
||||
/* dictionarys into which are entered renames for each specific */
|
||||
/* object specified in a rename clause (even if it uses the same */
|
||||
/* name */
|
||||
/** \var refdict, usedict
|
||||
* dictionarys into which are entered renames for each specific
|
||||
* object specified in a rename clause (even if it uses the same
|
||||
* name */
|
||||
Dictionary refdict;
|
||||
Dictionary usedict;
|
||||
/* lists of schemas that are fully ref/use'd */
|
||||
/* entries can be 0 if schemas weren't found during RENAMEresolve */
|
||||
Linked_List use_schemas;
|
||||
Linked_List ref_schemas;
|
||||
|
||||
Linked_List use_schemas; /**< lists of schemas that are fully use'd
|
||||
* entries can be 0 if schemas weren't found during RENAMEresolve */
|
||||
Linked_List ref_schemas; /**< lists of schemas that are fully ref'd
|
||||
* entries can be 0 if schemas weren't found during RENAMEresolve */
|
||||
};
|
||||
|
||||
/********************/
|
||||
@@ -124,11 +112,11 @@ struct Schema_ {
|
||||
# define INITIALLY(value)
|
||||
#endif /* SCHEMA_C */
|
||||
|
||||
GLOBAL struct freelist_head REN_fl;
|
||||
GLOBAL struct freelist_head SCOPE_fl;
|
||||
GLOBAL struct freelist_head SCHEMA_fl;
|
||||
GLOBAL SCL_EXPRESS_EXPORT struct freelist_head REN_fl;
|
||||
GLOBAL SCL_EXPRESS_EXPORT struct freelist_head SCOPE_fl;
|
||||
GLOBAL SCL_EXPRESS_EXPORT struct freelist_head SCHEMA_fl;
|
||||
|
||||
GLOBAL int __SCOPE_search_id INITIALLY( 0 );
|
||||
GLOBAL SCL_EXPRESS_EXPORT int __SCOPE_search_id INITIALLY( 0 );
|
||||
|
||||
#undef GLOBAL
|
||||
#undef INITIALLY
|
||||
@@ -156,26 +144,19 @@ GLOBAL int __SCOPE_search_id INITIALLY( 0 );
|
||||
/* function prototypes */
|
||||
/***********************/
|
||||
|
||||
extern Variable VARfind PROTO( ( Scope, char *, int ) );
|
||||
extern Schema SCHEMAcreate PROTO( ( void ) );
|
||||
extern void SCHEMAinitialize PROTO( ( void ) );
|
||||
extern void SCHEMAadd_use PROTO( ( Schema, Symbol *, Symbol *, Symbol * ) );
|
||||
extern void SCHEMAadd_reference PROTO( ( Schema, Symbol *, Symbol *, Symbol * ) );
|
||||
extern void SCHEMAdefine_use PROTO( ( Schema, Rename * ) );
|
||||
extern void SCHEMAdefine_reference PROTO( ( Schema, Rename * ) );
|
||||
extern Generic SCHEMAfind PROTO( ( Schema, char * name, int search_refs ) );
|
||||
extern Scope SCOPEcreate PROTO( ( char ) );
|
||||
extern Scope SCOPEcreate_tiny PROTO( ( char ) );
|
||||
extern Scope SCOPEcreate_nostab PROTO( ( char ) );
|
||||
extern Linked_List SCHEMAget_entities_use PROTO( ( Scope ) );
|
||||
extern Linked_List SCHEMAget_entities_ref PROTO( ( Scope ) );
|
||||
|
||||
/********************/
|
||||
/* inline functions */
|
||||
/********************/
|
||||
|
||||
#if supports_inline_functions || defined(SCHEMA_C)
|
||||
#endif /* supports_inline_functions || defined(SCHEMA_C) */
|
||||
extern SCL_EXPRESS_EXPORT Variable VARfind PROTO( ( Scope, char *, int ) );
|
||||
extern SCL_EXPRESS_EXPORT Schema SCHEMAcreate PROTO( ( void ) );
|
||||
extern SCL_EXPRESS_EXPORT void SCHEMAinitialize PROTO( ( void ) );
|
||||
extern SCL_EXPRESS_EXPORT void SCHEMAadd_use PROTO( ( Schema, Symbol *, Symbol *, Symbol * ) );
|
||||
extern SCL_EXPRESS_EXPORT void SCHEMAadd_reference PROTO( ( Schema, Symbol *, Symbol *, Symbol * ) );
|
||||
extern SCL_EXPRESS_EXPORT void SCHEMAdefine_use PROTO( ( Schema, Rename * ) );
|
||||
extern SCL_EXPRESS_EXPORT void SCHEMAdefine_reference PROTO( ( Schema, Rename * ) );
|
||||
extern SCL_EXPRESS_EXPORT Generic SCHEMAfind PROTO( ( Schema, char * name, int search_refs ) );
|
||||
extern SCL_EXPRESS_EXPORT Scope SCOPEcreate PROTO( ( char ) );
|
||||
extern SCL_EXPRESS_EXPORT Scope SCOPEcreate_tiny PROTO( ( char ) );
|
||||
extern SCL_EXPRESS_EXPORT Scope SCOPEcreate_nostab PROTO( ( char ) );
|
||||
extern SCL_EXPRESS_EXPORT Linked_List SCHEMAget_entities_use PROTO( ( Scope ) );
|
||||
extern SCL_EXPRESS_EXPORT Linked_List SCHEMAget_entities_ref PROTO( ( Scope ) );
|
||||
|
||||
#endif /* SCHEMA_H */
|
||||
|
||||
|
||||
+16
-42
@@ -1,10 +1,8 @@
|
||||
#ifndef SCOPE_H
|
||||
#define SCOPE_H
|
||||
|
||||
/* $Id: scope.h,v 1.10 1997/01/21 19:17:11 dar Exp $ */
|
||||
|
||||
/************************************************************************
|
||||
** Module: Scope
|
||||
/** **********************************************************************
|
||||
** Module: Scope \file scope.h
|
||||
** Description: This module implements a hierarchical (i.e., scoped)
|
||||
** symbol table. The symbol table can store definitions of entities,
|
||||
** types, algorithms, and variables, as well as containing a list
|
||||
@@ -47,16 +45,11 @@
|
||||
|
||||
#define SCOPE_NULL (Scope)0
|
||||
|
||||
/************/
|
||||
/* typedefs */
|
||||
/************/
|
||||
|
||||
/*typedef struct Scope *Scope;*/
|
||||
|
||||
/****************/
|
||||
/* modules used */
|
||||
/****************/
|
||||
|
||||
#include <scl_export.h>
|
||||
#include "type.h"
|
||||
#include "variable.h"
|
||||
#include "entity.h"
|
||||
@@ -85,14 +78,13 @@
|
||||
#define SCOPE_FIND_ANYTHING OBJ_ANYTHING_BITS
|
||||
|
||||
struct Scope_ {
|
||||
Symbol symbol;
|
||||
char type; /* see above */
|
||||
ClientData clientData; /* user may use this for any purpose */
|
||||
int search_id; /* key to avoid searching this scope twice */
|
||||
Dictionary symbol_table;
|
||||
Symbol symbol;
|
||||
char type; /* see above */
|
||||
ClientData clientData; /**< user may use this for any purpose */
|
||||
int search_id; /**< key to avoid searching this scope twice */
|
||||
Dictionary symbol_table,enum_table;
|
||||
struct Scope_ * superscope;
|
||||
union {
|
||||
/* struct Constant *constant;*/
|
||||
struct Procedure_ * proc;
|
||||
struct Function_ * func;
|
||||
struct Rule_ * rule;
|
||||
@@ -101,10 +93,10 @@ struct Scope_ {
|
||||
struct Express_ * express;
|
||||
struct Increment_ * incr;
|
||||
struct TypeHead_ * type;
|
||||
/* no, query owns a scope rather than scope owning a query */
|
||||
/* struct Query *query;*/
|
||||
/* no, query owns a scope rather than scope owning a query
|
||||
* struct Query *query; */
|
||||
} u;
|
||||
Linked_List where; /* optional where clause */
|
||||
Linked_List where; /**< optional where clause */
|
||||
};
|
||||
|
||||
/********************/
|
||||
@@ -128,9 +120,6 @@ struct Scope_ {
|
||||
#define SCOPEget_symbol(scope) (&(scope)->symbol)
|
||||
#define SCOPEput_name(scope,name) ((scope)->symbol.name = name)
|
||||
#define SCOPEget_name(scope) ((scope)->symbol.name)
|
||||
/* get_superscope's' for backward compat */
|
||||
#define SCOPEget_superscope(scope) ((scope)->superscope)
|
||||
#define SCOPEget_superscope(scope) ((scope)->superscope)
|
||||
#define SCOPEget_resolved(scope) ((scope)->symbol.resolved)
|
||||
|
||||
#define SCOPEget_clientData(s) ((s)->clientData)
|
||||
@@ -149,25 +138,10 @@ struct Scope_ {
|
||||
/* function prototypes */
|
||||
/***********************/
|
||||
|
||||
extern struct Symbol_ * SCOPE_get_symbol PROTO( ( Generic ) );
|
||||
/*extern struct Scope * SCOPEget_nearest_enclosing_entity PROTO((Scope));*/
|
||||
extern void SCOPE_get_entities PROTO( ( Scope, Linked_List ) );
|
||||
extern Linked_List SCOPEget_entities PROTO( ( Scope ) );
|
||||
extern Linked_List SCOPEget_entities_superclass_order PROTO( ( Scope ) );
|
||||
extern Generic SCOPEfind PROTO( ( Scope, char *, int ) );
|
||||
extern SCL_EXPRESS_EXPORT struct Symbol_ * SCOPE_get_symbol PROTO( ( Generic ) );
|
||||
extern SCL_EXPRESS_EXPORT void SCOPE_get_entities PROTO( ( Scope, Linked_List ) );
|
||||
extern SCL_EXPRESS_EXPORT Linked_List SCOPEget_entities PROTO( ( Scope ) );
|
||||
extern SCL_EXPRESS_EXPORT Linked_List SCOPEget_entities_superclass_order PROTO( ( Scope ) );
|
||||
extern SCL_EXPRESS_EXPORT Generic SCOPEfind PROTO( ( Scope, char *, int ) );
|
||||
|
||||
#if 0
|
||||
extern Linked_List SCOPEget_types PROTO( ( Scope ) );
|
||||
extern Linked_List SCOPEget_variables PROTO( ( Scope ) );
|
||||
extern Linked_List SCOPEget_algorithms PROTO( ( Scope ) );
|
||||
extern Linked_List SCOPEget_constants PROTO( ( Scope ) );
|
||||
#endif
|
||||
|
||||
/********************/
|
||||
/* inline functions */
|
||||
/********************/
|
||||
|
||||
#if supports_inline_functions || defined(SCOPE_C)
|
||||
|
||||
#endif /* supports_inline_functions || defined(SCOPE_C) */
|
||||
#endif /* SCOPE_H */
|
||||
|
||||
+35
-44
@@ -1,10 +1,8 @@
|
||||
#ifndef STATEMENT_H
|
||||
#define STATEMENT_H
|
||||
|
||||
/* $Id: stmt.h,v 1.3 1997/01/21 19:17:11 dar Exp $ */
|
||||
|
||||
/************************************************************************
|
||||
** Module: Statement
|
||||
/** **********************************************************************
|
||||
** Module: Statement \file stmt.h
|
||||
** Description: This module implements the Statement abstraction. A
|
||||
** statement is, in effect, a typeless Expression. Due to the
|
||||
** existence of complex language constructs, however, it often is
|
||||
@@ -50,6 +48,7 @@
|
||||
/* packages used */
|
||||
/*****************/
|
||||
|
||||
#include <scl_export.h>
|
||||
#include "expbasic.h" /* get basic definitions */
|
||||
#include "scope.h"
|
||||
|
||||
@@ -94,9 +93,8 @@ typedef struct Scope_ * Increment;
|
||||
/* these should probably all be expression types */
|
||||
|
||||
struct Statement_ {
|
||||
Symbol symbol; /* can hold pcall or alias name */
|
||||
/* but otherwise is not used for anything */
|
||||
int type; /* one of STMT_XXX above */
|
||||
Symbol symbol; /**< can hold pcall or alias name but otherwise is not used for anything */
|
||||
int type; /**< one of STMT_XXX above */
|
||||
/* hey, is there nothing in common beside symbol and private data?? */
|
||||
union u_statement {
|
||||
struct Alias_ * alias;
|
||||
@@ -114,7 +112,7 @@ struct Statement_ {
|
||||
struct Alias_ {
|
||||
struct Scope_ * scope;
|
||||
struct Variable_ * variable;
|
||||
Linked_List statements; /* list of statements */
|
||||
Linked_List statements; /**< list of statements */
|
||||
};
|
||||
|
||||
struct Assignment_ {
|
||||
@@ -133,18 +131,18 @@ struct Compound_Statement_ {
|
||||
|
||||
struct Conditional_ {
|
||||
Expression test;
|
||||
Linked_List code; /* list of statements */
|
||||
Linked_List otherwise; /* list of statements */
|
||||
Linked_List code; /**< list of statements */
|
||||
Linked_List otherwise; /**< list of statements */
|
||||
};
|
||||
|
||||
struct Loop_ {
|
||||
struct Scope_ * scope; /* scope for increment control */
|
||||
struct Scope_ * scope; /**< scope for increment control */
|
||||
Expression while_expr;
|
||||
Expression until_expr;
|
||||
Linked_List statements; /* list of statements */
|
||||
Linked_List statements; /**< list of statements */
|
||||
};
|
||||
|
||||
/* this is an element in the optional Loop scope */
|
||||
/** this is an element in the optional Loop scope */
|
||||
struct Increment_ {
|
||||
Expression init;
|
||||
Expression end;
|
||||
@@ -153,7 +151,7 @@ struct Increment_ {
|
||||
|
||||
struct Procedure_Call_ {
|
||||
struct Scope_ * procedure;
|
||||
Linked_List parameters; /* list of expressions */
|
||||
Linked_List parameters; /**< list of expressions */
|
||||
};
|
||||
|
||||
struct Return_Statement_ {
|
||||
@@ -172,20 +170,20 @@ struct Return_Statement_ {
|
||||
#include "decstart.h"
|
||||
#endif /*STATEMENT_C*/
|
||||
|
||||
GLOBAL struct freelist_head STMT_fl;
|
||||
GLOBAL SCL_EXPRESS_EXPORT struct freelist_head STMT_fl;
|
||||
|
||||
GLOBAL struct freelist_head ALIAS_fl;
|
||||
GLOBAL struct freelist_head ASSIGN_fl;
|
||||
GLOBAL struct freelist_head CASE_fl;
|
||||
GLOBAL struct freelist_head COMP_STMT_fl;
|
||||
GLOBAL struct freelist_head COND_fl;
|
||||
GLOBAL struct freelist_head LOOP_fl;
|
||||
GLOBAL struct freelist_head PCALL_fl;
|
||||
GLOBAL struct freelist_head RET_fl;
|
||||
GLOBAL struct freelist_head INCR_fl;
|
||||
GLOBAL SCL_EXPRESS_EXPORT struct freelist_head ALIAS_fl;
|
||||
GLOBAL SCL_EXPRESS_EXPORT struct freelist_head ASSIGN_fl;
|
||||
GLOBAL SCL_EXPRESS_EXPORT struct freelist_head CASE_fl;
|
||||
GLOBAL SCL_EXPRESS_EXPORT struct freelist_head COMP_STMT_fl;
|
||||
GLOBAL SCL_EXPRESS_EXPORT struct freelist_head COND_fl;
|
||||
GLOBAL SCL_EXPRESS_EXPORT struct freelist_head LOOP_fl;
|
||||
GLOBAL SCL_EXPRESS_EXPORT struct freelist_head PCALL_fl;
|
||||
GLOBAL SCL_EXPRESS_EXPORT struct freelist_head RET_fl;
|
||||
GLOBAL SCL_EXPRESS_EXPORT struct freelist_head INCR_fl;
|
||||
|
||||
GLOBAL Statement STATEMENT_ESCAPE INITIALLY( STATEMENT_NULL );
|
||||
GLOBAL Statement STATEMENT_SKIP INITIALLY( STATEMENT_NULL );
|
||||
GLOBAL SCL_EXPRESS_EXPORT Statement STATEMENT_ESCAPE INITIALLY( STATEMENT_NULL );
|
||||
GLOBAL SCL_EXPRESS_EXPORT Statement STATEMENT_SKIP INITIALLY( STATEMENT_NULL );
|
||||
|
||||
#include "de_end.h"
|
||||
|
||||
@@ -235,24 +233,17 @@ GLOBAL Statement STATEMENT_SKIP INITIALLY( STATEMENT_NULL );
|
||||
/* function prototypes */
|
||||
/***********************/
|
||||
|
||||
extern Statement STMTcreate PROTO( ( int ) );
|
||||
extern Statement ALIAScreate PROTO( ( struct Scope_ *, Variable, Linked_List ) );
|
||||
extern Statement CASEcreate PROTO( ( Expression , Linked_List ) );
|
||||
extern Statement ASSIGNcreate PROTO( ( Expression , Expression ) );
|
||||
extern Statement COMP_STMTcreate PROTO( ( Linked_List ) );
|
||||
extern Statement CONDcreate PROTO( ( Expression, Linked_List, Linked_List ) );
|
||||
extern Statement LOOPcreate PROTO( ( struct Scope_ *, Expression, Expression, Linked_List ) );
|
||||
extern Statement PCALLcreate PROTO( ( Linked_List ) );
|
||||
extern Statement RETcreate PROTO( ( Expression ) );
|
||||
extern void STMTinitialize PROTO( ( void ) );
|
||||
extern struct Scope_ * INCR_CTLcreate PROTO( ( Symbol *, Expression start,
|
||||
extern SCL_EXPRESS_EXPORT Statement STMTcreate PROTO( ( int ) );
|
||||
extern SCL_EXPRESS_EXPORT Statement ALIAScreate PROTO( ( struct Scope_ *, Variable, Linked_List ) );
|
||||
extern SCL_EXPRESS_EXPORT Statement CASEcreate PROTO( ( Expression , Linked_List ) );
|
||||
extern SCL_EXPRESS_EXPORT Statement ASSIGNcreate PROTO( ( Expression , Expression ) );
|
||||
extern SCL_EXPRESS_EXPORT Statement COMP_STMTcreate PROTO( ( Linked_List ) );
|
||||
extern SCL_EXPRESS_EXPORT Statement CONDcreate PROTO( ( Expression, Linked_List, Linked_List ) );
|
||||
extern SCL_EXPRESS_EXPORT Statement LOOPcreate PROTO( ( struct Scope_ *, Expression, Expression, Linked_List ) );
|
||||
extern SCL_EXPRESS_EXPORT Statement PCALLcreate PROTO( ( Linked_List ) );
|
||||
extern SCL_EXPRESS_EXPORT Statement RETcreate PROTO( ( Expression ) );
|
||||
extern SCL_EXPRESS_EXPORT void STMTinitialize PROTO( ( void ) );
|
||||
extern SCL_EXPRESS_EXPORT struct Scope_ * INCR_CTLcreate PROTO( ( Symbol *, Expression start,
|
||||
Expression end, Expression increment ) );
|
||||
|
||||
/********************/
|
||||
/* inline functions */
|
||||
/********************/
|
||||
|
||||
#if supports_inline_functions || defined(STATEMENT_C)
|
||||
#endif /* supports_inline_functions || defined(STATEMENT_C) */
|
||||
|
||||
#endif /*STATEMENT_H*/
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
#ifndef SYMBOL_H
|
||||
#define SYMBOL_H
|
||||
|
||||
/* $Id: symbol.h,v 1.8 1997/01/21 19:17:11 dar Exp $ */
|
||||
|
||||
/************************************************************************
|
||||
** Module: Symbol
|
||||
/** **********************************************************************
|
||||
** Module: Symbol \file symbol.h
|
||||
** Description: This module implements the Symbol abstraction.
|
||||
** Constants:
|
||||
** SYMBOL_NULL - the null Symbol
|
||||
@@ -45,9 +43,7 @@
|
||||
/* packages used */
|
||||
/*****************/
|
||||
|
||||
#ifdef SYMBOL_C
|
||||
#endif /* SYMBOL_C */
|
||||
|
||||
#include <scl_export.h>
|
||||
#include "basic.h" /* get basic definitions */
|
||||
#include "memory.h"
|
||||
|
||||
@@ -82,7 +78,7 @@ struct Symbol_ {
|
||||
#include "decstart.h"
|
||||
#endif /* SYMBOL_C */
|
||||
|
||||
GLOBAL struct freelist_head SYMBOL_fl;
|
||||
GLOBAL SCL_EXPRESS_EXPORT struct freelist_head SYMBOL_fl;
|
||||
|
||||
#include "de_end.h"
|
||||
|
||||
@@ -95,21 +91,13 @@ GLOBAL struct freelist_head SYMBOL_fl;
|
||||
|
||||
#define SYMBOLset(obj) obj->symbol.line = yylineno; \
|
||||
obj->symbol.filename = current_filename
|
||||
/* for backwards compatibility only, no one should ever need this */
|
||||
#define SYMBOLget_name(sym) ((sym)->name)
|
||||
|
||||
/***********************/
|
||||
/* function prototypes */
|
||||
/***********************/
|
||||
|
||||
extern void SYMBOLinitialize PROTO( ( void ) );
|
||||
Symbol * SYMBOLcreate PROTO( ( char *, int, char * ) );
|
||||
extern SCL_EXPRESS_EXPORT void SYMBOLinitialize( void );
|
||||
SCL_EXPRESS_EXPORT Symbol * SYMBOLcreate( char * name, int line, char * filename );
|
||||
|
||||
/********************/
|
||||
/* inline functions */
|
||||
/********************/
|
||||
|
||||
#if supports_inline_functions || defined(SYMBOL_C)
|
||||
#endif /* supports_inline_functions || defined(SYMBOL_C) */
|
||||
|
||||
#endif /* SYMBOL_H */
|
||||
|
||||
+79
-142
@@ -1,10 +1,8 @@
|
||||
#ifndef TYPE_H
|
||||
#define TYPE_H
|
||||
|
||||
/* $Id: type.h,v 1.14 1997/09/19 18:25:10 dar Exp $ */
|
||||
|
||||
/************************************************************************
|
||||
** Module: Type
|
||||
/** **********************************************************************
|
||||
** Module: Type \file type.h
|
||||
** Description: This module implements the type abstraction. It is
|
||||
** rather unpleasant, since this abstraction is quite well suited
|
||||
** to an object-oriented environment with inheritance.
|
||||
@@ -55,16 +53,16 @@
|
||||
/*************/
|
||||
|
||||
#define TYPE_NULL (Type)0
|
||||
/* since we can't evaluate true size of many aggregates, prepare */
|
||||
/* to grow them by chunks of this size */
|
||||
|
||||
/** since we can't evaluate true size of many aggregates,
|
||||
* prepare to grow them by chunks of this size */
|
||||
#define AGGR_CHUNK_SIZE 30
|
||||
|
||||
/* these are all orthogonal types */
|
||||
/** these are all orthogonal types */
|
||||
enum type_enum {
|
||||
unknown_ = 0, /* 0 catches uninit. errors */
|
||||
special_, /* placeholder, given meaning by it's owner, */
|
||||
/* such as Type_Dont_Care, Type_Bad, Type_User_Def */
|
||||
runtime_, /* cannot be further determined until runtime */
|
||||
unknown_ = 0, /**< 0 catches uninit. errors */
|
||||
special_, /**< placeholder, given meaning by it's owner, such as Type_Dont_Care, Type_Bad, Type_User_Def */
|
||||
runtime_, /**< cannot be further determined until runtime */
|
||||
integer_,
|
||||
real_,
|
||||
string_,
|
||||
@@ -77,32 +75,29 @@ enum type_enum {
|
||||
generic_,
|
||||
|
||||
/* aggregates */
|
||||
aggregate_, /* as a formal */
|
||||
aggregate_, /**< as a formal */
|
||||
array_,
|
||||
bag_,
|
||||
set_,
|
||||
list_,
|
||||
last_aggregate_,/* not real, just for easier computation */
|
||||
last_aggregate_,/**< not real, just for easier computation */
|
||||
|
||||
oneof_,
|
||||
|
||||
/* while they are really used for different */
|
||||
/* purposes, it might be worth considering */
|
||||
/* collapsing entity_ and entity_list_ */
|
||||
entity_, /* single entity */
|
||||
entity_list_, /* linked list of entities */
|
||||
/** while they are really used for different purposes, it might be worth considering collapsing entity_ and entity_list_ */
|
||||
entity_, /**< single entity */
|
||||
entity_list_, /**< linked list of entities */
|
||||
enumeration_,
|
||||
select_,
|
||||
reference_, /* something only defined by a base type, i.e., a */
|
||||
/* type reference */
|
||||
reference_, /**< something only defined by a base type, i.e., a type reference */
|
||||
query_,
|
||||
op_, /* something with an operand */
|
||||
inverse_, /* is? an inverse */
|
||||
op_, /**< something with an operand */
|
||||
inverse_, /**< is? an inverse */
|
||||
|
||||
identifier_, /* simple identifier in an expression */
|
||||
attribute_, /* attribute reference (i.e., expr->u.variable) */
|
||||
derived_,/*?*/
|
||||
funcall_, /* a function call and actual parameters */
|
||||
identifier_, /**< simple identifier in an expression */
|
||||
attribute_, /**< attribute reference (i.e., expr->u.variable) */
|
||||
derived_, /**< ?*/
|
||||
funcall_, /**< a function call and actual parameters */
|
||||
|
||||
self_
|
||||
};
|
||||
@@ -111,53 +106,25 @@ enum type_enum {
|
||||
/* packages used */
|
||||
/*****************/
|
||||
|
||||
#include <scl_export.h>
|
||||
#include "expbasic.h" /* get basic definitions */
|
||||
#include "symbol.h"
|
||||
#include "object.h"
|
||||
/*#include "scope.h"*/
|
||||
|
||||
/************/
|
||||
/* typedefs */
|
||||
/************/
|
||||
|
||||
/*typedef struct Scope *Type;*/
|
||||
typedef struct TypeHead_ * TypeHead;
|
||||
typedef struct TypeBody_ * TypeBody;
|
||||
typedef enum type_enum TypeType;
|
||||
|
||||
/* following are all for backwards compatibility - not otherwise necessary */
|
||||
typedef Type Aggregate_Type, Composed_Type, Sized_Type, Type_Reference;
|
||||
typedef Aggregate_Type Array_Type, List_Type, Bag_Type;
|
||||
typedef Bag_Type Set_Type;
|
||||
typedef Composed_Type Entity_Type, Enumeration_Type, Select_Type;
|
||||
typedef Sized_Type Integer_Type, Real_Type, String_Type, Binary_Type;
|
||||
|
||||
/* provide a replacement for Class */
|
||||
typedef enum type_enum Class_Of_Type;
|
||||
typedef enum type_enum Class;
|
||||
#define OBJget_class(typ) ((typ)->u.type->body->type)
|
||||
#define CLASSinherits_from TYPEinherits_from
|
||||
|
||||
/* backwards compatibility */
|
||||
#define Class_Integer_Type integer_
|
||||
#define Class_Number_Type number_
|
||||
#define Class_Real_Type real_
|
||||
#define Class_Entity_Type entity_
|
||||
#define Class_Entity_List_Type entity_list_
|
||||
#define Class_Enumeration_Type enumeration_
|
||||
#define Class_Boolean_Type boolean_
|
||||
#define Class_Logical_Type logical_
|
||||
#define Class_Binary_Type binary_
|
||||
#define Class_String_Type string_
|
||||
#define Class_Array_Type array_
|
||||
#define Class_List_Type list_
|
||||
#define Class_Set_Type set_
|
||||
#define Class_Bag_Type bag_
|
||||
#define Class_Generic_Type generic_
|
||||
#define Class_Select_Type select_
|
||||
#define Class_Reference_Type reference_
|
||||
#define Class_Aggregate_Type aggregate_
|
||||
|
||||
/****************/
|
||||
/* modules used */
|
||||
/****************/
|
||||
@@ -172,9 +139,8 @@ typedef enum type_enum Class;
|
||||
/***************************/
|
||||
|
||||
struct TypeHead_ {
|
||||
Type head; /* if we are a defined type */
|
||||
/* this is who we point to */
|
||||
struct TypeBody_ * body; /* true type, ignoring defined types */
|
||||
Type head; /**< if we are a defined type this is who we point to */
|
||||
struct TypeBody_ * body; /**< true type, ignoring defined types */
|
||||
#if 0
|
||||
/* if we are concerned about memory (over time) uncomment this and */
|
||||
/* other references to refcount in parser and TYPEresolve. It is */
|
||||
@@ -185,30 +151,25 @@ struct TypeHead_ {
|
||||
|
||||
struct TypeBody_ {
|
||||
#if 1
|
||||
struct TypeHead_ * head; /* for debugging only */
|
||||
struct TypeHead_ * head; /**< for debugging only */
|
||||
#endif
|
||||
enum type_enum type; /* bits describing this type, int, real, etc */
|
||||
enum type_enum type; /**< bits describing this type, int, real, etc */
|
||||
struct {
|
||||
unsigned unique : 1;
|
||||
unsigned optional : 1;
|
||||
unsigned fixed : 1;
|
||||
unsigned shared : 1; /* type is shared */
|
||||
unsigned repeat : 1; /* expression is a repeat count*/
|
||||
unsigned encoded : 1; /* encoded string */
|
||||
unsigned shared : 1; /**< type is shared */
|
||||
unsigned repeat : 1; /**< expression is a repeat count*/
|
||||
unsigned encoded : 1; /**< encoded string */
|
||||
} flags;
|
||||
Type base; /* underlying base type if any */
|
||||
/* can also contain true type if this type */
|
||||
/* is a type reference */
|
||||
Type tag; /* optional tag */
|
||||
Type base; /**< underlying base type if any can also contain true type if this type is a type reference */
|
||||
Type tag; /**< optional tag */
|
||||
/* a lot of the stuff below can be unionized */
|
||||
Expression precision;
|
||||
Linked_List list; /* used by select_types */
|
||||
/* and composed types, such as for a */
|
||||
/* list of entities in an instance */
|
||||
/* Dictionary enumeration; *//* only used by enumerations */
|
||||
Linked_List list; /**< used by select_types and composed types, such as for a list of entities in an instance */
|
||||
Expression upper;
|
||||
Expression lower;
|
||||
struct Scope_ * entity; /* only used by entity types */
|
||||
struct Scope_ * entity; /**< only used by entity types */
|
||||
};
|
||||
|
||||
/********************/
|
||||
@@ -223,41 +184,41 @@ struct TypeBody_ {
|
||||
|
||||
/* Very commonly-used read-only types */
|
||||
/* non-constant versions probably aren't necessary? */
|
||||
GLOBAL Type Type_Bad;
|
||||
GLOBAL Type Type_Unknown;
|
||||
GLOBAL Type Type_Dont_Care;
|
||||
GLOBAL Type Type_Runtime; /* indicates that this object can't be */
|
||||
/* calculated now but must be deferred */
|
||||
/* til (the mythical) runtime */
|
||||
GLOBAL Type Type_Binary;
|
||||
GLOBAL Type Type_Boolean;
|
||||
GLOBAL Type Type_Enumeration;
|
||||
GLOBAL Type Type_Expression;
|
||||
GLOBAL Type Type_Aggregate;
|
||||
GLOBAL Type Type_Integer;
|
||||
GLOBAL Type Type_Integer;
|
||||
GLOBAL Type Type_Number;
|
||||
GLOBAL Type Type_Real;
|
||||
GLOBAL Type Type_String;
|
||||
GLOBAL Type Type_String_Encoded;
|
||||
GLOBAL Type Type_Logical;
|
||||
GLOBAL Type Type_Set;
|
||||
GLOBAL Type Type_Attribute;
|
||||
GLOBAL Type Type_Entity;
|
||||
GLOBAL Type Type_Funcall;
|
||||
GLOBAL Type Type_Generic;
|
||||
GLOBAL Type Type_Identifier;
|
||||
GLOBAL Type Type_Oneof;
|
||||
GLOBAL Type Type_Query;
|
||||
GLOBAL Type Type_Self;
|
||||
GLOBAL Type Type_Set_Of_String;
|
||||
GLOBAL Type Type_Set_Of_Generic;
|
||||
GLOBAL Type Type_Bag_Of_Generic;
|
||||
GLOBAL SCL_EXPRESS_EXPORT Type Type_Bad;
|
||||
GLOBAL SCL_EXPRESS_EXPORT Type Type_Unknown;
|
||||
GLOBAL SCL_EXPRESS_EXPORT Type Type_Dont_Care;
|
||||
GLOBAL SCL_EXPRESS_EXPORT Type Type_Runtime; /**< indicates that this object can't be
|
||||
calculated now but must be deferred
|
||||
until (the mythical) runtime */
|
||||
GLOBAL SCL_EXPRESS_EXPORT Type Type_Binary;
|
||||
GLOBAL SCL_EXPRESS_EXPORT Type Type_Boolean;
|
||||
GLOBAL SCL_EXPRESS_EXPORT Type Type_Enumeration;
|
||||
GLOBAL SCL_EXPRESS_EXPORT Type Type_Expression;
|
||||
GLOBAL SCL_EXPRESS_EXPORT Type Type_Aggregate;
|
||||
GLOBAL SCL_EXPRESS_EXPORT Type Type_Integer;
|
||||
GLOBAL SCL_EXPRESS_EXPORT Type Type_Integer;
|
||||
GLOBAL SCL_EXPRESS_EXPORT Type Type_Number;
|
||||
GLOBAL SCL_EXPRESS_EXPORT Type Type_Real;
|
||||
GLOBAL SCL_EXPRESS_EXPORT Type Type_String;
|
||||
GLOBAL SCL_EXPRESS_EXPORT Type Type_String_Encoded;
|
||||
GLOBAL SCL_EXPRESS_EXPORT Type Type_Logical;
|
||||
GLOBAL SCL_EXPRESS_EXPORT Type Type_Set;
|
||||
GLOBAL SCL_EXPRESS_EXPORT Type Type_Attribute;
|
||||
GLOBAL SCL_EXPRESS_EXPORT Type Type_Entity;
|
||||
GLOBAL SCL_EXPRESS_EXPORT Type Type_Funcall;
|
||||
GLOBAL SCL_EXPRESS_EXPORT Type Type_Generic;
|
||||
GLOBAL SCL_EXPRESS_EXPORT Type Type_Identifier;
|
||||
GLOBAL SCL_EXPRESS_EXPORT Type Type_Oneof;
|
||||
GLOBAL SCL_EXPRESS_EXPORT Type Type_Query;
|
||||
GLOBAL SCL_EXPRESS_EXPORT Type Type_Self;
|
||||
GLOBAL SCL_EXPRESS_EXPORT Type Type_Set_Of_String;
|
||||
GLOBAL SCL_EXPRESS_EXPORT Type Type_Set_Of_Generic;
|
||||
GLOBAL SCL_EXPRESS_EXPORT Type Type_Bag_Of_Generic;
|
||||
|
||||
GLOBAL struct freelist_head TYPEHEAD_fl;
|
||||
GLOBAL struct freelist_head TYPEBODY_fl;
|
||||
GLOBAL SCL_EXPRESS_EXPORT struct freelist_head TYPEHEAD_fl;
|
||||
GLOBAL SCL_EXPRESS_EXPORT struct freelist_head TYPEBODY_fl;
|
||||
|
||||
GLOBAL Error ERROR_corrupted_type INITIALLY( ERROR_none );
|
||||
GLOBAL SCL_EXPRESS_EXPORT Error ERROR_corrupted_type INITIALLY( ERROR_none );
|
||||
|
||||
#include "de_end.h"
|
||||
|
||||
@@ -274,12 +235,13 @@ GLOBAL Error ERROR_corrupted_type INITIALLY( ERROR_none );
|
||||
#define TYPEis_identifier(t) ((t)->u.type->body->type == identifier_)
|
||||
#define TYPEis_logical(t) ((t)->u.type->body->type == logical_)
|
||||
#define TYPEis_boolean(t) ((t)->u.type->body->type == boolean_)
|
||||
#define TYPEis_real(t) ((t)->u.type->body->type == real_)
|
||||
#define TYPEis_integer(t) ((t)->u.type->body->type == integer_)
|
||||
#define TYPEis_string(t) ((t)->u.type->body->type == string_)
|
||||
#define TYPEis_expression(t) ((t)->u.type->body->type == op_)
|
||||
#define TYPEis_oneof(t) ((t)->u.type->body->type == oneof_)
|
||||
#define TYPEis_entity(t) ((t)->u.type->body->type == entity_)
|
||||
#define TYPEis_enumeration(t) ((t)->u.type->body->type == enumeration_)
|
||||
/*#define TYPEis_aggregate(t) ((t)->u.type->body->type >= aggregate_ && (t)->u.type->body->type < last_aggregate_)*/
|
||||
#define TYPEis_aggregate(t) ((t)->u.type->body->base)
|
||||
#define TYPEis_aggregate_raw(t) ((t)->u.type->body->type == aggregate_)
|
||||
#define TYPEis_array(t) ((t)->u.type->body->type == array_)
|
||||
@@ -315,7 +277,6 @@ GLOBAL Error ERROR_corrupted_type INITIALLY( ERROR_none );
|
||||
#define COMP_TYPEput_items(t,lis) ((t)->u.type->body->list = (lis))
|
||||
#define COMP_TYPEadd_items(t,lis) LISTadd_all((t)->u.type->body->list, (lis));
|
||||
|
||||
/*#define ENUM_TYPEput_items(type,list) COMP_TYPEput_items(type, list)*/
|
||||
#define ENUM_TYPEget_items(t) ((t)->symbol_table)
|
||||
#define TYPEget_optional(t) ((t)->u.type->body->flags.optional)
|
||||
#define TYPEget_unique(t) ((t)->u.type->body->flags.unique)
|
||||
@@ -328,9 +289,6 @@ GLOBAL Error ERROR_corrupted_type INITIALLY( ERROR_none );
|
||||
|
||||
#define TYPEget_enum_tags(t) ((t)->symbol_table)
|
||||
|
||||
/* for backwards compatibility */
|
||||
#define AGGR_TYPEget_base_type TYPEget_base_type
|
||||
|
||||
#define TYPEget_clientData(t) ((t)->clientData)
|
||||
#define TYPEput_clientData(t,d) ((t)->clientData = (d))
|
||||
|
||||
@@ -338,40 +296,19 @@ GLOBAL Error ERROR_corrupted_type INITIALLY( ERROR_none );
|
||||
/* function prototypes */
|
||||
/***********************/
|
||||
|
||||
extern Type TYPEcreate_partial PROTO( ( struct Symbol_ *, Scope ) );
|
||||
extern SCL_EXPRESS_EXPORT Type TYPEcreate_partial PROTO( ( struct Symbol_ *, Scope ) );
|
||||
|
||||
extern Type TYPEcreate PROTO( ( enum type_enum ) );
|
||||
extern Type TYPEcreate_from_body_anonymously PROTO( ( TypeBody ) );
|
||||
extern Type TYPEcreate_name PROTO( ( struct Symbol_ * ) );
|
||||
extern Type TYPEcreate_nostab PROTO( ( struct Symbol_ *, Scope, char ) );
|
||||
/*extern Type TYPEcreate_typedef PROTO((Type, TypeBody,
|
||||
Scope,struct Symbol *));*/
|
||||
extern TypeBody TYPEBODYcreate PROTO( ( enum type_enum ) );
|
||||
/*extern Type TYPEcopy_shallow PROTO((Type));*/
|
||||
extern void TYPEinitialize PROTO( ( void ) );
|
||||
extern SCL_EXPRESS_EXPORT Type TYPEcreate PROTO( ( enum type_enum ) );
|
||||
extern SCL_EXPRESS_EXPORT Type TYPEcreate_from_body_anonymously PROTO( ( TypeBody ) );
|
||||
extern SCL_EXPRESS_EXPORT Type TYPEcreate_name PROTO( ( struct Symbol_ * ) );
|
||||
extern SCL_EXPRESS_EXPORT Type TYPEcreate_nostab PROTO( ( struct Symbol_ *, Scope, char ) );
|
||||
extern SCL_EXPRESS_EXPORT TypeBody TYPEBODYcreate PROTO( ( enum type_enum ) );
|
||||
extern SCL_EXPRESS_EXPORT void TYPEinitialize PROTO( ( void ) );
|
||||
|
||||
#if 0
|
||||
extern Dictionary TYPEget_enum_tags PROTO( ( Type ) );
|
||||
#endif
|
||||
extern bool TYPEinherits_from PROTO( ( Type, enum type_enum ) );
|
||||
extern Type TYPEget_nonaggregate_base_type PROTO( ( Type ) );
|
||||
extern SCL_EXPRESS_EXPORT bool TYPEinherits_from PROTO( ( Type, enum type_enum ) );
|
||||
extern SCL_EXPRESS_EXPORT Type TYPEget_nonaggregate_base_type PROTO( ( Type ) );
|
||||
|
||||
extern Type TYPEcreate_user_defined_type PROTO( ( Type, Scope, struct Symbol_ * ) );
|
||||
extern Type TYPEcreate_user_defined_tag PROTO( ( Type, Scope, struct Symbol_ * ) );
|
||||
|
||||
#if 0
|
||||
extern int TYPEget_size PROTO( ( Type ) );
|
||||
extern bool TYPEcompatible PROTO( ( Type, Type ) );
|
||||
extern Expression SZD_TYPEget_precision PROTO( ( Sized_Type ) );
|
||||
extern bool SZD_TYPEget_varying PROTO( ( Sized_Type ) );
|
||||
extern Expression TYPE_REFget_full_name PROTO( ( Type_Reference * ) );
|
||||
#endif /*0*/
|
||||
|
||||
/********************/
|
||||
/* inline functions */
|
||||
/********************/
|
||||
|
||||
#if supports_inline_functions || defined(TYPE_C)
|
||||
#endif /* supports_inline_functions || defined(TYPE_C) */
|
||||
extern SCL_EXPRESS_EXPORT Type TYPEcreate_user_defined_type PROTO( ( Type, Scope, struct Symbol_ * ) );
|
||||
extern SCL_EXPRESS_EXPORT Type TYPEcreate_user_defined_tag PROTO( ( Type, Scope, struct Symbol_ * ) );
|
||||
|
||||
#endif /* TYPE_H */
|
||||
|
||||
+18
-50
@@ -1,10 +1,8 @@
|
||||
#ifndef VARIABLE_H
|
||||
#define VARIABLE_H
|
||||
|
||||
/* $Id: variable.h,v 1.10 1997/01/21 19:17:11 dar Exp $ */
|
||||
|
||||
/************************************************************************
|
||||
** Module: Variable
|
||||
/** **********************************************************************
|
||||
** Module: Variable \file variable.h
|
||||
** Description: This module implements the Variable abstraction. A
|
||||
** Variable consists of a name, a type, a reference class, and
|
||||
** some flags, e.g. 'optional', 'variable'. It is used to represent
|
||||
@@ -78,26 +76,23 @@ typedef struct Variable_ * Variable;
|
||||
/***************************/
|
||||
|
||||
struct Variable_ {
|
||||
/* Symbol is inside of 'name' below */
|
||||
Expression name;
|
||||
Type type;
|
||||
Expression initializer; /* or 'derived' */
|
||||
int offset;
|
||||
Expression name; /**< Symbol is inside of 'name' below */
|
||||
Type type;
|
||||
Expression initializer; /**< or 'derived' */
|
||||
int offset;
|
||||
|
||||
struct {
|
||||
int optional : 1; /* OPTIONAL keyword */
|
||||
int var : 1; /* VAR keyword */
|
||||
int constant : 1; /* from CONSTANT...END_CONSTANT */
|
||||
int unique : 1; /* appears in UNIQUE list */
|
||||
int parameter : 1; /* is a formal parameter */
|
||||
int attribute : 1; /* is an attribute (rule parameters */
|
||||
/* are marked this way, too) */
|
||||
int optional : 1; /**< OPTIONAL keyword */
|
||||
int var : 1; /**< VAR keyword */
|
||||
int constant : 1; /**< from CONSTANT...END_CONSTANT */
|
||||
int unique : 1; /**< appears in UNIQUE list */
|
||||
int parameter : 1; /**< is a formal parameter */
|
||||
int attribute : 1; /**< is an attribute (rule parameters are marked this way, too) */
|
||||
} flags;
|
||||
|
||||
#define query_symbol inverse_symbol
|
||||
Symbol * inverse_symbol; /* entity symbol */
|
||||
Variable inverse_attribute; /* attribute related by */
|
||||
/* inverse relationship */
|
||||
Symbol * inverse_symbol; /**< entity symbol */
|
||||
Variable inverse_attribute; /**< attribute related by inverse relationship */
|
||||
};
|
||||
|
||||
/********************/
|
||||
@@ -110,7 +105,7 @@ struct Variable_ {
|
||||
#include "decstart.h"
|
||||
#endif /* VARIABLE_C */
|
||||
|
||||
GLOBAL struct freelist_head VAR_fl;
|
||||
GLOBAL SCL_EXPRESS_EXPORT struct freelist_head VAR_fl;
|
||||
|
||||
#include "de_end.h"
|
||||
|
||||
@@ -133,40 +128,13 @@ GLOBAL struct freelist_head VAR_fl;
|
||||
|
||||
#define VARis_derived(v) ((v)->initializer != 0)
|
||||
#define VARget_inverse(v) ((v)->inverse_attribute)
|
||||
/* for backwards compatibility */
|
||||
#define VARget_derived VARis_derived
|
||||
|
||||
/***********************/
|
||||
/* function prototypes */
|
||||
/***********************/
|
||||
|
||||
extern Variable VARcreate PROTO( ( Expression, Type ) );
|
||||
extern void VARinitialize PROTO( ( void ) );
|
||||
extern char * VARget_simple_name PROTO( ( Variable ) );
|
||||
|
||||
#if 0
|
||||
extern void VARput_type PROTO( ( Variable *, Type ) );
|
||||
extern void VARput_initializer PROTO( ( Variable *, Expression ) );
|
||||
extern void VARput_derived PROTO( ( Variable *, Boolean ) );
|
||||
extern void VARput_optional PROTO( ( Variable *, Boolean ) );
|
||||
extern void VARput_variable PROTO( ( Variable *, Boolean ) );
|
||||
extern void VARput_reference PROTO( ( Variable *, Expression ) );
|
||||
/*Mextern void VARput_offset PROTO((Variable *, int));*/
|
||||
extern void VARput_inverse PROTO( ( Variable *, Symbol * ) );
|
||||
/*M extern Type VARget_type PROTO((Variable *));*/
|
||||
/*Mextern Boolean VARget_derived PROTO((Variable *));*/
|
||||
extern Boolean VARget_optional PROTO( ( Variable * ) );
|
||||
extern Boolean VARget_variable PROTO( ( Variable * ) );
|
||||
extern Expression VARget_reference PROTO( ( Variable * ) );
|
||||
/*Mextern int VARget_offset PROTO((Variable *));*/
|
||||
#endif /*0*/
|
||||
|
||||
/********************/
|
||||
/* inline functions */
|
||||
/********************/
|
||||
|
||||
#if supports_inline_functions || defined(VARIABLE_C)
|
||||
|
||||
#endif /* supports_inline_functions || defined(VARIABLE_C) */
|
||||
extern SCL_EXPRESS_EXPORT Variable VARcreate PROTO( ( Expression, Type ) );
|
||||
extern SCL_EXPRESS_EXPORT void VARinitialize PROTO( ( void ) );
|
||||
extern SCL_EXPRESS_EXPORT char * VARget_simple_name PROTO( ( Variable ) );
|
||||
|
||||
#endif /* VARIABLE_H */
|
||||
|
||||
@@ -1,13 +1,23 @@
|
||||
#ifndef SCL_CF_H
|
||||
#define SCL_CF_H
|
||||
|
||||
/**** Define statements for CMake ****/
|
||||
#cmakedefine HAVE_NDIR_H 1
|
||||
#cmakedefine HAVE_STDARG_H 1
|
||||
#cmakedefine HAVE_SYS_STAT_H 1
|
||||
#cmakedefine HAVE_SYS_PARAM_H 1
|
||||
#cmakedefine HAVE_SYSENT_H 1
|
||||
#cmakedefine HAVE_UNISTD_H 1
|
||||
#cmakedefine HAVE_DIRENT_H 1
|
||||
#cmakedefine HAVE_STDBOOL_H 1
|
||||
#cmakedefine HAVE_PROCESS_H 1
|
||||
#cmakedefine HAVE_IO_H 1
|
||||
|
||||
#cmakedefine HAVE_ABS 1
|
||||
#cmakedefine HAVE_MEMCPY 1
|
||||
#cmakedefine HAVE_MEMMOVE 1
|
||||
#cmakedefine HAVE_GETOPT 1
|
||||
|
||||
#cmakedefine HAVE_SSIZE_T 1
|
||||
|
||||
//cmake updates this at build time
|
||||
#define SCL_COMMIT_ID "@GIT_COMMIT_ID@"
|
||||
#endif /* SCL_CF_H */
|
||||
|
||||
@@ -0,0 +1,82 @@
|
||||
#ifndef SCL_EXPORT_H
|
||||
#define SCL_EXPORT_H
|
||||
|
||||
/* Import/Export flags for express. */
|
||||
#ifndef SCL_EXPRESS_EXPORT
|
||||
# if defined(SCL_EXPRESS_DLL_EXPORTS) && defined(SCL_EXPRESS_DLL_IMPORTS)
|
||||
# error "Only SCL_EXPRESS_DLL_EXPORTS or SCL_EXPRESS_DLL_IMPORTS can be defined, not both."
|
||||
# elif defined(SCL_EXPRESS_DLL_EXPORTS)
|
||||
# define SCL_EXPRESS_EXPORT __declspec(dllexport)
|
||||
# elif defined(SCL_EXPRESS_DLL_IMPORTS)
|
||||
# define SCL_EXPRESS_EXPORT __declspec(dllimport)
|
||||
# else
|
||||
# define SCL_EXPRESS_EXPORT
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Import/Export flags for exppp. */
|
||||
#ifndef SCL_EXPPP_EXPORT
|
||||
# if defined(SCL_EXPPP_DLL_EXPORTS) && defined(SCL_EXPPP_DLL_IMPORTS)
|
||||
# error "Only SCL_EXPPP_DLL_EXPORTS or SCL_EXPPP_DLL_IMPORTS can be defined, not both."
|
||||
# elif defined(SCL_EXPPP_DLL_EXPORTS)
|
||||
# define SCL_EXPPP_EXPORT __declspec(dllexport)
|
||||
# elif defined(SCL_EXPPP_DLL_IMPORTS)
|
||||
# define SCL_EXPPP_EXPORT __declspec(dllimport)
|
||||
# else
|
||||
# define SCL_EXPPP_EXPORT
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Import/Export flags for utils. */
|
||||
#ifndef SCL_UTILS_EXPORT
|
||||
# if defined(SCL_UTILS_DLL_EXPORTS) && defined(SCL_UTILS_DLL_IMPORTS)
|
||||
# error "Only SCL_UTILS_DLL_EXPORTS or SCL_UTILS_DLL_IMPORTS can be defined, not both."
|
||||
# elif defined(SCL_UTILS_DLL_EXPORTS)
|
||||
# define SCL_UTILS_EXPORT __declspec(dllexport)
|
||||
# elif defined(SCL_UTILS_DLL_IMPORTS)
|
||||
# define SCL_UTILS_EXPORT __declspec(dllimport)
|
||||
# else
|
||||
# define SCL_UTILS_EXPORT
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Import/Export flags for dai. */
|
||||
#ifndef SCL_DAI_EXPORT
|
||||
# if defined(SCL_DAI_DLL_EXPORTS) && defined(SCL_DAI_DLL_IMPORTS)
|
||||
# error "Only SCL_DAI_DLL_EXPORTS or SCL_DAI_DLL_IMPORTS can be defined, not both."
|
||||
# elif defined(SCL_DAI_DLL_EXPORTS)
|
||||
# define SCL_DAI_EXPORT __declspec(dllexport)
|
||||
# elif defined(SCL_DAI_DLL_IMPORTS)
|
||||
# define SCL_DAI_EXPORT __declspec(dllimport)
|
||||
# else
|
||||
# define SCL_DAI_EXPORT
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Import/Export flags for core. */
|
||||
#ifndef SCL_CORE_EXPORT
|
||||
# if defined(SCL_CORE_DLL_EXPORTS) && defined(SCL_CORE_DLL_IMPORTS)
|
||||
# error "Only SCL_CORE_DLL_EXPORTS or SCL_CORE_DLL_IMPORTS can be defined, not both."
|
||||
# elif defined(SCL_CORE_DLL_EXPORTS)
|
||||
# define SCL_CORE_EXPORT __declspec(dllexport)
|
||||
# elif defined(SCL_CORE_DLL_IMPORTS)
|
||||
# define SCL_CORE_EXPORT __declspec(dllimport)
|
||||
# else
|
||||
# define SCL_CORE_EXPORT
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Import/Export flags for editor. */
|
||||
#ifndef SCL_EDITOR_EXPORT
|
||||
# if defined(SCL_EDITOR_DLL_EXPORTS) && defined(SCL_EDITOR_DLL_IMPORTS)
|
||||
# error "Only SCL_EDITOR_DLL_EXPORTS or SCL_EDITOR_DLL_IMPORTS can be defined, not both."
|
||||
# elif defined(SCL_EDITOR_DLL_EXPORTS)
|
||||
# define SCL_EDITOR_EXPORT __declspec(dllexport)
|
||||
# elif defined(SCL_EDITOR_DLL_IMPORTS)
|
||||
# define SCL_EDITOR_EXPORT __declspec(dllimport)
|
||||
# else
|
||||
# define SCL_EDITOR_EXPORT
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#endif /* SCL_EXPORT_H */
|
||||
@@ -0,0 +1,54 @@
|
||||
#ifndef STDBOOL_H_
|
||||
#define STDBOOL_H_
|
||||
|
||||
/**
|
||||
* stdbool.h - ISO C99 Boolean type
|
||||
* Author - Bill Chatfield
|
||||
* E-mail - bill underscore chatfield at yahoo dot com
|
||||
* Copyright - You are free to use for any purpose except illegal acts
|
||||
* Warrenty - None: don't blame me if it breaks something
|
||||
*
|
||||
* In ISO C99, stdbool.h is a standard header and _Bool is a keyword, but
|
||||
* some compilers don't offer these yet. This header file is an
|
||||
* implementation of the standard ISO C99 stdbool.h header file. It checks
|
||||
* for various compiler versions and defines things that are missing in
|
||||
* those versions.
|
||||
*
|
||||
* The GNU and Watcom compilers include a stdbool.h, but the Borland
|
||||
* C/C++ 5.5.1 compiler and the Microsoft compilers do not.
|
||||
*
|
||||
* See http://predef.sourceforge.net/precomp.html for compile macros.
|
||||
*/
|
||||
|
||||
#ifndef __cplusplus
|
||||
|
||||
/**
|
||||
* Borland C++ 5.5.1 does not define _Bool.
|
||||
*/
|
||||
#if defined(__BORLANDC__) && __BORLANDC__ < 0x630
|
||||
typedef int _Bool;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Microsoft C/C++ version 14.00.50727.762, which comes with Visual C++ 2005,
|
||||
* and version 15.00.30729.01, which comes with Visual C++ 2008, do not
|
||||
* define _Bool.
|
||||
*/
|
||||
#if defined(_MSC_VER)
|
||||
typedef int _Bool;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Define the Boolean macros only if they are not already defined.
|
||||
*/
|
||||
#ifndef __bool_true_false_are_defined
|
||||
#define bool _Bool
|
||||
#define Boolean _Bool
|
||||
#define false 0
|
||||
#define true 1
|
||||
#define __bool_true_false_are_defined 1
|
||||
#endif
|
||||
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /*STDBOOL_H_*/
|
||||
@@ -0,0 +1,31 @@
|
||||
// XGetopt.h Version 1.2
|
||||
//
|
||||
// Author: Hans Dietrich
|
||||
// hdietrich2@hotmail.com
|
||||
//
|
||||
// This software is released into the public domain.
|
||||
// You are free to use it in any way you like.
|
||||
//
|
||||
// This software is provided "as is" with no expressed
|
||||
// or implied warranty. I accept no liability for any
|
||||
// damage or loss of business that this software may cause.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef XGETOPT_H
|
||||
#define XGETOPT_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern int optind, opterr;
|
||||
extern char * optarg;
|
||||
|
||||
int getopt( int argc, char * argv[], char * optstring );
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif //XGETOPT_H
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
# astyle --options=misc/astyle.cfg path/to/file
|
||||
|
||||
#run astyle on all files: from the scl root dir, use
|
||||
# astyle --options=misc/astyle.cfg --recursive "src/*.c" "src/*.cc" "include/*.h"
|
||||
# astyle --options=misc/astyle.cfg --recursive "src/*.c" "src/*.cc" "include/*.h" "src/*.h"
|
||||
# in the above line, the double quotes *are* necessary
|
||||
|
||||
# DO NOT run astyle on flex/bison input such as expparse.y and expscan.l!
|
||||
|
||||
@@ -0,0 +1,235 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
#you probably want to run the ctest script that calls this instead:
|
||||
# ctest -S ctest_matrix.cmake
|
||||
|
||||
#must be ran from scl/build_matrix
|
||||
|
||||
from xml.etree import ElementTree as ET
|
||||
import os
|
||||
from datetime import date
|
||||
import subprocess
|
||||
import codecs
|
||||
import io
|
||||
|
||||
|
||||
#ctest xml file layout
|
||||
#<Site ...=...>
|
||||
# <testing>
|
||||
# <StartDateTime>..</>
|
||||
# <StartTestTime>..</>
|
||||
# <TestList>..</>
|
||||
# <Test status=..>..</>
|
||||
# <EndDateTime>Dec 28 17:49 EST</EndDateTime>
|
||||
# <EndTestTime>1325112579</EndTestTime>
|
||||
# <ElapsedMinutes>1.9</ElapsedMinutes>
|
||||
# </Testing>
|
||||
#</Site>
|
||||
|
||||
|
||||
#summary (aka 's') is a table near the top of the document
|
||||
#body (aka 'b') contains the details for all schemas
|
||||
|
||||
def main():
|
||||
xml_file = find_xml()
|
||||
wikipath, matrix = find_wiki()
|
||||
|
||||
#codecs.open is deprecated but io.open doesn't seem to work, and open() complains of unicode
|
||||
out = codecs.open(matrix,encoding='utf-8',mode='w')
|
||||
out.write( header() )
|
||||
out.write( read_tests(xml_file) )
|
||||
out.close()
|
||||
git_push(wikipath, matrix)
|
||||
|
||||
|
||||
def find_xml():
|
||||
#find xml file
|
||||
i = 0
|
||||
for dirname in os.listdir("Testing"):
|
||||
if str(date.today().year) in dirname:
|
||||
i += 1
|
||||
if i > 1:
|
||||
print "Too many directories, exiting"
|
||||
exit(1)
|
||||
xml = os.path.join("Testing", dirname, "Test.xml")
|
||||
return xml
|
||||
|
||||
def find_wiki():
|
||||
#find wiki and matrix file, issue 'git pull'
|
||||
wikipath = os.path.abspath("../../wiki-scl")
|
||||
if not os.path.isdir(os.path.join(wikipath,".git")):
|
||||
print "Can't find wiki or not a git repo"
|
||||
exit(1)
|
||||
p = subprocess.call(["git", "pull", "origin"], cwd=wikipath)
|
||||
if not p == 0:
|
||||
print "'git pull' exited with error"
|
||||
exit(1)
|
||||
matrix = os.path.join(wikipath, "Schema-build-matrix.md")
|
||||
if not os.path.isfile(matrix):
|
||||
print "Matrix file doesn't exist or isn't a file"
|
||||
exit(1)
|
||||
return wikipath,matrix
|
||||
|
||||
def git_push(path,f):
|
||||
p = subprocess.call(["git", "add", f], cwd=path)
|
||||
if not p == 0:
|
||||
print "'git add' exited with error"
|
||||
exit(1)
|
||||
msg = date.today().__str__() + " - schema matrix updated by update-matrix.py"
|
||||
p = subprocess.call(["git", "commit", "-m", msg ], cwd=path)
|
||||
if not p == 0:
|
||||
print "'git commit' exited with error"
|
||||
exit(1)
|
||||
p = subprocess.call(["git", "push", "origin"], cwd=path)
|
||||
if not p == 0:
|
||||
print "'git push' exited with error"
|
||||
exit(1)
|
||||
|
||||
|
||||
def header():
|
||||
h = "## Created " + date.today().__str__() + "\n" + "### Current as of commit "
|
||||
l = subprocess.check_output(["git", "log", """--pretty=format:%H Commit Summary: %s<br>Author: %aN<br>Date: %aD""", "-n1"])
|
||||
h += "[" + l[:8] + "](http://github.com/mpictor/StepClassLibrary/commit/" + l[:l.find(" ")]
|
||||
h += ") --\n<font color=grey>" + l[l.find(" ")+1:] + "</font>\n\n----\n"
|
||||
h += "### Summary\n<table width=100%><tr><th>Schema</th><th>Generate</th><th>Build</th></tr>"
|
||||
return h
|
||||
|
||||
def read_tests(xml):
|
||||
# read all <Test>s in xml, create mixed html/markdown
|
||||
try:
|
||||
tree = ET.parse(xml)
|
||||
except Exception, inst:
|
||||
print "Unexpected error opening %s: %s" % (xml, inst)
|
||||
return
|
||||
|
||||
root = tree.getroot()
|
||||
testing = root.find("Testing")
|
||||
|
||||
|
||||
tests = testing.findall("Test")
|
||||
summary = ""
|
||||
body = ""
|
||||
for test in tests:
|
||||
s,b = schema_info(test,tests)
|
||||
summary += s
|
||||
body += b
|
||||
summary += "</table>\n\n"
|
||||
return summary + body
|
||||
|
||||
|
||||
|
||||
def schema_info(test,tests):
|
||||
# this returns html & markdown formatted summary and body strings
|
||||
# for the generate and build tests for a single schema
|
||||
s=""
|
||||
b=""
|
||||
name = test.find("Name").text
|
||||
if name.startswith("generate_cpp_"):
|
||||
#print this one. if it passes, find and print build.
|
||||
ap = name[len("generate_cpp_"):]
|
||||
s += "<tr><td><a href=#" + ap + ">" + ap.title() + "</a></td><td>"
|
||||
s += test_status(test) + "</td><td>"
|
||||
b += "----\n<a name=\"wiki-" + ap + "\"></a>\n"
|
||||
b += "### Schema " + ap.title()
|
||||
b += "<table width=100%>"
|
||||
b += test_table("generation",test)
|
||||
if test.get("Status") == "passed":
|
||||
for build in tests:
|
||||
if build.find("Name").text == "build_cpp_sdai_" + ap:
|
||||
s += test_status(build) + "</td></tr>\n"
|
||||
b += test_table("compilation",build)
|
||||
break
|
||||
else:
|
||||
s += "----</td></tr>\n"
|
||||
b += "</table>\n"
|
||||
return s,b
|
||||
|
||||
def test_table(ttype, test):
|
||||
# populate the table for one test
|
||||
# returns: html & markdown formatted text to be added to 'body'
|
||||
b = "<tr><td>Code " + ttype
|
||||
output = test.find("Results").find("Measurement").find("Value").text
|
||||
w = output.count("WARNING")
|
||||
w += output.count("warning")
|
||||
lines = output.split("\n")
|
||||
if "The rest of the test output was removed since it exceeds the threshold of" in lines[-2]:
|
||||
trunc1 = "at least "
|
||||
trunc2 = "(ctest truncated output)"
|
||||
else:
|
||||
trunc1 = ""
|
||||
trunc2 = ""
|
||||
if test.get("Status") == "passed":
|
||||
#print summary in b
|
||||
b += " succeeded with " + trunc1 + w.__str__() + " warnings " + trunc2
|
||||
if w == 0: #nothing to print in the table, so skip it
|
||||
b += "</td></tr>\n"
|
||||
return b
|
||||
else:
|
||||
#print warnings and errors in b
|
||||
e = output.count("ERROR")
|
||||
e += output.count("error")
|
||||
b += " failed with %s%d warnings and %d errors %s" %(trunc1, w, e, trunc2)
|
||||
b += "<br>\n<table border=1 width=100%>\n"
|
||||
b += "<tr><th>Line</th><th>Text</th></tr>\n"
|
||||
|
||||
# ERRORs
|
||||
# 242_n2813_mim_lf.exp:2278: --ERROR: Expected a type...
|
||||
# gcc errors look like ???
|
||||
l=0
|
||||
for line in lines:
|
||||
if ": --ERROR:" in line:
|
||||
l += 1
|
||||
c1 = line.find(":")
|
||||
c2 = line.find(":",c1+1)
|
||||
b += "<tr><td>" + line[c1+1:c2] + "</td><td>" + line[c2+4:] + "</td></tr>\n"
|
||||
elif ": error:" in line:
|
||||
l += 1
|
||||
c1 = line.find(":")
|
||||
c2 = line.find(":",c1+1)
|
||||
c3 = line.find(":",c2+1) #skip the character number
|
||||
b += "<tr><td>" + line[c1+1:c2] + "</td><td>" + line[c3+2:] + "</td></tr>\n"
|
||||
if l > 20:
|
||||
b += "<tr><td>-</td><td><font color=red>-- maximum number of errors printed --</font></td></tr>\n"
|
||||
break
|
||||
# WARNINGs
|
||||
# ap239_arm_lf.exp:2731: WARNING: Implicit downcast...
|
||||
# WARNING: in SELECT TYPE date_or_date... (multi-line warning)
|
||||
# compstructs.cc:28:23: warning: unused
|
||||
l=0
|
||||
for line in lines:
|
||||
if ": WARNING" in line:
|
||||
l += 1
|
||||
c1 = line.find(":")
|
||||
c2 = line.find(":",c1+1)
|
||||
b += "<tr><td>" + line[c1+1:c2] + "</td><td>" + line[c2+2:] + "</td></tr>\n"
|
||||
elif "WARNING" in line:
|
||||
b += "<tr><td>????</td><td>" + line + "</td></tr>\n"
|
||||
elif ": warning:" in line:
|
||||
l += 1
|
||||
c1 = line.find(":")
|
||||
c2 = line.find(":",c1+1)
|
||||
c3 = line.find(":",c2+1) #skip the character number
|
||||
b += "<tr><td>" + line[c1+1:c2] + "</td><td>" + line[c3+2:] + "</td></tr>\n"
|
||||
if l > 20:
|
||||
b += "<tr><td>-</td><td><font color=red>-- maximum number of warnings printed --</font></td></tr>\n"
|
||||
break
|
||||
b += "</table></td></tr>\n"
|
||||
return b
|
||||
|
||||
def test_status(test):
|
||||
t = ""
|
||||
for m in test.find("Results").findall("NamedMeasurement"):
|
||||
if m.get("name") == "Execution Time":
|
||||
t = " in " + m.find("Value").text + "s"
|
||||
break
|
||||
if test.get("Status") == "passed":
|
||||
s = "<font color=green>PASS</font>"
|
||||
elif test.get("Status") == "failed":
|
||||
s = "<font color=red>FAIL</font>"
|
||||
else:
|
||||
s = "<font color=cyan>" + test.get("Status") + "</font>"
|
||||
return s + t
|
||||
|
||||
if __name__ == "__main__":
|
||||
# Someone is launching this directly
|
||||
main()
|
||||
@@ -16,11 +16,6 @@ extern ofstream * logStream;
|
||||
|
||||
static int debug_access_hooks = 0;
|
||||
|
||||
#ifdef PART26
|
||||
|
||||
const char * sclHostName = CORBA::Orbix.myHost(); // Default is local host
|
||||
#endif
|
||||
|
||||
Schema * s_example_schema = 0;
|
||||
|
||||
/* ************** TYPES */
|
||||
@@ -126,15 +121,6 @@ SdaiPoly_line::SdaiPoly_line( SdaiPoly_line & e ) {
|
||||
}
|
||||
SdaiPoly_line::~SdaiPoly_line() { }
|
||||
|
||||
|
||||
#ifdef __O3DB__
|
||||
void
|
||||
SdaiPoly_line::oodb_reInit() {
|
||||
eDesc = example_schemae_poly_line;
|
||||
attributes [0].aDesc = a_0points;
|
||||
}
|
||||
#endif
|
||||
|
||||
SdaiPoly_line::SdaiPoly_line( SCLP23( Application_instance ) *se, int * addAttrs ) {
|
||||
/* Set this to point to the head entity. */
|
||||
HeadEntity( se );
|
||||
@@ -199,17 +185,6 @@ SdaiShape::SdaiShape( SdaiShape & e ) {
|
||||
}
|
||||
SdaiShape::~SdaiShape() { }
|
||||
|
||||
|
||||
#ifdef __O3DB__
|
||||
void
|
||||
SdaiShape::oodb_reInit() {
|
||||
eDesc = example_schemae_shape;
|
||||
attributes [0].aDesc = a_1item_name;
|
||||
attributes [1].aDesc = a_2item_color;
|
||||
attributes [2].aDesc = a_3number_of_sides;
|
||||
}
|
||||
#endif
|
||||
|
||||
SdaiShape::SdaiShape( SCLP23( Application_instance ) *se, int * addAttrs ) {
|
||||
/* Set this to point to the head entity. */
|
||||
HeadEntity( se );
|
||||
@@ -363,15 +338,6 @@ create_SdaiRectangle( os_database * db ) {
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef __O3DB__
|
||||
void
|
||||
SdaiRectangle::oodb_reInit() {
|
||||
eDesc = example_schemae_rectangle;
|
||||
attributes [3].aDesc = a_4height;
|
||||
attributes [4].aDesc = a_5width;
|
||||
}
|
||||
#endif
|
||||
|
||||
SdaiRectangle::SdaiRectangle( SCLP23( Application_instance ) *se, int * addAttrs ) : SdaiShape( se, ( addAttrs ? &addAttrs[1] : 0 ) ) {
|
||||
/* Set this to point to the head entity. */
|
||||
HeadEntity( se );
|
||||
@@ -450,13 +416,6 @@ SdaiSquare::SdaiSquare( SdaiSquare & e ) {
|
||||
}
|
||||
SdaiSquare::~SdaiSquare() { }
|
||||
|
||||
#ifdef __O3DB__
|
||||
void
|
||||
SdaiSquare::oodb_reInit() {
|
||||
eDesc = example_schemae_square;
|
||||
}
|
||||
#endif
|
||||
|
||||
SdaiSquare::SdaiSquare( SCLP23( Application_instance ) *se, int * addAttrs ) : SdaiRectangle( se, ( addAttrs ? &addAttrs[1] : 0 ) ) {
|
||||
/* Set this to point to the head entity. */
|
||||
HeadEntity( se );
|
||||
@@ -504,16 +463,6 @@ SdaiTriangle::SdaiTriangle( SdaiTriangle & e ) {
|
||||
}
|
||||
SdaiTriangle::~SdaiTriangle() { }
|
||||
|
||||
#ifdef __O3DB__
|
||||
void
|
||||
SdaiTriangle::oodb_reInit() {
|
||||
eDesc = example_schemae_triangle;
|
||||
attributes [3].aDesc = a_6side1_length;
|
||||
attributes [4].aDesc = a_7side2_length;
|
||||
attributes [5].aDesc = a_8side3_length;
|
||||
}
|
||||
#endif
|
||||
|
||||
SdaiTriangle::SdaiTriangle( SCLP23( Application_instance ) *se, int * addAttrs ) : SdaiShape( se, ( addAttrs ? &addAttrs[1] : 0 ) ) {
|
||||
/* Set this to point to the head entity. */
|
||||
HeadEntity( se );
|
||||
@@ -620,14 +569,6 @@ SdaiCircle::SdaiCircle( SdaiCircle & e ) {
|
||||
}
|
||||
SdaiCircle::~SdaiCircle() { }
|
||||
|
||||
#ifdef __O3DB__
|
||||
void
|
||||
SdaiCircle::oodb_reInit() {
|
||||
eDesc = example_schemae_circle;
|
||||
attributes [3].aDesc = a_9radius;
|
||||
}
|
||||
#endif
|
||||
|
||||
SdaiCircle::SdaiCircle( SCLP23( Application_instance ) *se, int * addAttrs ) : SdaiShape( se, ( addAttrs ? &addAttrs[1] : 0 ) ) {
|
||||
/* Set this to point to the head entity. */
|
||||
HeadEntity( se );
|
||||
@@ -691,16 +632,6 @@ SdaiLine::SdaiLine( SdaiLine & e ) {
|
||||
}
|
||||
SdaiLine::~SdaiLine() { }
|
||||
|
||||
|
||||
#ifdef __O3DB__
|
||||
void
|
||||
SdaiLine::oodb_reInit() {
|
||||
eDesc = example_schemae_line;
|
||||
attributes [0].aDesc = a_10end_point_one;
|
||||
attributes [1].aDesc = a_11end_point_two;
|
||||
}
|
||||
#endif
|
||||
|
||||
SdaiLine::SdaiLine( SCLP23( Application_instance ) *se, int * addAttrs ) {
|
||||
/* Set this to point to the head entity. */
|
||||
HeadEntity( se );
|
||||
@@ -788,16 +719,6 @@ SdaiCartesian_point::SdaiCartesian_point( SdaiCartesian_point & e ) {
|
||||
}
|
||||
SdaiCartesian_point::~SdaiCartesian_point() { }
|
||||
|
||||
#ifdef __O3DB__
|
||||
void
|
||||
SdaiCartesian_point::oodb_reInit() {
|
||||
eDesc = example_schemae_cartesian_point;
|
||||
attributes [0].aDesc = a_12x;
|
||||
attributes [1].aDesc = a_13y;
|
||||
attributes [2].aDesc = a_14z;
|
||||
}
|
||||
#endif
|
||||
|
||||
SdaiCartesian_point::SdaiCartesian_point( SCLP23( Application_instance ) *se, int * addAttrs ) {
|
||||
/* Set this to point to the head entity. */
|
||||
HeadEntity( se );
|
||||
|
||||
@@ -5,450 +5,407 @@
|
||||
// regenerate it.
|
||||
/* $Id$ */
|
||||
|
||||
#ifdef __O3DB__
|
||||
#include <OpenOODB.h>
|
||||
#endif
|
||||
|
||||
#ifndef SCHEMA_H
|
||||
#include <schema.h>
|
||||
#endif
|
||||
|
||||
#ifdef PART26
|
||||
#include <corbaIncludes.h>
|
||||
// Create a corbaSchema.h file in this directory with a #include in
|
||||
// it for your IDL generated schema-specific .hh file.
|
||||
#include <corbaSchema.h>
|
||||
#endif
|
||||
|
||||
/* ************** TYPES */
|
||||
/* ************** TYPES */
|
||||
|
||||
////////// ENUMERATION TYPE color
|
||||
enum Color {
|
||||
Color__red,
|
||||
Color__green,
|
||||
Color__blue,
|
||||
Color__yellow,
|
||||
Color__orange,
|
||||
Color__white,
|
||||
Color__black,
|
||||
Color__brown,
|
||||
Color_unset
|
||||
Color__red,
|
||||
Color__green,
|
||||
Color__blue,
|
||||
Color__yellow,
|
||||
Color__orange,
|
||||
Color__white,
|
||||
Color__black,
|
||||
Color__brown,
|
||||
Color_unset
|
||||
};
|
||||
|
||||
class SdaiColor_var : public SCLP23(Enum) {
|
||||
class SdaiColor_var : public SCLP23( Enum ) {
|
||||
|
||||
protected:
|
||||
EnumTypeDescriptor *type;
|
||||
protected:
|
||||
EnumTypeDescriptor * type;
|
||||
|
||||
public:
|
||||
SdaiColor_var (const char * n =0, EnumTypeDescriptor *et =example_schemat_color);
|
||||
SdaiColor_var (Color e, EnumTypeDescriptor *et =example_schemat_color)
|
||||
: type(et) { set_value (e); }
|
||||
~SdaiColor_var () { }
|
||||
SdaiColor_var& operator= (const SdaiColor_var& e)
|
||||
{ set_value (e); return *this; }
|
||||
operator Color () const;
|
||||
public:
|
||||
SdaiColor_var( const char * n = 0, EnumTypeDescriptor * et = example_schemat_color );
|
||||
SdaiColor_var( Color e, EnumTypeDescriptor * et = example_schemat_color )
|
||||
: type( et ) {
|
||||
set_value( e );
|
||||
}
|
||||
~SdaiColor_var() { }
|
||||
SdaiColor_var & operator= ( const SdaiColor_var & e ) {
|
||||
set_value( e );
|
||||
return *this;
|
||||
}
|
||||
operator Color() const;
|
||||
|
||||
inline virtual const char * Name () const
|
||||
{ return type->Name(); }
|
||||
inline virtual int no_elements () const { return 8; }
|
||||
virtual const char * element_at (int n) const;
|
||||
inline virtual const char * Name() const {
|
||||
return type->Name();
|
||||
}
|
||||
inline virtual int no_elements() const {
|
||||
return 8;
|
||||
}
|
||||
virtual const char * element_at( int n ) const;
|
||||
|
||||
};
|
||||
|
||||
typedef SdaiColor_var * SdaiColor_var_ptr;
|
||||
|
||||
SCLP23(Enum) * create_SdaiColor_var ();
|
||||
SCLP23( Enum ) * create_SdaiColor_var();
|
||||
|
||||
class SdaiColor_vars : public EnumAggregate {
|
||||
|
||||
protected:
|
||||
EnumTypeDescriptor *enum_type;
|
||||
protected:
|
||||
EnumTypeDescriptor * enum_type;
|
||||
|
||||
public:
|
||||
SdaiColor_vars( EnumTypeDescriptor * =example_schemat_color);
|
||||
virtual ~SdaiColor_vars();
|
||||
virtual SingleLinkNode * NewNode()
|
||||
{ return new EnumNode (new SdaiColor_var( "", enum_type )); }
|
||||
public:
|
||||
SdaiColor_vars( EnumTypeDescriptor * = example_schemat_color );
|
||||
virtual ~SdaiColor_vars();
|
||||
virtual SingleLinkNode * NewNode() {
|
||||
return new EnumNode( new SdaiColor_var( "", enum_type ) );
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
typedef SdaiColor_vars * SdaiColor_vars_ptr;
|
||||
|
||||
STEPaggregate * create_SdaiColor_vars ();
|
||||
STEPaggregate * create_SdaiColor_vars();
|
||||
|
||||
////////// END ENUMERATION color
|
||||
|
||||
|
||||
// ***** Build the SELECT Types
|
||||
// ***** Build the SELECT Types
|
||||
|
||||
/* ************** ENTITIES */
|
||||
/* ************** ENTITIES */
|
||||
|
||||
// ***** Print Entity Classes
|
||||
// ***** Print Entity Classes
|
||||
|
||||
///////// ENTITY poly_line
|
||||
///////// ENTITY poly_line
|
||||
|
||||
extern AttrDescriptor *a_0points;
|
||||
extern AttrDescriptor * a_0points;
|
||||
|
||||
class SdaiPoly_line : public SCLP23(Application_instance) {
|
||||
class SdaiPoly_line : public SCLP23( Application_instance ) {
|
||||
|
||||
protected:
|
||||
EntityAggregate _points ; // of line
|
||||
protected:
|
||||
EntityAggregate _points ; // of line
|
||||
|
||||
public:
|
||||
public:
|
||||
|
||||
SdaiPoly_line ( );
|
||||
SdaiPoly_line (SCLP23(Application_instance) *se, int *addAttrs = 0);
|
||||
SdaiPoly_line (SdaiPoly_line& e );
|
||||
~SdaiPoly_line ();
|
||||
SdaiPoly_line( );
|
||||
SdaiPoly_line( SCLP23( Application_instance ) *se, int * addAttrs = 0 );
|
||||
SdaiPoly_line( SdaiPoly_line & e );
|
||||
~SdaiPoly_line();
|
||||
|
||||
#ifdef __O3DB__
|
||||
void oodb_reInit();
|
||||
#endif
|
||||
|
||||
int opcode () { return 0 ; }
|
||||
const EntityAggregate_ptr points_() const;
|
||||
void points_ (const EntityAggregate_ptr x);
|
||||
int opcode() {
|
||||
return 0 ;
|
||||
}
|
||||
const EntityAggregate_ptr points_() const;
|
||||
void points_( const EntityAggregate_ptr x );
|
||||
|
||||
|
||||
};
|
||||
|
||||
#ifdef __O3DB__
|
||||
inline SCLP23(Application_instance_ptr)
|
||||
create_SdaiPoly_line () { return (SCLP23(Application_instance_ptr)) new SdaiPoly_line ; }
|
||||
#else
|
||||
inline SdaiPoly_line *
|
||||
create_SdaiPoly_line () { return new SdaiPoly_line ; }
|
||||
#endif
|
||||
create_SdaiPoly_line() {
|
||||
return new SdaiPoly_line ;
|
||||
}
|
||||
|
||||
///////// END_ENTITY poly_line
|
||||
///////// END_ENTITY poly_line
|
||||
|
||||
|
||||
///////// ENTITY shape
|
||||
///////// ENTITY shape
|
||||
|
||||
extern AttrDescriptor *a_1item_name;
|
||||
extern AttrDescriptor *a_2item_color;
|
||||
extern AttrDescriptor *a_3number_of_sides;
|
||||
extern AttrDescriptor * a_1item_name;
|
||||
extern AttrDescriptor * a_2item_color;
|
||||
extern AttrDescriptor * a_3number_of_sides;
|
||||
|
||||
class SdaiShape : public SCLP23(Application_instance) {
|
||||
class SdaiShape : public SCLP23( Application_instance ) {
|
||||
|
||||
protected:
|
||||
SCLP23(String) _item_name ;
|
||||
SdaiColor_var _item_color ; // OPTIONAL
|
||||
SCLP23(Integer) _number_of_sides ;
|
||||
public:
|
||||
protected:
|
||||
SCLP23( String ) _item_name ;
|
||||
SdaiColor_var _item_color ; // OPTIONAL
|
||||
SCLP23( Integer ) _number_of_sides ;
|
||||
public:
|
||||
|
||||
SdaiShape ( );
|
||||
SdaiShape (SCLP23(Application_instance) *se, int *addAttrs = 0);
|
||||
SdaiShape (SdaiShape& e );
|
||||
~SdaiShape ();
|
||||
SdaiShape( );
|
||||
SdaiShape( SCLP23( Application_instance ) *se, int * addAttrs = 0 );
|
||||
SdaiShape( SdaiShape & e );
|
||||
~SdaiShape();
|
||||
|
||||
#ifdef __O3DB__
|
||||
void oodb_reInit();
|
||||
#endif
|
||||
int opcode() {
|
||||
return 1 ;
|
||||
}
|
||||
const SdaiLabel item_name_() const;
|
||||
void item_name_( const SdaiLabel x );
|
||||
|
||||
int opcode () { return 1 ; }
|
||||
const SdaiLabel item_name_() const;
|
||||
void item_name_ (const SdaiLabel x);
|
||||
const SdaiColor_var item_color_() const;
|
||||
void item_color_( const SdaiColor_var x );
|
||||
|
||||
const SdaiColor_var item_color_() const;
|
||||
void item_color_ (const SdaiColor_var x);
|
||||
|
||||
const SCLP23(Integer) number_of_sides_() const;
|
||||
void number_of_sides_ (const SCLP23(Integer) x);
|
||||
const SCLP23( Integer ) number_of_sides_() const;
|
||||
void number_of_sides_( const SCLP23( Integer ) x );
|
||||
|
||||
|
||||
};
|
||||
|
||||
#ifdef __O3DB__
|
||||
inline SCLP23(Application_instance_ptr)
|
||||
create_SdaiShape () { return (SCLP23(Application_instance_ptr)) new SdaiShape ; }
|
||||
#else
|
||||
inline SdaiShape *
|
||||
create_SdaiShape () { return new SdaiShape ; }
|
||||
#endif
|
||||
create_SdaiShape() {
|
||||
return new SdaiShape ;
|
||||
}
|
||||
|
||||
///////// END_ENTITY shape
|
||||
///////// END_ENTITY shape
|
||||
|
||||
|
||||
///////// ENTITY rectangle
|
||||
///////// ENTITY rectangle
|
||||
|
||||
extern AttrDescriptor *a_4height;
|
||||
extern AttrDescriptor *a_5width;
|
||||
extern AttrDescriptor * a_4height;
|
||||
extern AttrDescriptor * a_5width;
|
||||
|
||||
class SdaiRectangle : public SdaiShape {
|
||||
|
||||
protected:
|
||||
SCLP23(Real) _height ;
|
||||
SCLP23(Real) _width ;
|
||||
public:
|
||||
|
||||
SdaiRectangle ( );
|
||||
SdaiRectangle (SCLP23(Application_instance) *se, int *addAttrs = 0);
|
||||
SdaiRectangle (SdaiRectangle& e );
|
||||
~SdaiRectangle ();
|
||||
protected:
|
||||
SCLP23( Real ) _height ;
|
||||
SCLP23( Real ) _width ;
|
||||
public:
|
||||
|
||||
#ifdef __O3DB__
|
||||
void oodb_reInit();
|
||||
#endif
|
||||
SdaiRectangle( );
|
||||
SdaiRectangle( SCLP23( Application_instance ) *se, int * addAttrs = 0 );
|
||||
SdaiRectangle( SdaiRectangle & e );
|
||||
~SdaiRectangle();
|
||||
|
||||
int opcode () { return 2 ; }
|
||||
const SdaiLength_measure height_() const;
|
||||
void height_ (const SdaiLength_measure x);
|
||||
int opcode() {
|
||||
return 2 ;
|
||||
}
|
||||
const SdaiLength_measure height_() const;
|
||||
void height_( const SdaiLength_measure x );
|
||||
|
||||
const SdaiLength_measure width_() const;
|
||||
void width_ (const SdaiLength_measure x);
|
||||
const SdaiLength_measure width_() const;
|
||||
void width_( const SdaiLength_measure x );
|
||||
|
||||
/* The first parent's access functions are */
|
||||
/* above or covered by inherited functions. */
|
||||
/* The first parent's access functions are */
|
||||
/* above or covered by inherited functions. */
|
||||
|
||||
};
|
||||
|
||||
#ifdef __O3DB__
|
||||
inline SCLP23(Application_instance_ptr)
|
||||
create_SdaiRectangle () { return (SCLP23(Application_instance_ptr)) new SdaiRectangle ; }
|
||||
#else
|
||||
inline SdaiRectangle *
|
||||
create_SdaiRectangle () { return new SdaiRectangle ; }
|
||||
#endif
|
||||
create_SdaiRectangle() {
|
||||
return new SdaiRectangle ;
|
||||
}
|
||||
|
||||
///////// END_ENTITY rectangle
|
||||
///////// END_ENTITY rectangle
|
||||
|
||||
|
||||
///////// ENTITY square
|
||||
///////// ENTITY square
|
||||
|
||||
|
||||
class SdaiSquare : public SdaiRectangle {
|
||||
|
||||
protected:
|
||||
public:
|
||||
|
||||
SdaiSquare ( );
|
||||
SdaiSquare (SCLP23(Application_instance) *se, int *addAttrs = 0);
|
||||
SdaiSquare (SdaiSquare& e );
|
||||
~SdaiSquare ();
|
||||
protected:
|
||||
public:
|
||||
|
||||
#ifdef __O3DB__
|
||||
void oodb_reInit();
|
||||
#endif
|
||||
SdaiSquare( );
|
||||
SdaiSquare( SCLP23( Application_instance ) *se, int * addAttrs = 0 );
|
||||
SdaiSquare( SdaiSquare & e );
|
||||
~SdaiSquare();
|
||||
|
||||
int opcode () { return 3 ; }
|
||||
/* The first parent's access functions are */
|
||||
/* above or covered by inherited functions. */
|
||||
int opcode() {
|
||||
return 3 ;
|
||||
}
|
||||
/* The first parent's access functions are */
|
||||
/* above or covered by inherited functions. */
|
||||
|
||||
};
|
||||
|
||||
#ifdef __O3DB__
|
||||
inline SCLP23(Application_instance_ptr)
|
||||
create_SdaiSquare () { return (SCLP23(Application_instance_ptr)) new SdaiSquare ; }
|
||||
#else
|
||||
inline SdaiSquare *
|
||||
create_SdaiSquare () { return new SdaiSquare ; }
|
||||
#endif
|
||||
create_SdaiSquare() {
|
||||
return new SdaiSquare ;
|
||||
}
|
||||
|
||||
///////// END_ENTITY square
|
||||
///////// END_ENTITY square
|
||||
|
||||
|
||||
///////// ENTITY triangle
|
||||
///////// ENTITY triangle
|
||||
|
||||
extern AttrDescriptor *a_6side1_length;
|
||||
extern AttrDescriptor *a_7side2_length;
|
||||
extern AttrDescriptor *a_8side3_length;
|
||||
extern AttrDescriptor * a_6side1_length;
|
||||
extern AttrDescriptor * a_7side2_length;
|
||||
extern AttrDescriptor * a_8side3_length;
|
||||
|
||||
class SdaiTriangle : public SdaiShape {
|
||||
|
||||
protected:
|
||||
SCLP23(Real) _side1_length ;
|
||||
SCLP23(Real) _side2_length ;
|
||||
SCLP23(Real) _side3_length ;
|
||||
public:
|
||||
|
||||
SdaiTriangle ( );
|
||||
SdaiTriangle (SCLP23(Application_instance) *se, int *addAttrs = 0);
|
||||
SdaiTriangle (SdaiTriangle& e );
|
||||
~SdaiTriangle ();
|
||||
protected:
|
||||
SCLP23( Real ) _side1_length ;
|
||||
SCLP23( Real ) _side2_length ;
|
||||
SCLP23( Real ) _side3_length ;
|
||||
public:
|
||||
|
||||
#ifdef __O3DB__
|
||||
void oodb_reInit();
|
||||
#endif
|
||||
SdaiTriangle( );
|
||||
SdaiTriangle( SCLP23( Application_instance ) *se, int * addAttrs = 0 );
|
||||
SdaiTriangle( SdaiTriangle & e );
|
||||
~SdaiTriangle();
|
||||
|
||||
int opcode () { return 4 ; }
|
||||
const SdaiLength_measure side1_length_() const;
|
||||
void side1_length_ (const SdaiLength_measure x);
|
||||
int opcode() {
|
||||
return 4 ;
|
||||
}
|
||||
const SdaiLength_measure side1_length_() const;
|
||||
void side1_length_( const SdaiLength_measure x );
|
||||
|
||||
const SdaiLength_measure side2_length_() const;
|
||||
void side2_length_ (const SdaiLength_measure x);
|
||||
const SdaiLength_measure side2_length_() const;
|
||||
void side2_length_( const SdaiLength_measure x );
|
||||
|
||||
const SdaiLength_measure side3_length_() const;
|
||||
void side3_length_ (const SdaiLength_measure x);
|
||||
const SdaiLength_measure side3_length_() const;
|
||||
void side3_length_( const SdaiLength_measure x );
|
||||
|
||||
/* The first parent's access functions are */
|
||||
/* above or covered by inherited functions. */
|
||||
/* The first parent's access functions are */
|
||||
/* above or covered by inherited functions. */
|
||||
|
||||
};
|
||||
|
||||
#ifdef __O3DB__
|
||||
inline SCLP23(Application_instance_ptr)
|
||||
create_SdaiTriangle () { return (SCLP23(Application_instance_ptr)) new SdaiTriangle ; }
|
||||
#else
|
||||
inline SdaiTriangle *
|
||||
create_SdaiTriangle () { return new SdaiTriangle ; }
|
||||
#endif
|
||||
create_SdaiTriangle() {
|
||||
return new SdaiTriangle ;
|
||||
}
|
||||
|
||||
///////// END_ENTITY triangle
|
||||
///////// END_ENTITY triangle
|
||||
|
||||
|
||||
///////// ENTITY circle
|
||||
///////// ENTITY circle
|
||||
|
||||
extern AttrDescriptor *a_9radius;
|
||||
extern AttrDescriptor * a_9radius;
|
||||
|
||||
class SdaiCircle : public SdaiShape {
|
||||
|
||||
protected:
|
||||
SCLP23(Real) _radius ;
|
||||
public:
|
||||
|
||||
SdaiCircle ( );
|
||||
SdaiCircle (SCLP23(Application_instance) *se, int *addAttrs = 0);
|
||||
SdaiCircle (SdaiCircle& e );
|
||||
~SdaiCircle ();
|
||||
protected:
|
||||
SCLP23( Real ) _radius ;
|
||||
public:
|
||||
|
||||
#ifdef __O3DB__
|
||||
void oodb_reInit();
|
||||
#endif
|
||||
SdaiCircle( );
|
||||
SdaiCircle( SCLP23( Application_instance ) *se, int * addAttrs = 0 );
|
||||
SdaiCircle( SdaiCircle & e );
|
||||
~SdaiCircle();
|
||||
|
||||
int opcode () { return 5 ; }
|
||||
const SCLP23(Real) radius_() const;
|
||||
void radius_ (const SCLP23(Real) x);
|
||||
int opcode() {
|
||||
return 5 ;
|
||||
}
|
||||
const SCLP23( Real ) radius_() const;
|
||||
void radius_( const SCLP23( Real ) x );
|
||||
|
||||
/* The first parent's access functions are */
|
||||
/* above or covered by inherited functions. */
|
||||
/* The first parent's access functions are */
|
||||
/* above or covered by inherited functions. */
|
||||
|
||||
};
|
||||
|
||||
#ifdef __O3DB__
|
||||
inline SCLP23(Application_instance_ptr)
|
||||
create_SdaiCircle () { return (SCLP23(Application_instance_ptr)) new SdaiCircle ; }
|
||||
#else
|
||||
inline SdaiCircle *
|
||||
create_SdaiCircle () { return new SdaiCircle ; }
|
||||
#endif
|
||||
create_SdaiCircle() {
|
||||
return new SdaiCircle ;
|
||||
}
|
||||
|
||||
///////// END_ENTITY circle
|
||||
///////// END_ENTITY circle
|
||||
|
||||
|
||||
///////// ENTITY line
|
||||
///////// ENTITY line
|
||||
|
||||
extern AttrDescriptor *a_10end_point_one;
|
||||
extern AttrDescriptor *a_11end_point_two;
|
||||
extern AttrDescriptor * a_10end_point_one;
|
||||
extern AttrDescriptor * a_11end_point_two;
|
||||
|
||||
class SdaiLine : public SCLP23(Application_instance) {
|
||||
class SdaiLine : public SCLP23( Application_instance ) {
|
||||
|
||||
protected:
|
||||
SCLP23(Application_instance_ptr) _end_point_one ;
|
||||
SCLP23(Application_instance_ptr) _end_point_two ;
|
||||
public:
|
||||
protected:
|
||||
SCLP23( Application_instance_ptr ) _end_point_one ;
|
||||
SCLP23( Application_instance_ptr ) _end_point_two ;
|
||||
public:
|
||||
|
||||
SdaiLine ( );
|
||||
SdaiLine (SCLP23(Application_instance) *se, int *addAttrs = 0);
|
||||
SdaiLine (SdaiLine& e );
|
||||
~SdaiLine ();
|
||||
SdaiLine( );
|
||||
SdaiLine( SCLP23( Application_instance ) *se, int * addAttrs = 0 );
|
||||
SdaiLine( SdaiLine & e );
|
||||
~SdaiLine();
|
||||
|
||||
#ifdef __O3DB__
|
||||
void oodb_reInit();
|
||||
#endif
|
||||
int opcode() {
|
||||
return 6 ;
|
||||
}
|
||||
const SdaiCartesian_point_ptr end_point_one_() const;
|
||||
void end_point_one_( const SdaiCartesian_point_ptr x );
|
||||
|
||||
int opcode () { return 6 ; }
|
||||
const SdaiCartesian_point_ptr end_point_one_() const;
|
||||
void end_point_one_ (const SdaiCartesian_point_ptr x);
|
||||
|
||||
const SdaiCartesian_point_ptr end_point_two_() const;
|
||||
void end_point_two_ (const SdaiCartesian_point_ptr x);
|
||||
const SdaiCartesian_point_ptr end_point_two_() const;
|
||||
void end_point_two_( const SdaiCartesian_point_ptr x );
|
||||
|
||||
|
||||
};
|
||||
|
||||
#ifdef __O3DB__
|
||||
inline SCLP23(Application_instance_ptr)
|
||||
create_SdaiLine () { return (SCLP23(Application_instance_ptr)) new SdaiLine ; }
|
||||
#else
|
||||
inline SdaiLine *
|
||||
create_SdaiLine () { return new SdaiLine ; }
|
||||
#endif
|
||||
create_SdaiLine() {
|
||||
return new SdaiLine ;
|
||||
}
|
||||
|
||||
///////// END_ENTITY line
|
||||
///////// END_ENTITY line
|
||||
|
||||
|
||||
///////// ENTITY cartesian_point
|
||||
///////// ENTITY cartesian_point
|
||||
|
||||
extern AttrDescriptor *a_12x;
|
||||
extern AttrDescriptor *a_13y;
|
||||
extern AttrDescriptor *a_14z;
|
||||
extern AttrDescriptor * a_12x;
|
||||
extern AttrDescriptor * a_13y;
|
||||
extern AttrDescriptor * a_14z;
|
||||
|
||||
class SdaiCartesian_point : public SCLP23(Application_instance) {
|
||||
class SdaiCartesian_point : public SCLP23( Application_instance ) {
|
||||
|
||||
protected:
|
||||
SCLP23(Real) _x ;
|
||||
SCLP23(Real) _y ;
|
||||
SCLP23(Real) _z ; // OPTIONAL
|
||||
public:
|
||||
protected:
|
||||
SCLP23( Real ) _x ;
|
||||
SCLP23( Real ) _y ;
|
||||
SCLP23( Real ) _z ; // OPTIONAL
|
||||
public:
|
||||
|
||||
SdaiCartesian_point ( );
|
||||
SdaiCartesian_point (SCLP23(Application_instance) *se, int *addAttrs = 0);
|
||||
SdaiCartesian_point (SdaiCartesian_point& e );
|
||||
~SdaiCartesian_point ();
|
||||
SdaiCartesian_point( );
|
||||
SdaiCartesian_point( SCLP23( Application_instance ) *se, int * addAttrs = 0 );
|
||||
SdaiCartesian_point( SdaiCartesian_point & e );
|
||||
~SdaiCartesian_point();
|
||||
|
||||
#ifdef __O3DB__
|
||||
void oodb_reInit();
|
||||
#endif
|
||||
int opcode() {
|
||||
return 7 ;
|
||||
}
|
||||
const SdaiPoint x_() const;
|
||||
void x_( const SdaiPoint x );
|
||||
|
||||
int opcode () { return 7 ; }
|
||||
const SdaiPoint x_() const;
|
||||
void x_ (const SdaiPoint x);
|
||||
const SdaiPoint y_() const;
|
||||
void y_( const SdaiPoint x );
|
||||
|
||||
const SdaiPoint y_() const;
|
||||
void y_ (const SdaiPoint x);
|
||||
|
||||
const SdaiPoint z_() const;
|
||||
void z_ (const SdaiPoint x);
|
||||
const SdaiPoint z_() const;
|
||||
void z_( const SdaiPoint x );
|
||||
|
||||
|
||||
};
|
||||
|
||||
#ifdef __O3DB__
|
||||
inline SCLP23(Application_instance_ptr)
|
||||
create_SdaiCartesian_point () { return (SCLP23(Application_instance_ptr)) new SdaiCartesian_point ; }
|
||||
#else
|
||||
inline SdaiCartesian_point *
|
||||
create_SdaiCartesian_point () { return new SdaiCartesian_point ; }
|
||||
#endif
|
||||
create_SdaiCartesian_point() {
|
||||
return new SdaiCartesian_point ;
|
||||
}
|
||||
|
||||
///////// END_ENTITY cartesian_point
|
||||
///////// END_ENTITY cartesian_point
|
||||
|
||||
|
||||
// ***** generate Model related pieces
|
||||
// ***** generate Model related pieces
|
||||
|
||||
class SdaiModel_contents_example_schema : public SCLP23(Model_contents) {
|
||||
class SdaiModel_contents_example_schema : public SCLP23( Model_contents ) {
|
||||
|
||||
public:
|
||||
public:
|
||||
|
||||
SdaiModel_contents_example_schema();
|
||||
SdaiModel_contents_example_schema();
|
||||
|
||||
SdaiPoly_line__set_var SdaiPoly_line_get_extents();
|
||||
SdaiPoly_line__set_var SdaiPoly_line_get_extents();
|
||||
|
||||
SdaiShape__set_var SdaiShape_get_extents();
|
||||
SdaiShape__set_var SdaiShape_get_extents();
|
||||
|
||||
SdaiRectangle__set_var SdaiRectangle_get_extents();
|
||||
SdaiRectangle__set_var SdaiRectangle_get_extents();
|
||||
|
||||
SdaiSquare__set_var SdaiSquare_get_extents();
|
||||
SdaiSquare__set_var SdaiSquare_get_extents();
|
||||
|
||||
SdaiTriangle__set_var SdaiTriangle_get_extents();
|
||||
SdaiTriangle__set_var SdaiTriangle_get_extents();
|
||||
|
||||
SdaiCircle__set_var SdaiCircle_get_extents();
|
||||
SdaiCircle__set_var SdaiCircle_get_extents();
|
||||
|
||||
SdaiLine__set_var SdaiLine_get_extents();
|
||||
SdaiLine__set_var SdaiLine_get_extents();
|
||||
|
||||
SdaiCartesian_point__set_var SdaiCartesian_point_get_extents();
|
||||
SdaiCartesian_point__set_var SdaiCartesian_point_get_extents();
|
||||
|
||||
};
|
||||
|
||||
@@ -456,6 +413,6 @@ class SdaiModel_contents_example_schema : public SCLP23(Model_contents) {
|
||||
typedef SdaiModel_contents_example_schema * SdaiModel_contents_example_schema_ptr;
|
||||
typedef SdaiModel_contents_example_schema_ptr SdaiModel_contents_example_schema_var;
|
||||
|
||||
SCLP23(Model_contents_ptr) create_SdaiModel_contents_example_schema();
|
||||
SCLP23( Model_contents_ptr ) create_SdaiModel_contents_example_schema();
|
||||
|
||||
#endif
|
||||
|
||||
@@ -3,85 +3,85 @@
|
||||
// This file was generated by fedex_plus. You probably don't want to edit
|
||||
// it since your modifications will be lost if fedex_plus is used to
|
||||
// regenerate it.
|
||||
/* $Id$ */
|
||||
/* $Id$ */
|
||||
#include <schema.h>
|
||||
|
||||
// Schema: SdaiEXAMPLE_SCHEMA
|
||||
extern Schema * s_example_schema;
|
||||
extern Schema * s_example_schema;
|
||||
|
||||
// Types:
|
||||
class SdaiColor_vars;
|
||||
extern EnumTypeDescriptor *example_schemat_color;
|
||||
typedef SCLP23(String) SdaiLabel;
|
||||
extern TypeDescriptor *example_schemat_label;
|
||||
typedef SCLP23(Real) SdaiPoint;
|
||||
extern TypeDescriptor *example_schemat_point;
|
||||
typedef SCLP23(Real) SdaiLength_measure;
|
||||
extern TypeDescriptor *example_schemat_length_measure;
|
||||
extern EnumTypeDescriptor * example_schemat_color;
|
||||
typedef SCLP23( String ) SdaiLabel;
|
||||
extern TypeDescriptor * example_schemat_label;
|
||||
typedef SCLP23( Real ) SdaiPoint;
|
||||
extern TypeDescriptor * example_schemat_point;
|
||||
typedef SCLP23( Real ) SdaiLength_measure;
|
||||
extern TypeDescriptor * example_schemat_length_measure;
|
||||
|
||||
// Entities:
|
||||
class SdaiPoly_line;
|
||||
typedef SdaiPoly_line * SdaiPoly_lineH;
|
||||
typedef SdaiPoly_line * SdaiPoly_line_ptr;
|
||||
typedef SdaiPoly_line_ptr SdaiPoly_line_var;
|
||||
#define SdaiPoly_line__set SCLP23(DAObject__set)
|
||||
#define SdaiPoly_line__set_var SCLP23(DAObject__set_var)
|
||||
extern EntityDescriptor *example_schemae_poly_line;
|
||||
typedef SdaiPoly_line * SdaiPoly_lineH;
|
||||
typedef SdaiPoly_line * SdaiPoly_line_ptr;
|
||||
typedef SdaiPoly_line_ptr SdaiPoly_line_var;
|
||||
#define SdaiPoly_line__set SCLP23(DAObject__set)
|
||||
#define SdaiPoly_line__set_var SCLP23(DAObject__set_var)
|
||||
extern EntityDescriptor * example_schemae_poly_line;
|
||||
|
||||
class SdaiShape;
|
||||
typedef SdaiShape * SdaiShapeH;
|
||||
typedef SdaiShape * SdaiShape_ptr;
|
||||
typedef SdaiShape_ptr SdaiShape_var;
|
||||
#define SdaiShape__set SCLP23(DAObject__set)
|
||||
#define SdaiShape__set_var SCLP23(DAObject__set_var)
|
||||
extern EntityDescriptor *example_schemae_shape;
|
||||
typedef SdaiShape * SdaiShapeH;
|
||||
typedef SdaiShape * SdaiShape_ptr;
|
||||
typedef SdaiShape_ptr SdaiShape_var;
|
||||
#define SdaiShape__set SCLP23(DAObject__set)
|
||||
#define SdaiShape__set_var SCLP23(DAObject__set_var)
|
||||
extern EntityDescriptor * example_schemae_shape;
|
||||
|
||||
class SdaiRectangle;
|
||||
typedef SdaiRectangle * SdaiRectangleH;
|
||||
typedef SdaiRectangle * SdaiRectangle_ptr;
|
||||
typedef SdaiRectangle_ptr SdaiRectangle_var;
|
||||
#define SdaiRectangle__set SCLP23(DAObject__set)
|
||||
#define SdaiRectangle__set_var SCLP23(DAObject__set_var)
|
||||
extern EntityDescriptor *example_schemae_rectangle;
|
||||
typedef SdaiRectangle * SdaiRectangleH;
|
||||
typedef SdaiRectangle * SdaiRectangle_ptr;
|
||||
typedef SdaiRectangle_ptr SdaiRectangle_var;
|
||||
#define SdaiRectangle__set SCLP23(DAObject__set)
|
||||
#define SdaiRectangle__set_var SCLP23(DAObject__set_var)
|
||||
extern EntityDescriptor * example_schemae_rectangle;
|
||||
|
||||
class SdaiSquare;
|
||||
typedef SdaiSquare * SdaiSquareH;
|
||||
typedef SdaiSquare * SdaiSquare_ptr;
|
||||
typedef SdaiSquare_ptr SdaiSquare_var;
|
||||
#define SdaiSquare__set SCLP23(DAObject__set)
|
||||
#define SdaiSquare__set_var SCLP23(DAObject__set_var)
|
||||
extern EntityDescriptor *example_schemae_square;
|
||||
typedef SdaiSquare * SdaiSquareH;
|
||||
typedef SdaiSquare * SdaiSquare_ptr;
|
||||
typedef SdaiSquare_ptr SdaiSquare_var;
|
||||
#define SdaiSquare__set SCLP23(DAObject__set)
|
||||
#define SdaiSquare__set_var SCLP23(DAObject__set_var)
|
||||
extern EntityDescriptor * example_schemae_square;
|
||||
|
||||
class SdaiTriangle;
|
||||
typedef SdaiTriangle * SdaiTriangleH;
|
||||
typedef SdaiTriangle * SdaiTriangle_ptr;
|
||||
typedef SdaiTriangle_ptr SdaiTriangle_var;
|
||||
#define SdaiTriangle__set SCLP23(DAObject__set)
|
||||
#define SdaiTriangle__set_var SCLP23(DAObject__set_var)
|
||||
extern EntityDescriptor *example_schemae_triangle;
|
||||
typedef SdaiTriangle * SdaiTriangleH;
|
||||
typedef SdaiTriangle * SdaiTriangle_ptr;
|
||||
typedef SdaiTriangle_ptr SdaiTriangle_var;
|
||||
#define SdaiTriangle__set SCLP23(DAObject__set)
|
||||
#define SdaiTriangle__set_var SCLP23(DAObject__set_var)
|
||||
extern EntityDescriptor * example_schemae_triangle;
|
||||
|
||||
class SdaiCircle;
|
||||
typedef SdaiCircle * SdaiCircleH;
|
||||
typedef SdaiCircle * SdaiCircle_ptr;
|
||||
typedef SdaiCircle_ptr SdaiCircle_var;
|
||||
#define SdaiCircle__set SCLP23(DAObject__set)
|
||||
#define SdaiCircle__set_var SCLP23(DAObject__set_var)
|
||||
extern EntityDescriptor *example_schemae_circle;
|
||||
typedef SdaiCircle * SdaiCircleH;
|
||||
typedef SdaiCircle * SdaiCircle_ptr;
|
||||
typedef SdaiCircle_ptr SdaiCircle_var;
|
||||
#define SdaiCircle__set SCLP23(DAObject__set)
|
||||
#define SdaiCircle__set_var SCLP23(DAObject__set_var)
|
||||
extern EntityDescriptor * example_schemae_circle;
|
||||
|
||||
class SdaiLine;
|
||||
typedef SdaiLine * SdaiLineH;
|
||||
typedef SdaiLine * SdaiLine_ptr;
|
||||
typedef SdaiLine_ptr SdaiLine_var;
|
||||
#define SdaiLine__set SCLP23(DAObject__set)
|
||||
#define SdaiLine__set_var SCLP23(DAObject__set_var)
|
||||
extern EntityDescriptor *example_schemae_line;
|
||||
typedef SdaiLine * SdaiLineH;
|
||||
typedef SdaiLine * SdaiLine_ptr;
|
||||
typedef SdaiLine_ptr SdaiLine_var;
|
||||
#define SdaiLine__set SCLP23(DAObject__set)
|
||||
#define SdaiLine__set_var SCLP23(DAObject__set_var)
|
||||
extern EntityDescriptor * example_schemae_line;
|
||||
|
||||
class SdaiCartesian_point;
|
||||
typedef SdaiCartesian_point * SdaiCartesian_pointH;
|
||||
typedef SdaiCartesian_point * SdaiCartesian_point_ptr;
|
||||
typedef SdaiCartesian_point_ptr SdaiCartesian_point_var;
|
||||
#define SdaiCartesian_point__set SCLP23(DAObject__set)
|
||||
#define SdaiCartesian_point__set_var SCLP23(DAObject__set_var)
|
||||
extern EntityDescriptor *example_schemae_cartesian_point;
|
||||
typedef SdaiCartesian_point * SdaiCartesian_pointH;
|
||||
typedef SdaiCartesian_point * SdaiCartesian_point_ptr;
|
||||
typedef SdaiCartesian_point_ptr SdaiCartesian_point_var;
|
||||
#define SdaiCartesian_point__set SCLP23(DAObject__set)
|
||||
#define SdaiCartesian_point__set_var SCLP23(DAObject__set_var)
|
||||
extern EntityDescriptor * example_schemae_cartesian_point;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -8,10 +8,6 @@
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
|
||||
#ifdef __O3DB__
|
||||
#include <OpenOODB.h>
|
||||
#endif
|
||||
|
||||
#include <sdai.h>
|
||||
|
||||
|
||||
@@ -26,13 +22,13 @@
|
||||
#include <STEPattribute.h>
|
||||
|
||||
#include <Sdaiclasses.h>
|
||||
extern void SchemaInit (Registry &);
|
||||
extern void InitSchemasAndEnts (Registry &);
|
||||
#include <SdaiEXAMPLE_SCHEMA.h>
|
||||
extern void SdaiEXAMPLE_SCHEMAInit (Registry & r);
|
||||
extern void SchemaInit( Registry & );
|
||||
extern void InitSchemasAndEnts( Registry & );
|
||||
#include <SdaiEXAMPLE_SCHEMA.h>
|
||||
extern void SdaiEXAMPLE_SCHEMAInit( Registry & r );
|
||||
|
||||
#include <complexSupport.h>
|
||||
ComplexCollect *gencomplex();
|
||||
ComplexCollect * gencomplex();
|
||||
|
||||
SCLP23(Model_contents_ptr) GetModelContents(char *schemaName);
|
||||
SCLP23( Model_contents_ptr ) GetModelContents( char * schemaName );
|
||||
#endif
|
||||
|
||||
@@ -8,6 +8,9 @@ set(LIBSTEPDAI_SRCS
|
||||
sdaiEntity_extent_set.cc
|
||||
sdaiModel_contents.cc
|
||||
sdaiModel_contents_list.cc
|
||||
sdaiEnum.cc
|
||||
sdaiString.cc
|
||||
sdaiBinary.cc
|
||||
)
|
||||
|
||||
SET(LIBSTEPDAI_PRIVATE_HDRS
|
||||
@@ -20,15 +23,23 @@ SET(LIBSTEPDAI_PRIVATE_HDRS
|
||||
sdaiObject.h
|
||||
sdaiSession_instance.h
|
||||
StrUtil.hh
|
||||
sdaiEnum.h
|
||||
sdaiString.h
|
||||
sdaiBinary.h
|
||||
)
|
||||
|
||||
IF(MSVC OR BORLAND)
|
||||
add_definitions( -DSCL_DAI_DLL_EXPORTS )
|
||||
add_definitions( -DSCL_UTILS_DLL_IMPORTS )
|
||||
ENDIF()
|
||||
|
||||
include_directories(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${SCL_SOURCE_DIR}/src/clstepcore
|
||||
${SCL_SOURCE_DIR}/src/clutils
|
||||
)
|
||||
|
||||
SCL_ADDLIB(stepdai "${LIBSTEPDAI_SRCS}" "steputils stepcore")
|
||||
SCL_ADDLIB(stepdai "${LIBSTEPDAI_SRCS}" "steputils")
|
||||
|
||||
if(APPLE)
|
||||
set_target_properties(stepdai PROPERTIES LINK_FLAGS "-flat_namespace -undefined suppress")
|
||||
|
||||
@@ -51,7 +51,7 @@ SDAI_Application_instance__set::~SDAI_Application_instance__set() {
|
||||
}
|
||||
|
||||
void SDAI_Application_instance__set::Check( int index ) {
|
||||
SDAI_Application_instance_ptr* newbuf;
|
||||
SDAI_Application_instance_ptr * newbuf;
|
||||
|
||||
if( index >= _bufsize ) {
|
||||
_bufsize = ( index + 1 ) * 2;
|
||||
@@ -63,7 +63,7 @@ void SDAI_Application_instance__set::Check( int index ) {
|
||||
}
|
||||
|
||||
void SDAI_Application_instance__set::Insert( SDAI_Application_instance_ptr v, int index ) {
|
||||
SDAI_Application_instance_ptr* spot;
|
||||
SDAI_Application_instance_ptr * spot;
|
||||
index = ( index < 0 ) ? _count : index;
|
||||
|
||||
if( index < _count ) {
|
||||
@@ -81,7 +81,7 @@ void SDAI_Application_instance__set::Insert( SDAI_Application_instance_ptr v, in
|
||||
|
||||
void SDAI_Application_instance__set::Append( SDAI_Application_instance_ptr v ) {
|
||||
int index = _count;
|
||||
SDAI_Application_instance_ptr* spot;
|
||||
SDAI_Application_instance_ptr * spot;
|
||||
|
||||
if( index < _count ) {
|
||||
Check( _count + 1 );
|
||||
@@ -99,7 +99,7 @@ void SDAI_Application_instance__set::Append( SDAI_Application_instance_ptr v ) {
|
||||
void SDAI_Application_instance__set::Remove( int index ) {
|
||||
if( 0 <= index && index < _count ) {
|
||||
--_count;
|
||||
SDAI_Application_instance_ptr* spot = &_buf[index];
|
||||
SDAI_Application_instance_ptr * spot = &_buf[index];
|
||||
memmove( spot, spot + 1, ( _count - index )*sizeof( SDAI_Application_instance_ptr ) );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,35 +30,35 @@
|
||||
#ifndef SDAI_APPLICATION_INSTANCE_SET_h
|
||||
#define SDAI_APPLICATION_INSTANCE_SET_h
|
||||
|
||||
#include <scl_export.h>
|
||||
//#include <STEPentity.h>
|
||||
|
||||
class SDAI_Application_instance__set;
|
||||
typedef SDAI_Application_instance__set *
|
||||
SDAI_Application_instance__set_ptr;
|
||||
typedef SDAI_Application_instance__set_ptr
|
||||
SDAI_Application_instance__set_var;
|
||||
SDAI_Application_instance__set_ptr;
|
||||
typedef SDAI_Application_instance__set_ptr
|
||||
SDAI_Application_instance__set_var;
|
||||
|
||||
class SDAI_Application_instance__set
|
||||
{
|
||||
public:
|
||||
SDAI_Application_instance__set(int = 16);
|
||||
~SDAI_Application_instance__set();
|
||||
class SCL_DAI_EXPORT SDAI_Application_instance__set {
|
||||
public:
|
||||
SDAI_Application_instance__set( int = 16 );
|
||||
~SDAI_Application_instance__set();
|
||||
|
||||
SDAI_Application_instance_ptr& operator[](int index);
|
||||
void Insert(SDAI_Application_instance_ptr, int index);
|
||||
void Append(SDAI_Application_instance_ptr);
|
||||
void Remove(int index);
|
||||
void Remove(SDAI_Application_instance_ptr);
|
||||
int Index(SDAI_Application_instance_ptr);
|
||||
SDAI_Application_instance_ptr & operator[]( int index );
|
||||
void Insert( SDAI_Application_instance_ptr, int index );
|
||||
void Append( SDAI_Application_instance_ptr );
|
||||
void Remove( int index );
|
||||
void Remove( SDAI_Application_instance_ptr );
|
||||
int Index( SDAI_Application_instance_ptr );
|
||||
|
||||
int Count();
|
||||
void Clear();
|
||||
private:
|
||||
void Check(int index);
|
||||
private:
|
||||
SDAI_Application_instance_ptr* _buf;
|
||||
int _bufsize;
|
||||
int _count;
|
||||
int Count();
|
||||
void Clear();
|
||||
private:
|
||||
void Check( int index );
|
||||
private:
|
||||
SDAI_Application_instance_ptr * _buf;
|
||||
int _bufsize;
|
||||
int _count;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -12,15 +12,34 @@
|
||||
#include <sstream>
|
||||
#include <sdai.h>
|
||||
|
||||
extern Severity CheckRemainingInput( istream & in, ErrorDescriptor * err,
|
||||
const char * typeName, // used in error message
|
||||
const char * tokenList ); // e.g. ",)"
|
||||
|
||||
SDAI_Binary::SDAI_Binary( const char * str, int max ) {
|
||||
content = std::string( str, max );
|
||||
}
|
||||
|
||||
SDAI_Binary::SDAI_Binary( const std::string & s ) {
|
||||
content = std::string( s );
|
||||
}
|
||||
|
||||
SDAI_Binary::~SDAI_Binary( void ) {
|
||||
}
|
||||
|
||||
SDAI_Binary & SDAI_Binary::operator= ( const char * s ) {
|
||||
std::string::operator= ( s );
|
||||
content = std::string( s );
|
||||
return *this;
|
||||
}
|
||||
|
||||
void SDAI_Binary::clear( void ) {
|
||||
content.clear();
|
||||
}
|
||||
|
||||
bool SDAI_Binary::empty( void ) const {
|
||||
return content.empty();
|
||||
}
|
||||
|
||||
const char * SDAI_Binary::c_str( void ) const {
|
||||
return content.c_str();
|
||||
}
|
||||
|
||||
void SDAI_Binary::STEPwrite( ostream & out ) const {
|
||||
const char * str = 0;
|
||||
if( empty() ) {
|
||||
@@ -53,7 +72,7 @@ const char * SDAI_Binary::STEPwrite( std::string & s ) const {
|
||||
}
|
||||
|
||||
Severity SDAI_Binary::ReadBinary( istream & in, ErrorDescriptor * err, int AssignVal,
|
||||
int needDelims ) {
|
||||
int needDelims ) {
|
||||
if( AssignVal ) {
|
||||
clear();
|
||||
}
|
||||
@@ -160,8 +179,8 @@ Severity SDAI_Binary::STEPread( const char * s, ErrorDescriptor * err ) {
|
||||
** following.
|
||||
******************************************************************************/
|
||||
Severity SDAI_Binary::BinaryValidLevel( istream & in, ErrorDescriptor * err,
|
||||
int optional, char * tokenList,
|
||||
int needDelims, int clearError ) {
|
||||
int optional, char * tokenList,
|
||||
int needDelims, int clearError ) {
|
||||
if( clearError ) {
|
||||
err->ClearErrorMsg();
|
||||
}
|
||||
@@ -195,8 +214,8 @@ Severity SDAI_Binary::BinaryValidLevel( istream & in, ErrorDescriptor * err,
|
||||
}
|
||||
|
||||
Severity SDAI_Binary::BinaryValidLevel( const char * value, ErrorDescriptor * err,
|
||||
int optional, char * tokenList,
|
||||
int needDelims, int clearError ) {
|
||||
int optional, char * tokenList,
|
||||
int needDelims, int clearError ) {
|
||||
istringstream in( ( char * )value );
|
||||
return BinaryValidLevel( in, err, optional, tokenList,
|
||||
needDelims, clearError );
|
||||
@@ -0,0 +1,56 @@
|
||||
#ifndef SDAIBINARY_H
|
||||
#define SDAIBINARY_H 1
|
||||
|
||||
#include <scl_export.h>
|
||||
#include <string>
|
||||
|
||||
/*
|
||||
* NIST STEP Core Class Library
|
||||
* clstepcore/sdaiBinary.h
|
||||
* April 1997
|
||||
* KC Morris
|
||||
|
||||
* Development of this software was funded by the United States Government,
|
||||
* and is not subject to copyright.
|
||||
*/
|
||||
|
||||
class SCL_DAI_EXPORT SDAI_Binary {
|
||||
private:
|
||||
std::string content;
|
||||
public:
|
||||
|
||||
//constructor(s) & destructor
|
||||
SDAI_Binary( const char * str = 0, int max = 0 );
|
||||
SDAI_Binary( const std::string & s );
|
||||
~SDAI_Binary( void );
|
||||
|
||||
// operators
|
||||
SDAI_Binary & operator= ( const char * s );
|
||||
|
||||
void clear( void );
|
||||
bool empty( void ) const;
|
||||
const char * c_str( void ) const;
|
||||
// format for STEP
|
||||
const char * asStr() const {
|
||||
return c_str();
|
||||
}
|
||||
void STEPwrite( ostream & out = cout ) const;
|
||||
const char * STEPwrite( std::string & s ) const;
|
||||
|
||||
Severity StrToVal( const char * s, ErrorDescriptor * err );
|
||||
Severity STEPread( istream & in, ErrorDescriptor * err );
|
||||
Severity STEPread( const char * s, ErrorDescriptor * err );
|
||||
|
||||
Severity BinaryValidLevel( const char * value, ErrorDescriptor * err,
|
||||
int optional, char * tokenList,
|
||||
int needDelims = 0, int clearError = 1 );
|
||||
Severity BinaryValidLevel( istream & in, ErrorDescriptor * err,
|
||||
int optional, char * tokenList,
|
||||
int needDelims = 0, int clearError = 1 );
|
||||
|
||||
protected:
|
||||
Severity ReadBinary( istream & in, ErrorDescriptor * err, int AssignVal = 1,
|
||||
int needDelims = 1 );
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -37,16 +37,6 @@ SDAI_DAObject::SDAI_DAObject() {
|
||||
SDAI_DAObject::~SDAI_DAObject() {
|
||||
}
|
||||
|
||||
|
||||
#ifdef PART26
|
||||
//SCLP26(Application_instance_ptr)
|
||||
IDL_Application_instance_ptr
|
||||
SDAI_DAObject::create_TIE() {
|
||||
cout << "ERROR DAObject::create_TIE() called." << endl;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
SDAI_DAObject_SDAI::SDAI_DAObject_SDAI() {
|
||||
}
|
||||
|
||||
@@ -59,16 +49,6 @@ SDAI_DAObject_SDAI::SDAI_DAObject_SDAI(const DAObject_SDAI&)
|
||||
SDAI_DAObject_SDAI::~SDAI_DAObject_SDAI() {
|
||||
}
|
||||
|
||||
|
||||
#ifdef PART26
|
||||
//SCLP26(Application_instance_ptr)
|
||||
IDL_Application_instance_ptr
|
||||
SDAI_DAObject_SDAI::create_TIE() {
|
||||
cout << "ERROR DAObject_SDAI::create_TIE() called." << endl;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Copyright (c) 1990, 1991 Stanford University
|
||||
*
|
||||
@@ -109,7 +89,7 @@ SDAI_DAObject__set::~SDAI_DAObject__set() {
|
||||
|
||||
void SDAI_DAObject__set::Check( int index ) {
|
||||
|
||||
SDAI_DAObject_ptr* newbuf;
|
||||
SDAI_DAObject_ptr * newbuf;
|
||||
|
||||
if( index >= _bufsize ) {
|
||||
_bufsize = ( index + 1 ) * 2;
|
||||
@@ -123,7 +103,7 @@ void SDAI_DAObject__set::Check( int index ) {
|
||||
void
|
||||
SDAI_DAObject__set::Insert( SDAI_DAObject_ptr v, int index ) {
|
||||
|
||||
SDAI_DAObject_ptr* spot;
|
||||
SDAI_DAObject_ptr * spot;
|
||||
index = ( index < 0 ) ? _count : index;
|
||||
|
||||
if( index < _count ) {
|
||||
@@ -142,7 +122,7 @@ SDAI_DAObject__set::Insert( SDAI_DAObject_ptr v, int index ) {
|
||||
void SDAI_DAObject__set::Append( SDAI_DAObject_ptr v ) {
|
||||
|
||||
int index = _count;
|
||||
SDAI_DAObject_ptr* spot;
|
||||
SDAI_DAObject_ptr * spot;
|
||||
|
||||
if( index < _count ) {
|
||||
Check( _count + 1 );
|
||||
@@ -161,7 +141,7 @@ void SDAI_DAObject__set::Remove( int index ) {
|
||||
|
||||
if( 0 <= index && index < _count ) {
|
||||
--_count;
|
||||
SDAI_DAObject_ptr* spot = &_buf[index];
|
||||
SDAI_DAObject_ptr * spot = &_buf[index];
|
||||
memmove( spot, spot + 1, ( _count - index )*sizeof( SDAI_DAObject_ptr ) );
|
||||
}
|
||||
}
|
||||
|
||||
+306
-294
@@ -1,90 +1,94 @@
|
||||
#ifndef SDAIDAOBJECT_H
|
||||
#define SDAIDAOBJECT_H 1
|
||||
|
||||
typedef char* SDAI_DAObjectID;
|
||||
#include <scl_export.h>
|
||||
|
||||
// interface PID (ISO/DIS 10303-23:1996(E) 5.3.10.1)
|
||||
// Also, CORBA POS specification, Section 5.4
|
||||
//
|
||||
// The PID class maintains the persistent object identifier for every
|
||||
// persistent object, objects of class DAObject, and objects of any class
|
||||
// derived directly or indirectly from DAObject.
|
||||
//
|
||||
// POS: The PID identifies one or more locations within a Datastore that
|
||||
// represent the persistent data of an object and generates a string
|
||||
// identifier for that data. An object must have a PID in order to store
|
||||
// its data persistently.
|
||||
//
|
||||
typedef char * SDAI_DAObjectID;
|
||||
|
||||
// interface PID (ISO/DIS 10303-23:1996(E) 5.3.10.1)
|
||||
// Also, CORBA POS specification, Section 5.4
|
||||
//
|
||||
// The PID class maintains the persistent object identifier for every
|
||||
// persistent object, objects of class DAObject, and objects of any class
|
||||
// derived directly or indirectly from DAObject.
|
||||
//
|
||||
// POS: The PID identifies one or more locations within a Datastore that
|
||||
// represent the persistent data of an object and generates a string
|
||||
// identifier for that data. An object must have a PID in order to store
|
||||
// its data persistently.
|
||||
//
|
||||
/*
|
||||
The EXPRESS ENTITY application_instance from the SDAI_data_type_schema from
|
||||
clause 10 in ISO 10303-22, shall be mapped to the C++ class
|
||||
Application_instance. The class Application_instance shall be a subtype of
|
||||
the C++ class DAObject and of the C++ class Entity_instance.
|
||||
The class DAObject is supported by the classes PID, PID_SDAI and the type
|
||||
The EXPRESS ENTITY application_instance from the SDAI_data_type_schema from
|
||||
clause 10 in ISO 10303-22, shall be mapped to the C++ class
|
||||
Application_instance. The class Application_instance shall be a subtype of
|
||||
the C++ class DAObject and of the C++ class Entity_instance.
|
||||
The class DAObject is supported by the classes PID, PID_SDAI and the type
|
||||
SDAI_DAObjectID as follows:
|
||||
*/
|
||||
|
||||
class SDAI_PID : public SDAI_sdaiObject
|
||||
{
|
||||
public:
|
||||
class SCL_DAI_EXPORT SDAI_PID : public SDAI_sdaiObject {
|
||||
public:
|
||||
|
||||
// These are in the IDL generated code for Part 26. I will have to think about
|
||||
// These are in the IDL generated code for Part 26. I will have to think about
|
||||
// why they should be here (for Part 23). DAS
|
||||
// static PID_ptr _duplicate(PID_ptr);
|
||||
// static PID_ptr _narrow(SDAI_sdaiObject_ptr);
|
||||
// static PID_ptr _nil();
|
||||
|
||||
SDAI_String _datastore_type ;
|
||||
SDAI_String _pidstring ;
|
||||
SDAI_String _datastore_type ;
|
||||
SDAI_String _pidstring ;
|
||||
|
||||
// constructor/destructor
|
||||
SDAI_PID();
|
||||
virtual ~SDAI_PID();
|
||||
// constructor/destructor
|
||||
SDAI_PID();
|
||||
virtual ~SDAI_PID();
|
||||
|
||||
/*
|
||||
The Datestore_type attribute shall identify the type of the underlying
|
||||
datastore.
|
||||
*/
|
||||
char* Datastore_type() const { return const_cast<char *>(_datastore_type.c_str()); }
|
||||
void Datastore_type(char *x) { _datastore_type = x; }
|
||||
/*
|
||||
The Datestore_type attribute shall identify the type of the underlying
|
||||
datastore.
|
||||
*/
|
||||
char * Datastore_type() const {
|
||||
return const_cast<char *>( _datastore_type.c_str() );
|
||||
}
|
||||
void Datastore_type( char * x ) {
|
||||
_datastore_type = x;
|
||||
}
|
||||
|
||||
/*
|
||||
This function shall return a string version of the receiver.
|
||||
*/
|
||||
char* get_PIDString();
|
||||
/*
|
||||
This function shall return a string version of the receiver.
|
||||
*/
|
||||
char * get_PIDString();
|
||||
};
|
||||
|
||||
typedef SDAI_PID* SDAI_PID_ptr;
|
||||
typedef SDAI_PID * SDAI_PID_ptr;
|
||||
typedef SDAI_PID_ptr SDAI_PID_var;
|
||||
|
||||
|
||||
// interface PID_DA (ISO/DIS 10303-23:1996(E) 5.3.10.3)
|
||||
// Also, CORBA POS specification, Direct Access Protocol, Section 5.10.1
|
||||
//
|
||||
// The Direct Access Protocol supports direct access to persistent data
|
||||
// through typed attributes organized in data objects that are defined
|
||||
// in a Data Definition Language (DDL). An object using this protocol
|
||||
// whould represent its persistent data as one or more interconnected
|
||||
// data objects, For uniformity, the persistent data of an object is
|
||||
// described as a single data object; however, that data object might be
|
||||
// the root of a graph of data objects interconnected by stored data
|
||||
// object references. If an object uses multiple data objects, the
|
||||
// object traverses the graph by following stored data object references.
|
||||
//
|
||||
// The PID_DA class maintains the persistent object identifier for an
|
||||
// application DAObject.
|
||||
//
|
||||
// POS: The Persistent Identifiers (PIDs) used by the PDS_DA contain
|
||||
// an object identifier that is local to the particular PDS. This value
|
||||
// may be accessed through this extension to the CosPersistencePID
|
||||
// interface.
|
||||
//
|
||||
// interface PID_DA (ISO/DIS 10303-23:1996(E) 5.3.10.3)
|
||||
// Also, CORBA POS specification, Direct Access Protocol, Section 5.10.1
|
||||
//
|
||||
// The Direct Access Protocol supports direct access to persistent data
|
||||
// through typed attributes organized in data objects that are defined
|
||||
// in a Data Definition Language (DDL). An object using this protocol
|
||||
// whould represent its persistent data as one or more interconnected
|
||||
// data objects, For uniformity, the persistent data of an object is
|
||||
// described as a single data object; however, that data object might be
|
||||
// the root of a graph of data objects interconnected by stored data
|
||||
// object references. If an object uses multiple data objects, the
|
||||
// object traverses the graph by following stored data object references.
|
||||
//
|
||||
// The PID_DA class maintains the persistent object identifier for an
|
||||
// application DAObject.
|
||||
//
|
||||
// POS: The Persistent Identifiers (PIDs) used by the PDS_DA contain
|
||||
// an object identifier that is local to the particular PDS. This value
|
||||
// may be accessed through this extension to the CosPersistencePID
|
||||
// interface.
|
||||
//
|
||||
|
||||
class SDAI_PID_DA: public SDAI_PID
|
||||
{
|
||||
public:
|
||||
class SCL_DAI_EXPORT SDAI_PID_DA: public SDAI_PID {
|
||||
public:
|
||||
|
||||
SDAI_String _oid ;
|
||||
SDAI_String _oid ;
|
||||
// oid (ISO/DIS 10303-23:1996(E) 5.3.10.3)
|
||||
//
|
||||
// This attribute shall set and return the string representation of the
|
||||
@@ -93,70 +97,75 @@ class SDAI_PID_DA: public SDAI_PID
|
||||
//
|
||||
// POS: This returns the data object identifier used by this PDS for
|
||||
// the data object specified by the PID. The SDAI_DAObjectID type is
|
||||
// defined as an unbounded sequence of bytes that may be
|
||||
// defined as an unbounded sequence of bytes that may be
|
||||
// vendor-dependent.
|
||||
//
|
||||
|
||||
// constructor/destructor
|
||||
SDAI_PID_DA();
|
||||
virtual ~SDAI_PID_DA();
|
||||
// constructor/destructor
|
||||
SDAI_PID_DA();
|
||||
virtual ~SDAI_PID_DA();
|
||||
|
||||
virtual void oid (const SDAI_DAObjectID x) { _oid = x; }
|
||||
virtual SDAI_DAObjectID oid () const
|
||||
{ return const_cast<char *>(_oid.c_str()); }
|
||||
virtual void oid( const SDAI_DAObjectID x ) {
|
||||
_oid = x;
|
||||
}
|
||||
virtual SDAI_DAObjectID oid() const {
|
||||
return const_cast<char *>( _oid.c_str() );
|
||||
}
|
||||
};
|
||||
|
||||
typedef SDAI_PID_DA* SDAI_PID_DA_ptr;
|
||||
typedef SDAI_PID_DA * SDAI_PID_DA_ptr;
|
||||
typedef SDAI_PID_DA_ptr SDAI_PID_DA_var;
|
||||
|
||||
// interface PID_SDAI (ISO/DIS 10303-23:1996(E) 5.3.10.2)
|
||||
//
|
||||
// The PID_SDAI class maintains the persistent object identifier for
|
||||
// a Model_contents object.
|
||||
//
|
||||
class SDAI_PID_SDAI : public SDAI_PID
|
||||
{
|
||||
public:
|
||||
SDAI_String _modelid ;
|
||||
// interface PID_SDAI (ISO/DIS 10303-23:1996(E) 5.3.10.2)
|
||||
//
|
||||
// The PID_SDAI class maintains the persistent object identifier for
|
||||
// a Model_contents object.
|
||||
//
|
||||
class SCL_DAI_EXPORT SDAI_PID_SDAI : public SDAI_PID {
|
||||
public:
|
||||
SDAI_String _modelid ;
|
||||
|
||||
// constructor/destructor
|
||||
SDAI_PID_SDAI();
|
||||
virtual ~SDAI_PID_SDAI();
|
||||
// constructor/destructor
|
||||
SDAI_PID_SDAI();
|
||||
virtual ~SDAI_PID_SDAI();
|
||||
|
||||
// Modelid (ISO/DIS 10303-23:1996(E) 5.3.10.3)
|
||||
//
|
||||
// This attribute shall set and return the string representation of
|
||||
// the persistent identifier of the cluster of data for the
|
||||
// the persistent identifier of the cluster of data for the
|
||||
// Model_contents referred to by this PID.
|
||||
//
|
||||
virtual void Modelid (const char * x) { _modelid = x; }
|
||||
virtual char * Modelid () const { return const_cast<char *>(_modelid.c_str()); }
|
||||
virtual void Modelid( const char * x ) {
|
||||
_modelid = x;
|
||||
}
|
||||
virtual char * Modelid() const {
|
||||
return const_cast<char *>( _modelid.c_str() );
|
||||
}
|
||||
};
|
||||
|
||||
typedef SDAI_PID_SDAI* SDAI_PID_SDAI_ptr;
|
||||
typedef SDAI_PID_SDAI * SDAI_PID_SDAI_ptr;
|
||||
typedef SDAI_PID_SDAI_ptr SDAI_PID_SDAI_var;
|
||||
|
||||
// interface DAObject (ISO/DIS 10303-23:1996(E) 5.3.10.5)
|
||||
// Also, CORBA POS Section 5.10.2, Direct Access Protocol.
|
||||
//
|
||||
// From POS: The DAObject interface provides operations that many data
|
||||
// object clients need. A Datastore implementation may provide support
|
||||
// for these operations automatically for its data objects. A data object
|
||||
// is not required to support this interface. A client can obtain access
|
||||
// to these operations by narrowing a data object reference to the
|
||||
// DAObject interface.
|
||||
//
|
||||
// interface DAObject (ISO/DIS 10303-23:1996(E) 5.3.10.5)
|
||||
// Also, CORBA POS Section 5.10.2, Direct Access Protocol.
|
||||
//
|
||||
// From POS: The DAObject interface provides operations that many data
|
||||
// object clients need. A Datastore implementation may provide support
|
||||
// for these operations automatically for its data objects. A data object
|
||||
// is not required to support this interface. A client can obtain access
|
||||
// to these operations by narrowing a data object reference to the
|
||||
// DAObject interface.
|
||||
//
|
||||
|
||||
// predefine these _ptr since they are used inside this class
|
||||
class SDAI_DAObject;
|
||||
typedef SDAI_DAObject* SDAI_DAObject_ptr;
|
||||
// predefine these _ptr since they are used inside this class
|
||||
class SDAI_DAObject;
|
||||
typedef SDAI_DAObject * SDAI_DAObject_ptr;
|
||||
typedef SDAI_DAObject_ptr SDAI_DAObject_var;
|
||||
|
||||
class SDAI_DAObject : public SDAI_sdaiObject
|
||||
{
|
||||
public:
|
||||
class SCL_DAI_EXPORT SDAI_DAObject : public SDAI_sdaiObject {
|
||||
public:
|
||||
|
||||
SDAI_String _dado_oid;
|
||||
SDAI_String _dado_oid;
|
||||
|
||||
// dado_same (ISO/DIS 10303-23:1996(E) 5.3.10.5)
|
||||
//
|
||||
@@ -168,13 +177,13 @@ class SDAI_DAObject : public SDAI_sdaiObject
|
||||
// identity.
|
||||
//
|
||||
|
||||
// constructor/destructor
|
||||
SDAI_DAObject();
|
||||
virtual ~SDAI_DAObject();
|
||||
// constructor/destructor
|
||||
SDAI_DAObject();
|
||||
virtual ~SDAI_DAObject();
|
||||
|
||||
Logical dado_same(SDAI_DAObject_ptr obj) {
|
||||
return LUnknown;
|
||||
}
|
||||
Logical dado_same( SDAI_DAObject_ptr obj ) {
|
||||
return LUnknown;
|
||||
}
|
||||
|
||||
// Get persistent label (ISO/DIS 10303-22:1996(E) 10.11.6)
|
||||
//
|
||||
@@ -191,33 +200,36 @@ class SDAI_DAObject : public SDAI_sdaiObject
|
||||
// sdaiTR_NAVL The transaction is currently not available
|
||||
// sdaiTR_EAB The transaction ended abnormally
|
||||
// sdaiRP_NOPN The repository is not open
|
||||
// sdaiEI_NEXS The entity instance does not exist
|
||||
// sdaiEI_NEXS The entity instance does not exist
|
||||
// sdaiFN_NAVL This function is not supported by the implementation
|
||||
// sdaiSY_ERR An underlying system error occurred
|
||||
//
|
||||
// POS specification description: This returns the object identifier
|
||||
// for the data object. The scope of data object identifiers is
|
||||
// implementation-specific, but is not guaranteed to be global.
|
||||
//
|
||||
//
|
||||
/* jg == The return value of this function in Part 23 is PID_DA which
|
||||
seems wrong. We follow the CORBAservices specification here.
|
||||
(Persistent Object Service Specification, Section 5.10). Also
|
||||
note that the return value as described in the text above
|
||||
should be a string type.
|
||||
*/
|
||||
SDAI_DAObjectID dado_oid()
|
||||
{ return const_cast<char *>(_dado_oid.c_str()); }
|
||||
SDAI_DAObjectID dado_oid() {
|
||||
return const_cast<char *>( _dado_oid.c_str() );
|
||||
}
|
||||
|
||||
// dado_pid
|
||||
//
|
||||
// POS specification description: This returns a PID_DA for the
|
||||
// POS specification description: This returns a PID_DA for the
|
||||
// data object.
|
||||
//
|
||||
/* jg == This function is not included in Part 23 and 26. However, it is
|
||||
/* jg == This function is not included in Part 23 and 26. However, it is
|
||||
part of interface DAObject in the specification of the
|
||||
Persistent Object Service.
|
||||
Persistent Object Service.
|
||||
*/
|
||||
SDAI_PID_DA_ptr dado_pid() { return 0; }
|
||||
SDAI_PID_DA_ptr dado_pid() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// dado_remove (ISO/DIS 10303-23:1996(E) 5.3.10.5)
|
||||
//
|
||||
@@ -228,281 +240,281 @@ class SDAI_DAObject : public SDAI_sdaiObject
|
||||
// POS specification description: This deletes the object from the
|
||||
// persistent store and deletes the in-memory data object.
|
||||
//
|
||||
void dado_remove() { }
|
||||
void dado_remove() { }
|
||||
|
||||
// dado_free (ISO/DIS 10303-23:1996(E) 5.3.10.5)
|
||||
//
|
||||
//
|
||||
// This function shall inform the implementation that it is free
|
||||
// to move the object back to the persistent store.
|
||||
//
|
||||
// POS specification description: This informs the PDS (Persistent
|
||||
//
|
||||
// POS specification description: This informs the PDS (Persistent
|
||||
// Data Service) that the data object is not required for the time
|
||||
// being, and the PDS may move it back to persistent store. The data
|
||||
// object must be preserved and must be brought back the next time it is
|
||||
// object must be preserved and must be brought back the next time it is
|
||||
// referenced. This operation is only a hint and is provided to improve
|
||||
// performance and resource usage.
|
||||
// performance and resource usage.
|
||||
//
|
||||
void dado_free() { }
|
||||
void dado_free() { }
|
||||
};
|
||||
|
||||
/*
|
||||
5.3.10.1 DAObject_SDAI
|
||||
*/
|
||||
|
||||
class SDAI_DAObject_SDAI : public SDAI_DAObject {
|
||||
class SCL_DAI_EXPORT SDAI_DAObject_SDAI : public SDAI_DAObject {
|
||||
|
||||
public:
|
||||
SDAI_DAObject_SDAI();
|
||||
public:
|
||||
SDAI_DAObject_SDAI();
|
||||
|
||||
virtual ~SDAI_DAObject_SDAI();
|
||||
virtual ~SDAI_DAObject_SDAI();
|
||||
|
||||
/*
|
||||
5.3.10.1.1 Find entity instance SDAI-model
|
||||
*/
|
||||
/*
|
||||
5.3.10.1.1 Find entity instance SDAI-model
|
||||
*/
|
||||
|
||||
// Model_ptr Owning_model() const;
|
||||
|
||||
/*
|
||||
The Owning_model function shall implement the SDAI operation, Find
|
||||
entity instance SDAI-model.
|
||||
/*
|
||||
The Owning_model function shall implement the SDAI operation, Find
|
||||
entity instance SDAI-model.
|
||||
|
||||
The following specifies the coorespondence between each SDAI
|
||||
input/output and its equivalent specified in this Part.
|
||||
The following specifies the coorespondence between each SDAI
|
||||
input/output and its equivalent specified in this Part.
|
||||
|
||||
SDAI C++
|
||||
------ -------
|
||||
Object receiver
|
||||
Model return value
|
||||
SDAI C++
|
||||
------ -------
|
||||
Object receiver
|
||||
Model return value
|
||||
|
||||
5.3.10.1.2 Find entity instance users
|
||||
*/
|
||||
5.3.10.1.2 Find entity instance users
|
||||
*/
|
||||
|
||||
// Object__list_var FindObjectUsers(const
|
||||
// Schema_instance__list_var& aggr) const;
|
||||
// Schema_instance__list_var& aggr) const;
|
||||
|
||||
/*
|
||||
The FindObjectUsers function shall implement the SDAI operation,
|
||||
Find entity instance users.
|
||||
/*
|
||||
The FindObjectUsers function shall implement the SDAI operation,
|
||||
Find entity instance users.
|
||||
|
||||
The following specifies the coorespondence between each SDAI
|
||||
input/output and its equivalent specified in this Part.
|
||||
The following specifies the coorespondence between each SDAI
|
||||
input/output and its equivalent specified in this Part.
|
||||
|
||||
SDAI C++
|
||||
-------- --------
|
||||
Instance receiver
|
||||
Domain aggr
|
||||
Result return value
|
||||
SDAI C++
|
||||
-------- --------
|
||||
Instance receiver
|
||||
Domain aggr
|
||||
Result return value
|
||||
|
||||
5.3.10.1.3 Is same
|
||||
*/
|
||||
5.3.10.1.3 Is same
|
||||
*/
|
||||
|
||||
Logical IsSame(const SDAI_sdaiObject_ptr& otherEntity) const;
|
||||
Logical IsSame( const SDAI_sdaiObject_ptr & otherEntity ) const;
|
||||
|
||||
/*
|
||||
Function:
|
||||
The IsSame function shall determine whether the parameter otherEntity
|
||||
refers to the same instance as the receiver. This function shall
|
||||
implement the behaviour of the EXPRESS operator (:=:).
|
||||
/*
|
||||
Function:
|
||||
The IsSame function shall determine whether the parameter otherEntity
|
||||
refers to the same instance as the receiver. This function shall
|
||||
implement the behaviour of the EXPRESS operator (:=:).
|
||||
|
||||
Output:
|
||||
This function shall return TRUE if the two instances are identical.
|
||||
This function shall return FALSE if the two instances are not identical.
|
||||
This function shall return UNKNOWN if either instance is unset.
|
||||
Output:
|
||||
This function shall return TRUE if the two instances are identical.
|
||||
This function shall return FALSE if the two instances are not identical.
|
||||
This function shall return UNKNOWN if either instance is unset.
|
||||
|
||||
Possible error indicators:
|
||||
sdaiMX_NDEF // SDAI-model access not defined
|
||||
sdaiEI_NEXS // Entity instance does not exist
|
||||
sdaiTY_NDEF // Type not defined
|
||||
sdaiSY_ERR // Underlying system error
|
||||
Possible error indicators:
|
||||
sdaiMX_NDEF // SDAI-model access not defined
|
||||
sdaiEI_NEXS // Entity instance does not exist
|
||||
sdaiTY_NDEF // Type not defined
|
||||
sdaiSY_ERR // Underlying system error
|
||||
|
||||
Origin: Convenience function
|
||||
Origin: Convenience function
|
||||
|
||||
5.3.10.1.4 Get attribute
|
||||
*/
|
||||
5.3.10.1.4 Get attribute
|
||||
*/
|
||||
|
||||
#ifdef SDAI_CPP_LATE_BINDING
|
||||
Any_var GetAttr(const Attribute_ptr& attDef);
|
||||
Any_var GetAttr(const char* attName);
|
||||
Any_var GetAttr( const Attribute_ptr & attDef );
|
||||
Any_var GetAttr( const char * attName );
|
||||
#endif
|
||||
|
||||
/*
|
||||
The GetAttr functions shall implement the SDAI operation, Get attribute.
|
||||
/*
|
||||
The GetAttr functions shall implement the SDAI operation, Get attribute.
|
||||
|
||||
The following specifies the coorespondence between each SDAI
|
||||
input/output and its equivalent specified in this Part.
|
||||
The following specifies the coorespondence between each SDAI
|
||||
input/output and its equivalent specified in this Part.
|
||||
|
||||
SDAI C++
|
||||
------ ---------
|
||||
Object receiver
|
||||
Attribute attDef, attName
|
||||
Value return value
|
||||
SDAI C++
|
||||
------ ---------
|
||||
Object receiver
|
||||
Attribute attDef, attName
|
||||
Value return value
|
||||
|
||||
5.3.10.1.5 Get instance type
|
||||
*/
|
||||
5.3.10.1.5 Get instance type
|
||||
*/
|
||||
|
||||
#ifdef SDAI_CPP_LATE_BINDING
|
||||
const Entity_ptr GetInstanceType() const;
|
||||
const Entity_ptr GetInstanceType() const;
|
||||
#endif
|
||||
|
||||
/*
|
||||
Function:
|
||||
/*
|
||||
Function:
|
||||
|
||||
The GetInstanceType functions shall implement the SDAI operation,
|
||||
Get instance type.
|
||||
The GetInstanceType functions shall implement the SDAI operation,
|
||||
Get instance type.
|
||||
|
||||
The following specifies the coorespondence between each SDAI
|
||||
input/output and its equivalent specified in this Part.
|
||||
The following specifies the coorespondence between each SDAI
|
||||
input/output and its equivalent specified in this Part.
|
||||
|
||||
SDAI C++
|
||||
------ --------
|
||||
Object receiver
|
||||
Type return value
|
||||
SDAI C++
|
||||
------ --------
|
||||
Object receiver
|
||||
Type return value
|
||||
|
||||
5.3.10.1.6 Is instance of
|
||||
*/
|
||||
5.3.10.1.6 Is instance of
|
||||
*/
|
||||
|
||||
Boolean IsInstanceOf(const char* typeName) const;
|
||||
::Boolean IsInstanceOf( const char * typeName ) const;
|
||||
#ifdef SDAI_CPP_LATE_BINDING
|
||||
Boolean IsInstanceOf(const Entity_ptr& otherEntity) const;
|
||||
::Boolean IsInstanceOf( const Entity_ptr & otherEntity ) const;
|
||||
#endif
|
||||
|
||||
/*
|
||||
Function:
|
||||
The IsInstanceOf functions shall implement the SDAI operation Is
|
||||
instance of.
|
||||
/*
|
||||
Function:
|
||||
The IsInstanceOf functions shall implement the SDAI operation Is
|
||||
instance of.
|
||||
|
||||
The following specifies the coorespondence between each SDAI
|
||||
input/output and its equivalent specified in this Part.
|
||||
The following specifies the coorespondence between each SDAI
|
||||
input/output and its equivalent specified in this Part.
|
||||
|
||||
SDAI C++
|
||||
------ --------
|
||||
Object receiver
|
||||
Type typeName, otherEntity
|
||||
Result return value
|
||||
SDAI C++
|
||||
------ --------
|
||||
Object receiver
|
||||
Type typeName, otherEntity
|
||||
Result return value
|
||||
|
||||
5.3.10.1.7 Is kind of
|
||||
*/
|
||||
5.3.10.1.7 Is kind of
|
||||
*/
|
||||
|
||||
Boolean IsKindOf(const char* typeName) const;
|
||||
::Boolean IsKindOf( const char * typeName ) const;
|
||||
#ifdef SDAI_CPP_LATE_BINDING
|
||||
Boolean IsKindOf(const Entity_ptr& theType) const;
|
||||
::Boolean IsKindOf( const Entity_ptr & theType ) const;
|
||||
#endif
|
||||
|
||||
/*
|
||||
The IsKindOf functions shall implement the SDAI operation, Is kind of.
|
||||
/*
|
||||
The IsKindOf functions shall implement the SDAI operation, Is kind of.
|
||||
|
||||
The following specifies the coorespondence between each SDAI
|
||||
input/output and its equivalent specified in this Part.
|
||||
The following specifies the coorespondence between each SDAI
|
||||
input/output and its equivalent specified in this Part.
|
||||
|
||||
SDAI C++
|
||||
------ --------
|
||||
Object receiver
|
||||
Type typeName, theType
|
||||
Result return value
|
||||
SDAI C++
|
||||
------ --------
|
||||
Object receiver
|
||||
Type typeName, theType
|
||||
Result return value
|
||||
|
||||
5.3.10.1.8 Is SDAI kind of
|
||||
*/
|
||||
5.3.10.1.8 Is SDAI kind of
|
||||
*/
|
||||
|
||||
Boolean IsSDAIKindOf(const char* typeName) const;
|
||||
::Boolean IsSDAIKindOf( const char * typeName ) const;
|
||||
|
||||
#ifdef SDAI_CPP_LATE_BINDING
|
||||
Boolean IsSDAIKindOf(const Entity_ptr& theType) const;
|
||||
::Boolean IsSDAIKindOf( const Entity_ptr & theType ) const;
|
||||
#endif
|
||||
|
||||
/*
|
||||
The IsSDAIKindOf functions shall implement the SDAI operation,
|
||||
Is SDAI Kind Of.
|
||||
/*
|
||||
The IsSDAIKindOf functions shall implement the SDAI operation,
|
||||
Is SDAI Kind Of.
|
||||
|
||||
The following specifies the coorespondence between each SDAI
|
||||
input/output and its equivalent specified in this Part.
|
||||
The following specifies the coorespondence between each SDAI
|
||||
input/output and its equivalent specified in this Part.
|
||||
|
||||
SDAI C++
|
||||
------ --------
|
||||
Object receiver
|
||||
Type typeName, theType
|
||||
Result return value
|
||||
SDAI C++
|
||||
------ --------
|
||||
Object receiver
|
||||
Type typeName, theType
|
||||
Result return value
|
||||
|
||||
5.3.10.1.9 Test attribute
|
||||
*/
|
||||
5.3.10.1.9 Test attribute
|
||||
*/
|
||||
|
||||
#ifdef SDAI_CPP_LATE_BINDING
|
||||
Boolean TestAttr(const Attribute_ptr& attDef);
|
||||
Boolean TestAttr(const char* attName) const;
|
||||
Boolean TestAttr( const Attribute_ptr & attDef );
|
||||
Boolean TestAttr( const char * attName ) const;
|
||||
#endif
|
||||
|
||||
/*
|
||||
The TestAttr functions shall implement the SDAI operation,
|
||||
Test attribute.
|
||||
/*
|
||||
The TestAttr functions shall implement the SDAI operation,
|
||||
Test attribute.
|
||||
|
||||
The following specifies the coorespondence between each SDAI
|
||||
input/output and its equivalent specified in this Part.
|
||||
The following specifies the coorespondence between each SDAI
|
||||
input/output and its equivalent specified in this Part.
|
||||
|
||||
SDAI C++
|
||||
------ ---------
|
||||
Object receiver
|
||||
Attribute attDef, attName
|
||||
Result return value
|
||||
|
||||
5.3.10.1.10 Get instance type name
|
||||
*/
|
||||
SDAI C++
|
||||
------ ---------
|
||||
Object receiver
|
||||
Attribute attDef, attName
|
||||
Result return value
|
||||
|
||||
5.3.10.1.10 Get instance type name
|
||||
*/
|
||||
|
||||
#ifndef SDAI_CPP_LATE_BINDING
|
||||
char * GetInstanceTypeName() const;
|
||||
char * GetInstanceTypeName() const;
|
||||
#endif
|
||||
/*
|
||||
Function:
|
||||
The GetInstanceType function shall retrieve the name of the type of
|
||||
the receiver.
|
||||
/*
|
||||
Function:
|
||||
The GetInstanceType function shall retrieve the name of the type of
|
||||
the receiver.
|
||||
|
||||
Output:
|
||||
This function shall return a String which contains the name of the
|
||||
type of the receiver. The returned name shall be the name as it
|
||||
appears in the Dictionary Model.
|
||||
Output:
|
||||
This function shall return a String which contains the name of the
|
||||
type of the receiver. The returned name shall be the name as it
|
||||
appears in the Dictionary Model.
|
||||
|
||||
Possible error indicators:
|
||||
sdaiMX_NDEF // SDAI-model access not defined
|
||||
sdaiEI_NEXS // Entity instance does not exist
|
||||
sdaiSY_ERR // Underlying system error
|
||||
Possible error indicators:
|
||||
sdaiMX_NDEF // SDAI-model access not defined
|
||||
sdaiEI_NEXS // Entity instance does not exist
|
||||
sdaiSY_ERR // Underlying system error
|
||||
|
||||
Origin: Convenience function
|
||||
*/
|
||||
Origin: Convenience function
|
||||
*/
|
||||
|
||||
};
|
||||
|
||||
typedef SDAI_DAObject_SDAI* SDAI_DAObject_SDAI_ptr;
|
||||
typedef SDAI_DAObject_SDAI * SDAI_DAObject_SDAI_ptr;
|
||||
typedef SDAI_DAObject_SDAI_ptr SDAI_DAObject_SDAI_var;
|
||||
|
||||
class SDAI_DAObject__set {
|
||||
public:
|
||||
SDAI_DAObject__set(int = 16);
|
||||
~SDAI_DAObject__set();
|
||||
class SCL_DAI_EXPORT SDAI_DAObject__set {
|
||||
public:
|
||||
SDAI_DAObject__set( int = 16 );
|
||||
~SDAI_DAObject__set();
|
||||
|
||||
SDAI_DAObject_ptr retrieve(int index);
|
||||
int is_empty();
|
||||
SDAI_DAObject_ptr retrieve( int index );
|
||||
int is_empty();
|
||||
|
||||
SDAI_DAObject_ptr& operator[](int index);
|
||||
SDAI_DAObject_ptr & operator[]( int index );
|
||||
|
||||
void Insert(SDAI_DAObject_ptr, int index);
|
||||
void Append(SDAI_DAObject_ptr);
|
||||
void Remove(int index);
|
||||
void Insert( SDAI_DAObject_ptr, int index );
|
||||
void Append( SDAI_DAObject_ptr );
|
||||
void Remove( int index );
|
||||
|
||||
int Index(SDAI_DAObject_ptr);
|
||||
int Index( SDAI_DAObject_ptr );
|
||||
|
||||
void Clear();
|
||||
int Count();
|
||||
void Clear();
|
||||
int Count();
|
||||
|
||||
private:
|
||||
void Check(int index);
|
||||
private:
|
||||
SDAI_DAObject_ptr* _buf;
|
||||
int _bufsize;
|
||||
int _count;
|
||||
private:
|
||||
void Check( int index );
|
||||
private:
|
||||
SDAI_DAObject_ptr * _buf;
|
||||
int _bufsize;
|
||||
int _count;
|
||||
|
||||
public:
|
||||
public:
|
||||
|
||||
};
|
||||
|
||||
typedef SDAI_DAObject__set* SDAI_DAObject__set_ptr;
|
||||
typedef SDAI_DAObject__set * SDAI_DAObject__set_ptr;
|
||||
typedef SDAI_DAObject__set_ptr SDAI_DAObject__set_var;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -45,13 +45,13 @@ SDAI_Entity_extent::definition_( const Entity_ptr & ep ) {
|
||||
}
|
||||
|
||||
void
|
||||
SDAI_Entity_extent::definition_name_( const SDAI_Entity_name& en ) {
|
||||
SDAI_Entity_extent::definition_name_( const SDAI_Entity_name & en ) {
|
||||
_definition_name = new char[strlen( en ) + 1];
|
||||
strncpy( _definition_name, en, strlen( en ) + 1 );
|
||||
}
|
||||
|
||||
void
|
||||
SDAI_Entity_extent::owned_by_( SDAI_Model_contents__list_var& mclv ) {
|
||||
SDAI_Entity_extent::owned_by_( SDAI_Model_contents__list_var & mclv ) {
|
||||
// _owned_by = mcp;
|
||||
}
|
||||
|
||||
@@ -92,7 +92,7 @@ SDAI_DAObject__set_var instances_() const
|
||||
*/
|
||||
|
||||
void
|
||||
SDAI_Entity_extent::AddInstance( const SDAI_DAObject_ptr& appInst ) {
|
||||
SDAI_Entity_extent::AddInstance( const SDAI_DAObject_ptr & appInst ) {
|
||||
_instances.Append( appInst );
|
||||
}
|
||||
|
||||
@@ -114,7 +114,7 @@ SDAI_Entity_extent::AddInstance( const SDAI_DAObject_ptr& appInst ) {
|
||||
|
||||
|
||||
void
|
||||
SDAI_Entity_extent::RemoveInstance( const SDAI_DAObject_ptr& appInst ) {
|
||||
SDAI_Entity_extent::RemoveInstance( const SDAI_DAObject_ptr & appInst ) {
|
||||
_instances.Remove( _instances.Index( appInst ) );
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#ifndef ENTITYEXTENT_H
|
||||
#define ENTITYEXTENT_H 1
|
||||
|
||||
#include <scl_export.h>
|
||||
|
||||
/*
|
||||
//#include <sdaiDefs.h>
|
||||
//#include <ApplInstanceSet.h>
|
||||
@@ -8,7 +10,7 @@
|
||||
//#include <ModelContents.h>
|
||||
*/
|
||||
|
||||
/*
|
||||
/*
|
||||
7.3.3 Entity extent
|
||||
*/
|
||||
|
||||
@@ -16,102 +18,106 @@ class SDAI_Entity_extent;
|
||||
typedef SDAI_Entity_extent * SDAI_Entity_extent_ptr;
|
||||
typedef SDAI_Entity_extent_ptr SDAI_Entity_extent_var;
|
||||
|
||||
class SDAI_Entity_extent : public SDAI_Session_instance {
|
||||
class SCL_DAI_EXPORT SDAI_Entity_extent : public SDAI_Session_instance {
|
||||
|
||||
friend class SDAI_Model_contents;
|
||||
/*
|
||||
NOTE - The ModelContent class is a friend so that ModelContent may add
|
||||
instances to Entity_extent instances.
|
||||
*/
|
||||
friend class SDAI_Model_contents;
|
||||
/*
|
||||
NOTE - The ModelContent class is a friend so that ModelContent may add
|
||||
instances to Entity_extent instances.
|
||||
*/
|
||||
|
||||
public: //for now
|
||||
public: //for now
|
||||
// protected:
|
||||
Entity_ptr _definition ;
|
||||
SDAI_Entity_name _definition_name ;
|
||||
SDAI_DAObject__set _instances ; // of Application_instance
|
||||
// Entity_instance__set _instances ; // of entity_instance
|
||||
// EntityAggregate _instances ; // of entity_instance
|
||||
Entity_ptr _definition ;
|
||||
SDAI_Entity_name _definition_name ;
|
||||
SDAI_DAObject__set _instances ; // of Application_instance
|
||||
// Entity_instance__set _instances ; // of entity_instance
|
||||
// EntityAggregate _instances ; // of entity_instance
|
||||
// Express in part 22 - INVERSE owned_by : sdai_model_contents FOR folders;
|
||||
SDAI_Model_contents__list _owned_by ; // ADDED in Part 22
|
||||
SDAI_Model_contents__list _owned_by ; // ADDED in Part 22
|
||||
|
||||
// private:
|
||||
SDAI_Entity_extent();
|
||||
// SDAI_Entity_extent(const SDAI_Entity_extent& ee);
|
||||
~SDAI_Entity_extent(); // not in part 23
|
||||
SDAI_Entity_extent();
|
||||
// SDAI_Entity_extent(const SDAI_Entity_extent& ee);
|
||||
~SDAI_Entity_extent(); // not in part 23
|
||||
|
||||
public:
|
||||
public:
|
||||
|
||||
SDAI_Entity_name definition_name_() const
|
||||
{ return _definition_name; }
|
||||
SDAI_Entity_name definition_name_() const {
|
||||
return _definition_name;
|
||||
}
|
||||
|
||||
const Entity_ptr definition_() const;
|
||||
const Entity_ptr definition_() const;
|
||||
#ifdef SDAI_CPP_LATE_BINDING
|
||||
// const Entity_ptr definition_() const;
|
||||
#endif
|
||||
|
||||
SDAI_DAObject__set_var instances_() { return &_instances; }
|
||||
SDAI_DAObject__set_var instances_() const
|
||||
{ return (const SDAI_DAObject__set_var)&_instances; }
|
||||
SDAI_DAObject__set_var instances_() {
|
||||
return &_instances;
|
||||
}
|
||||
SDAI_DAObject__set_var instances_() const {
|
||||
return ( const SDAI_DAObject__set_var )&_instances;
|
||||
}
|
||||
|
||||
// need to implement Model_contents__list
|
||||
const SDAI_Model_contents__list_var owned_by_() const;
|
||||
const SDAI_Model_contents__list_var owned_by_() const;
|
||||
|
||||
// static SDAI_Entity_extent_ptr
|
||||
// _duplicate(SDAI_Entity_extent_ptr eep);
|
||||
// static SDAI_Entity_extent_ptr
|
||||
// _duplicate(SDAI_Entity_extent_ptr eep);
|
||||
// static SDAI_Entity_extent_ptr _narrow(Object_ptr op);
|
||||
// static SDAI_Entity_extent_ptr _nil();
|
||||
|
||||
// private:
|
||||
void definition_(const Entity_ptr& ep);
|
||||
void definition_( const Entity_ptr & ep );
|
||||
#ifdef SDAI_CPP_LATE_BINDING
|
||||
// void definition_(const Entity_ptr& ep);
|
||||
#endif
|
||||
void definition_name_(const SDAI_Entity_name& ep);
|
||||
void owned_by_(SDAI_Model_contents__list_var& mcp);
|
||||
void definition_name_( const SDAI_Entity_name & ep );
|
||||
void owned_by_( SDAI_Model_contents__list_var & mcp );
|
||||
|
||||
/*
|
||||
7.3.3.1 SDAI operation declarations
|
||||
/*
|
||||
7.3.3.1 SDAI operation declarations
|
||||
|
||||
7.3.3.1.1 AddInstance
|
||||
*/
|
||||
7.3.3.1.1 AddInstance
|
||||
*/
|
||||
|
||||
// this is no longer in Part 23
|
||||
void AddInstance(const SDAI_DAObject_ptr& appInst);
|
||||
// this is no longer in Part 23
|
||||
void AddInstance( const SDAI_DAObject_ptr & appInst );
|
||||
|
||||
/*
|
||||
Function:
|
||||
/*
|
||||
Function:
|
||||
|
||||
The AddInstance function shall add the entity instance entity
|
||||
handle to the instances set of the receiver.
|
||||
The AddInstance function shall add the entity instance entity
|
||||
handle to the instances set of the receiver.
|
||||
|
||||
Possible error indicators:
|
||||
sdaiSS_NOPN // Session not open
|
||||
sdaiRP_NOPN // Repository not open
|
||||
sdaiMO_NEXS // SDAI-model does not exist
|
||||
sdaiMX_NRW // SDAI-model access not read-write
|
||||
sdaiSY_ERR // Underlying system error
|
||||
Possible error indicators:
|
||||
sdaiSS_NOPN // Session not open
|
||||
sdaiRP_NOPN // Repository not open
|
||||
sdaiMO_NEXS // SDAI-model does not exist
|
||||
sdaiMX_NRW // SDAI-model access not read-write
|
||||
sdaiSY_ERR // Underlying system error
|
||||
|
||||
Origin: Convenience function
|
||||
*/
|
||||
Origin: Convenience function
|
||||
*/
|
||||
|
||||
// this is no longer in Part 23
|
||||
void RemoveInstance(const SDAI_DAObject_ptr& appInst);
|
||||
// this is no longer in Part 23
|
||||
void RemoveInstance( const SDAI_DAObject_ptr & appInst );
|
||||
|
||||
/*
|
||||
7.3.3.1.2 RemoveInstance
|
||||
Function:
|
||||
The RemoveInstance function shall remove the entity instance entity
|
||||
handle from the instances set of the receiver.
|
||||
/*
|
||||
7.3.3.1.2 RemoveInstance
|
||||
Function:
|
||||
The RemoveInstance function shall remove the entity instance entity
|
||||
handle from the instances set of the receiver.
|
||||
|
||||
Possible error indicators:
|
||||
sdaiSS_NOPN // Session not open
|
||||
sdaiRP_NOPN // Repository not open
|
||||
sdaiMO_NEXS // SDAI-model does not exist
|
||||
sdaiMX_NRW // SDAI-model access not read-write
|
||||
sdaiSY_ERR // Underlying system error
|
||||
Possible error indicators:
|
||||
sdaiSS_NOPN // Session not open
|
||||
sdaiRP_NOPN // Repository not open
|
||||
sdaiMO_NEXS // SDAI-model does not exist
|
||||
sdaiMX_NRW // SDAI-model access not read-write
|
||||
sdaiSY_ERR // Underlying system error
|
||||
|
||||
Origin: Convenience function
|
||||
*/
|
||||
Origin: Convenience function
|
||||
*/
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ SDAI_Entity_extent__set::~SDAI_Entity_extent__set() {
|
||||
|
||||
void SDAI_Entity_extent__set::Check( int index ) {
|
||||
|
||||
SDAI_Entity_extent_ptr* newbuf;
|
||||
SDAI_Entity_extent_ptr * newbuf;
|
||||
|
||||
if( index >= _bufsize ) {
|
||||
_bufsize = ( index + 1 ) * 2;
|
||||
@@ -69,7 +69,7 @@ void SDAI_Entity_extent__set::Check( int index ) {
|
||||
void
|
||||
SDAI_Entity_extent__set::Insert( SDAI_Entity_extent_ptr v, int index ) {
|
||||
|
||||
SDAI_Entity_extent_ptr* spot;
|
||||
SDAI_Entity_extent_ptr * spot;
|
||||
index = ( index < 0 ) ? _count : index;
|
||||
|
||||
if( index < _count ) {
|
||||
@@ -88,7 +88,7 @@ SDAI_Entity_extent__set::Insert( SDAI_Entity_extent_ptr v, int index ) {
|
||||
void SDAI_Entity_extent__set::Append( SDAI_Entity_extent_ptr v ) {
|
||||
|
||||
int index = _count;
|
||||
SDAI_Entity_extent_ptr* spot;
|
||||
SDAI_Entity_extent_ptr * spot;
|
||||
|
||||
if( index < _count ) {
|
||||
Check( _count + 1 );
|
||||
@@ -107,7 +107,7 @@ void SDAI_Entity_extent__set::Remove( int index ) {
|
||||
|
||||
if( 0 <= index && index < _count ) {
|
||||
--_count;
|
||||
SDAI_Entity_extent_ptr* spot = &_buf[index];
|
||||
SDAI_Entity_extent_ptr * spot = &_buf[index];
|
||||
memmove( spot, spot + 1, ( _count - index )*sizeof( SDAI_Entity_extent_ptr ) );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,35 +35,35 @@
|
||||
//#include <EntityExtent.h>
|
||||
*/
|
||||
|
||||
class SDAI_Entity_extent__set {
|
||||
public:
|
||||
class SCL_DAI_EXPORT SDAI_Entity_extent__set {
|
||||
public:
|
||||
|
||||
SDAI_Entity_extent__set(int = 16);
|
||||
~SDAI_Entity_extent__set();
|
||||
SDAI_Entity_extent__set( int = 16 );
|
||||
~SDAI_Entity_extent__set();
|
||||
|
||||
SDAI_Entity_extent_ptr retrieve(int index);
|
||||
int is_empty();
|
||||
SDAI_Entity_extent_ptr retrieve( int index );
|
||||
int is_empty();
|
||||
|
||||
SDAI_Entity_extent_ptr& operator[](int index);
|
||||
SDAI_Entity_extent_ptr & operator[]( int index );
|
||||
|
||||
void Insert(SDAI_Entity_extent_ptr, int index);
|
||||
void Append(SDAI_Entity_extent_ptr);
|
||||
void Remove(int index);
|
||||
int Index(SDAI_Entity_extent_ptr);
|
||||
void Insert( SDAI_Entity_extent_ptr, int index );
|
||||
void Append( SDAI_Entity_extent_ptr );
|
||||
void Remove( int index );
|
||||
int Index( SDAI_Entity_extent_ptr );
|
||||
|
||||
void Clear();
|
||||
int Count();
|
||||
void Clear();
|
||||
int Count();
|
||||
|
||||
private:
|
||||
void Check(int index);
|
||||
private:
|
||||
SDAI_Entity_extent_ptr* _buf;
|
||||
int _bufsize;
|
||||
int _count;
|
||||
private:
|
||||
void Check( int index );
|
||||
private:
|
||||
SDAI_Entity_extent_ptr * _buf;
|
||||
int _bufsize;
|
||||
int _count;
|
||||
|
||||
};
|
||||
|
||||
typedef SDAI_Entity_extent__set* SDAI_Entity_extent__set_ptr;
|
||||
typedef SDAI_Entity_extent__set * SDAI_Entity_extent__set_ptr;
|
||||
typedef SDAI_Entity_extent__set_ptr SDAI_Entity_extent__set_var;
|
||||
|
||||
/*
|
||||
|
||||
@@ -26,7 +26,7 @@ SDAI_LOGICAL::SDAI_LOGICAL( Logical state ) {
|
||||
set_value( state );
|
||||
}
|
||||
|
||||
SDAI_LOGICAL::SDAI_LOGICAL( const SDAI_LOGICAL& source ) {
|
||||
SDAI_LOGICAL::SDAI_LOGICAL( const SDAI_LOGICAL & source ) {
|
||||
set_value( source.asInt() );
|
||||
}
|
||||
|
||||
@@ -86,12 +86,12 @@ SDAI_LOGICAL::operator Logical() const {
|
||||
|
||||
|
||||
|
||||
SDAI_LOGICAL & SDAI_LOGICAL::operator= ( const SDAI_LOGICAL& t ) {
|
||||
SDAI_LOGICAL & SDAI_LOGICAL::operator= ( const SDAI_LOGICAL & t ) {
|
||||
set_value( t.asInt() );
|
||||
return *this;
|
||||
}
|
||||
|
||||
SDAI_LOGICAL SDAI_LOGICAL::operator ==( const SDAI_LOGICAL& t ) const {
|
||||
SDAI_LOGICAL SDAI_LOGICAL::operator ==( const SDAI_LOGICAL & t ) const {
|
||||
if( v == t.asInt() ) {
|
||||
return LTrue ;
|
||||
}
|
||||
@@ -137,7 +137,7 @@ int SDAI_LOGICAL::set_value( const char * n ) {
|
||||
|
||||
|
||||
Severity SDAI_LOGICAL::ReadEnum( istream & in, ErrorDescriptor * err, int AssignVal,
|
||||
int needDelims ) {
|
||||
int needDelims ) {
|
||||
if( AssignVal ) {
|
||||
set_null();
|
||||
}
|
||||
@@ -271,7 +271,7 @@ SDAI_BOOLEAN::SDAI_BOOLEAN( Boolean state ) {
|
||||
set_value( state );
|
||||
}
|
||||
|
||||
SDAI_BOOLEAN::SDAI_BOOLEAN( const SDAI_BOOLEAN& source ) {
|
||||
SDAI_BOOLEAN::SDAI_BOOLEAN( const SDAI_BOOLEAN & source ) {
|
||||
set_value( source.asInt() );
|
||||
}
|
||||
|
||||
@@ -290,7 +290,7 @@ SDAI_BOOLEAN::SDAI_BOOLEAN( int i ) {
|
||||
}
|
||||
}
|
||||
|
||||
SDAI_BOOLEAN::SDAI_BOOLEAN( const SDAI_LOGICAL& val ) {
|
||||
SDAI_BOOLEAN::SDAI_BOOLEAN( const SDAI_LOGICAL & val ) {
|
||||
if( val.asInt() == LUnknown ) {
|
||||
// this should set error code sdaiVT_NVLD i.e. Invalid value type.
|
||||
v = BUnset;
|
||||
@@ -311,7 +311,7 @@ SDAI_BOOLEAN::operator Boolean() const {
|
||||
}
|
||||
}
|
||||
|
||||
SDAI_BOOLEAN & SDAI_BOOLEAN::operator= ( const SDAI_LOGICAL& t ) {
|
||||
SDAI_BOOLEAN & SDAI_BOOLEAN::operator= ( const SDAI_LOGICAL & t ) {
|
||||
set_value( t.asInt() );
|
||||
return *this;
|
||||
}
|
||||
@@ -332,7 +332,7 @@ const char * SDAI_BOOLEAN::element_at( int n ) const {
|
||||
}
|
||||
}
|
||||
|
||||
SDAI_LOGICAL SDAI_BOOLEAN::operator ==( const SDAI_LOGICAL& t ) const {
|
||||
SDAI_LOGICAL SDAI_BOOLEAN::operator ==( const SDAI_LOGICAL & t ) const {
|
||||
if( v == t.asInt() ) {
|
||||
return LTrue ;
|
||||
}
|
||||
@@ -413,7 +413,7 @@ void SDAI_Enum::DebugDisplay( ostream & out ) const {
|
||||
** true or false => non-matching delimiters are flagged as an error
|
||||
*/
|
||||
Severity SDAI_Enum::ReadEnum( istream & in, ErrorDescriptor * err, int AssignVal,
|
||||
int needDelims ) {
|
||||
int needDelims ) {
|
||||
if( AssignVal ) {
|
||||
set_null();
|
||||
}
|
||||
@@ -588,8 +588,8 @@ const char * SDAI_Enum::STEPwrite( std::string & s ) const {
|
||||
}
|
||||
|
||||
Severity SDAI_Enum::EnumValidLevel( istream & in, ErrorDescriptor * err,
|
||||
int optional, char * tokenList,
|
||||
int needDelims, int clearError ) {
|
||||
int optional, char * tokenList,
|
||||
int needDelims, int clearError ) {
|
||||
if( clearError ) {
|
||||
err->ClearErrorMsg();
|
||||
}
|
||||
@@ -625,8 +625,8 @@ Severity SDAI_Enum::EnumValidLevel( istream & in, ErrorDescriptor * err,
|
||||
}
|
||||
|
||||
Severity SDAI_Enum::EnumValidLevel( const char * value, ErrorDescriptor * err,
|
||||
int optional, char * tokenList,
|
||||
int needDelims, int clearError ) {
|
||||
int optional, char * tokenList,
|
||||
int needDelims, int clearError ) {
|
||||
istringstream in( ( char * )value );
|
||||
return EnumValidLevel( in, err, optional, tokenList, needDelims,
|
||||
clearError );
|
||||
@@ -638,7 +638,7 @@ Severity SDAI_Enum::EnumValidLevel( const char * value, ErrorDescriptor * err,
|
||||
** warning is printed and processing continues
|
||||
**
|
||||
** set_value is the same function as put
|
||||
**
|
||||
**
|
||||
** Parameter: value to be set
|
||||
** Status: ok 2.91
|
||||
** \returns: value set
|
||||
@@ -690,12 +690,12 @@ SDAI_Enum & SDAI_Enum::operator= ( const int i ) {
|
||||
return *this;
|
||||
}
|
||||
|
||||
SDAI_Enum & SDAI_Enum::operator= ( const SDAI_Enum& Senum ) {
|
||||
SDAI_Enum & SDAI_Enum::operator= ( const SDAI_Enum & Senum ) {
|
||||
put( Senum.asInt() );
|
||||
return *this;
|
||||
}
|
||||
|
||||
ostream & operator<< ( ostream & out, const SDAI_Enum& a ) {
|
||||
ostream & operator<< ( ostream & out, const SDAI_Enum & a ) {
|
||||
std::string tmp;
|
||||
out << a.asStr( tmp );
|
||||
return out;
|
||||
@@ -0,0 +1,150 @@
|
||||
#ifndef P23ENUM_H
|
||||
#define P23ENUM_H
|
||||
|
||||
/*
|
||||
* NIST STEP Core Class Library
|
||||
* clstepcore/Enum.h
|
||||
* April 1997
|
||||
* K. C. Morris
|
||||
* David Sauder
|
||||
|
||||
* Development of this software was funded by the United States Government,
|
||||
* and is not subject to copyright.
|
||||
*/
|
||||
|
||||
#include <scl_export.h>
|
||||
|
||||
class SCL_DAI_EXPORT SDAI_Enum {
|
||||
friend ostream & operator<< ( ostream &, const SDAI_Enum & );
|
||||
protected:
|
||||
int v; // integer value of enumeration instance
|
||||
// mapped to a symbolic value in the elements
|
||||
|
||||
virtual int set_value( const char * n );
|
||||
virtual int set_value( const int n );
|
||||
SDAI_Enum();
|
||||
virtual ~SDAI_Enum();
|
||||
|
||||
public:
|
||||
|
||||
void PrintContents( ostream & out = cout ) const {
|
||||
DebugDisplay( out );
|
||||
}
|
||||
|
||||
virtual int no_elements() const = 0;
|
||||
virtual const char * Name() const = 0;
|
||||
const char * get_value_at( int n ) const {
|
||||
return element_at( n );
|
||||
}
|
||||
virtual const char * element_at( int n ) const = 0;
|
||||
|
||||
Severity EnumValidLevel( const char * value, ErrorDescriptor * err,
|
||||
int optional, char * tokenList,
|
||||
int needDelims = 0, int clearError = 1 );
|
||||
|
||||
Severity EnumValidLevel( istream & in, ErrorDescriptor * err,
|
||||
int optional, char * tokenList,
|
||||
int needDelims = 0, int clearError = 1 );
|
||||
|
||||
const int asInt() const {
|
||||
return v;
|
||||
}
|
||||
|
||||
const char * asStr( std::string & s ) const;
|
||||
void STEPwrite( ostream & out = cout ) const;
|
||||
const char * STEPwrite( std::string & s ) const;
|
||||
|
||||
Severity StrToVal( const char * s, ErrorDescriptor * err, int optional = 1 );
|
||||
Severity STEPread( istream & in, ErrorDescriptor * err, int optional = 1 );
|
||||
Severity STEPread( const char * s, ErrorDescriptor * err, int optional = 1 );
|
||||
|
||||
virtual int put( int val );
|
||||
virtual int put( const char * n );
|
||||
int is_null() const {
|
||||
return !( exists() );
|
||||
}
|
||||
void set_null() {
|
||||
nullify();
|
||||
}
|
||||
SDAI_Enum & operator= ( const int );
|
||||
SDAI_Enum & operator= ( const SDAI_Enum & );
|
||||
|
||||
virtual int exists() const;
|
||||
virtual void nullify();
|
||||
void DebugDisplay( ostream & out = cout ) const;
|
||||
|
||||
protected:
|
||||
virtual Severity ReadEnum( istream & in, ErrorDescriptor * err,
|
||||
int AssignVal = 1, int needDelims = 1 );
|
||||
};
|
||||
|
||||
|
||||
|
||||
class SDAI_LOGICAL;
|
||||
class SDAI_BOOLEAN;
|
||||
|
||||
enum Boolean { BFalse, BTrue, BUnset };
|
||||
enum Logical { LFalse, LTrue, LUnset, LUnknown };
|
||||
|
||||
class SCL_DAI_EXPORT SDAI_LOGICAL :
|
||||
public SDAI_Enum {
|
||||
public:
|
||||
const char * Name() const;
|
||||
|
||||
SDAI_LOGICAL( char * val = 0 );
|
||||
SDAI_LOGICAL( Logical state );
|
||||
SDAI_LOGICAL( const SDAI_LOGICAL & source );
|
||||
SDAI_LOGICAL( int i );
|
||||
|
||||
virtual ~SDAI_LOGICAL();
|
||||
|
||||
virtual int no_elements() const;
|
||||
virtual const char * element_at( int n ) const;
|
||||
|
||||
operator Logical() const;
|
||||
SDAI_LOGICAL & operator=( const SDAI_LOGICAL & t );
|
||||
|
||||
SDAI_LOGICAL operator==( const SDAI_LOGICAL & t ) const;
|
||||
|
||||
// these 2 are redefined because LUnknown has cardinal value > LUnset
|
||||
int exists() const; // return 0 if unset otherwise return 1
|
||||
void nullify(); // change the receiver to an unset status
|
||||
|
||||
protected:
|
||||
virtual int set_value( const int n );
|
||||
virtual int set_value( const char * n );
|
||||
virtual Severity ReadEnum( istream & in, ErrorDescriptor * err,
|
||||
int AssignVal = 1, int needDelims = 1 );
|
||||
|
||||
};
|
||||
|
||||
class SCL_DAI_EXPORT SDAI_BOOLEAN :
|
||||
public SDAI_Enum {
|
||||
public:
|
||||
const char * Name() const;
|
||||
|
||||
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;
|
||||
SDAI_BOOLEAN & operator=( const SDAI_LOGICAL & t );
|
||||
|
||||
SDAI_BOOLEAN & operator=( const ::Boolean t );
|
||||
SDAI_LOGICAL operator==( const SDAI_LOGICAL & t ) const;
|
||||
|
||||
};
|
||||
|
||||
static const SDAI_BOOLEAN SDAI_TRUE;
|
||||
static const SDAI_BOOLEAN SDAI_FALSE;
|
||||
static const SDAI_BOOLEAN SDAI_UNSET;
|
||||
static const SDAI_LOGICAL SDAI_UNKNOWN;
|
||||
|
||||
|
||||
#endif
|
||||
@@ -79,12 +79,12 @@ SDAI_Model_contents::CreateEntityInstance( const char * Type ) {
|
||||
}
|
||||
|
||||
void
|
||||
SDAI_Model_contents::AddInstance( const SDAI_DAObject_SDAI_ptr& appInst ) {
|
||||
SDAI_Model_contents::AddInstance( const SDAI_DAObject_SDAI_ptr & appInst ) {
|
||||
_instances.contents_()->Append( appInst );
|
||||
}
|
||||
|
||||
void
|
||||
SDAI_Model_contents::RemoveInstance( SDAI_DAObject_SDAI_ptr& appInst ) {
|
||||
SDAI_Model_contents::RemoveInstance( SDAI_DAObject_SDAI_ptr & appInst ) {
|
||||
_instances.contents_()->Remove( _instances.contents_()->Index( appInst ) );
|
||||
}
|
||||
|
||||
|
||||
+133
-130
@@ -1,6 +1,7 @@
|
||||
#ifndef SDAIMODEL_CONTENTS_H
|
||||
#define SDAIMODEL_CONTENTS_H 1
|
||||
|
||||
#include <scl_export.h>
|
||||
//SDAI_Model_contents
|
||||
|
||||
/*
|
||||
@@ -22,189 +23,191 @@
|
||||
//#include <SessionInstance.h>
|
||||
*/
|
||||
|
||||
// The class SDAI_Model_contents_instances shall implement convenience functions by
|
||||
// The class SDAI_Model_contents_instances shall implement convenience functions by
|
||||
// SDAI_Model_contents in this part of ISO 10303
|
||||
|
||||
class SDAI_Model_contents_instances : public SDAI_DAObject
|
||||
{
|
||||
public:
|
||||
class SCL_DAI_EXPORT SDAI_Model_contents_instances : public SDAI_DAObject {
|
||||
public:
|
||||
|
||||
SDAI_DAObject__set _instances;
|
||||
SDAI_DAObject__set _instances;
|
||||
|
||||
SDAI_Model_contents_instances();
|
||||
virtual ~SDAI_Model_contents_instances();
|
||||
SDAI_Model_contents_instances();
|
||||
virtual ~SDAI_Model_contents_instances();
|
||||
|
||||
// This function shall return the set of DAObjects contained in
|
||||
// the receiver.
|
||||
SDAI_DAObject__set_var contents_() { return &_instances; }
|
||||
const SDAI_DAObject__set_var contents_() const
|
||||
{ return (const SDAI_DAObject__set_var) &_instances; };
|
||||
// This function shall return the set of DAObjects contained in
|
||||
// the receiver.
|
||||
SDAI_DAObject__set_var contents_() {
|
||||
return &_instances;
|
||||
}
|
||||
const SDAI_DAObject__set_var contents_() const {
|
||||
return ( const SDAI_DAObject__set_var ) &_instances;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
typedef SDAI_Model_contents_instances *
|
||||
SDAI_Model_contents_instances_ptr;
|
||||
typedef SDAI_Model_contents_instances_ptr
|
||||
SDAI_Model_contents_instances_var;
|
||||
SDAI_Model_contents_instances_ptr;
|
||||
typedef SDAI_Model_contents_instances_ptr
|
||||
SDAI_Model_contents_instances_var;
|
||||
|
||||
// Model_contents_ptr def pushed ahead of #include for Entity_extent
|
||||
//class SDAI_Model_contents;
|
||||
//typedef SDAI_Model_contents SDAI_Model_contents_ptr;
|
||||
|
||||
class SDAI_Model_contents : public SDAI_Session_instance {
|
||||
class SCL_DAI_EXPORT SDAI_Model_contents : public SDAI_Session_instance {
|
||||
|
||||
//friend class SDAI_Model;
|
||||
|
||||
/*
|
||||
NOTE - Model is a friend so that Model may access the contents of
|
||||
the Entity_extents folders.
|
||||
/*
|
||||
NOTE - Model is a friend so that Model may access the contents of
|
||||
the Entity_extents folders.
|
||||
|
||||
DATA MEMBERS
|
||||
*/
|
||||
public:
|
||||
DATA MEMBERS
|
||||
*/
|
||||
public:
|
||||
// protected: // for now
|
||||
// contains Application_instances (i.e. STEPentities)
|
||||
SDAI_Model_contents_instances _instances;
|
||||
SDAI_Model_contents_instances _instances;
|
||||
|
||||
SDAI_Entity_extent__set _folders; // of entity_extent
|
||||
SDAI_Entity_extent__set _folders; // of entity_extent
|
||||
|
||||
SDAI_Entity_extent__set _populated_folders; // of entity_extent
|
||||
SDAI_Entity_extent__set _populated_folders; // of entity_extent
|
||||
|
||||
// EntityAggregate _instances; // of Entity_instance
|
||||
// EntityAggregate _instances; // of Entity_instance
|
||||
// EntityAggregate _folders; // of entity_extent
|
||||
// EntityAggregate _populated_folders; // of entity_extent
|
||||
|
||||
/*
|
||||
Constructor declarations
|
||||
*/
|
||||
public: // for now at least
|
||||
/*
|
||||
Constructor declarations
|
||||
*/
|
||||
public: // for now at least
|
||||
// private:
|
||||
SDAI_Model_contents();
|
||||
SDAI_Model_contents();
|
||||
// SDAI_Model_contents(const SDAI_Model_contents& mc);
|
||||
~SDAI_Model_contents();
|
||||
/*
|
||||
Access function declarations
|
||||
*/
|
||||
public:
|
||||
SDAI_Model_contents_instances_ptr instances_();
|
||||
const SDAI_Model_contents_instances_ptr instances_() const;
|
||||
~SDAI_Model_contents();
|
||||
/*
|
||||
Access function declarations
|
||||
*/
|
||||
public:
|
||||
SDAI_Model_contents_instances_ptr instances_();
|
||||
const SDAI_Model_contents_instances_ptr instances_() const;
|
||||
|
||||
SDAI_Entity_extent__set_var folders_();
|
||||
const SDAI_Entity_extent__set_var folders_() const;
|
||||
SDAI_Entity_extent__set_var folders_();
|
||||
const SDAI_Entity_extent__set_var folders_() const;
|
||||
|
||||
//Boolean TestFolders() const;
|
||||
//Boolean TestFolders() const;
|
||||
|
||||
const SDAI_Entity_extent__set_var populated_folders_() const;
|
||||
SDAI_Entity_extent__set_var populated_folders_();
|
||||
//Boolean TestPopulated_folders() const;
|
||||
const SDAI_Entity_extent__set_var populated_folders_() const;
|
||||
SDAI_Entity_extent__set_var populated_folders_();
|
||||
//Boolean TestPopulated_folders() const;
|
||||
|
||||
// static SDAI_Model_contents_ptr
|
||||
// _duplicate(SDAI_Model_contents_ptr);
|
||||
// static SDAI_Model_contents_ptr
|
||||
// _duplicate(SDAI_Model_contents_ptr);
|
||||
// static SDAI_Model_contents_ptr _narrow(Object_ptr);
|
||||
// static SDAI_Model_contents_ptr _nil();
|
||||
|
||||
SDAI_PID_DA_ptr
|
||||
get_object_pid(const SDAI_DAObject_ptr &d) const;
|
||||
SDAI_PID_DA_ptr
|
||||
get_object_pid( const SDAI_DAObject_ptr & d ) const;
|
||||
|
||||
SDAI_DAObject_ptr lookup(const SDAI_PID_DA_ptr &p) const;
|
||||
SDAI_DAObject_ptr lookup( const SDAI_PID_DA_ptr & p ) const;
|
||||
|
||||
/*
|
||||
SDAI operation declarations
|
||||
/*
|
||||
SDAI operation declarations
|
||||
|
||||
7.3.2.1 SDAI operation declarations
|
||||
7.3.2.1 SDAI operation declarations
|
||||
|
||||
7.3.2.1.1 Add instance
|
||||
*/
|
||||
7.3.2.1.1 Add instance
|
||||
*/
|
||||
// private:
|
||||
public: // for now at least
|
||||
SDAI_DAObject_ptr
|
||||
CreateEntityInstance(const char * Type);
|
||||
public: // for now at least
|
||||
SDAI_DAObject_ptr
|
||||
CreateEntityInstance( const char * Type );
|
||||
|
||||
// until we find out what this should really be in the spec
|
||||
void AddInstance(const SDAI_DAObject_SDAI_ptr& appInst);
|
||||
// until we find out what this should really be in the spec
|
||||
void AddInstance( const SDAI_DAObject_SDAI_ptr & appInst );
|
||||
// void AddInstance(const Entity_instance_ptr& entityHandle);
|
||||
//void AddInstance(EntityInstanceH& entityHandle);
|
||||
/* Function:
|
||||
The AddInstance function shall add the entity instance entity handle
|
||||
to the instances set of the receiver. This function shall add the
|
||||
entity instance entityHandle to each Entity_extent in the folders
|
||||
attribute of the receiver for which the type or a subtype of the
|
||||
type contained in the folder corresponds to the type of entityHandle.
|
||||
This function shall add the entity instance entityHandle to each
|
||||
Entity_extent in the populated_folders attribute of the receiver for
|
||||
which the type or a subtype of the type contained in the folder
|
||||
corresponds to the type of entityHandle.
|
||||
//void AddInstance(EntityInstanceH& entityHandle);
|
||||
/* Function:
|
||||
The AddInstance function shall add the entity instance entity handle
|
||||
to the instances set of the receiver. This function shall add the
|
||||
entity instance entityHandle to each Entity_extent in the folders
|
||||
attribute of the receiver for which the type or a subtype of the
|
||||
type contained in the folder corresponds to the type of entityHandle.
|
||||
This function shall add the entity instance entityHandle to each
|
||||
Entity_extent in the populated_folders attribute of the receiver for
|
||||
which the type or a subtype of the type contained in the folder
|
||||
corresponds to the type of entityHandle.
|
||||
|
||||
Possible error indicators:
|
||||
sdaiSS_NOPN // Session not open
|
||||
sdaiRP_NOPN // Repository not open
|
||||
sdaiMO_NEXS // SDAI-model does not exist
|
||||
sdaiMX_NRW // SDAI-model access not read-write
|
||||
sdaiSY_ERR // Underlying system error
|
||||
Possible error indicators:
|
||||
sdaiSS_NOPN // Session not open
|
||||
sdaiRP_NOPN // Repository not open
|
||||
sdaiMO_NEXS // SDAI-model does not exist
|
||||
sdaiMX_NRW // SDAI-model access not read-write
|
||||
sdaiSY_ERR // Underlying system error
|
||||
|
||||
Origin: Convenience function
|
||||
*/
|
||||
Origin: Convenience function
|
||||
*/
|
||||
|
||||
// until we find out what this should really be in the spec
|
||||
void RemoveInstance(SDAI_DAObject_SDAI_ptr& appInst);
|
||||
// void RemoveInstance(Entity_instance_ptr& entityHandle);
|
||||
//void RemoveInstance(EntityInstanceH& entityHandle);
|
||||
/* Function
|
||||
The RemoveInstance function shall remove the entity instance entity
|
||||
handle from the instances set of the receiver. This function shall
|
||||
remove the entity instance entityHandle from each Entity_extent in
|
||||
the folders attribute of the receiver for which the type or a
|
||||
subtype of the type contained in the folder corresponds to the
|
||||
type of entityHandle. This function shall remove the entity
|
||||
instance entityHandle from each Entity_extent in the
|
||||
populated_folders attribute of the receiver for which the type or
|
||||
a subtype of the type contained in the folder corresponds to the
|
||||
type of entityHandle.
|
||||
// until we find out what this should really be in the spec
|
||||
void RemoveInstance( SDAI_DAObject_SDAI_ptr & appInst );
|
||||
// void RemoveInstance(Entity_instance_ptr& entityHandle);
|
||||
//void RemoveInstance(EntityInstanceH& entityHandle);
|
||||
/* Function
|
||||
The RemoveInstance function shall remove the entity instance entity
|
||||
handle from the instances set of the receiver. This function shall
|
||||
remove the entity instance entityHandle from each Entity_extent in
|
||||
the folders attribute of the receiver for which the type or a
|
||||
subtype of the type contained in the folder corresponds to the
|
||||
type of entityHandle. This function shall remove the entity
|
||||
instance entityHandle from each Entity_extent in the
|
||||
populated_folders attribute of the receiver for which the type or
|
||||
a subtype of the type contained in the folder corresponds to the
|
||||
type of entityHandle.
|
||||
|
||||
Possible error indicators
|
||||
sdaiSS_NOPN // Session not open
|
||||
sdaiRP_NOPN // Repository not open
|
||||
sdaiMO_NEXS // SDAI-model does not exist
|
||||
sdaiMX_NRW // SDAI-model access not read-write
|
||||
sdaiSY_ERR // Underlying system error
|
||||
Possible error indicators
|
||||
sdaiSS_NOPN // Session not open
|
||||
sdaiRP_NOPN // Repository not open
|
||||
sdaiMO_NEXS // SDAI-model does not exist
|
||||
sdaiMX_NRW // SDAI-model access not read-write
|
||||
sdaiSY_ERR // Underlying system error
|
||||
|
||||
Origin: Convenience function
|
||||
*/
|
||||
public:
|
||||
|
||||
/*
|
||||
7.3.2.1.3 Get entity extent
|
||||
*/
|
||||
Origin: Convenience function
|
||||
*/
|
||||
public:
|
||||
|
||||
/*
|
||||
7.3.2.1.3 Get entity extent
|
||||
*/
|
||||
#ifdef SDAI_CPP_LATE_BINDING
|
||||
#if 0 // for now
|
||||
Any_var GetEntity_extent(const std::string& entityName);
|
||||
const Any_var GetEntity_extent(const std::string& entityName) const;
|
||||
Any_var GetEntity_extent(const Entity_ptr& ep);
|
||||
const Any_var GetEntity_extent(const Entity_ptr& ep) const;
|
||||
Any_var GetEntity_extent( const std::string & entityName );
|
||||
const Any_var GetEntity_extent( const std::string & entityName ) const;
|
||||
Any_var GetEntity_extent( const Entity_ptr & ep );
|
||||
const Any_var GetEntity_extent( const Entity_ptr & ep ) const;
|
||||
#endif
|
||||
/* Function:
|
||||
The GetEntity_extent function shall retrieve an entity folder from
|
||||
the folders attribute within the contents attribute of the receiver.
|
||||
This folder shall contain all of the instances of a particular type
|
||||
and its subtypes within the model. The type may be specified
|
||||
indirectly by the entityName parameter or directly by the entity.
|
||||
Subsequent access to the returned aggregate shall be restricted to
|
||||
read-only functionality.
|
||||
/* Function:
|
||||
The GetEntity_extent function shall retrieve an entity folder from
|
||||
the folders attribute within the contents attribute of the receiver.
|
||||
This folder shall contain all of the instances of a particular type
|
||||
and its subtypes within the model. The type may be specified
|
||||
indirectly by the entityName parameter or directly by the entity.
|
||||
Subsequent access to the returned aggregate shall be restricted to
|
||||
read-only functionality.
|
||||
|
||||
Output:
|
||||
This function shall return an aggregate handle used as an argument
|
||||
for subsequent SDAI function calls. Otherwise, this function shall
|
||||
return a null handle.
|
||||
Output:
|
||||
This function shall return an aggregate handle used as an argument
|
||||
for subsequent SDAI function calls. Otherwise, this function shall
|
||||
return a null handle.
|
||||
|
||||
Possible error indicators:
|
||||
sdaiSS_NOPN // Session not open
|
||||
sdaiRP_NOPN // Repository not open
|
||||
sdaiMO_NEXS // SDAI-model does not exist
|
||||
sdaiED_NDEF // Entity definition unknown in this model
|
||||
sdaiSY_ERR // Underlying system error
|
||||
Possible error indicators:
|
||||
sdaiSS_NOPN // Session not open
|
||||
sdaiRP_NOPN // Repository not open
|
||||
sdaiMO_NEXS // SDAI-model does not exist
|
||||
sdaiED_NDEF // Entity definition unknown in this model
|
||||
sdaiSY_ERR // Underlying system error
|
||||
|
||||
Origin: Convenience function
|
||||
*/
|
||||
Origin: Convenience function
|
||||
*/
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ SDAI_Model_contents__list::~SDAI_Model_contents__list() {
|
||||
|
||||
void SDAI_Model_contents__list::Check( int index ) {
|
||||
|
||||
SDAI_Model_contents_ptr* newbuf;
|
||||
SDAI_Model_contents_ptr * newbuf;
|
||||
|
||||
if( index >= _bufsize ) {
|
||||
_bufsize = ( index + 1 ) * 2;
|
||||
@@ -61,7 +61,7 @@ void SDAI_Model_contents__list::Check( int index ) {
|
||||
void
|
||||
SDAI_Model_contents__list::Insert( SDAI_Model_contents_ptr v, int index ) {
|
||||
|
||||
SDAI_Model_contents_ptr* spot;
|
||||
SDAI_Model_contents_ptr * spot;
|
||||
index = ( index < 0 ) ? _count : index;
|
||||
|
||||
if( index < _count ) {
|
||||
@@ -80,7 +80,7 @@ SDAI_Model_contents__list::Insert( SDAI_Model_contents_ptr v, int index ) {
|
||||
void SDAI_Model_contents__list::Append( SDAI_Model_contents_ptr v ) {
|
||||
|
||||
int index = _count;
|
||||
SDAI_Model_contents_ptr* spot;
|
||||
SDAI_Model_contents_ptr * spot;
|
||||
|
||||
if( index < _count ) {
|
||||
Check( _count + 1 );
|
||||
@@ -99,7 +99,7 @@ void SDAI_Model_contents__list::Remove( int index ) {
|
||||
|
||||
if( 0 <= index && index < _count ) {
|
||||
--_count;
|
||||
SDAI_Model_contents_ptr* spot = &_buf[index];
|
||||
SDAI_Model_contents_ptr * spot = &_buf[index];
|
||||
memmove( spot, spot + 1, ( _count - index )*sizeof( SDAI_Model_contents_ptr ) );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,35 +1,37 @@
|
||||
#ifndef SDAIMODEL_CONTENTS_LIST_H
|
||||
#define SDAIMODEL_CONTENTS_LIST_H 1
|
||||
|
||||
class SDAI_Model_contents__list {
|
||||
public:
|
||||
SDAI_Model_contents__list(int = 16);
|
||||
~SDAI_Model_contents__list();
|
||||
#include <scl_export.h>
|
||||
|
||||
SDAI_Model_contents_ptr retrieve(int index);
|
||||
int is_empty();
|
||||
class SCL_DAI_EXPORT SDAI_Model_contents__list {
|
||||
public:
|
||||
SDAI_Model_contents__list( int = 16 );
|
||||
~SDAI_Model_contents__list();
|
||||
|
||||
SDAI_Model_contents_ptr& operator[](int index);
|
||||
SDAI_Model_contents_ptr retrieve( int index );
|
||||
int is_empty();
|
||||
|
||||
void Insert(SDAI_Model_contents_ptr, int index);
|
||||
void Append(SDAI_Model_contents_ptr);
|
||||
void Remove(int index);
|
||||
int Index(SDAI_Model_contents_ptr);
|
||||
SDAI_Model_contents_ptr & operator[]( int index );
|
||||
|
||||
void Clear();
|
||||
int Count();
|
||||
void Insert( SDAI_Model_contents_ptr, int index );
|
||||
void Append( SDAI_Model_contents_ptr );
|
||||
void Remove( int index );
|
||||
int Index( SDAI_Model_contents_ptr );
|
||||
|
||||
private:
|
||||
void Check(int index);
|
||||
private:
|
||||
SDAI_Model_contents_ptr* _buf;
|
||||
int _bufsize;
|
||||
int _count;
|
||||
void Clear();
|
||||
int Count();
|
||||
|
||||
private:
|
||||
void Check( int index );
|
||||
private:
|
||||
SDAI_Model_contents_ptr * _buf;
|
||||
int _bufsize;
|
||||
int _count;
|
||||
};
|
||||
|
||||
typedef SDAI_Model_contents__list*
|
||||
SDAI_Model_contents__list_ptr;
|
||||
typedef SDAI_Model_contents__list_ptr
|
||||
SDAI_Model_contents__list_var;
|
||||
typedef SDAI_Model_contents__list *
|
||||
SDAI_Model_contents__list_ptr;
|
||||
typedef SDAI_Model_contents__list_ptr
|
||||
SDAI_Model_contents__list_var;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,13 +5,3 @@ SDAI_sdaiObject::SDAI_sdaiObject() {
|
||||
|
||||
SDAI_sdaiObject::~SDAI_sdaiObject() {
|
||||
}
|
||||
|
||||
#ifdef PART26
|
||||
//SCLP26(Application_instance_ptr)
|
||||
IDL_Application_instance_ptr
|
||||
SDAI_sdaiObject::create_TIE() {
|
||||
cout << "ERROR sdaiObject::create_TIE() called." << endl;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
+18
-22
@@ -2,38 +2,34 @@
|
||||
#ifndef SDAIOBJECT_H
|
||||
#define SDAIOBJECT_H 1
|
||||
|
||||
#include <scl_export.h>
|
||||
|
||||
/*
|
||||
|
||||
*/
|
||||
/*
|
||||
The EXPRESS ENTITY entity_instance from the SDAI_data_type_schema from
|
||||
The EXPRESS ENTITY entity_instance from the SDAI_data_type_schema from
|
||||
clause 10 in ISO 10303-22, shall be mapped to the C++ class Entity_instance.
|
||||
The class Entity_instance shall be a subtype of the C++ class Object:
|
||||
*/
|
||||
|
||||
class SDAI_sdaiObject
|
||||
{
|
||||
public:
|
||||
SDAI_sdaiObject();
|
||||
virtual ~SDAI_sdaiObject();
|
||||
class SCL_DAI_EXPORT SDAI_sdaiObject {
|
||||
public:
|
||||
SDAI_sdaiObject();
|
||||
virtual ~SDAI_sdaiObject();
|
||||
// static Object_ptr _duplicate(Object_ptr);
|
||||
// static Object_ptr _nil();
|
||||
|
||||
#ifdef PART26
|
||||
// virtual SCLP26(Application_instance_ptr) create_TIE();
|
||||
virtual IDL_Application_instance_ptr create_TIE();
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
typedef SDAI_sdaiObject* SDAI_sdaiObject_ptr;
|
||||
typedef SDAI_sdaiObject * SDAI_sdaiObject_ptr;
|
||||
typedef SDAI_sdaiObject_ptr SDAI_sdaiObject_var;
|
||||
|
||||
/*
|
||||
The class Object shall be accessed through the handle types Object_ptr and
|
||||
Object_var. For handles to the C++ class representing a EXPRESS ENTITY data
|
||||
type A, the following implicit widening operations shall be supported:
|
||||
A_ptr to Object_ptr and A_var to Object_ptr. An implementation need not
|
||||
The class Object shall be accessed through the handle types Object_ptr and
|
||||
Object_var. For handles to the C++ class representing a EXPRESS ENTITY data
|
||||
type A, the following implicit widening operations shall be supported:
|
||||
A_ptr to Object_ptr and A_var to Object_ptr. An implementation need not
|
||||
support implicit widening of A_var to Object_var.
|
||||
|
||||
This binding shall support the following functions:
|
||||
@@ -42,20 +38,20 @@ typedef SDAI_sdaiObject_ptr SDAI_sdaiObject_var;
|
||||
//void release(Object_ptr obj);
|
||||
|
||||
/*
|
||||
The release function indicates that the caller will no longer access the
|
||||
The release function indicates that the caller will no longer access the
|
||||
reference obj.
|
||||
*/
|
||||
|
||||
//Boolean is_nil(Object_ptr obj);
|
||||
|
||||
/*
|
||||
The is_nil function shall return true if obj is a nil handle; otherwise it
|
||||
The is_nil function shall return true if obj is a nil handle; otherwise it
|
||||
returns false.
|
||||
|
||||
This binding does not specify that all base classes in the application
|
||||
schema be virtual base classes; however, it does require that no multiply
|
||||
inherited derived class contain multiple instantiations of any of its base
|
||||
classes. This requirement applies to all classes, even classes used to
|
||||
This binding does not specify that all base classes in the application
|
||||
schema be virtual base classes; however, it does require that no multiply
|
||||
inherited derived class contain multiple instantiations of any of its base
|
||||
classes. This requirement applies to all classes, even classes used to
|
||||
instantiate complex instances.
|
||||
*/
|
||||
|
||||
|
||||
@@ -2,27 +2,27 @@
|
||||
#ifndef SESSION_INSTANCE_H
|
||||
#define SESSION_INSTANCE_H 1
|
||||
|
||||
#include <scl_export.h>
|
||||
//#include <sdai.h>
|
||||
|
||||
class SDAI_Session_instance : public SDAI_sdaiObject
|
||||
{
|
||||
class SCL_DAI_EXPORT SDAI_Session_instance : public SDAI_sdaiObject {
|
||||
|
||||
public:
|
||||
int x;
|
||||
public:
|
||||
int x;
|
||||
|
||||
SDAI_Session_instance();
|
||||
virtual ~SDAI_Session_instance();
|
||||
SDAI_Session_instance();
|
||||
virtual ~SDAI_Session_instance();
|
||||
// SDAI_Session_instance(const SDAI_Session_instance& si) {}
|
||||
|
||||
// static SDAI_Session_instance_ptr
|
||||
// _duplicate(SDAI_Session_instance_ptr sip);
|
||||
// static SDAI_Session_instance_ptr
|
||||
// _narrow(SDAI_Object_ptr o);
|
||||
// static SDAI_Session_instance_ptr
|
||||
// _duplicate(SDAI_Session_instance_ptr sip);
|
||||
// static SDAI_Session_instance_ptr
|
||||
// _narrow(SDAI_Object_ptr o);
|
||||
// static SDAI_Session_instance_ptr _nil();
|
||||
|
||||
};
|
||||
|
||||
typedef SDAI_Session_instance* SDAI_Session_instance_ptr;
|
||||
typedef SDAI_Session_instance * SDAI_Session_instance_ptr;
|
||||
typedef SDAI_Session_instance_ptr SDAI_Session_instance_var;
|
||||
|
||||
// the old names
|
||||
|
||||
@@ -12,11 +12,43 @@
|
||||
#include <sdai.h>
|
||||
#include <sstream>
|
||||
|
||||
SDAI_String::SDAI_String( const char * str, int max ) {
|
||||
content = std::string( str, max );
|
||||
}
|
||||
|
||||
SDAI_String::SDAI_String( const std::string & s ) {
|
||||
content = std::string( s );
|
||||
}
|
||||
|
||||
SDAI_String::SDAI_String( const SDAI_String & s ) {
|
||||
content = std::string( s.c_str() );
|
||||
}
|
||||
|
||||
SDAI_String::~SDAI_String( void ) {
|
||||
}
|
||||
|
||||
SDAI_String & SDAI_String::operator= ( const char * s ) {
|
||||
std::string::operator= ( s );
|
||||
content = std::string( s );
|
||||
return *this;
|
||||
}
|
||||
|
||||
bool SDAI_String::operator== ( const char * s ) const {
|
||||
return ( content == s );
|
||||
}
|
||||
|
||||
void SDAI_String::clear( void ) {
|
||||
content.clear();
|
||||
}
|
||||
|
||||
bool SDAI_String::empty( void ) const {
|
||||
return content.empty();
|
||||
}
|
||||
|
||||
const char * SDAI_String::c_str( void ) const {
|
||||
return content.c_str();
|
||||
}
|
||||
|
||||
|
||||
void SDAI_String::STEPwrite( ostream & out ) const {
|
||||
out << c_str();
|
||||
}
|
||||
@@ -45,23 +77,23 @@ Severity SDAI_String::STEPread( istream & in, ErrorDescriptor * err ) {
|
||||
in.unsetf( ios::skipws );
|
||||
|
||||
// extract the string from the inputstream
|
||||
string s = ToExpressStr(in, err);
|
||||
operator+= (s);
|
||||
string s = ToExpressStr( in, err );
|
||||
content += s;
|
||||
|
||||
// retrieve current severity
|
||||
Severity sev = err -> severity();
|
||||
|
||||
// Not missing closing quote on string value
|
||||
if (sev != SEVERITY_INPUT_ERROR && s.compare("") != 0) {
|
||||
if( sev != SEVERITY_INPUT_ERROR && s.compare( "" ) != 0 ) {
|
||||
sev = SEVERITY_NULL;
|
||||
}
|
||||
|
||||
// There was no quote
|
||||
if ( !(sev == SEVERITY_INPUT_ERROR || sev == SEVERITY_NULL) ) {
|
||||
in.flags( flags ); // set the format state back to previous settings
|
||||
clear();
|
||||
err -> GreaterSeverity( SEVERITY_INCOMPLETE );
|
||||
sev = SEVERITY_INCOMPLETE;
|
||||
if( !( sev == SEVERITY_INPUT_ERROR || sev == SEVERITY_NULL ) ) {
|
||||
in.flags( flags ); // set the format state back to previous settings
|
||||
clear();
|
||||
err -> GreaterSeverity( SEVERITY_INCOMPLETE );
|
||||
sev = SEVERITY_INCOMPLETE;
|
||||
}
|
||||
return sev;
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
#ifndef STEPSTRING_H
|
||||
#define STEPSTRING_H 1
|
||||
|
||||
/*
|
||||
* NIST STEP Core Class Library
|
||||
* clstepcore/sdaiString.h
|
||||
* April 1997
|
||||
* KC Morris
|
||||
|
||||
* Development of this software was funded by the United States Government,
|
||||
* and is not subject to copyright.
|
||||
*/
|
||||
|
||||
#include <scl_export.h>
|
||||
|
||||
class SCL_DAI_EXPORT SDAI_String {
|
||||
private:
|
||||
std::string content;
|
||||
public:
|
||||
|
||||
//constructor(s) & destructor
|
||||
SDAI_String( const char * str = 0, int max = 0 );
|
||||
SDAI_String( const std::string & s );
|
||||
SDAI_String( const SDAI_String & s );
|
||||
~SDAI_String( void );
|
||||
|
||||
// operators
|
||||
SDAI_String & operator= ( const char * s );
|
||||
bool operator== ( const char * s ) const;
|
||||
|
||||
void clear( void );
|
||||
bool empty( void ) const;
|
||||
const char * c_str( void ) const;
|
||||
// format for STEP
|
||||
const char * asStr( std::string & s ) const {
|
||||
return s.c_str();
|
||||
}
|
||||
void STEPwrite( ostream & out = cout ) const;
|
||||
void STEPwrite( std::string & s ) const;
|
||||
|
||||
Severity StrToVal( const char * s );
|
||||
Severity STEPread( istream & in, ErrorDescriptor * err );
|
||||
Severity STEPread( const char * s, ErrorDescriptor * err );
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -40,7 +40,14 @@ include_directories(
|
||||
${SCL_SOURCE_DIR}/src/clutils
|
||||
)
|
||||
|
||||
SCL_ADDLIB(stepeditor "${LIBSTEPEDITOR_SRCS}" stepcore)
|
||||
if(MSVC OR BORLAND)
|
||||
add_definitions( -DSCL_EDITOR_DLL_EXPORTS )
|
||||
add_definitions( -DSCL_CORE_DLL_IMPORTS )
|
||||
add_definitions( -DSCL_DAI_DLL_IMPORTS )
|
||||
add_definitions( -DSCL_UTILS_DLL_IMPORTS )
|
||||
endif()
|
||||
|
||||
SCL_ADDLIB(stepeditor "${LIBSTEPEDITOR_SRCS}" stepcore stepdai steputils)
|
||||
|
||||
if(APPLE)
|
||||
set_target_properties(stepeditor PROPERTIES LINK_FLAGS "-flat_namespace -undefined suppress")
|
||||
|
||||
+48
-49
@@ -75,8 +75,12 @@ STEPfile::ReadHeader( istream & in ) {
|
||||
std::string cmtStr;
|
||||
|
||||
InstMgr * im = new InstMgr;
|
||||
SDAI_Application_instance* obj;
|
||||
SDAI_Application_instance * obj;
|
||||
#if defined(__MSVC__) || defined(__BORLAND__)
|
||||
Severity objsev = SEVERITY_NULL;
|
||||
#else
|
||||
__attribute__( ( unused ) ) Severity objsev = SEVERITY_NULL;
|
||||
#endif
|
||||
|
||||
int endsec = 0;
|
||||
int userDefined = 0;
|
||||
@@ -162,7 +166,7 @@ STEPfile::ReadHeader( istream & in ) {
|
||||
keywd << "\'.\n\tdata lost: " << strbuf << "\n";
|
||||
_error.GreaterSeverity( SEVERITY_WARNING );
|
||||
} else { //not ENTITY_NULL
|
||||
//read the header instance
|
||||
//read the header instance
|
||||
|
||||
//check obj's Error Descriptor
|
||||
objsev = AppendEntityErrorMsg( &( obj->Error() ) );
|
||||
@@ -171,9 +175,9 @@ STEPfile::ReadHeader( istream & in ) {
|
||||
fileid = HeaderId( keywd );
|
||||
|
||||
//read the values from the istream
|
||||
objsev = obj->STEPread( fileid, 0, ( InstMgr * )0, in );
|
||||
objsev = obj->STEPread( fileid, 0, ( InstMgr * )0, in, NULL, true, _strict );
|
||||
if( !cmtStr.empty() ) {
|
||||
obj->AddP21Comment( cmtStr );
|
||||
obj->PrependP21Comment( cmtStr );
|
||||
}
|
||||
|
||||
in >> ws;
|
||||
@@ -210,7 +214,7 @@ Severity
|
||||
STEPfile::HeaderVerifyInstances( InstMgr * im ) {
|
||||
int err = 0;
|
||||
int fileid;
|
||||
SDAI_Application_instance* obj;
|
||||
SDAI_Application_instance * obj;
|
||||
|
||||
//check File_Name
|
||||
fileid = HeaderId( "File_Name" );
|
||||
@@ -258,16 +262,16 @@ STEPfile::HeaderDefaultFileName() {
|
||||
fn->name_( "" );
|
||||
fn->time_stamp_( "" );
|
||||
tmp->StrToVal( "", &_error,
|
||||
fn->attributes[2].
|
||||
aDesc -> DomainType(),
|
||||
_headerInstances );
|
||||
fn->author_(tmp);
|
||||
fn->attributes[2].
|
||||
aDesc -> DomainType(),
|
||||
_headerInstances );
|
||||
fn->author_( tmp );
|
||||
|
||||
tmp->StrToVal( "", &_error,
|
||||
fn->attributes[3].
|
||||
aDesc -> DomainType(),
|
||||
_headerInstances );
|
||||
fn->organization_(tmp);
|
||||
fn->organization_( tmp );
|
||||
|
||||
fn->preprocessor_version_( "" );
|
||||
fn->originating_system_( "" );
|
||||
@@ -295,10 +299,10 @@ STEPfile::HeaderDefaultFileSchema() {
|
||||
StringAggregate_ptr tmp = new StringAggregate;
|
||||
|
||||
tmp->StrToVal( "", &_error,
|
||||
fs->attributes[0].
|
||||
aDesc -> DomainType(),
|
||||
_headerInstances );
|
||||
fs->schema_identifiers_(tmp);
|
||||
fs->attributes[0].
|
||||
aDesc -> DomainType(),
|
||||
_headerInstances );
|
||||
fs->schema_identifiers_( tmp );
|
||||
|
||||
fs->STEPfile_id = HeaderId( "File_Schema" );
|
||||
|
||||
@@ -328,8 +332,8 @@ header section entites. The file id numbers are important.
|
||||
***************************/
|
||||
void
|
||||
STEPfile::HeaderMergeInstances( InstMgr * im ) {
|
||||
SDAI_Application_instance* se = 0;
|
||||
SDAI_Application_instance* from = 0;
|
||||
SDAI_Application_instance * se = 0;
|
||||
SDAI_Application_instance * from = 0;
|
||||
|
||||
int idnum;
|
||||
|
||||
@@ -830,7 +834,7 @@ STEPfile::ReadWorkingData1( istream & in ) {
|
||||
** in an exchange file
|
||||
******************************************************************/
|
||||
int
|
||||
STEPfile::ReadData2( istream & in, int useTechCor ) {
|
||||
STEPfile::ReadData2( istream & in, bool useTechCor ) {
|
||||
_entsInvalid = 0;
|
||||
_entsIncomplete = 0;
|
||||
_entsWarning = 0;
|
||||
@@ -1133,7 +1137,7 @@ STEPfile::ReadData2( istream & in ) {
|
||||
#endif
|
||||
|
||||
int
|
||||
STEPfile::ReadWorkingData2( istream & in, int useTechCor ) {
|
||||
STEPfile::ReadWorkingData2( istream & in, bool useTechCor ) {
|
||||
return ReadData2( in, useTechCor );
|
||||
#ifdef junk
|
||||
_errorCount = 0; // reset error count
|
||||
@@ -1319,7 +1323,7 @@ STEPfile::CreateInstance( istream & in, ostream & out ) {
|
||||
int fileid = -1;
|
||||
SDAI_Application_instance_ptr * scopelist = 0;
|
||||
|
||||
SDAI_Application_instance* obj;
|
||||
SDAI_Application_instance * obj;
|
||||
ErrorDescriptor result;
|
||||
// Sent down to CreateSubSuperInstance() to receive error info
|
||||
|
||||
@@ -1497,7 +1501,7 @@ STEPfile::CreateScopeInstances( istream & in, SDAI_Application_instance_ptr ** s
|
||||
in.putback( c );
|
||||
*scopelist = new SDAI_Application_instance_ptr [i];
|
||||
while( i > 0 ) {
|
||||
*scopelist [i-1] = inscope [i];
|
||||
*scopelist [i - 1] = inscope [i];
|
||||
i--;
|
||||
}
|
||||
|
||||
@@ -1745,7 +1749,7 @@ void ReadEntityError( char c, int i, istream & in ) {
|
||||
*****************************************************/
|
||||
SDAI_Application_instance *
|
||||
STEPfile::ReadInstance( istream & in, ostream & out, std::string & cmtStr,
|
||||
int useTechCor ) {
|
||||
bool useTechCor ) {
|
||||
Severity sev = SEVERITY_NULL;
|
||||
|
||||
std::string tmpbuf;
|
||||
@@ -1756,7 +1760,7 @@ STEPfile::ReadInstance( istream & in, ostream & out, std::string & cmtStr,
|
||||
|
||||
char c;
|
||||
int fileid;
|
||||
SDAI_Application_instance* obj = ENTITY_NULL;
|
||||
SDAI_Application_instance * obj = ENTITY_NULL;
|
||||
int idIncrNum = FileIdIncr();
|
||||
|
||||
ReadComment( in, cmtStr );
|
||||
@@ -1828,7 +1832,7 @@ STEPfile::ReadInstance( istream & in, ostream & out, std::string & cmtStr,
|
||||
if( c == '(' ) {
|
||||
// TODO
|
||||
sev = obj->STEPread( fileid, idIncrNum, &instances(), in, currSch.c_str(),
|
||||
useTechCor );
|
||||
useTechCor, _strict );
|
||||
|
||||
ReadTokenSeparator( in, &cmtStr );
|
||||
|
||||
@@ -1857,7 +1861,7 @@ STEPfile::ReadInstance( istream & in, ostream & out, std::string & cmtStr,
|
||||
if( !in.good() ) {
|
||||
out << "ERROR: instance #" << fileid
|
||||
<< " Unexpected file problem in "
|
||||
<< "STEPfile::CreateInstance.\n";
|
||||
<< "STEPfile::ReadInstance." << endl;;
|
||||
}
|
||||
ReadTokenSeparator( in, &cmtStr );
|
||||
|
||||
@@ -1865,8 +1869,8 @@ STEPfile::ReadInstance( istream & in, ostream & out, std::string & cmtStr,
|
||||
if( userDefined ) {
|
||||
SkipInstance( in, tmpbuf );
|
||||
out << "WARNING: #" << fileid <<
|
||||
". Ignoring User defined entity.\n\tdata lost: !"
|
||||
<< objnm << tmpbuf << "\n";
|
||||
". Ignoring User defined entity." << endl << " data lost: !"
|
||||
<< objnm << tmpbuf << endl;
|
||||
++_warningCount;
|
||||
return ENTITY_NULL;
|
||||
}
|
||||
@@ -1875,7 +1879,7 @@ STEPfile::ReadInstance( istream & in, ostream & out, std::string & cmtStr,
|
||||
// (WORKING_SESSION included)
|
||||
|
||||
sev = obj->STEPread( fileid, idIncrNum, &instances(), in, currSch.c_str(),
|
||||
useTechCor );
|
||||
useTechCor, _strict );
|
||||
|
||||
ReadTokenSeparator( in, &cmtStr );
|
||||
|
||||
@@ -1961,17 +1965,17 @@ BUG: doesn't check to see if the backup command works.
|
||||
void
|
||||
STEPfile::MakeBackupFile() {
|
||||
std::string bckup = FileName();
|
||||
bckup.append(".bak");
|
||||
bckup.append( ".bak" );
|
||||
|
||||
std::fstream f(FileName().c_str(), std::fstream::in|std::fstream::binary);
|
||||
std::fstream f( FileName().c_str(), std::fstream::in | std::fstream::binary );
|
||||
f << std::noskipws;
|
||||
std::istream_iterator<unsigned char> begin(f);
|
||||
std::istream_iterator<unsigned char> begin( f );
|
||||
std::istream_iterator<unsigned char> end;
|
||||
|
||||
std::fstream f2(bckup.c_str(), std::fstream::out|std::fstream::trunc|std::fstream::binary);
|
||||
std::ostream_iterator<char> begin2(f2);
|
||||
std::fstream f2( bckup.c_str(), std::fstream::out | std::fstream::trunc | std::fstream::binary );
|
||||
std::ostream_iterator<char> begin2( f2 );
|
||||
|
||||
copy(begin, end, begin2);
|
||||
copy( begin, end, begin2 );
|
||||
|
||||
_error.AppendToDetailMsg( "Making backup file: " );
|
||||
_error.AppendToDetailMsg( bckup.c_str() );
|
||||
@@ -2080,7 +2084,7 @@ The header section entities must be numbered in the following manner:
|
||||
int STEPfile::HeaderId( const std::string name ) {
|
||||
std::string tmp = name;
|
||||
|
||||
std::transform(tmp.begin(), tmp.end(), tmp.begin(), ::toupper);
|
||||
std::transform( tmp.begin(), tmp.end(), tmp.begin(), ::toupper );
|
||||
|
||||
if( tmp == "FILE_DESCRIPTION" ) {
|
||||
return 1;
|
||||
@@ -2105,7 +2109,7 @@ STEPfile::WriteHeader( ostream & out ) {
|
||||
WriteHeaderInstanceFileSchema( out );
|
||||
|
||||
// Write the rest of the header instances
|
||||
SDAI_Application_instance* se;
|
||||
SDAI_Application_instance * se;
|
||||
int n = _headerInstances->InstanceCount();
|
||||
for( int i = 0; i < n; ++i ) {
|
||||
se = _headerInstances->GetMgrNode( i ) ->GetApplication_instance();
|
||||
@@ -2123,7 +2127,7 @@ STEPfile::WriteHeader( ostream & out ) {
|
||||
/***************************
|
||||
***************************/
|
||||
void
|
||||
STEPfile::WriteHeaderInstance( SDAI_Application_instance* obj, ostream & out ) {
|
||||
STEPfile::WriteHeaderInstance( SDAI_Application_instance * obj, ostream & out ) {
|
||||
std::string tmp;
|
||||
if( !obj->P21Comment().empty() ) {
|
||||
out << obj->P21Comment();
|
||||
@@ -2144,7 +2148,7 @@ STEPfile::WriteHeaderInstance( SDAI_Application_instance* obj, ostream & out ) {
|
||||
void
|
||||
STEPfile::WriteHeaderInstanceFileName( ostream & out ) {
|
||||
// Get the FileName instance from _headerInstances
|
||||
SDAI_Application_instance *se = 0;
|
||||
SDAI_Application_instance * se = 0;
|
||||
se = _headerInstances->GetApplication_instance( "File_Name" );
|
||||
if( se == ENTITY_NULL ) {
|
||||
se = ( SDAI_Application_instance * )HeaderDefaultFileName();
|
||||
@@ -2171,7 +2175,7 @@ STEPfile::WriteHeaderInstanceFileName( ostream & out ) {
|
||||
|
||||
void STEPfile::WriteHeaderInstanceFileDescription( ostream & out ) {
|
||||
// Get the FileDescription instance from _headerInstances
|
||||
SDAI_Application_instance *se = 0;
|
||||
SDAI_Application_instance * se = 0;
|
||||
se = _headerInstances->GetApplication_instance( "File_Description" );
|
||||
if( se == ENTITY_NULL ) {
|
||||
se = ( SDAI_Application_instance * )HeaderDefaultFileDescription();
|
||||
@@ -2181,7 +2185,7 @@ void STEPfile::WriteHeaderInstanceFileDescription( ostream & out ) {
|
||||
}
|
||||
|
||||
void STEPfile::WriteHeaderInstanceFileSchema( ostream & out ) {
|
||||
SDAI_Application_instance *se = 0;
|
||||
SDAI_Application_instance * se = 0;
|
||||
|
||||
// Get the FileName instance from _headerInstances
|
||||
se = _headerInstances->GetApplication_instance( "File_Schema" );
|
||||
@@ -2200,8 +2204,7 @@ void STEPfile::WriteData( ostream & out, int writeComments ) {
|
||||
out << "DATA;\n";
|
||||
|
||||
int n = instances().InstanceCount();
|
||||
for( int i = 0; i < n; ++i )
|
||||
{
|
||||
for( int i = 0; i < n; ++i ) {
|
||||
instances().GetMgrNode( i )->GetApplication_instance()->STEPwrite( out, currSch.c_str(), writeComments );
|
||||
}
|
||||
|
||||
@@ -2214,19 +2217,17 @@ void STEPfile::WriteData( ostream & out, int writeComments ) {
|
||||
void STEPfile::WriteValuePairsData( ostream & out, int writeComments, int mixedCase ) {
|
||||
std::string currSch = schemaName();
|
||||
int n = instances().InstanceCount();
|
||||
for( int i = 0; i < n; ++i )
|
||||
{
|
||||
for( int i = 0; i < n; ++i ) {
|
||||
instances().GetMgrNode( i )->GetApplication_instance()->WriteValuePairs( out, currSch.c_str(), writeComments, mixedCase );
|
||||
}
|
||||
}
|
||||
|
||||
Severity STEPfile::AppendFile( istream * in, int useTechCor ) {
|
||||
Severity STEPfile::AppendFile( istream * in, bool useTechCor ) {
|
||||
Severity rval = SEVERITY_NULL;
|
||||
char errbuf[BUFSIZ];
|
||||
|
||||
SetFileIdIncrement();
|
||||
int total_insts = 0, valid_insts = 0;
|
||||
__attribute__( ( unused ) ) int exchange_file = -1;
|
||||
|
||||
ReadTokenSeparator( *in );
|
||||
std::string keywd = GetKeyword( *in, "; #", _error );
|
||||
@@ -2236,11 +2237,9 @@ Severity STEPfile::AppendFile( istream * in, int useTechCor ) {
|
||||
|
||||
if( !strncmp( const_cast<char *>( keywd.c_str() ), "ISO-10303-21",
|
||||
strlen( const_cast<char *>( keywd.c_str() ) ) ) ) {
|
||||
exchange_file = 1;
|
||||
SetFileType( VERSION_CURRENT );
|
||||
} else if( !strncmp( const_cast<char *>( keywd.c_str() ), "STEP_WORKING_SESSION",
|
||||
strlen( const_cast<char *>( keywd.c_str() ) ) ) ) {
|
||||
exchange_file = 0;
|
||||
if( _fileType != WORKING_SESSION ) {
|
||||
_error.AppendToUserMsg(
|
||||
"Warning: Reading in file as Working Session file.\n" );
|
||||
@@ -2259,7 +2258,7 @@ Severity STEPfile::AppendFile( istream * in, int useTechCor ) {
|
||||
return SEVERITY_INPUT_ERROR;
|
||||
}
|
||||
|
||||
cout << "Reading Data from " << ( ( FileName().compare( "-" ) == 0 ) ? "standard input" : FileName() ) << "...\n";
|
||||
cout << "Reading Data from " << ( ( FileName().compare( "-" ) == 0 ) ? "standard input" : FileName().c_str() ) << "...\n";
|
||||
|
||||
// Read header
|
||||
rval = ReadHeader( *in );
|
||||
@@ -2406,7 +2405,7 @@ Severity STEPfile::WriteWorkingFile( ostream & out, int clearError, int writeCom
|
||||
|
||||
/******************************************************/
|
||||
Severity STEPfile::WriteWorkingFile( const std::string filename, int clearError,
|
||||
int writeComments ) {
|
||||
int writeComments ) {
|
||||
if( clearError ) {
|
||||
_error.ClearErrorMsg();
|
||||
}
|
||||
|
||||
+153
-129
@@ -1,5 +1,5 @@
|
||||
#ifndef _STEPFILE_H
|
||||
#define _STEPFILE_H
|
||||
#define _STEPFILE_H
|
||||
|
||||
/*
|
||||
* NIST STEP Core Class Library
|
||||
@@ -13,6 +13,7 @@
|
||||
* and is not subject to copyright.
|
||||
*/
|
||||
|
||||
#include <scl_export.h>
|
||||
#include <instmgr.h>
|
||||
#include <Registry.h>
|
||||
#include <fstream>
|
||||
@@ -27,185 +28,208 @@
|
||||
#define READ_INCOMPLETE 20
|
||||
|
||||
enum FileTypeCode {
|
||||
TYPE_UNKNOWN = -2,
|
||||
VERSION_OLD = -1,
|
||||
VERSION_UNKNOWN = 0,
|
||||
VERSION_CURRENT = 1,
|
||||
WORKING_SESSION = 2,
|
||||
TYPE_UNKNOWN = -2,
|
||||
VERSION_OLD = -1,
|
||||
VERSION_UNKNOWN = 0,
|
||||
VERSION_CURRENT = 1,
|
||||
WORKING_SESSION = 2,
|
||||
OLD_WORKING_SESSION = 3
|
||||
};
|
||||
};
|
||||
|
||||
class STEPfile
|
||||
{
|
||||
protected:
|
||||
//data members
|
||||
class SCL_EDITOR_EXPORT STEPfile {
|
||||
protected:
|
||||
//data members
|
||||
|
||||
InstMgr& _instances;
|
||||
Registry& _reg;
|
||||
InstMgr & _instances;
|
||||
Registry & _reg;
|
||||
|
||||
InstMgr & instances () { return _instances; }
|
||||
Registry & reg () { return _reg; }
|
||||
int _fileIdIncr; //Increment value to be added to FileId Numbers on input
|
||||
InstMgr & instances() {
|
||||
return _instances;
|
||||
}
|
||||
Registry & reg() {
|
||||
return _reg;
|
||||
}
|
||||
int _fileIdIncr; //Increment value to be added to FileId Numbers on input
|
||||
|
||||
//header information
|
||||
InstMgr* _headerInstances;
|
||||
Registry *_headerRegistry;
|
||||
|
||||
int _headerId; //STEPfile_id given to SDAI_Application_instance from header section
|
||||
InstMgr * _headerInstances;
|
||||
Registry * _headerRegistry;
|
||||
|
||||
int _headerId; //STEPfile_id given to SDAI_Application_instance from header section
|
||||
|
||||
//file information
|
||||
DirObj* _currentDir;
|
||||
std::string _fileName;
|
||||
DirObj * _currentDir;
|
||||
std::string _fileName;
|
||||
|
||||
//error information
|
||||
ErrorDescriptor _error;
|
||||
ErrorDescriptor _error;
|
||||
|
||||
// new errors
|
||||
int _entsNotCreated; // num entities not created in first pass
|
||||
int _entsInvalid; // num entities that had invalid attr values
|
||||
int _entsIncomplete; // num entities that had missing attr values
|
||||
// (includes entities that had invalid values
|
||||
// for required attrs)
|
||||
int _entsWarning; // num entities that may have had problems
|
||||
// with attrs - reported as an attr user msg
|
||||
// new errors
|
||||
int _entsNotCreated; // num entities not created in first pass
|
||||
int _entsInvalid; // num entities that had invalid attr values
|
||||
int _entsIncomplete; // num entities that had missing attr values
|
||||
// (includes entities that had invalid values
|
||||
// for required attrs)
|
||||
int _entsWarning; // num entities that may have had problems
|
||||
// with attrs - reported as an attr user msg
|
||||
|
||||
// old errors
|
||||
int _errorCount;
|
||||
int _warningCount;
|
||||
// old errors
|
||||
int _errorCount;
|
||||
int _warningCount;
|
||||
|
||||
int _maxErrorCount;
|
||||
int _maxErrorCount;
|
||||
|
||||
bool _strict; ///< If false, "missing and required" attributes are replaced with a generic value when file is read
|
||||
|
||||
protected:
|
||||
|
||||
protected:
|
||||
|
||||
//file type information
|
||||
FileTypeCode _fileType;
|
||||
char ENTITY_NAME_DELIM;
|
||||
char* FILE_DELIM;
|
||||
char* END_FILE_DELIM;
|
||||
|
||||
FileTypeCode _fileType;
|
||||
char ENTITY_NAME_DELIM;
|
||||
char * FILE_DELIM;
|
||||
char * END_FILE_DELIM;
|
||||
|
||||
//public member functions
|
||||
public:
|
||||
public:
|
||||
|
||||
//public access to member variables
|
||||
//header information
|
||||
InstMgr* HeaderInstances() { return _headerInstances; }
|
||||
const Registry *HeaderRegistry() { return _headerRegistry; }
|
||||
InstMgr * HeaderInstances() {
|
||||
return _headerInstances;
|
||||
}
|
||||
const Registry * HeaderRegistry() {
|
||||
return _headerRegistry;
|
||||
}
|
||||
// to create header instances
|
||||
SDAI_Application_instance* HeaderDefaultFileName();
|
||||
SDAI_Application_instance* HeaderDefaultFileDescription();
|
||||
SDAI_Application_instance* HeaderDefaultFileSchema();
|
||||
SDAI_Application_instance * HeaderDefaultFileName();
|
||||
SDAI_Application_instance * HeaderDefaultFileDescription();
|
||||
SDAI_Application_instance * HeaderDefaultFileSchema();
|
||||
|
||||
//file information
|
||||
const std::string FileName() const { return _fileName; }
|
||||
const std::string SetFileName (const std::string name = "");
|
||||
const std::string TruncFileName (const std::string name) const;
|
||||
const std::string FileName() const {
|
||||
return _fileName;
|
||||
}
|
||||
const std::string SetFileName( const std::string name = "" );
|
||||
const std::string TruncFileName( const std::string name ) const;
|
||||
|
||||
//error information
|
||||
ErrorDescriptor& Error() /* const */ { return _error; }
|
||||
int ErrorCount() const { return _errorCount; }
|
||||
int WarningCount() const { return _warningCount; }
|
||||
Severity AppendEntityErrorMsg (ErrorDescriptor *e);
|
||||
|
||||
ErrorDescriptor & Error() { /* const */
|
||||
return _error;
|
||||
}
|
||||
int ErrorCount() const {
|
||||
return _errorCount;
|
||||
}
|
||||
int WarningCount() const {
|
||||
return _warningCount;
|
||||
}
|
||||
Severity AppendEntityErrorMsg( ErrorDescriptor * e );
|
||||
|
||||
//version information
|
||||
FileTypeCode FileType() const { return _fileType; }
|
||||
void FileType (FileTypeCode ft) { _fileType = ft; }
|
||||
int SetFileType (FileTypeCode ft = VERSION_CURRENT);
|
||||
|
||||
//Reading and Writing
|
||||
Severity ReadExchangeFile (const std::string filename = "", int useTechCor =1);
|
||||
Severity AppendExchangeFile (const std::string filename = "", int useTechCor =1);
|
||||
FileTypeCode FileType() const {
|
||||
return _fileType;
|
||||
}
|
||||
void FileType( FileTypeCode ft ) {
|
||||
_fileType = ft;
|
||||
}
|
||||
int SetFileType( FileTypeCode ft = VERSION_CURRENT );
|
||||
|
||||
Severity ReadWorkingFile (const std::string filename = "", int useTechCor =1);
|
||||
Severity AppendWorkingFile (const std::string filename = "", int useTechCor =1);
|
||||
//Reading and Writing
|
||||
Severity ReadExchangeFile( const std::string filename = "", bool useTechCor = true );
|
||||
Severity AppendExchangeFile( const std::string filename = "", bool useTechCor = true );
|
||||
|
||||
Severity AppendFile (istream* in, int useTechCor =1) ;
|
||||
Severity ReadWorkingFile( const std::string filename = "", bool useTechCor = true );
|
||||
Severity AppendWorkingFile( const std::string filename = "", bool useTechCor = true );
|
||||
|
||||
Severity WriteExchangeFile (ostream& out, int validate =1,
|
||||
int clearError = 1, int writeComments = 1);
|
||||
Severity WriteExchangeFile (const std::string filename = "", int validate =1,
|
||||
int clearError = 1, int writeComments = 1);
|
||||
Severity WriteValuePairsFile(ostream& out, int validate =1,
|
||||
int clearError =1,
|
||||
int writeComments = 1, int mixedCase = 1);
|
||||
Severity AppendFile( istream * in, bool useTechCor = true ) ;
|
||||
|
||||
Severity WriteWorkingFile (ostream& out, int clearError = 1,
|
||||
int writeComments = 1);
|
||||
Severity WriteWorkingFile (const std::string filename = "", int clearError = 1,
|
||||
int writeComments = 1);
|
||||
Severity WriteExchangeFile( ostream & out, int validate = 1,
|
||||
int clearError = 1, int writeComments = 1 );
|
||||
Severity WriteExchangeFile( const std::string filename = "", int validate = 1,
|
||||
int clearError = 1, int writeComments = 1 );
|
||||
Severity WriteValuePairsFile( ostream & out, int validate = 1,
|
||||
int clearError = 1,
|
||||
int writeComments = 1, int mixedCase = 1 );
|
||||
|
||||
stateEnum EntityWfState(char c);
|
||||
|
||||
void Renumber ();
|
||||
Severity WriteWorkingFile( ostream & out, int clearError = 1,
|
||||
int writeComments = 1 );
|
||||
Severity WriteWorkingFile( const std::string filename = "", int clearError = 1,
|
||||
int writeComments = 1 );
|
||||
|
||||
stateEnum EntityWfState( char c );
|
||||
|
||||
void Renumber();
|
||||
|
||||
//constructors
|
||||
STEPfile (Registry& r, InstMgr& i, const std::string filename = "");
|
||||
virtual ~STEPfile();
|
||||
STEPfile( Registry & r, InstMgr & i, const std::string filename = "", bool strict = true );
|
||||
virtual ~STEPfile();
|
||||
|
||||
protected:
|
||||
protected:
|
||||
//member functions
|
||||
const std::string schemaName(); // returns and copies out schema name from header instances
|
||||
const std::string schemaName(); // returns and copies out schema name from header instances
|
||||
//called by ReadExchangeFile
|
||||
istream* OpenInputFile (const std::string filename = "");
|
||||
void CloseInputFile(istream* in);
|
||||
|
||||
Severity ReadHeader(istream& in);
|
||||
istream * OpenInputFile( const std::string filename = "" );
|
||||
void CloseInputFile( istream * in );
|
||||
|
||||
Severity HeaderVerifyInstances(InstMgr* im);
|
||||
void HeaderMergeInstances(InstMgr* im);
|
||||
|
||||
int HeaderId (int increment =1);
|
||||
int HeaderId (const std::string name);
|
||||
Severity ReadHeader( istream & in );
|
||||
|
||||
int ReadData1 (istream& in); // first pass to create instances
|
||||
// second pass to read instances
|
||||
int ReadData2 (istream& in, int useTechCor =1);
|
||||
Severity HeaderVerifyInstances( InstMgr * im );
|
||||
void HeaderMergeInstances( InstMgr * im );
|
||||
|
||||
int HeaderId( int increment = 1 );
|
||||
int HeaderId( const std::string name );
|
||||
|
||||
int ReadData1( istream & in ); // first pass to create instances
|
||||
// second pass to read instances
|
||||
int ReadData2( istream & in, bool useTechCor = true );
|
||||
|
||||
// obsolete
|
||||
int ReadWorkingData1 (istream& in);
|
||||
int ReadWorkingData2 (istream& in, int useTechCor =1);
|
||||
int ReadWorkingData1( istream & in );
|
||||
int ReadWorkingData2( istream & in, bool useTechCor = true );
|
||||
|
||||
void ReadRestOfFile(istream& in);
|
||||
void ReadRestOfFile( istream & in );
|
||||
|
||||
// create instance - used by ReadData1()
|
||||
SDAI_Application_instance * CreateInstance(istream& in, ostream& out);
|
||||
// create complex instance - used by CreateInstance()
|
||||
SDAI_Application_instance * CreateSubSuperInstance(istream& in, int fileid,
|
||||
ErrorDescriptor &);
|
||||
// create instance - used by ReadData1()
|
||||
SDAI_Application_instance * CreateInstance( istream & in, ostream & out );
|
||||
// create complex instance - used by CreateInstance()
|
||||
SDAI_Application_instance * CreateSubSuperInstance( istream & in, int fileid,
|
||||
ErrorDescriptor & );
|
||||
|
||||
// read the instance - used by ReadData2()
|
||||
SDAI_Application_instance * ReadInstance(istream& in, ostream& out,
|
||||
std::string &cmtStr, int useTechCor =1);
|
||||
// read the instance - used by ReadData2()
|
||||
SDAI_Application_instance * ReadInstance( istream & in, ostream & out,
|
||||
std::string & cmtStr, bool useTechCor = true );
|
||||
|
||||
// reading scopes are still incomplete
|
||||
// these functions are stubs
|
||||
Severity CreateScopeInstances(istream& in, SDAI_Application_instance_ptr ** scopelist);
|
||||
Severity ReadScopeInstances(istream& in);
|
||||
// reading scopes are still incomplete
|
||||
// these functions are stubs
|
||||
Severity CreateScopeInstances( istream & in, SDAI_Application_instance_ptr ** scopelist );
|
||||
Severity ReadScopeInstances( istream & in );
|
||||
// Severity ReadSubSuperInstance(istream& in);
|
||||
|
||||
int FindDataSection (istream& in);
|
||||
int FindHeaderSection (istream& in);
|
||||
int FindDataSection( istream & in );
|
||||
int FindHeaderSection( istream & in );
|
||||
|
||||
// writing working session files
|
||||
void WriteWorkingData(ostream& out, int writeComments = 1);
|
||||
void WriteWorkingData( ostream & out, int writeComments = 1 );
|
||||
|
||||
//called by WriteExchangeFile
|
||||
ofstream* OpenOutputFile(const std::string filename = "");
|
||||
void CloseOutputFile(ostream* out);
|
||||
ofstream * OpenOutputFile( const std::string filename = "" );
|
||||
void CloseOutputFile( ostream * out );
|
||||
|
||||
void WriteHeader (ostream& out);
|
||||
void WriteHeaderInstance (SDAI_Application_instance *obj, ostream& out);
|
||||
void WriteHeaderInstanceFileName (ostream& out);
|
||||
void WriteHeaderInstanceFileDescription (ostream& out);
|
||||
void WriteHeaderInstanceFileSchema (ostream& out);
|
||||
void WriteHeader( ostream & out );
|
||||
void WriteHeaderInstance( SDAI_Application_instance * obj, ostream & out );
|
||||
void WriteHeaderInstanceFileName( ostream & out );
|
||||
void WriteHeaderInstanceFileDescription( ostream & out );
|
||||
void WriteHeaderInstanceFileSchema( ostream & out );
|
||||
|
||||
void WriteData (ostream& out, int writeComments = 1);
|
||||
void WriteValuePairsData(ostream& out, int writeComments = 1,
|
||||
int mixedCase = 1);
|
||||
|
||||
int IncrementFileId (int fileid);
|
||||
int FileIdIncr() { return _fileIdIncr; }
|
||||
void SetFileIdIncrement ();
|
||||
void MakeBackupFile();
|
||||
void WriteData( ostream & out, int writeComments = 1 );
|
||||
void WriteValuePairsData( ostream & out, int writeComments = 1,
|
||||
int mixedCase = 1 );
|
||||
|
||||
int IncrementFileId( int fileid );
|
||||
int FileIdIncr() {
|
||||
return _fileIdIncr;
|
||||
}
|
||||
void SetFileIdIncrement();
|
||||
void MakeBackupFile();
|
||||
|
||||
// void ReadWhiteSpace(istream& in);
|
||||
};
|
||||
|
||||
@@ -24,12 +24,11 @@ extern void HeaderSchemaInit( Registry & reg );
|
||||
|
||||
//constructor & destructor
|
||||
|
||||
STEPfile::STEPfile( Registry & r, InstMgr & i, const std::string filename ) :
|
||||
STEPfile::STEPfile( Registry & r, InstMgr & i, const std::string filename, bool strict ) :
|
||||
_instances( i ), _reg( r ), _fileIdIncr( 0 ), _headerId( 0 ),
|
||||
_entsNotCreated( 0 ), _entsInvalid( 0 ), _entsIncomplete( 0 ),
|
||||
_entsWarning( 0 ), _errorCount( 0 ), _warningCount( 0 ),
|
||||
_maxErrorCount( 5000 )
|
||||
{
|
||||
_maxErrorCount( 5000 ), _strict( strict ) {
|
||||
SetFileType( VERSION_CURRENT );
|
||||
SetFileIdIncrement();
|
||||
_currentDir = new DirObj( "" );
|
||||
@@ -92,17 +91,17 @@ const std::string STEPfile::TruncFileName( const std::string filename ) const {
|
||||
#else
|
||||
char slash = '/';
|
||||
#endif
|
||||
size_t l = filename.find_last_of(slash);
|
||||
size_t l = filename.find_last_of( slash );
|
||||
if( l == std::string::npos ) {
|
||||
return filename;
|
||||
} else {
|
||||
return filename.substr(l);
|
||||
return filename.substr( l );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/******************************************************/
|
||||
Severity STEPfile::ReadExchangeFile( const std::string filename, int useTechCor ) {
|
||||
Severity STEPfile::ReadExchangeFile( const std::string filename, bool useTechCor ) {
|
||||
_error.ClearErrorMsg();
|
||||
_errorCount = 0;
|
||||
istream * in = OpenInputFile( filename );
|
||||
@@ -121,7 +120,7 @@ Severity STEPfile::ReadExchangeFile( const std::string filename, int useTechCor
|
||||
return rval;
|
||||
}
|
||||
|
||||
Severity STEPfile::AppendExchangeFile( const std::string filename, int useTechCor ) {
|
||||
Severity STEPfile::AppendExchangeFile( const std::string filename, bool useTechCor ) {
|
||||
_error.ClearErrorMsg();
|
||||
_errorCount = 0;
|
||||
istream * in = OpenInputFile( filename );
|
||||
@@ -135,7 +134,7 @@ Severity STEPfile::AppendExchangeFile( const std::string filename, int useTechCo
|
||||
}
|
||||
|
||||
/******************************************************/
|
||||
Severity STEPfile::ReadWorkingFile( const std::string filename, int useTechCor ) {
|
||||
Severity STEPfile::ReadWorkingFile( const std::string filename, bool useTechCor ) {
|
||||
_error.ClearErrorMsg();
|
||||
_errorCount = 0;
|
||||
istream * in = OpenInputFile( filename );
|
||||
@@ -155,7 +154,7 @@ Severity STEPfile::ReadWorkingFile( const std::string filename, int useTechCor )
|
||||
}
|
||||
|
||||
|
||||
Severity STEPfile::AppendWorkingFile( const std::string filename, int useTechCor ) {
|
||||
Severity STEPfile::AppendWorkingFile( const std::string filename, bool useTechCor ) {
|
||||
_error.ClearErrorMsg();
|
||||
_errorCount = 0;
|
||||
istream * in = OpenInputFile( filename );
|
||||
@@ -258,7 +257,7 @@ void STEPfile::SetFileIdIncrement() {
|
||||
if( instances().MaxFileId() < 0 ) {
|
||||
_fileIdIncr = 0;
|
||||
} else _fileIdIncr =
|
||||
( int )( ( ceil( ( ( instances().MaxFileId() + 99.0 ) / 1000.0 ) ) + 1.0 ) * 1000.0 );
|
||||
( int )( ( ceil( ( ( instances().MaxFileId() + 99.0 ) / 1000.0 ) ) + 1.0 ) * 1000.0 );
|
||||
}
|
||||
|
||||
|
||||
@@ -272,7 +271,7 @@ const std::string STEPfile::schemaName() {
|
||||
SdaiFile_schema * fs;
|
||||
std::string schName;
|
||||
STEPnode * n;
|
||||
|
||||
|
||||
if( _headerInstances == NULL ) {
|
||||
return schName;
|
||||
}
|
||||
@@ -297,13 +296,13 @@ const std::string STEPfile::schemaName() {
|
||||
schName.clear();
|
||||
return schName;
|
||||
}
|
||||
if( schName[ schName.length()-1 ] == '\'' ) {
|
||||
schName = schName.substr(1,schName.length()-2);
|
||||
if( schName[ schName.length() - 1 ] == '\'' ) {
|
||||
schName = schName.substr( 1, schName.length() - 2 );
|
||||
} else {
|
||||
_error.AppendToUserMsg( "In STEPfile::schemaName: schName was truncated." );
|
||||
_error.GreaterSeverity( SEVERITY_WARNING );
|
||||
|
||||
schName = schName.substr(1,schName.length()-1);
|
||||
|
||||
schName = schName.substr( 1, schName.length() - 1 );
|
||||
}
|
||||
return schName;
|
||||
}
|
||||
|
||||
+468
-468
File diff suppressed because it is too large
Load Diff
+123
-98
@@ -4,6 +4,7 @@
|
||||
// it since your modifications will be lost if fedex_plus is used to
|
||||
// regenerate it.
|
||||
|
||||
#include <scl_export.h>
|
||||
#include <sdai.h>
|
||||
#include <Registry.h>
|
||||
#include <STEPaggregate.h>
|
||||
@@ -12,84 +13,92 @@
|
||||
|
||||
///////// ENTITY section_language
|
||||
|
||||
extern AttrDescriptor *a_0section;
|
||||
extern AttrDescriptor *a_1default_language;
|
||||
extern SCL_EDITOR_EXPORT AttrDescriptor * a_0section;
|
||||
extern SCL_EDITOR_EXPORT AttrDescriptor * a_1default_language;
|
||||
|
||||
class SdaiSection_language : public SDAI_Application_instance {
|
||||
protected:
|
||||
class SCL_EDITOR_EXPORT SdaiSection_language : public SDAI_Application_instance {
|
||||
protected:
|
||||
SDAI_String _section ; // OPTIONAL
|
||||
SDAI_String _default_language ;
|
||||
public:
|
||||
public:
|
||||
|
||||
SdaiSection_language ( );
|
||||
SdaiSection_language (SDAI_Application_instance *se, int *addAttrs = 0);
|
||||
SdaiSection_language (SdaiSection_language& e );
|
||||
~SdaiSection_language ();
|
||||
SdaiSection_language( );
|
||||
SdaiSection_language( SDAI_Application_instance * se, int * addAttrs = 0 );
|
||||
SdaiSection_language( SdaiSection_language & e );
|
||||
~SdaiSection_language();
|
||||
|
||||
int opcode () { return 0 ; }
|
||||
int opcode() {
|
||||
return 0 ;
|
||||
}
|
||||
const SdaiSection_name section_() const;
|
||||
void section_ (const SdaiSection_name x);
|
||||
void section_( const SdaiSection_name x );
|
||||
|
||||
const SdaiLanguage_name default_language_() const;
|
||||
void default_language_ (const SdaiLanguage_name x);
|
||||
void default_language_( const SdaiLanguage_name x );
|
||||
|
||||
};
|
||||
|
||||
inline SdaiSection_language *
|
||||
create_SdaiSection_language () { return new SdaiSection_language ; }
|
||||
create_SdaiSection_language() {
|
||||
return new SdaiSection_language ;
|
||||
}
|
||||
|
||||
///////// END_ENTITY section_language
|
||||
|
||||
|
||||
///////// ENTITY file_population
|
||||
|
||||
extern AttrDescriptor *a_2governing_schema;
|
||||
extern AttrDescriptor *a_3determination_method;
|
||||
extern AttrDescriptor *a_4governed_sections;
|
||||
extern SCL_EDITOR_EXPORT AttrDescriptor * a_2governing_schema;
|
||||
extern SCL_EDITOR_EXPORT AttrDescriptor * a_3determination_method;
|
||||
extern SCL_EDITOR_EXPORT AttrDescriptor * a_4governed_sections;
|
||||
|
||||
class SdaiFile_population : public SDAI_Application_instance {
|
||||
protected:
|
||||
class SCL_EDITOR_EXPORT SdaiFile_population : public SDAI_Application_instance {
|
||||
protected:
|
||||
SDAI_String _governing_schema ;
|
||||
SDAI_String _determination_method ;
|
||||
StringAggregate _governed_sections ; // OPTIONAL // of section_name
|
||||
|
||||
public:
|
||||
public:
|
||||
|
||||
SdaiFile_population ( );
|
||||
SdaiFile_population (SDAI_Application_instance *se, int *addAttrs = 0);
|
||||
SdaiFile_population (SdaiFile_population& e );
|
||||
~SdaiFile_population ();
|
||||
SdaiFile_population( );
|
||||
SdaiFile_population( SDAI_Application_instance * se, int * addAttrs = 0 );
|
||||
SdaiFile_population( SdaiFile_population & e );
|
||||
~SdaiFile_population();
|
||||
|
||||
int opcode () { return 1 ; }
|
||||
int opcode() {
|
||||
return 1 ;
|
||||
}
|
||||
const SdaiSchema_name governing_schema_() const;
|
||||
void governing_schema_ (const SdaiSchema_name x);
|
||||
void governing_schema_( const SdaiSchema_name x );
|
||||
|
||||
const SdaiExchange_structure_identifier determination_method_() const;
|
||||
void determination_method_ (const SdaiExchange_structure_identifier x);
|
||||
void determination_method_( const SdaiExchange_structure_identifier x );
|
||||
|
||||
const StringAggregate_ptr governed_sections_() const;
|
||||
void governed_sections_ (const StringAggregate_ptr x);
|
||||
void governed_sections_( const StringAggregate_ptr x );
|
||||
|
||||
};
|
||||
|
||||
inline SdaiFile_population *
|
||||
create_SdaiFile_population () { return new SdaiFile_population ; }
|
||||
create_SdaiFile_population() {
|
||||
return new SdaiFile_population ;
|
||||
}
|
||||
|
||||
///////// END_ENTITY file_population
|
||||
|
||||
|
||||
///////// ENTITY file_name
|
||||
|
||||
extern AttrDescriptor *a_5name;
|
||||
extern AttrDescriptor *a_6time_stamp;
|
||||
extern AttrDescriptor *a_7author;
|
||||
extern AttrDescriptor *a_8organization;
|
||||
extern AttrDescriptor *a_9preprocessor_version;
|
||||
extern AttrDescriptor *a_10originating_system;
|
||||
extern AttrDescriptor *a_11authorization;
|
||||
extern AttrDescriptor * a_5name;
|
||||
extern AttrDescriptor * a_6time_stamp;
|
||||
extern AttrDescriptor * a_7author;
|
||||
extern AttrDescriptor * a_8organization;
|
||||
extern AttrDescriptor * a_9preprocessor_version;
|
||||
extern AttrDescriptor * a_10originating_system;
|
||||
extern AttrDescriptor * a_11authorization;
|
||||
|
||||
class SdaiFile_name : public SDAI_Application_instance {
|
||||
protected:
|
||||
class SCL_EDITOR_EXPORT SdaiFile_name : public SDAI_Application_instance {
|
||||
protected:
|
||||
SDAI_String _name ;
|
||||
SDAI_String _time_stamp ;
|
||||
StringAggregate _author ;
|
||||
@@ -97,156 +106,172 @@ class SdaiFile_name : public SDAI_Application_instance {
|
||||
SDAI_String _preprocessor_version ;
|
||||
SDAI_String _originating_system ;
|
||||
SDAI_String _authorization ;
|
||||
public:
|
||||
public:
|
||||
|
||||
SdaiFile_name ( );
|
||||
SdaiFile_name (SDAI_Application_instance *se, int *addAttrs = 0);
|
||||
SdaiFile_name (SdaiFile_name& e );
|
||||
~SdaiFile_name ();
|
||||
SdaiFile_name( );
|
||||
SdaiFile_name( SDAI_Application_instance * se, int * addAttrs = 0 );
|
||||
SdaiFile_name( SdaiFile_name & e );
|
||||
~SdaiFile_name();
|
||||
|
||||
int opcode () { return 2 ; }
|
||||
int opcode() {
|
||||
return 2 ;
|
||||
}
|
||||
const SDAI_String name_() const;
|
||||
void name_ (const SDAI_String x);
|
||||
void name_( const SDAI_String x );
|
||||
|
||||
const SdaiTime_stamp_text time_stamp_() const;
|
||||
void time_stamp_ (const SdaiTime_stamp_text x);
|
||||
void time_stamp_( const SdaiTime_stamp_text x );
|
||||
|
||||
const StringAggregate_ptr author_() const;
|
||||
void author_ (const StringAggregate_ptr x);
|
||||
void author_( const StringAggregate_ptr x );
|
||||
|
||||
const StringAggregate_ptr organization_() const;
|
||||
void organization_ (const StringAggregate_ptr x);
|
||||
void organization_( const StringAggregate_ptr x );
|
||||
|
||||
const SDAI_String preprocessor_version_() const;
|
||||
void preprocessor_version_ (const SDAI_String x);
|
||||
void preprocessor_version_( const SDAI_String x );
|
||||
|
||||
const SDAI_String originating_system_() const;
|
||||
void originating_system_ (const SDAI_String x);
|
||||
void originating_system_( const SDAI_String x );
|
||||
|
||||
const SDAI_String authorization_() const;
|
||||
void authorization_ (const SDAI_String x);
|
||||
void authorization_( const SDAI_String x );
|
||||
|
||||
};
|
||||
|
||||
inline SdaiFile_name *
|
||||
create_SdaiFile_name () { return new SdaiFile_name ; }
|
||||
create_SdaiFile_name() {
|
||||
return new SdaiFile_name ;
|
||||
}
|
||||
|
||||
///////// END_ENTITY file_name
|
||||
|
||||
|
||||
///////// ENTITY section_context
|
||||
|
||||
extern AttrDescriptor *a_12section;
|
||||
extern AttrDescriptor *a_13context_identifiers;
|
||||
extern SCL_EDITOR_EXPORT AttrDescriptor * a_12section;
|
||||
extern SCL_EDITOR_EXPORT AttrDescriptor * a_13context_identifiers;
|
||||
|
||||
class SdaiSection_context : public SDAI_Application_instance {
|
||||
protected:
|
||||
class SCL_EDITOR_EXPORT SdaiSection_context : public SDAI_Application_instance {
|
||||
protected:
|
||||
SDAI_String _section ; // OPTIONAL
|
||||
StringAggregate _context_identifiers ; // of context_name
|
||||
|
||||
public:
|
||||
public:
|
||||
|
||||
SdaiSection_context ( );
|
||||
SdaiSection_context (SDAI_Application_instance *se, int *addAttrs = 0);
|
||||
SdaiSection_context (SdaiSection_context& e );
|
||||
~SdaiSection_context ();
|
||||
SdaiSection_context( );
|
||||
SdaiSection_context( SDAI_Application_instance * se, int * addAttrs = 0 );
|
||||
SdaiSection_context( SdaiSection_context & e );
|
||||
~SdaiSection_context();
|
||||
|
||||
int opcode () { return 3 ; }
|
||||
int opcode() {
|
||||
return 3 ;
|
||||
}
|
||||
const SdaiSection_name section_() const;
|
||||
void section_ (const SdaiSection_name x);
|
||||
void section_( const SdaiSection_name x );
|
||||
|
||||
const StringAggregate_ptr context_identifiers_() const;
|
||||
void context_identifiers_ (const StringAggregate_ptr x);
|
||||
void context_identifiers_( const StringAggregate_ptr x );
|
||||
|
||||
};
|
||||
|
||||
inline SdaiSection_context *
|
||||
create_SdaiSection_context () { return new SdaiSection_context ; }
|
||||
create_SdaiSection_context() {
|
||||
return new SdaiSection_context ;
|
||||
}
|
||||
|
||||
///////// END_ENTITY section_context
|
||||
|
||||
|
||||
///////// ENTITY file_description
|
||||
|
||||
extern AttrDescriptor *a_14description;
|
||||
extern AttrDescriptor *a_15implementation_level;
|
||||
extern SCL_EDITOR_EXPORT AttrDescriptor * a_14description;
|
||||
extern SCL_EDITOR_EXPORT AttrDescriptor * a_15implementation_level;
|
||||
|
||||
class SdaiFile_description : public SDAI_Application_instance {
|
||||
protected:
|
||||
class SCL_EDITOR_EXPORT SdaiFile_description : public SDAI_Application_instance {
|
||||
protected:
|
||||
StringAggregate _description ;
|
||||
SDAI_String _implementation_level ;
|
||||
public:
|
||||
public:
|
||||
|
||||
SdaiFile_description ( );
|
||||
SdaiFile_description (SDAI_Application_instance *se, int *addAttrs = 0);
|
||||
SdaiFile_description (SdaiFile_description& e );
|
||||
~SdaiFile_description ();
|
||||
SdaiFile_description( );
|
||||
SdaiFile_description( SDAI_Application_instance * se, int * addAttrs = 0 );
|
||||
SdaiFile_description( SdaiFile_description & e );
|
||||
~SdaiFile_description();
|
||||
|
||||
int opcode () { return 4 ; }
|
||||
int opcode() {
|
||||
return 4 ;
|
||||
}
|
||||
const StringAggregate_ptr description_() const;
|
||||
void description_ (const StringAggregate_ptr x);
|
||||
void description_( const StringAggregate_ptr x );
|
||||
|
||||
const SDAI_String implementation_level_() const;
|
||||
void implementation_level_ (const SDAI_String x);
|
||||
void implementation_level_( const SDAI_String x );
|
||||
|
||||
};
|
||||
|
||||
inline SdaiFile_description *
|
||||
create_SdaiFile_description () { return new SdaiFile_description ; }
|
||||
create_SdaiFile_description() {
|
||||
return new SdaiFile_description ;
|
||||
}
|
||||
|
||||
///////// END_ENTITY file_description
|
||||
|
||||
|
||||
///////// ENTITY file_schema
|
||||
|
||||
extern AttrDescriptor *a_16schema_identifiers;
|
||||
extern SCL_EDITOR_EXPORT AttrDescriptor * a_16schema_identifiers;
|
||||
|
||||
class SdaiFile_schema : public SDAI_Application_instance {
|
||||
protected:
|
||||
class SCL_EDITOR_EXPORT SdaiFile_schema : public SDAI_Application_instance {
|
||||
protected:
|
||||
StringAggregate _schema_identifiers ; // of schema_name
|
||||
|
||||
public:
|
||||
public:
|
||||
|
||||
SdaiFile_schema ( );
|
||||
SdaiFile_schema (SDAI_Application_instance *se, int *addAttrs = 0);
|
||||
SdaiFile_schema (SdaiFile_schema& e );
|
||||
~SdaiFile_schema ();
|
||||
SdaiFile_schema( );
|
||||
SdaiFile_schema( SDAI_Application_instance * se, int * addAttrs = 0 );
|
||||
SdaiFile_schema( SdaiFile_schema & e );
|
||||
~SdaiFile_schema();
|
||||
|
||||
int opcode () { return 5 ; }
|
||||
int opcode() {
|
||||
return 5 ;
|
||||
}
|
||||
const StringAggregate_ptr schema_identifiers_() const;
|
||||
void schema_identifiers_ (const StringAggregate_ptr x);
|
||||
void schema_identifiers_( const StringAggregate_ptr x );
|
||||
|
||||
};
|
||||
|
||||
inline SdaiFile_schema *
|
||||
create_SdaiFile_schema () { return new SdaiFile_schema ; }
|
||||
create_SdaiFile_schema() {
|
||||
return new SdaiFile_schema ;
|
||||
}
|
||||
|
||||
///////// END_ENTITY file_schema
|
||||
|
||||
|
||||
// ***** generate Model related pieces
|
||||
|
||||
class SdaiModel_contents_header_section_schema : public SDAI_Model_contents {
|
||||
class SCL_EDITOR_EXPORT SdaiModel_contents_header_section_schema : public SDAI_Model_contents {
|
||||
|
||||
public:
|
||||
SdaiModel_contents_header_section_schema();
|
||||
public:
|
||||
SdaiModel_contents_header_section_schema();
|
||||
|
||||
SdaiSection_language__set_var SdaiSection_language_get_extents();
|
||||
SdaiSection_language__set_var SdaiSection_language_get_extents();
|
||||
|
||||
SdaiFile_population__set_var SdaiFile_population_get_extents();
|
||||
SdaiFile_population__set_var SdaiFile_population_get_extents();
|
||||
|
||||
SdaiFile_name__set_var SdaiFile_name_get_extents();
|
||||
SdaiFile_name__set_var SdaiFile_name_get_extents();
|
||||
|
||||
SdaiSection_context__set_var SdaiSection_context_get_extents();
|
||||
SdaiSection_context__set_var SdaiSection_context_get_extents();
|
||||
|
||||
SdaiFile_description__set_var SdaiFile_description_get_extents();
|
||||
SdaiFile_description__set_var SdaiFile_description_get_extents();
|
||||
|
||||
SdaiFile_schema__set_var SdaiFile_schema_get_extents();
|
||||
SdaiFile_schema__set_var SdaiFile_schema_get_extents();
|
||||
|
||||
};
|
||||
|
||||
|
||||
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;
|
||||
SDAI_Model_contents_ptr create_SdaiModel_contents_header_section_schema();
|
||||
SCL_EDITOR_EXPORT SDAI_Model_contents_ptr create_SdaiModel_contents_header_section_schema();
|
||||
#endif
|
||||
|
||||
@@ -6,86 +6,86 @@
|
||||
|
||||
#include <SdaiHeaderSchema.h>
|
||||
|
||||
void HeaderInitSchemasAndEnts (Registry & reg) {
|
||||
void HeaderInitSchemasAndEnts( Registry & reg ) {
|
||||
Uniqueness_rule_ptr ur;
|
||||
// Schema: SdaiHEADER_SECTION_SCHEMA
|
||||
s_header_section_schema = new Schema("Header_Section_Schema");
|
||||
s_header_section_schema->AssignModelContentsCreator(
|
||||
(ModelContentsCreator) create_SdaiModel_contents_header_section_schema);
|
||||
reg.AddSchema (*s_header_section_schema);
|
||||
// Schema: SdaiHEADER_SECTION_SCHEMA
|
||||
s_header_section_schema = new Schema( "Header_Section_Schema" );
|
||||
s_header_section_schema->AssignModelContentsCreator(
|
||||
( ModelContentsCreator ) create_SdaiModel_contents_header_section_schema );
|
||||
reg.AddSchema( *s_header_section_schema );
|
||||
|
||||
// ***** Initialize the Types
|
||||
header_section_schemat_time_stamp_text = new TypeDescriptor (
|
||||
"Time_Stamp_Text", // Name
|
||||
sdaiSTRING, // FundamentalType
|
||||
s_header_section_schema, // Originating Schema
|
||||
"STRING (256)"); // Description
|
||||
s_header_section_schema->AddType(header_section_schemat_time_stamp_text);
|
||||
header_section_schemat_section_name = new TypeDescriptor (
|
||||
"Section_Name", // Name
|
||||
REFERENCE_TYPE, // FundamentalType
|
||||
s_header_section_schema, // Originating Schema
|
||||
"exchange_structure_identifier"); // Description
|
||||
s_header_section_schema->AddType(header_section_schemat_section_name);
|
||||
header_section_schemat_context_name = new TypeDescriptor (
|
||||
"Context_Name", // Name
|
||||
sdaiSTRING, // FundamentalType
|
||||
s_header_section_schema, // Originating Schema
|
||||
"STRING"); // Description
|
||||
s_header_section_schema->AddType(header_section_schemat_context_name);
|
||||
header_section_schemat_schema_name = new TypeDescriptor (
|
||||
"Schema_Name", // Name
|
||||
sdaiSTRING, // FundamentalType
|
||||
s_header_section_schema, // Originating Schema
|
||||
"STRING (1024)"); // Description
|
||||
s_header_section_schema->AddType(header_section_schemat_schema_name);
|
||||
header_section_schemat_language_name = new TypeDescriptor (
|
||||
"Language_Name", // Name
|
||||
REFERENCE_TYPE, // FundamentalType
|
||||
s_header_section_schema, // Originating Schema
|
||||
"exchange_structure_identifier"); // Description
|
||||
s_header_section_schema->AddType(header_section_schemat_language_name);
|
||||
header_section_schemat_exchange_structure_identifier = new TypeDescriptor (
|
||||
"Exchange_Structure_Identifier", // Name
|
||||
sdaiSTRING, // FundamentalType
|
||||
s_header_section_schema, // Originating Schema
|
||||
"STRING"); // Description
|
||||
s_header_section_schema->AddType(header_section_schemat_exchange_structure_identifier);
|
||||
// ***** Initialize the Types
|
||||
header_section_schemat_time_stamp_text = new TypeDescriptor(
|
||||
"Time_Stamp_Text", // Name
|
||||
sdaiSTRING, // FundamentalType
|
||||
s_header_section_schema, // Originating Schema
|
||||
"STRING (256)" ); // Description
|
||||
s_header_section_schema->AddType( header_section_schemat_time_stamp_text );
|
||||
header_section_schemat_section_name = new TypeDescriptor(
|
||||
"Section_Name", // Name
|
||||
REFERENCE_TYPE, // FundamentalType
|
||||
s_header_section_schema, // Originating Schema
|
||||
"exchange_structure_identifier" ); // Description
|
||||
s_header_section_schema->AddType( header_section_schemat_section_name );
|
||||
header_section_schemat_context_name = new TypeDescriptor(
|
||||
"Context_Name", // Name
|
||||
sdaiSTRING, // FundamentalType
|
||||
s_header_section_schema, // Originating Schema
|
||||
"STRING" ); // Description
|
||||
s_header_section_schema->AddType( header_section_schemat_context_name );
|
||||
header_section_schemat_schema_name = new TypeDescriptor(
|
||||
"Schema_Name", // Name
|
||||
sdaiSTRING, // FundamentalType
|
||||
s_header_section_schema, // Originating Schema
|
||||
"STRING (1024)" ); // Description
|
||||
s_header_section_schema->AddType( header_section_schemat_schema_name );
|
||||
header_section_schemat_language_name = new TypeDescriptor(
|
||||
"Language_Name", // Name
|
||||
REFERENCE_TYPE, // FundamentalType
|
||||
s_header_section_schema, // Originating Schema
|
||||
"exchange_structure_identifier" ); // Description
|
||||
s_header_section_schema->AddType( header_section_schemat_language_name );
|
||||
header_section_schemat_exchange_structure_identifier = new TypeDescriptor(
|
||||
"Exchange_Structure_Identifier", // Name
|
||||
sdaiSTRING, // FundamentalType
|
||||
s_header_section_schema, // Originating Schema
|
||||
"STRING" ); // Description
|
||||
s_header_section_schema->AddType( header_section_schemat_exchange_structure_identifier );
|
||||
|
||||
// ***** Initialize the Entities
|
||||
header_section_schemae_section_language = new EntityDescriptor(
|
||||
"Section_Language", s_header_section_schema, LFalse, LFalse,
|
||||
(Creator) create_SdaiSection_language );
|
||||
s_header_section_schema->AddEntity(header_section_schemae_section_language);
|
||||
header_section_schemae_section_language->_uniqueness_rules = new Uniqueness_rule__set;
|
||||
ur = new Uniqueness_rule("UR1 : section;\n");
|
||||
header_section_schemae_section_language->_uniqueness_rules->Append(ur);
|
||||
header_section_schemae_file_population = new EntityDescriptor(
|
||||
"File_Population", s_header_section_schema, LFalse, LFalse,
|
||||
(Creator) create_SdaiFile_population );
|
||||
s_header_section_schema->AddEntity(header_section_schemae_file_population);
|
||||
header_section_schemae_file_name = new EntityDescriptor(
|
||||
"File_Name", s_header_section_schema, LFalse, LFalse,
|
||||
(Creator) create_SdaiFile_name );
|
||||
s_header_section_schema->AddEntity(header_section_schemae_file_name);
|
||||
header_section_schemae_section_context = new EntityDescriptor(
|
||||
"Section_Context", s_header_section_schema, LFalse, LFalse,
|
||||
(Creator) create_SdaiSection_context );
|
||||
s_header_section_schema->AddEntity(header_section_schemae_section_context);
|
||||
header_section_schemae_section_context->_uniqueness_rules = new Uniqueness_rule__set;
|
||||
ur = new Uniqueness_rule("UR1 : section;\n");
|
||||
header_section_schemae_section_context->_uniqueness_rules->Append(ur);
|
||||
header_section_schemae_file_description = new EntityDescriptor(
|
||||
"File_Description", s_header_section_schema, LFalse, LFalse,
|
||||
(Creator) create_SdaiFile_description );
|
||||
s_header_section_schema->AddEntity(header_section_schemae_file_description);
|
||||
header_section_schemae_file_schema = new EntityDescriptor(
|
||||
"File_Schema", s_header_section_schema, LFalse, LFalse,
|
||||
(Creator) create_SdaiFile_schema );
|
||||
s_header_section_schema->AddEntity(header_section_schemae_file_schema);
|
||||
// ***** Initialize the Entities
|
||||
header_section_schemae_section_language = new EntityDescriptor(
|
||||
"Section_Language", s_header_section_schema, LFalse, LFalse,
|
||||
( Creator ) create_SdaiSection_language );
|
||||
s_header_section_schema->AddEntity( header_section_schemae_section_language );
|
||||
header_section_schemae_section_language->_uniqueness_rules = new Uniqueness_rule__set;
|
||||
ur = new Uniqueness_rule( "UR1 : section;\n" );
|
||||
header_section_schemae_section_language->_uniqueness_rules->Append( ur );
|
||||
header_section_schemae_file_population = new EntityDescriptor(
|
||||
"File_Population", s_header_section_schema, LFalse, LFalse,
|
||||
( Creator ) create_SdaiFile_population );
|
||||
s_header_section_schema->AddEntity( header_section_schemae_file_population );
|
||||
header_section_schemae_file_name = new EntityDescriptor(
|
||||
"File_Name", s_header_section_schema, LFalse, LFalse,
|
||||
( Creator ) create_SdaiFile_name );
|
||||
s_header_section_schema->AddEntity( header_section_schemae_file_name );
|
||||
header_section_schemae_section_context = new EntityDescriptor(
|
||||
"Section_Context", s_header_section_schema, LFalse, LFalse,
|
||||
( Creator ) create_SdaiSection_context );
|
||||
s_header_section_schema->AddEntity( header_section_schemae_section_context );
|
||||
header_section_schemae_section_context->_uniqueness_rules = new Uniqueness_rule__set;
|
||||
ur = new Uniqueness_rule( "UR1 : section;\n" );
|
||||
header_section_schemae_section_context->_uniqueness_rules->Append( ur );
|
||||
header_section_schemae_file_description = new EntityDescriptor(
|
||||
"File_Description", s_header_section_schema, LFalse, LFalse,
|
||||
( Creator ) create_SdaiFile_description );
|
||||
s_header_section_schema->AddEntity( header_section_schemae_file_description );
|
||||
header_section_schemae_file_schema = new EntityDescriptor(
|
||||
"File_Schema", s_header_section_schema, LFalse, LFalse,
|
||||
( Creator ) create_SdaiFile_schema );
|
||||
s_header_section_schema->AddEntity( header_section_schemae_file_schema );
|
||||
|
||||
//////////////// USE statements
|
||||
//////////////// REFERENCE statements
|
||||
//////////////// USE statements
|
||||
//////////////// REFERENCE statements
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -4,70 +4,72 @@
|
||||
// it since your modifications will be lost if fedex_plus is used to
|
||||
// regenerate it.
|
||||
|
||||
#include <scl_export.h>
|
||||
|
||||
// Schema: SdaiHEADER_SECTION_SCHEMA
|
||||
extern Schema * s_header_section_schema;
|
||||
extern SCL_EDITOR_EXPORT Schema * s_header_section_schema;
|
||||
|
||||
// Types:
|
||||
typedef SDAI_String SdaiTime_stamp_text;
|
||||
extern TypeDescriptor *header_section_schemat_time_stamp_text;
|
||||
extern SCL_EDITOR_EXPORT TypeDescriptor * header_section_schemat_time_stamp_text;
|
||||
typedef SDAI_String SdaiSection_name;
|
||||
extern TypeDescriptor *header_section_schemat_section_name;
|
||||
extern SCL_EDITOR_EXPORT TypeDescriptor * header_section_schemat_section_name;
|
||||
typedef SDAI_String SdaiContext_name;
|
||||
extern TypeDescriptor *header_section_schemat_context_name;
|
||||
extern SCL_EDITOR_EXPORT TypeDescriptor * header_section_schemat_context_name;
|
||||
typedef SDAI_String SdaiSchema_name;
|
||||
extern TypeDescriptor *header_section_schemat_schema_name;
|
||||
extern SCL_EDITOR_EXPORT TypeDescriptor * header_section_schemat_schema_name;
|
||||
typedef SDAI_String SdaiLanguage_name;
|
||||
extern TypeDescriptor *header_section_schemat_language_name;
|
||||
extern SCL_EDITOR_EXPORT TypeDescriptor * header_section_schemat_language_name;
|
||||
typedef SDAI_String SdaiExchange_structure_identifier;
|
||||
extern TypeDescriptor *header_section_schemat_exchange_structure_identifier;
|
||||
extern SCL_EDITOR_EXPORT TypeDescriptor * header_section_schemat_exchange_structure_identifier;
|
||||
|
||||
// Entities:
|
||||
class SdaiSection_language;
|
||||
typedef SdaiSection_language * SdaiSection_languageH;
|
||||
typedef SdaiSection_language * SdaiSection_language_ptr;
|
||||
typedef SdaiSection_language * SdaiSection_languageH;
|
||||
typedef SdaiSection_language * SdaiSection_language_ptr;
|
||||
typedef SdaiSection_language_ptr SdaiSection_language_var;
|
||||
#define SdaiSection_language__set SDAI_DAObject__set
|
||||
#define SdaiSection_language__set_var SDAI_DAObject__set_var
|
||||
extern EntityDescriptor *header_section_schemae_section_language;
|
||||
extern SCL_EDITOR_EXPORT EntityDescriptor * header_section_schemae_section_language;
|
||||
|
||||
class SdaiFile_population;
|
||||
typedef SdaiFile_population * SdaiFile_populationH;
|
||||
typedef SdaiFile_population * SdaiFile_population_ptr;
|
||||
typedef SdaiFile_population * SdaiFile_populationH;
|
||||
typedef SdaiFile_population * SdaiFile_population_ptr;
|
||||
typedef SdaiFile_population_ptr SdaiFile_population_var;
|
||||
#define SdaiFile_population__set SDAI_DAObject__set
|
||||
#define SdaiFile_population__set_var SDAI_DAObject__set_var
|
||||
extern EntityDescriptor *header_section_schemae_file_population;
|
||||
extern SCL_EDITOR_EXPORT EntityDescriptor * header_section_schemae_file_population;
|
||||
|
||||
class SdaiFile_name;
|
||||
typedef SdaiFile_name * SdaiFile_nameH;
|
||||
typedef SdaiFile_name * SdaiFile_name_ptr;
|
||||
typedef SdaiFile_name * SdaiFile_nameH;
|
||||
typedef SdaiFile_name * SdaiFile_name_ptr;
|
||||
typedef SdaiFile_name_ptr SdaiFile_name_var;
|
||||
#define SdaiFile_name__set SDAI_DAObject__set
|
||||
#define SdaiFile_name__set_var SDAI_DAObject__set_var
|
||||
extern EntityDescriptor *header_section_schemae_file_name;
|
||||
extern SCL_EDITOR_EXPORT EntityDescriptor * header_section_schemae_file_name;
|
||||
|
||||
class SdaiSection_context;
|
||||
typedef SdaiSection_context * SdaiSection_contextH;
|
||||
typedef SdaiSection_context * SdaiSection_context_ptr;
|
||||
typedef SdaiSection_context * SdaiSection_contextH;
|
||||
typedef SdaiSection_context * SdaiSection_context_ptr;
|
||||
typedef SdaiSection_context_ptr SdaiSection_context_var;
|
||||
#define SdaiSection_context__set SDAI_DAObject__set
|
||||
#define SdaiSection_context__set_var SDAI_DAObject__set_var
|
||||
extern EntityDescriptor *header_section_schemae_section_context;
|
||||
extern SCL_EDITOR_EXPORT EntityDescriptor * header_section_schemae_section_context;
|
||||
|
||||
class SdaiFile_description;
|
||||
typedef SdaiFile_description * SdaiFile_descriptionH;
|
||||
typedef SdaiFile_description * SdaiFile_description_ptr;
|
||||
typedef SdaiFile_description * SdaiFile_descriptionH;
|
||||
typedef SdaiFile_description * SdaiFile_description_ptr;
|
||||
typedef SdaiFile_description_ptr SdaiFile_description_var;
|
||||
#define SdaiFile_description__set SDAI_DAObject__set
|
||||
#define SdaiFile_description__set_var SDAI_DAObject__set_var
|
||||
extern EntityDescriptor *header_section_schemae_file_description;
|
||||
extern SCL_EDITOR_EXPORT EntityDescriptor * header_section_schemae_file_description;
|
||||
|
||||
class SdaiFile_schema;
|
||||
typedef SdaiFile_schema * SdaiFile_schemaH;
|
||||
typedef SdaiFile_schema * SdaiFile_schema_ptr;
|
||||
typedef SdaiFile_schema * SdaiFile_schemaH;
|
||||
typedef SdaiFile_schema * SdaiFile_schema_ptr;
|
||||
typedef SdaiFile_schema_ptr SdaiFile_schema_var;
|
||||
#define SdaiFile_schema__set SDAI_DAObject__set
|
||||
#define SdaiFile_schema__set_var SDAI_DAObject__set_var
|
||||
extern EntityDescriptor *header_section_schemae_file_schema;
|
||||
extern SCL_EDITOR_EXPORT EntityDescriptor * header_section_schemae_file_schema;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -9,177 +9,176 @@
|
||||
#include <STEPattribute.h>
|
||||
#include <SdaiHeaderSchema.h>
|
||||
|
||||
void SdaiHEADER_SECTION_SCHEMAInit (Registry& reg)
|
||||
{
|
||||
header_section_schemat_time_stamp_text->ReferentType(t_sdaiSTRING);
|
||||
reg.AddType (*header_section_schemat_time_stamp_text);
|
||||
header_section_schemat_section_name->ReferentType(header_section_schemat_exchange_structure_identifier);
|
||||
reg.AddType (*header_section_schemat_section_name);
|
||||
header_section_schemat_context_name->ReferentType(t_sdaiSTRING);
|
||||
reg.AddType (*header_section_schemat_context_name);
|
||||
header_section_schemat_schema_name->ReferentType(t_sdaiSTRING);
|
||||
reg.AddType (*header_section_schemat_schema_name);
|
||||
header_section_schemat_language_name->ReferentType(header_section_schemat_exchange_structure_identifier);
|
||||
reg.AddType (*header_section_schemat_language_name);
|
||||
header_section_schemat_exchange_structure_identifier->ReferentType(t_sdaiSTRING);
|
||||
reg.AddType (*header_section_schemat_exchange_structure_identifier);
|
||||
void SdaiHEADER_SECTION_SCHEMAInit( Registry & reg ) {
|
||||
header_section_schemat_time_stamp_text->ReferentType( t_sdaiSTRING );
|
||||
reg.AddType( *header_section_schemat_time_stamp_text );
|
||||
header_section_schemat_section_name->ReferentType( header_section_schemat_exchange_structure_identifier );
|
||||
reg.AddType( *header_section_schemat_section_name );
|
||||
header_section_schemat_context_name->ReferentType( t_sdaiSTRING );
|
||||
reg.AddType( *header_section_schemat_context_name );
|
||||
header_section_schemat_schema_name->ReferentType( t_sdaiSTRING );
|
||||
reg.AddType( *header_section_schemat_schema_name );
|
||||
header_section_schemat_language_name->ReferentType( header_section_schemat_exchange_structure_identifier );
|
||||
reg.AddType( *header_section_schemat_language_name );
|
||||
header_section_schemat_exchange_structure_identifier->ReferentType( t_sdaiSTRING );
|
||||
reg.AddType( *header_section_schemat_exchange_structure_identifier );
|
||||
|
||||
///////// ENTITY section_language
|
||||
|
||||
a_0section =
|
||||
new AttrDescriptor("section",header_section_schemat_section_name,
|
||||
LTrue,LTrue, AttrType_Explicit,
|
||||
*header_section_schemae_section_language);
|
||||
header_section_schemae_section_language->AddExplicitAttr (a_0section);
|
||||
a_1default_language =
|
||||
new AttrDescriptor("default_language",header_section_schemat_language_name,
|
||||
LFalse,LFalse, AttrType_Explicit,
|
||||
*header_section_schemae_section_language);
|
||||
header_section_schemae_section_language->AddExplicitAttr (a_1default_language);
|
||||
reg.AddEntity (*header_section_schemae_section_language);
|
||||
a_0section =
|
||||
new AttrDescriptor( "section", header_section_schemat_section_name,
|
||||
LTrue, LTrue, AttrType_Explicit,
|
||||
*header_section_schemae_section_language );
|
||||
header_section_schemae_section_language->AddExplicitAttr( a_0section );
|
||||
a_1default_language =
|
||||
new AttrDescriptor( "default_language", header_section_schemat_language_name,
|
||||
LFalse, LFalse, AttrType_Explicit,
|
||||
*header_section_schemae_section_language );
|
||||
header_section_schemae_section_language->AddExplicitAttr( a_1default_language );
|
||||
reg.AddEntity( *header_section_schemae_section_language );
|
||||
///////// END_ENTITY section_language
|
||||
|
||||
///////// ENTITY file_population
|
||||
|
||||
a_2governing_schema =
|
||||
new AttrDescriptor("governing_schema",header_section_schemat_schema_name,
|
||||
LFalse,LFalse, AttrType_Explicit,
|
||||
*header_section_schemae_file_population);
|
||||
header_section_schemae_file_population->AddExplicitAttr (a_2governing_schema);
|
||||
a_3determination_method =
|
||||
new AttrDescriptor("determination_method",header_section_schemat_exchange_structure_identifier,
|
||||
LFalse,LFalse, AttrType_Explicit,
|
||||
*header_section_schemae_file_population);
|
||||
header_section_schemae_file_population->AddExplicitAttr (a_3determination_method);
|
||||
SetTypeDescriptor * t_0 = new SetTypeDescriptor;
|
||||
t_0->AssignAggrCreator((AggregateCreator) create_StringAggregate); // Creator function
|
||||
t_0->Bound1(1);
|
||||
t_0->Bound2(2147483647);
|
||||
t_0->FundamentalType(SET_TYPE);
|
||||
t_0->Description("SET [1:?] OF section_name");
|
||||
t_0->OriginatingSchema(s_header_section_schema);
|
||||
t_0->ReferentType(header_section_schemat_section_name);
|
||||
a_4governed_sections =
|
||||
new AttrDescriptor("governed_sections",t_0,LTrue,LFalse, AttrType_Explicit,
|
||||
*header_section_schemae_file_population);
|
||||
header_section_schemae_file_population->AddExplicitAttr (a_4governed_sections);
|
||||
reg.AddEntity (*header_section_schemae_file_population);
|
||||
a_2governing_schema =
|
||||
new AttrDescriptor( "governing_schema", header_section_schemat_schema_name,
|
||||
LFalse, LFalse, AttrType_Explicit,
|
||||
*header_section_schemae_file_population );
|
||||
header_section_schemae_file_population->AddExplicitAttr( a_2governing_schema );
|
||||
a_3determination_method =
|
||||
new AttrDescriptor( "determination_method", header_section_schemat_exchange_structure_identifier,
|
||||
LFalse, LFalse, AttrType_Explicit,
|
||||
*header_section_schemae_file_population );
|
||||
header_section_schemae_file_population->AddExplicitAttr( a_3determination_method );
|
||||
SetTypeDescriptor * t_0 = new SetTypeDescriptor;
|
||||
t_0->AssignAggrCreator( ( AggregateCreator ) create_StringAggregate ); // Creator function
|
||||
t_0->Bound1( 1 );
|
||||
t_0->Bound2( 2147483647 );
|
||||
t_0->FundamentalType( SET_TYPE );
|
||||
t_0->Description( "SET [1:?] OF section_name" );
|
||||
t_0->OriginatingSchema( s_header_section_schema );
|
||||
t_0->ReferentType( header_section_schemat_section_name );
|
||||
a_4governed_sections =
|
||||
new AttrDescriptor( "governed_sections", t_0, LTrue, LFalse, AttrType_Explicit,
|
||||
*header_section_schemae_file_population );
|
||||
header_section_schemae_file_population->AddExplicitAttr( a_4governed_sections );
|
||||
reg.AddEntity( *header_section_schemae_file_population );
|
||||
///////// END_ENTITY file_population
|
||||
|
||||
///////// ENTITY file_name
|
||||
|
||||
a_5name =
|
||||
new AttrDescriptor("name",t_sdaiSTRING,
|
||||
LFalse,LFalse, AttrType_Explicit,
|
||||
*header_section_schemae_file_name);
|
||||
header_section_schemae_file_name->AddExplicitAttr (a_5name);
|
||||
a_6time_stamp =
|
||||
new AttrDescriptor("time_stamp",header_section_schemat_time_stamp_text,
|
||||
LFalse,LFalse, AttrType_Explicit,
|
||||
*header_section_schemae_file_name);
|
||||
header_section_schemae_file_name->AddExplicitAttr (a_6time_stamp);
|
||||
ListTypeDescriptor * t_1 = new ListTypeDescriptor;
|
||||
t_1->AssignAggrCreator((AggregateCreator) create_StringAggregate); // Creator function
|
||||
t_1->Bound1(1);
|
||||
t_1->Bound2(2147483647);
|
||||
t_1->FundamentalType(LIST_TYPE);
|
||||
t_1->Description("LIST [1:?] OF STRING (256)");
|
||||
t_1->OriginatingSchema(s_header_section_schema);
|
||||
t_1->ReferentType(t_sdaiSTRING);
|
||||
a_7author =
|
||||
new AttrDescriptor("author",t_1,LFalse,LFalse, AttrType_Explicit,
|
||||
*header_section_schemae_file_name);
|
||||
header_section_schemae_file_name->AddExplicitAttr (a_7author);
|
||||
ListTypeDescriptor * t_2 = new ListTypeDescriptor;
|
||||
t_2->AssignAggrCreator((AggregateCreator) create_StringAggregate); // Creator function
|
||||
t_2->Bound1(1);
|
||||
t_2->Bound2(2147483647);
|
||||
t_2->FundamentalType(LIST_TYPE);
|
||||
t_2->Description("LIST [1:?] OF STRING (256)");
|
||||
t_2->OriginatingSchema(s_header_section_schema);
|
||||
t_2->ReferentType(t_sdaiSTRING);
|
||||
a_8organization =
|
||||
new AttrDescriptor("organization",t_2,LFalse,LFalse, AttrType_Explicit,
|
||||
*header_section_schemae_file_name);
|
||||
header_section_schemae_file_name->AddExplicitAttr (a_8organization);
|
||||
a_9preprocessor_version =
|
||||
new AttrDescriptor("preprocessor_version",t_sdaiSTRING,
|
||||
LFalse,LFalse, AttrType_Explicit,
|
||||
*header_section_schemae_file_name);
|
||||
header_section_schemae_file_name->AddExplicitAttr (a_9preprocessor_version);
|
||||
a_10originating_system =
|
||||
new AttrDescriptor("originating_system",t_sdaiSTRING,
|
||||
LFalse,LFalse, AttrType_Explicit,
|
||||
*header_section_schemae_file_name);
|
||||
header_section_schemae_file_name->AddExplicitAttr (a_10originating_system);
|
||||
a_11authorization =
|
||||
new AttrDescriptor("authorization",t_sdaiSTRING,
|
||||
LFalse,LFalse, AttrType_Explicit,
|
||||
*header_section_schemae_file_name);
|
||||
header_section_schemae_file_name->AddExplicitAttr (a_11authorization);
|
||||
reg.AddEntity (*header_section_schemae_file_name);
|
||||
a_5name =
|
||||
new AttrDescriptor( "name", t_sdaiSTRING,
|
||||
LFalse, LFalse, AttrType_Explicit,
|
||||
*header_section_schemae_file_name );
|
||||
header_section_schemae_file_name->AddExplicitAttr( a_5name );
|
||||
a_6time_stamp =
|
||||
new AttrDescriptor( "time_stamp", header_section_schemat_time_stamp_text,
|
||||
LFalse, LFalse, AttrType_Explicit,
|
||||
*header_section_schemae_file_name );
|
||||
header_section_schemae_file_name->AddExplicitAttr( a_6time_stamp );
|
||||
ListTypeDescriptor * t_1 = new ListTypeDescriptor;
|
||||
t_1->AssignAggrCreator( ( AggregateCreator ) create_StringAggregate ); // Creator function
|
||||
t_1->Bound1( 1 );
|
||||
t_1->Bound2( 2147483647 );
|
||||
t_1->FundamentalType( LIST_TYPE );
|
||||
t_1->Description( "LIST [1:?] OF STRING (256)" );
|
||||
t_1->OriginatingSchema( s_header_section_schema );
|
||||
t_1->ReferentType( t_sdaiSTRING );
|
||||
a_7author =
|
||||
new AttrDescriptor( "author", t_1, LFalse, LFalse, AttrType_Explicit,
|
||||
*header_section_schemae_file_name );
|
||||
header_section_schemae_file_name->AddExplicitAttr( a_7author );
|
||||
ListTypeDescriptor * t_2 = new ListTypeDescriptor;
|
||||
t_2->AssignAggrCreator( ( AggregateCreator ) create_StringAggregate ); // Creator function
|
||||
t_2->Bound1( 1 );
|
||||
t_2->Bound2( 2147483647 );
|
||||
t_2->FundamentalType( LIST_TYPE );
|
||||
t_2->Description( "LIST [1:?] OF STRING (256)" );
|
||||
t_2->OriginatingSchema( s_header_section_schema );
|
||||
t_2->ReferentType( t_sdaiSTRING );
|
||||
a_8organization =
|
||||
new AttrDescriptor( "organization", t_2, LFalse, LFalse, AttrType_Explicit,
|
||||
*header_section_schemae_file_name );
|
||||
header_section_schemae_file_name->AddExplicitAttr( a_8organization );
|
||||
a_9preprocessor_version =
|
||||
new AttrDescriptor( "preprocessor_version", t_sdaiSTRING,
|
||||
LFalse, LFalse, AttrType_Explicit,
|
||||
*header_section_schemae_file_name );
|
||||
header_section_schemae_file_name->AddExplicitAttr( a_9preprocessor_version );
|
||||
a_10originating_system =
|
||||
new AttrDescriptor( "originating_system", t_sdaiSTRING,
|
||||
LFalse, LFalse, AttrType_Explicit,
|
||||
*header_section_schemae_file_name );
|
||||
header_section_schemae_file_name->AddExplicitAttr( a_10originating_system );
|
||||
a_11authorization =
|
||||
new AttrDescriptor( "authorization", t_sdaiSTRING,
|
||||
LFalse, LFalse, AttrType_Explicit,
|
||||
*header_section_schemae_file_name );
|
||||
header_section_schemae_file_name->AddExplicitAttr( a_11authorization );
|
||||
reg.AddEntity( *header_section_schemae_file_name );
|
||||
///////// END_ENTITY file_name
|
||||
|
||||
///////// ENTITY section_context
|
||||
|
||||
a_12section =
|
||||
new AttrDescriptor("section",header_section_schemat_section_name,
|
||||
LTrue,LTrue, AttrType_Explicit,
|
||||
*header_section_schemae_section_context);
|
||||
header_section_schemae_section_context->AddExplicitAttr (a_12section);
|
||||
ListTypeDescriptor * t_3 = new ListTypeDescriptor;
|
||||
t_3->AssignAggrCreator((AggregateCreator) create_StringAggregate); // Creator function
|
||||
t_3->Bound1(1);
|
||||
t_3->Bound2(2147483647);
|
||||
t_3->FundamentalType(LIST_TYPE);
|
||||
t_3->Description("LIST [1:?] OF context_name");
|
||||
t_3->OriginatingSchema(s_header_section_schema);
|
||||
t_3->ReferentType(header_section_schemat_context_name);
|
||||
a_13context_identifiers =
|
||||
new AttrDescriptor("context_identifiers",t_3,LFalse,LFalse, AttrType_Explicit,
|
||||
*header_section_schemae_section_context);
|
||||
header_section_schemae_section_context->AddExplicitAttr (a_13context_identifiers);
|
||||
reg.AddEntity (*header_section_schemae_section_context);
|
||||
a_12section =
|
||||
new AttrDescriptor( "section", header_section_schemat_section_name,
|
||||
LTrue, LTrue, AttrType_Explicit,
|
||||
*header_section_schemae_section_context );
|
||||
header_section_schemae_section_context->AddExplicitAttr( a_12section );
|
||||
ListTypeDescriptor * t_3 = new ListTypeDescriptor;
|
||||
t_3->AssignAggrCreator( ( AggregateCreator ) create_StringAggregate ); // Creator function
|
||||
t_3->Bound1( 1 );
|
||||
t_3->Bound2( 2147483647 );
|
||||
t_3->FundamentalType( LIST_TYPE );
|
||||
t_3->Description( "LIST [1:?] OF context_name" );
|
||||
t_3->OriginatingSchema( s_header_section_schema );
|
||||
t_3->ReferentType( header_section_schemat_context_name );
|
||||
a_13context_identifiers =
|
||||
new AttrDescriptor( "context_identifiers", t_3, LFalse, LFalse, AttrType_Explicit,
|
||||
*header_section_schemae_section_context );
|
||||
header_section_schemae_section_context->AddExplicitAttr( a_13context_identifiers );
|
||||
reg.AddEntity( *header_section_schemae_section_context );
|
||||
///////// END_ENTITY section_context
|
||||
|
||||
///////// ENTITY file_description
|
||||
|
||||
ListTypeDescriptor * t_4 = new ListTypeDescriptor;
|
||||
t_4->AssignAggrCreator((AggregateCreator) create_StringAggregate); // Creator function
|
||||
t_4->Bound1(1);
|
||||
t_4->Bound2(2147483647);
|
||||
t_4->FundamentalType(LIST_TYPE);
|
||||
t_4->Description("LIST [1:?] OF STRING (256)");
|
||||
t_4->OriginatingSchema(s_header_section_schema);
|
||||
t_4->ReferentType(t_sdaiSTRING);
|
||||
a_14description =
|
||||
new AttrDescriptor("description",t_4,LFalse,LFalse, AttrType_Explicit,
|
||||
*header_section_schemae_file_description);
|
||||
header_section_schemae_file_description->AddExplicitAttr (a_14description);
|
||||
a_15implementation_level =
|
||||
new AttrDescriptor("implementation_level",t_sdaiSTRING,
|
||||
LFalse,LFalse, AttrType_Explicit,
|
||||
*header_section_schemae_file_description);
|
||||
header_section_schemae_file_description->AddExplicitAttr (a_15implementation_level);
|
||||
reg.AddEntity (*header_section_schemae_file_description);
|
||||
ListTypeDescriptor * t_4 = new ListTypeDescriptor;
|
||||
t_4->AssignAggrCreator( ( AggregateCreator ) create_StringAggregate ); // Creator function
|
||||
t_4->Bound1( 1 );
|
||||
t_4->Bound2( 2147483647 );
|
||||
t_4->FundamentalType( LIST_TYPE );
|
||||
t_4->Description( "LIST [1:?] OF STRING (256)" );
|
||||
t_4->OriginatingSchema( s_header_section_schema );
|
||||
t_4->ReferentType( t_sdaiSTRING );
|
||||
a_14description =
|
||||
new AttrDescriptor( "description", t_4, LFalse, LFalse, AttrType_Explicit,
|
||||
*header_section_schemae_file_description );
|
||||
header_section_schemae_file_description->AddExplicitAttr( a_14description );
|
||||
a_15implementation_level =
|
||||
new AttrDescriptor( "implementation_level", t_sdaiSTRING,
|
||||
LFalse, LFalse, AttrType_Explicit,
|
||||
*header_section_schemae_file_description );
|
||||
header_section_schemae_file_description->AddExplicitAttr( a_15implementation_level );
|
||||
reg.AddEntity( *header_section_schemae_file_description );
|
||||
///////// END_ENTITY file_description
|
||||
|
||||
///////// ENTITY file_schema
|
||||
|
||||
ListTypeDescriptor * t_5 = new ListTypeDescriptor;
|
||||
t_5->AssignAggrCreator((AggregateCreator) create_StringAggregate); // Creator function
|
||||
t_5->Bound1(1);
|
||||
t_5->Bound2(2147483647);
|
||||
t_5->UniqueElements(LTrue);
|
||||
t_5->FundamentalType(LIST_TYPE);
|
||||
t_5->Description("LIST [1:?] OF UNIQUE schema_name");
|
||||
t_5->OriginatingSchema(s_header_section_schema);
|
||||
t_5->ReferentType(header_section_schemat_schema_name);
|
||||
a_16schema_identifiers =
|
||||
new AttrDescriptor("schema_identifiers",t_5,LFalse,LFalse, AttrType_Explicit,
|
||||
*header_section_schemae_file_schema);
|
||||
header_section_schemae_file_schema->AddExplicitAttr (a_16schema_identifiers);
|
||||
reg.AddEntity (*header_section_schemae_file_schema);
|
||||
ListTypeDescriptor * t_5 = new ListTypeDescriptor;
|
||||
t_5->AssignAggrCreator( ( AggregateCreator ) create_StringAggregate ); // Creator function
|
||||
t_5->Bound1( 1 );
|
||||
t_5->Bound2( 2147483647 );
|
||||
t_5->UniqueElements( LTrue );
|
||||
t_5->FundamentalType( LIST_TYPE );
|
||||
t_5->Description( "LIST [1:?] OF UNIQUE schema_name" );
|
||||
t_5->OriginatingSchema( s_header_section_schema );
|
||||
t_5->ReferentType( header_section_schemat_schema_name );
|
||||
a_16schema_identifiers =
|
||||
new AttrDescriptor( "schema_identifiers", t_5, LFalse, LFalse, AttrType_Explicit,
|
||||
*header_section_schemae_file_schema );
|
||||
header_section_schemae_file_schema->AddExplicitAttr( a_16schema_identifiers );
|
||||
reg.AddEntity( *header_section_schemae_file_schema );
|
||||
///////// END_ENTITY file_schema
|
||||
|
||||
}
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
|
||||
#include <SdaiSchemaInit.h>
|
||||
|
||||
void HeaderSchemaInit (Registry & reg) {
|
||||
HeaderInitSchemasAndEnts (reg);
|
||||
SdaiHEADER_SECTION_SCHEMAInit (reg);
|
||||
reg.SetCompCollect( 0 );
|
||||
void HeaderSchemaInit( Registry & reg ) {
|
||||
HeaderInitSchemasAndEnts( reg );
|
||||
SdaiHEADER_SECTION_SCHEMAInit( reg );
|
||||
reg.SetCompCollect( 0 );
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
|
||||
#include <scl_export.h>
|
||||
#include <sdai.h>
|
||||
#include <Registry.h>
|
||||
#include <STEPaggregate.h>
|
||||
@@ -19,8 +20,8 @@
|
||||
#include <SdaiHeaderSchemaClasses.h>
|
||||
#include <SdaiHeaderSchema.h>
|
||||
|
||||
void HeaderSchemaInit (Registry &);
|
||||
void HeaderInitSchemasAndEnts (Registry &);
|
||||
void SdaiHEADER_SECTION_SCHEMAInit (Registry & r);
|
||||
SCL_EDITOR_EXPORT void HeaderSchemaInit( Registry & );
|
||||
SCL_EDITOR_EXPORT void HeaderInitSchemasAndEnts( Registry & );
|
||||
SCL_EDITOR_EXPORT void SdaiHEADER_SECTION_SCHEMAInit( Registry & r );
|
||||
|
||||
#endif
|
||||
|
||||
+103
-81
@@ -12,7 +12,7 @@
|
||||
* and is not subject to copyright.
|
||||
*/
|
||||
|
||||
|
||||
#include <scl_export.h>
|
||||
#include <gennode.h>
|
||||
#include <gennodelist.h>
|
||||
#include <gennodearray.h>
|
||||
@@ -25,8 +25,8 @@
|
||||
#include <SingleLinkList.h>
|
||||
|
||||
//#define NUM_CMDMGR_CMDS 9
|
||||
// this is the number of columns that contain cmds (as opposed
|
||||
// to state info)
|
||||
// this is the number of columns that contain cmds (as opposed
|
||||
// to state info)
|
||||
#define NUM_CMD_COLUMNS 3
|
||||
|
||||
// **** each of CMD_CHAR must be a unique char.
|
||||
@@ -52,7 +52,7 @@
|
||||
#define DELETE_STATE_CHAR 'D'
|
||||
#define DELETE_STATE_COL 4
|
||||
|
||||
// close will try to save it to its previous status
|
||||
// close will try to save it to its previous status
|
||||
#define CLOSE_CMD_CHAR 'c'
|
||||
#define CLOSE_CMD_COL 2
|
||||
|
||||
@@ -77,102 +77,124 @@
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class ReplicateLinkNode : public SingleLinkNode {
|
||||
private:
|
||||
protected:
|
||||
MgrNode * _repNode;
|
||||
public:
|
||||
ReplicateLinkNode() { _repNode = 0; }
|
||||
~ReplicateLinkNode() { }
|
||||
class SCL_EDITOR_EXPORT ReplicateLinkNode : public SingleLinkNode {
|
||||
private:
|
||||
protected:
|
||||
MgrNode * _repNode;
|
||||
public:
|
||||
ReplicateLinkNode() {
|
||||
_repNode = 0;
|
||||
}
|
||||
~ReplicateLinkNode() { }
|
||||
|
||||
const char *ClassName () { return "ReplicateLinkNode"; }
|
||||
const char * ClassName() {
|
||||
return "ReplicateLinkNode";
|
||||
}
|
||||
|
||||
MgrNode *ReplicateNode() { return _repNode; }
|
||||
void ReplicateNode(MgrNode *rn) { _repNode = rn; }
|
||||
MgrNode * ReplicateNode() {
|
||||
return _repNode;
|
||||
}
|
||||
void ReplicateNode( MgrNode * rn ) {
|
||||
_repNode = rn;
|
||||
}
|
||||
};
|
||||
|
||||
class ReplicateList : public SingleLinkList {
|
||||
private:
|
||||
protected:
|
||||
public:
|
||||
ReplicateList() { }
|
||||
~ReplicateList() { }
|
||||
class SCL_EDITOR_EXPORT ReplicateList : public SingleLinkList {
|
||||
private:
|
||||
protected:
|
||||
public:
|
||||
ReplicateList() { }
|
||||
~ReplicateList() { }
|
||||
|
||||
virtual SingleLinkNode * NewNode () { return new ReplicateLinkNode; }
|
||||
virtual SingleLinkNode * NewNode() {
|
||||
return new ReplicateLinkNode;
|
||||
}
|
||||
|
||||
bool IsOnList(MgrNode *mn);
|
||||
ReplicateLinkNode *FindNode(MgrNode *mn);
|
||||
|
||||
ReplicateLinkNode * AddNode (MgrNode * rn) {
|
||||
ReplicateLinkNode *node = (ReplicateLinkNode *) NewNode();
|
||||
node->ReplicateNode(rn);
|
||||
SingleLinkList::AppendNode(node);
|
||||
return node;
|
||||
}
|
||||
bool IsOnList( MgrNode * mn );
|
||||
ReplicateLinkNode * FindNode( MgrNode * mn );
|
||||
|
||||
bool Remove(ReplicateLinkNode *rln);
|
||||
bool Remove(MgrNode *rn);
|
||||
ReplicateLinkNode * AddNode( MgrNode * rn ) {
|
||||
ReplicateLinkNode * node = ( ReplicateLinkNode * ) NewNode();
|
||||
node->ReplicateNode( rn );
|
||||
SingleLinkList::AppendNode( node );
|
||||
return node;
|
||||
}
|
||||
|
||||
const char *ClassName () { return "ReplicateList"; }
|
||||
bool Remove( ReplicateLinkNode * rln );
|
||||
bool Remove( MgrNode * rn );
|
||||
|
||||
const char * ClassName() {
|
||||
return "ReplicateList";
|
||||
}
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class CmdMgr
|
||||
{
|
||||
protected:
|
||||
MgrNodeList *completeList;
|
||||
MgrNodeList *incompleteList;
|
||||
MgrNodeList *cancelList;
|
||||
MgrNodeList *deleteList;
|
||||
class SCL_EDITOR_EXPORT CmdMgr {
|
||||
protected:
|
||||
MgrNodeList * completeList;
|
||||
MgrNodeList * incompleteList;
|
||||
MgrNodeList * cancelList;
|
||||
MgrNodeList * deleteList;
|
||||
|
||||
DisplayNodeList *mappedWriteList;
|
||||
DisplayNodeList *mappedViewList;
|
||||
DisplayNodeList *closeList;
|
||||
DisplayNodeList * mappedWriteList;
|
||||
DisplayNodeList * mappedViewList;
|
||||
DisplayNodeList * closeList;
|
||||
|
||||
ReplicateList *replicateList;
|
||||
public:
|
||||
ReplicateList * replicateList;
|
||||
public:
|
||||
|
||||
CmdMgr();
|
||||
CmdMgr();
|
||||
|
||||
// STATE LIST OPERATIONS
|
||||
MgrNode *GetHead(stateEnum listType);
|
||||
DisplayNode *GetHead(displayStateEnum listType);
|
||||
ReplicateLinkNode *GetReplicateHead()
|
||||
{ return (ReplicateLinkNode *)(replicateList->GetHead()); }
|
||||
|
||||
void ClearEntries(stateEnum listType);
|
||||
void ClearEntries(displayStateEnum listType);
|
||||
void ClearReplicateEntries() { replicateList->Empty(); }
|
||||
ReplicateList *RepList() { return replicateList; }
|
||||
|
||||
// searches current list for fileId
|
||||
MgrNode *StateFindFileId(stateEnum s, int fileId);
|
||||
// returns stateNext or statePrev member variables
|
||||
// i.e. next or previous node on curr state list
|
||||
|
||||
int SaveCompleteCmdList(MgrNode *mn)
|
||||
{ return mn->ChangeList(completeList); }
|
||||
int SaveIncompleteCmdList(MgrNode *mn)
|
||||
{ return mn->ChangeList(incompleteList); }
|
||||
int CancelCmdList(MgrNode *mn)
|
||||
{ return mn->ChangeList(cancelList); }
|
||||
int DeleteCmdList(MgrNode *mn)
|
||||
{ return mn->ChangeList(deleteList); }
|
||||
int ModifyCmdList(MgrNode *mn)
|
||||
{ return mn->ChangeList(mappedWriteList); }
|
||||
int ViewCmdList(MgrNode *mn)
|
||||
{ return mn->ChangeList(mappedViewList); }
|
||||
int CloseCmdList(MgrNode *mn)
|
||||
{ return ( ( mn->DisplayState() == mappedWrite ) ||
|
||||
( mn->DisplayState() == mappedView ) ) ?
|
||||
mn->ChangeList(closeList) : 0;
|
||||
MgrNode * GetHead( stateEnum listType );
|
||||
DisplayNode * GetHead( displayStateEnum listType );
|
||||
ReplicateLinkNode * GetReplicateHead() {
|
||||
return ( ReplicateLinkNode * )( replicateList->GetHead() );
|
||||
}
|
||||
|
||||
void ReplicateCmdList(MgrNode *mn);
|
||||
|
||||
void ClearInstances();
|
||||
protected:
|
||||
void ClearEntries( stateEnum listType );
|
||||
void ClearEntries( displayStateEnum listType );
|
||||
void ClearReplicateEntries() {
|
||||
replicateList->Empty();
|
||||
}
|
||||
ReplicateList * RepList() {
|
||||
return replicateList;
|
||||
}
|
||||
|
||||
// searches current list for fileId
|
||||
MgrNode * StateFindFileId( stateEnum s, int fileId );
|
||||
// returns stateNext or statePrev member variables
|
||||
// i.e. next or previous node on curr state list
|
||||
|
||||
int SaveCompleteCmdList( MgrNode * mn ) {
|
||||
return mn->ChangeList( completeList );
|
||||
}
|
||||
int SaveIncompleteCmdList( MgrNode * mn ) {
|
||||
return mn->ChangeList( incompleteList );
|
||||
}
|
||||
int CancelCmdList( MgrNode * mn ) {
|
||||
return mn->ChangeList( cancelList );
|
||||
}
|
||||
int DeleteCmdList( MgrNode * mn ) {
|
||||
return mn->ChangeList( deleteList );
|
||||
}
|
||||
int ModifyCmdList( MgrNode * mn ) {
|
||||
return mn->ChangeList( mappedWriteList );
|
||||
}
|
||||
int ViewCmdList( MgrNode * mn ) {
|
||||
return mn->ChangeList( mappedViewList );
|
||||
}
|
||||
int CloseCmdList( MgrNode * mn ) {
|
||||
return ( ( mn->DisplayState() == mappedWrite ) ||
|
||||
( mn->DisplayState() == mappedView ) ) ?
|
||||
mn->ChangeList( closeList ) : 0;
|
||||
}
|
||||
|
||||
void ReplicateCmdList( MgrNode * mn );
|
||||
|
||||
void ClearInstances();
|
||||
protected:
|
||||
|
||||
};
|
||||
|
||||
|
||||
+42
-28
@@ -13,11 +13,9 @@
|
||||
* and is not subject to copyright.
|
||||
*/
|
||||
|
||||
/* $Id: dispnode.h,v 3.0.1.2 1997/11/05 22:11:39 sauderd DP3.1 $ */
|
||||
/* $Id: dispnode.h,v 3.0.1.2 1997/11/05 22:11:39 sauderd DP3.1 $ */
|
||||
|
||||
#ifdef __O3DB__
|
||||
#include <OpenOODB.h>
|
||||
#endif
|
||||
#include <scl_export.h>
|
||||
|
||||
/*#include <STEPattribute.h>*/
|
||||
/*#include <STEPentity.h>*/
|
||||
@@ -34,43 +32,59 @@ class MgrNode;
|
||||
// class DisplayNode
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class DisplayNode : public GenericNode
|
||||
{
|
||||
protected:
|
||||
friend class GenNodeList;
|
||||
friend class DisplayNodeList;
|
||||
class SCL_EDITOR_EXPORT DisplayNode : public GenericNode {
|
||||
protected:
|
||||
friend class GenNodeList;
|
||||
friend class DisplayNodeList;
|
||||
|
||||
MgrNode *mn;
|
||||
void *see;
|
||||
displayStateEnum displayState; // = { mappedWrite, mappedView, notMapped }
|
||||
MgrNode * mn;
|
||||
void * see;
|
||||
displayStateEnum displayState; // = { mappedWrite, mappedView, notMapped }
|
||||
|
||||
public:
|
||||
// this should probably only be used to create head nodes for dispnodelists
|
||||
DisplayNode() { displayState = noMapState; }
|
||||
DisplayNode(MgrNode *node) { mn = node; displayState = noMapState; }
|
||||
~DisplayNode();
|
||||
public:
|
||||
// this should probably only be used to create head nodes for dispnodelists
|
||||
DisplayNode() {
|
||||
displayState = noMapState;
|
||||
}
|
||||
DisplayNode( MgrNode * node ) {
|
||||
mn = node;
|
||||
displayState = noMapState;
|
||||
}
|
||||
~DisplayNode();
|
||||
|
||||
void SEE(void *s) { see = s; }
|
||||
virtual void *SEE() { return see; };
|
||||
void SEE( void * s ) {
|
||||
see = s;
|
||||
}
|
||||
virtual void * SEE() {
|
||||
return see;
|
||||
};
|
||||
|
||||
void mgrNode(MgrNode *node) { mn = node; }
|
||||
class MgrNode *mgrNode() { return mn; }
|
||||
void mgrNode( MgrNode * node ) {
|
||||
mn = node;
|
||||
}
|
||||
class MgrNode * mgrNode() {
|
||||
return mn;
|
||||
}
|
||||
|
||||
displayStateEnum DisplayState() { return displayState; }
|
||||
int DisplayListMember(displayStateEnum ds) { return (displayState == ds); }
|
||||
displayStateEnum DisplayState() {
|
||||
return displayState;
|
||||
}
|
||||
int DisplayListMember( displayStateEnum ds ) {
|
||||
return ( displayState == ds );
|
||||
}
|
||||
|
||||
int ChangeState(displayStateEnum s);
|
||||
int ChangeList(DisplayNodeList *cmdList);
|
||||
int ChangeState( displayStateEnum s );
|
||||
int ChangeList( DisplayNodeList * cmdList );
|
||||
|
||||
void Remove();
|
||||
void Remove();
|
||||
|
||||
protected:
|
||||
protected:
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// class DisplayNode inline functions
|
||||
// these functions don't rely on any inline functions (its own or
|
||||
// other classes) that aren't in this file except for Generic functions
|
||||
// other classes) that aren't in this file except for Generic functions
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif
|
||||
|
||||
+24
-26
@@ -13,11 +13,9 @@
|
||||
* and is not subject to copyright.
|
||||
*/
|
||||
|
||||
/* $Id: dispnodelist.h,v 3.0.1.2 1997/11/05 22:11:40 sauderd DP3.1 $ */
|
||||
/* $Id: dispnodelist.h,v 3.0.1.2 1997/11/05 22:11:40 sauderd DP3.1 $ */
|
||||
|
||||
#ifdef __O3DB__
|
||||
#include <OpenOODB.h>
|
||||
#endif
|
||||
#include <scl_export.h>
|
||||
|
||||
#include <gennode.h>
|
||||
//#include <gennode.inline.h>
|
||||
@@ -28,43 +26,43 @@
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// class DisplayNodeList
|
||||
// This will be used to represent the display state lists.
|
||||
// This will be used to represent the display state lists.
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class DisplayNodeList : public GenNodeList
|
||||
{
|
||||
public:
|
||||
DisplayNodeList(displayStateEnum type);
|
||||
~DisplayNodeList() { }
|
||||
class SCL_EDITOR_EXPORT DisplayNodeList : public GenNodeList {
|
||||
public:
|
||||
DisplayNodeList( displayStateEnum type );
|
||||
~DisplayNodeList() { }
|
||||
|
||||
// ADDED functions
|
||||
displayStateEnum GetState() { return listType; }
|
||||
displayStateEnum GetState() {
|
||||
return listType;
|
||||
}
|
||||
|
||||
// REDEFINED functions
|
||||
// deletes node from its previous list & appends
|
||||
virtual void Append(GenericNode *node);
|
||||
// deletes newNode from its previous list & inserts in
|
||||
// relation to existNode
|
||||
virtual void InsertAfter(GenericNode *newNode, GenericNode *existNode);
|
||||
virtual void InsertBefore(GenericNode *newNode, GenericNode *existNode);
|
||||
virtual void Remove(GenericNode *node);
|
||||
// deletes node from its previous list & appends
|
||||
virtual void Append( GenericNode * node );
|
||||
// deletes newNode from its previous list & inserts in
|
||||
// relation to existNode
|
||||
virtual void InsertAfter( GenericNode * newNode, GenericNode * existNode );
|
||||
virtual void InsertBefore( GenericNode * newNode, GenericNode * existNode );
|
||||
virtual void Remove( GenericNode * node );
|
||||
|
||||
protected:
|
||||
private:
|
||||
displayStateEnum listType;
|
||||
protected:
|
||||
private:
|
||||
displayStateEnum listType;
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// class DisplayNodeList inline functions
|
||||
// these functions don't rely on any inline functions (its own or
|
||||
// other classes) that aren't in this file except for Generic functions
|
||||
// other classes) that aren't in this file except for Generic functions
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
inline DisplayNodeList::DisplayNodeList(displayStateEnum type)
|
||||
: GenNodeList(new DisplayNode())
|
||||
{
|
||||
inline DisplayNodeList::DisplayNodeList( displayStateEnum type )
|
||||
: GenNodeList( new DisplayNode() ) {
|
||||
listType = type;
|
||||
((DisplayNode *)head)->displayState = type;
|
||||
( ( DisplayNode * )head )->displayState = type;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* and is not subject to copyright.
|
||||
*/
|
||||
|
||||
/* $Id: editordefines.h,v 3.0.1.2 1997/11/05 22:11:46 sauderd DP3.1 $ */
|
||||
/* $Id: editordefines.h,v 3.0.1.2 1997/11/05 22:11:46 sauderd DP3.1 $ */
|
||||
|
||||
class GenericNode;
|
||||
class GenNodeList;
|
||||
@@ -27,21 +27,21 @@ class DisplayNodeList;
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
enum displayStateEnum {
|
||||
mappedWrite, // has a writable SEE on the screen
|
||||
mappedView, // has a view only SEE on the screen
|
||||
notMapped,
|
||||
noMapState
|
||||
} ;
|
||||
mappedWrite, // has a writable SEE on the screen
|
||||
mappedView, // has a view only SEE on the screen
|
||||
notMapped,
|
||||
noMapState
|
||||
} ;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
enum stateEnum {
|
||||
noStateSE, // state undefined, not on a list
|
||||
completeSE, // on saved complete list
|
||||
incompleteSE, // on saved incomplete list
|
||||
deleteSE, // on delete list
|
||||
newSE // on newly created list
|
||||
} ;
|
||||
noStateSE, // state undefined, not on a list
|
||||
completeSE, // on saved complete list
|
||||
incompleteSE, // on saved incomplete list
|
||||
deleteSE, // on delete list
|
||||
newSE // on newly created list
|
||||
} ;
|
||||
|
||||
/*
|
||||
these variable are used by the STEPfile for reading and writing
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user