Compare commits

...
Author SHA1 Message Date
Mark Pictor 698b9e0371 Update text files for v0.6
Add v0.6 info, and change urls in those files
2012-05-25 22:12:37 -04:00
Mark Pictor a33cba8cef renamed - change urls, strings 2012-05-25 22:05:12 -04:00
Mark 8808a38a2e Merge pull request #187 from mpictor/review/remove-semicolon
remove semicolon
2012-05-17 02:08:02 -07:00
Mark 76adc60ac3 Merge pull request #185 from mpictor/tp/python-generator-stage2
Tp/python generator stage2
2012-05-16 18:08:06 -07:00
Mark 3275d36d80 Merge pull request #181 from mpictor/review/update_scl_macros
update scl_utils macros for linking on apple and windows
2012-05-16 17:07:15 -07:00
Mark Pictor 17cec63877 remove semicolon 2012-05-14 21:24:54 -04:00
charliestirk 5f39d9a466 Merge pull request #186 from mpictor/review/remove-players-theater-file
Oops, PlayersTheater.stp isn't IFC2X3
2012-05-11 18:54:28 -07:00
Mark Pictor 363a82e6a8 Oops, PlayersTheater.stp isn't IFC2X3 2012-05-11 21:09:39 -04:00
tpaviot 598e91a092 Small cleanup 2012-05-11 12:15:14 +02:00
tpaviot e313f9b3a0 Fixed TYPEprint_init prototype (not used in fedex_python though) 2012-05-11 12:08:25 +02:00
tpaviot ee13526af5 * Better support of where/rules functions
* Bugfix in OPTIONAL attributes
2012-05-11 12:08:25 +02:00
tpaviot 58e340b36c Added new unittest for functions; better switch/case implementation; added missing SQRT builtin function; 2012-05-11 12:08:24 +02:00
tpaviot f5787c6225 Started implementing where rules 2012-05-11 12:08:24 +02:00
tpaviot 4dc0e38c99 Implemented TYPEOF (to be continued) 2012-05-11 12:08:24 +02:00
tpaviot 1131c3042f Better implementation for defined datatypes 2012-05-11 12:08:24 +02:00
tpaviot 71c90857ed New implementation for expressions 2012-05-11 12:08:24 +02:00
tpaviot 7e5c20ea92 Implemented function support at the fedex_python level 2012-05-11 12:08:24 +02:00
tpaviot 891589683f Refactored the ENUMERATION class so that test_enum_entity_name schema passes 2012-05-11 12:08:24 +02:00
tpaviot 94b2dde59c Removed buggy code from TypeChecker 2012-05-11 12:08:24 +02:00
tpaviot b8275218a8 Fixed inheritance bug. single_inheritance_multi_level now passes 2012-05-11 12:08:23 +02:00
tpaviot b4458bbe79 Moved algorithms support to a class definition 2012-05-11 12:08:23 +02:00
tpaviot 2dcfaedae2 Implemeted functions/rules prototypes (to be continued) 2012-05-11 12:08:23 +02:00
tpaviot ae8d48481a Implemented 80% of the builtin constants/functions/procedures 2012-05-11 12:08:23 +02:00
tpaviot f049631f70 Made REAL and INTEGER inherit from NUMBER 2012-05-11 12:08:23 +02:00
tpaviot 217dd34edf Implemented SET type 2012-05-11 12:08:23 +02:00
tpaviot bda4c94ed7 Implemented BAG type 2012-05-11 12:08:22 +02:00
tpaviot b2dd22cc84 Added a new unitary schema + fixes 2012-05-11 12:08:22 +02:00
tpaviot 004235d0c2 unitary schema test_array passes 2012-05-11 12:08:22 +02:00
tpaviot 803323549e Improved ENUMERATION and SELECT implementation 2012-05-11 12:08:22 +02:00
tpaviot 754ae304fa Added schema name definition 2012-05-11 12:08:22 +02:00
tpaviot 78916d9b4d Improved test suite 2012-05-11 12:08:22 +02:00
Mark bad745c9b9 Merge pull request #184 from mpictor/review/ap203a1-mod
add modified ap203 amd 1, with comment explaining change
2012-05-09 17:34:50 -07:00
Mark Pictor da91e9735c add modified ap203 amd 1, with comment explaining change 2012-05-08 20:24:03 -04:00
Mark Pictor 758a45089e fix quotes 2012-05-05 11:17:45 -04:00
Mark Pictor 3df1d1ccce EXCLUDE_FROM_ALL cannot be set on targets that are installed
so either test a target or install it, but not both
2012-05-05 11:06:54 -04:00
Mark Pictor f125079519 sdai should be lowercase 2012-05-05 11:06:54 -04:00
Mark Pictor 7be54f3fec update scl_utils macros for apple flags and for windows dllimport/dllexport 2012-05-05 11:06:54 -04:00
Mark b72eea6fac Merge pull request #183 from mpictor/review/p21-binary-values
fix bug with binary values not being saved to disk
2012-05-05 06:13:06 -07:00
charliestirk 9ca98fc4ce Merge pull request #180 from mpictor/review/ifc-extension
when testing p21read, also look for files with .ifc ext
2012-04-16 19:07:34 -07:00
Mark Pictor c56ed86391 when testing p21read, also look for files with .ifc ext 2012-04-16 20:37:26 -04:00
Mark f4a0feb33a Merge pull request #175 from mpictor/review/select_segfault
select segfault
2012-04-12 15:34:59 -07:00
Mark 4527aadff6 Merge pull request #176 from mpictor/review/scl_trace_fprintf
fedex_plus - trace code generation with fprintf
2012-04-12 15:34:38 -07:00
Mark Pictor 2b46efb15f fix bug with binary values not being saved to disk
For SDAI_Binary, STEPattribute::is_null() cleared the value instead of
merely reporting whether it was null, like it does with other types.
2012-04-09 12:21:15 -04:00
Mark 1c12e5d102 Merge pull request #173 from mpictor/review/p21-rw-progress
Part 21 read-write progress
2012-04-09 09:07:31 -07:00
Mark 278e45caa7 Merge pull request #177 from mpictor/review/build_fix
Fixed build problem in print_typechain function.
2012-04-08 14:50:02 -07:00
davyw a9c64bc448 Fixed build problem in print_typechain function. 2012-04-08 23:09:32 +02:00
Mark Pictor 261ae1d67e minor changes, mostly suggested by davyw 2012-04-08 16:02:54 -04:00
Mark 1d34753c03 Merge pull request #166 from mpictor/review/aggr_runtime_bounds
Runtime bounds for aggregates
2012-04-08 12:34:53 -07:00
davyw aa97040c83 remove SCL_SCHEMA_EXPORT for now 2012-04-08 15:33:23 -04:00
Mark Pictor c2b87f8f0b include scl_trace_fprintf.h in source in src/fedex_plus
only added to files which use fprintf
2012-04-08 14:10:53 -04:00
Mark Pictor 1a32be9308 add header and config option for locating source of generated code 2012-04-08 14:10:53 -04:00
Mark 52bb54d87b Merge pull request #171 from mpictor/review/scl_cf_h
fix potential scl_cf.h problem
2012-04-08 08:51:54 -07:00
Mark Pictor f9390c6f8c add segfault test 2012-04-08 09:14:58 -04:00
Mark Pictor e421f70ce0 Fix p21read segfault with selects by initializing data members that are pointers 2012-04-08 08:09:05 -04:00
Mark 767a01a8f0 Merge pull request #168 from mpictor/review/p21read_memleak_fixes
Review/p21read memleak fixes
2012-04-07 03:40:20 -07:00
Mark Pictor 5af38feaa7 fix false-positive build errors reported on cdash 2012-04-06 19:15:02 -04:00
Mark Pictor 2067e48bbd check for std::thread during configuration 2012-04-06 16:54:41 -04:00
Mark Pictor 883bc716ce add test for r/w progress 2012-04-06 16:54:41 -04:00
charliestirk 89f8807c6e Merge pull request #172 from mpictor/review/schemas
add ap238 schema, move and update pdm schema
2012-04-06 13:50:22 -07:00
Mark Pictor 6c76d7b184 fix potential scl_cf.h problem 2012-04-06 16:35:33 -04:00
Mark Pictor 1e18361351 add ap238 schema, move and update pdm schema 2012-04-06 16:28:40 -04:00
Mark Pictor 0bea3efca0 make it possible to check STEPfile r/w progress
Adds member functions `float GetReadProgress() const` and `float GetWriteProgress() const`,
and some protected data members. The new functions are intended to be thread safe.
2012-04-06 15:38:53 -04:00
Mark Pictor 225180f35d make some funcs const 2012-04-06 15:38:53 -04:00
Mark Pictor 6f60a8a7f9 cleanup 2012-04-06 15:38:53 -04:00
davyw 910faf0198 make aggr_runtime_bounds branch compile with MSVC 2012-04-05 17:57:34 -04:00
davyw dd6ef88aa1 Fixed memory leaks for STEPcomplex attribute data.
* STEPcomplex creates attribute data in BuildAttrs method that never
  got destroyed.
2012-04-05 20:40:15 +02:00
davyw 6b1ba4aa5d TypeDescriptor::~TypeDescriptor body removed from ExpDict.h.
* Since TypeDescriptor destructor body was added to ExpDict.inline.cc it
  needed to be removed from ExpDict.h.
2012-04-05 20:40:14 +02:00
davyw 5aca33785c Fixed memory leak for entity names in STEPfile.cc.
* STEPFILE::entNmArr 's content never got destroyed.
2012-04-05 20:40:12 +02:00
davyw a1d6b25e75 Fixed some memory leaks in ExpDict.cc.
* TypeDescriptor::_where_rules never got destroyed.
* Where_rule__list, Uniqueness_rule__set and Global_rule__set never
  destroyed their content.
* Inverse_attributeList never destroyed it's content.
2012-04-05 20:40:11 +02:00
davyw 626bb73cb9 Fixed memory leak for Registry TypeDescriptors.
* Registry class creates a number of standard TypeDescriptors that never
  got destroyed.
2012-04-05 20:40:10 +02:00
davyw 8a2665e980 Fixed memory leaks for STEPaggregate data.
* Data was created for use with STEPaggregate types in fedex_plus generated
  code but never destroyed.
* Fixed some code style alignment.
* STEPaggregate's STEPnodes never got destroyed.
2012-04-05 20:40:09 +02:00
davyw 4740f4d45c Added SCL_ prefix to hash functions of scl_hash.cc.
* Linking went wrong because functions from hash.c and scl_hash.cc had
  the same names. By adding SCL_ prefix to the scl_hash.cc function names
  this issue is resolved.
* Fixed minor issue in scl_hash.cc.
2012-04-05 20:40:07 +02:00
davyw 04f4c1da66 Added unnamed types to Schema.
* Unnamed types where created, but never destroyed, added unnamed types
  list to Schema and delete the unnamed types in Schema destructor.
2012-04-05 20:40:06 +02:00
davyw 0a12237f8b Memory leak fix in dirobj.cc.
* DirObj::fileList was created but never destroyed.
2012-04-05 20:40:04 +02:00
davyw c77471a5f8 Delete STEPattributes from sdaiApplication_instance::attributes.
* The attributes list content from sdaiApplication_instance never got
  deleted, added clean up code to sdaiApplication_instance destructor.
* Added refCount to STEPattribute to prevent multiple deletions of the
  same instance in case an instance is added to attributes more than once.
2012-04-05 20:40:04 +02:00
davyw a9173c8b41 Moved Registry::DeleteContents to Registry::~Registry.
* DeleteContents was only called for _headerRegistry, not for the Schema
  Registry, by moving it to the destructor this fixes a number of memory
  leaks.
2012-04-05 20:40:02 +02:00
Mark 521f4427ea Merge pull request #167 from mpictor/review/brlcad-man-dir
make man page install path flexible
2012-04-04 05:28:21 -07:00
Mark 7628642baf Merge pull request #165 from mpictor/review/brlcad-paths
change paths to match BRL-CAD convention
2012-04-04 05:27:30 -07:00
starseeker c446fc391b make man page install path flexible 2012-04-01 12:54:43 -04:00
Mark Pictor 473223d831 add missing files, make tests work 2012-04-01 12:08:06 -04:00
Mark Pictor b4cf4236f2 declare some AggrTypeDescriptor member functions const 2012-03-31 22:08:29 -04:00
Mark Pictor 52635e7d8b add files to test runtime aggregate bounds 2012-03-31 22:08:29 -04:00
Mark Pictor 6817e1b868 change schema name, remove tabs 2012-03-31 13:17:31 -04:00
Mark Pictor a72fa6eb86 use the aggregate's name instead of the data member's name 2012-03-31 10:08:14 -04:00
Mark Pictor a86b035dc7 cleanup 2012-03-30 18:27:39 -04:00
Mark Pictor 7425e55db7 Add support for aggregate bounds that are not compile-time constants.
This renames or adds several functions in class AggrTypeDescriptor. Bounds
dependent on a function call are supported, but only as strings. Bounds
dependent on attributes need some work - the schema-specific libs won't
compile if they use the SetBound[12]FromMemberAccessor functions.
2012-03-30 18:27:39 -04:00
starseeker 905254125e change paths to match BRL-CAD convention 2012-03-30 18:05:44 -04:00
Mark db31ea0455 Merge pull request #163 from mpictor/review/brlcad-cmake
brlcad cmake patch, with two minor changes
2012-03-29 14:28:53 -07:00
Mark Pictor 7b54e23e1a update comment in scl_version_string.h 2012-03-26 20:40:17 -04:00
Mark Pictor c676850fab make CMAKE_BUILD_TYPE work for sub-builds 2012-03-26 20:39:02 -04:00
starseeker b507ee8179 Two more of Cliff's patches 2012-03-26 20:31:36 -04:00
Mark Pictor 347df4f231 cmake variables have been renamed 2012-03-26 19:56:02 -04:00
Mark 00ad279a63 Merge pull request #162 from mpictor/review/p21read_scl_memmgr
Review/p21read scl memmgr
2012-03-26 16:46:40 -07:00
charliestirk 0878a6d359 Merge pull request #164 from mpictor/review/doc-pdf
Added pdf version of documentation files
2012-03-26 16:19:01 -07:00
tpaviot 77ab82b571 Added pdf version of documentation files 2012-03-26 05:12:38 +02:00
Mark Pictor 0a954f1976 unittesting should default to off, minor whitespace change
unittesting had been turned on accidentally
made a few whitespace changes for readability (I assume the whitespace had been removed by a script)
2012-03-21 21:20:50 -04:00
starseeker 75706a942a starseeker's patch from http://bzflag.bz/~starseeker/scl_cmake_files.patch 2012-03-21 21:18:38 -04:00
davyw d8d293bbf8 Added scl_memmgr to fedex_plus generated schema libraries. 2012-03-20 21:15:06 +01:00
davyw 3be42207ee Added scl_memmgr to cleditor library. 2012-03-20 21:12:45 +01:00
davyw b49d2beb6a Added scl_memmgr to cldai library. 2012-03-20 21:11:48 +01:00
davyw 245ff1458b Added scl_memmgr to clstepcore library. 2012-03-20 21:08:45 +01:00
davyw 010e02b7a6 Added scl_memmgr to clutils library. 2012-03-20 21:07:02 +01:00
davyw c84330b26a Updated leak message with total leaks (in bytes). 2012-03-20 21:04:24 +01:00
Mark 88e09ca813 Merge pull request #160 from mpictor/review/memleak_fixes_fedex_plus
Review/memleak fixes fedex plus
2012-03-17 05:58:52 -07:00
davyw ee13cdaca3 Removed disabled code from src/express/resolve.c. 2012-03-15 21:08:26 +01:00
davyw b60f85be1d Fixed parameter inconsistency for ERRORdestroy function. 2012-03-13 22:24:40 +01:00
davyw f7cde9fc20 Fixed memory leak reported by scl_memmgr in multpass.c.
* Function initializeMarks allocates an int and stores the pointer in
  schema->clientData, this was not cleaned up anywhere. The function
  cleanupMarks destroys these allocated ints.
2012-03-13 21:30:50 +01:00
davyw 3010afa7ea Fixed some memory leaks reported by scl_memmgr. 2012-03-13 21:19:47 +01:00
davyw f5d0cc59aa Added fedex_plus/express cleanup functions.
* A lot of memory allocated in EXPRESSinitialize was not cleaned up.
  Added EXPRESScleanup function and subfunctions to clean up that memory.
2012-03-13 21:17:49 +01:00
charliestirk bd320c403d Merge pull request #158 from mpictor/review/npp-express-syntax
Added express syntax highlighting file for notepad ++.
2012-03-13 12:47:36 -07:00
davyw e83fc64bc9 Added express syntax highlighting file for notepad ++. 2012-03-13 20:39:53 +01:00
Mark 0e9cc5c6ae Merge pull request #156 from mpictor/review/add-ap219
add ap219 schema
2012-03-13 04:54:49 -07:00
Mark a215cae560 Merge pull request #157 from mpictor/review/matrix-and-highlight
add syntax highlighting file, changes to ctest matrix script
2012-03-13 04:54:18 -07:00
Mark Pictor 6c708845bf add ap219 schema 2012-03-12 21:07:50 -04:00
Mark Pictor 2e1befa0bf fix ctest matrix script 2012-03-12 21:07:00 -04:00
Mark Pictor 884949bbab add EXPRESS syntax highlighting file for Kate editor 2012-03-12 21:07:00 -04:00
Mark ea7adb4d18 Merge pull request #153 from mpictor/tp/new_unitary_schema
Added unitary schema to test issue #132
2012-03-08 16:35:15 -08:00
charliestirk 6ada55b7fe Update AUTHORS 2012-03-08 11:50:50 -07:00
charliestirk f705842bb7 added davy 2012-03-08 11:50:21 -07:00
Mark c1636b4d01 Merge pull request #152 from mpictor/review/msvc_fix_ap210
Replaced if...else if to if...return in selects.c.
2012-03-06 17:50:09 -08:00
tpaviot 0c424b4eb5 Added unitary schema to test issue #132 2012-03-04 22:01:09 +01:00
davyw dea7f8c3a1 Replaced if...else if to if...return in selects.c.
* On MSVC the number of nested if...else if statements is limited to 128.
  For AP210e2, AP210e3 and AP239, this number was reached, therefore
  the if...else if statements are now replaced with if...return statements.
* Increased buffer size from 5000 to 6000 in classes.c function TypeDescription.
  (Overflow occured for AP210e3.)
2012-03-04 13:22:17 +01:00
Mark 16e3749b8f Merge pull request #143 from mpictor/review/cmake-improvements
Improvements in the cmake builder
2012-03-02 03:34:05 -08:00
tpaviot 3953a2268e MSVC build type is set to Debug, as for Linux or OSX 2012-03-02 07:57:27 +01:00
tpaviot 5f1465e4e6 Fixed small bug in ABI versioning 2012-03-02 07:56:09 +01:00
tpaviot f3eab5d91a Added ABI versioning 2012-03-02 07:49:03 +01:00
tpaviot 7f588a64cf Fixed fedex_python build 2012-03-02 07:49:03 +01:00
tpaviot 38d2a49967 Improvements in the cmake builder 2012-03-02 07:49:02 +01:00
Mark 89035cdb2c Merge pull request #148 from mpictor/review/scl_memmgr
Review/scl memmgr
2012-03-01 05:53:55 -08:00
davyw 16743b297b Fixed malloc.h include for OSX (patch from @tpaviot) 2012-02-28 20:49:07 +01:00
davyw 7ec9f7d8fb Fixed fedex_python issues for msvc build.
* Mixed code/declarations are not allowed for c files on msvc.
  Moved variable declarations to top of function where needed.
* Added base library usage to fedex_python application.
2012-02-27 21:47:37 +01:00
davyw 4e0d73d001 Added use of scl_memmgr to fedex_plus application.
* Replaced malloc, calloc, realloc and free with scl_memmgr versions.
* Added scl_memmgr.h includes.
2012-02-27 21:21:55 +01:00
davyw 7ce8bcbefb Added use of scl_memmgr to exppp library.
* Replaced malloc, calloc, realloc and free with scl_memmgr versions.
* Added scl_memmgr.h includes.
2012-02-27 21:21:31 +01:00
davyw 4d6d249dad Added use of scl_memmgr to express library.
* Replaced malloc, calloc, realloc and free with scl_memmgr versions.
* Added scl_memmgr.h includes.
2012-02-27 21:21:08 +01:00
davyw 82c84e7337 Added base library with scl_memmgr implementation.
* scl_memmgr supports both c and c++ memory management.
  malloc, calloc, realloc and free for c.
  new, delete operators for c++.
  (in c++ files scl_memmgr.h should be included last because a macro
   is used to replace new and delete with scl versions. If not included
   last, this would break build.)
2012-02-27 21:20:15 +01:00
Mark 4d68ec0b19 Merge pull request #146 from mpictor/ver-0.5
Release v0.5 - update INSTALL, NEWS, README
2012-02-23 14:53:29 -08:00
Mark Pictor 69e0813cf7 improve installation instructions 2012-02-23 17:41:11 -05:00
Mark d0e2c156a1 Merge pull request #145 from mpictor/tp/python-generator-dev
Tp/python generator dev
2012-02-23 05:58:30 -08:00
tpaviot b84921e9d8 Fixed unittest failure 2012-02-23 05:25:28 +01:00
Mark Pictor d3418ed48c add python to README 2012-02-22 19:58:33 -05:00
Mark Pictor 96f5f28058 update docs for v0.5 2012-02-22 19:34:30 -05:00
tpaviot ca155ce50d Fixed regression 2012-02-22 23:16:24 +01:00
tpaviot 1bbbc219ba Fixed version and url in setup.py 2012-02-22 23:09:04 +01:00
tpaviot 59cf7ec1ed Fixed unbounded list support 2012-02-22 23:06:51 +01:00
tpaviot f053df82db Added other examples from unitary_schemas directory 2012-02-22 17:58:55 +01:00
tpaviot 8cad6ec2aa Improvements in SELECT and ENUMERATION support 2012-02-22 17:57:23 +01:00
tpaviot 5f345c700e Better support for enum and aggr typedefs 2012-02-22 17:57:23 +01:00
tpaviot 37594fc4a2 Code clean-up: remove unused code 2012-02-22 17:57:23 +01:00
tpaviot d6da97ec30 Small spelling fix 2012-02-22 17:57:23 +01:00
tpaviot 5f88f509b2 Improved docstring for aggregate 2012-02-22 17:57:22 +01:00
tpaviot d87d07a26c Added Model module/class 2012-02-22 17:57:22 +01:00
tpaviot 50b9032d32 LIST better implementation 2012-02-22 17:57:22 +01:00
tpaviot d56795946c Improvements in the aggregates support and Part21 importer as well 2012-02-22 17:57:22 +01:00
tpaviot 117ba3972f SCL unittest fix 2012-02-22 17:57:22 +01:00
tpaviot 8595a291cb Code cleanup 2012-02-22 17:57:22 +01:00
tpaviot ee78ba9c52 Moved AggregationDataType module name to AggregationDataTypes 2012-02-22 17:57:22 +01:00
tpaviot 575c77dda9 Bugfix: segfault when processing ap203 schema 2012-02-22 17:57:22 +01:00
tpaviot bd9942dc36 * Made ARRAY implementation strictly comply with ISO 10303-11:1994
* Updated SCL unittest.
2012-02-22 17:57:22 +01:00
tpaviot 10999e7a48 First draft for a SCL python generator 2012-02-22 17:57:21 +01:00
Mark becb8405ba Merge pull request #135 from mpictor/review/gcc_incomplete_type
Fix the incomplete type errors in AP210, AP235, AP242
2012-02-21 17:09:12 -08:00
Mark Pictor dca5e0c843 add 4 ap210e2 exchange files from wikistep
one had DOS line endings - "warning: CRLF will be replaced by LF in data/ap210e2/PDES-181.stp"
2012-02-21 20:06:02 -05:00
Mark Pictor 47ecd2088f fix linker issue on OSX 2012-02-21 20:04:42 -05:00
Mark Pictor 1cc2774b52 rewrite format_for_std_stringout(), eliminate use of 'tmpstr' buffer 2012-02-16 20:51:13 -05:00
Mark Pictor 3fd222218f Replace the scl_char_str__list class with std::deque
Also use std::string in place of char * in various places
2012-02-14 21:00:40 -05:00
Mark Pictor 212c11453e break up huge strings in generated code 2012-02-14 20:00:48 -05:00
Mark Pictor 260fd55f10 fix segfault - initialize members that are pointer-to-aggregate 2012-02-09 19:02:37 -05:00
Mark Pictor d94a44944b a little cleanup in src/fedex_plus 2012-02-09 19:02:37 -05:00
Mark Pictor 2be1cc40be add small schema exposing incomplete type bug 2012-02-09 19:02:36 -05:00
Mark Pictor 809e1dd495 in generated code, use pointer for all aggregate members 2012-02-09 19:02:36 -05:00
Mark Pictor 3aee5f353c selects.c: don't print tabs into schema files, also some minor cleanup 2012-02-09 19:02:36 -05:00
249 changed files with 165262 additions and 345657 deletions
+1
View File
@@ -13,6 +13,7 @@ Morrison, Christopher Sean (sean, morrison, brlcad)
Paviot, Thomas (tpaviot)
Pictor, Mark (mpictor)
Thomas, Dawn (homovulgaris, madant)
Wouters, Dave (davyw)
Yapp, Clifford (starseeker)
Special thanks:
+195 -105
View File
@@ -38,36 +38,61 @@
# This file contains the top level CMakeLists.txt logic for the
# SCL software package.
PROJECT(SCL)
# SCL version
SET(SCL_VERSION_MAJOR 0)
SET(SCL_VERSION_MINOR 5-dev)
SET(SCL_VERSION ${SCL_VERSION_MAJOR}.${SCL_VERSION_MINOR})
# SCL ABI version. SCL_ABI_SOVERSION should be incremented
# for each release introducing API incompatibilities
SET(SCL_ABI_SOVERSION 2)
SET(SCL_ABI_VERSION ${SCL_ABI_SOVERSION}.0.0)
# Minimum required version of CMake
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
IF(COMMAND CMAKE_POLICY)
CMAKE_POLICY(SET CMP0003 NEW)
CMAKE_POLICY(SET CMP0003 NEW)
ENDIF(COMMAND CMAKE_POLICY)
# set CMake project name
PROJECT(SCL)
IF( NOT DEFINED SCL_BUILD_TYPE )
SET( SCL_BUILD_TYPE "Debug" CACHE STRING "Build type" ) # By default set debug build
ENDIF( NOT DEFINED SCL_BUILD_TYPE )
IF(NOT SCL_IS_SUBBUILD)
SET(CMAKE_BUILD_TYPE ${SCL_BUILD_TYPE} CACHE INTERNAL "Build type, immutable" FORCE )
ELSE(NOT SCL_IS_SUBBUILD)
SET(CMAKE_BUILD_TYPE ${SCL_BUILD_TYPE} )
ENDIF(NOT SCL_IS_SUBBUILD)
if( CMAKE_BUILD_TYPE STREQUAL "" )
message( "-- Debug build - to override, rerun cmake with '-DCMAKE_BUILD_TYPE=Release'." )
set( CMAKE_BUILD_TYPE Debug )
endif()
# Define helper macro OPTION_WITH_DEFAULT
MACRO( OPTION_WITH_DEFAULT OPTION_NAME OPTION_STRING OPTION_DEFAULT )
IF( NOT DEFINED ${OPTION_NAME} )
SET( ${OPTION_NAME} ${OPTION_DEFAULT} )
ENDIF( NOT DEFINED ${OPTION_NAME} )
OPTION( ${OPTION_NAME} "${OPTION_STRING}" ${${OPTION_NAME}} )
ENDMACRO( OPTION_WITH_DEFAULT OPTION_NAME OPTION_STRING OPTION_DEFAULT )
# build shared libs by default
OPTION(BUILD_SHARED_LIBS "Build shared libraries" ON)
OPTION_WITH_DEFAULT(SCL_BUILD_SHARED_LIBS "Build shared libs" ON )
# build static libs by default
OPTION(BUILD_STATIC_LIBS "Build static libraries" OFF)
# don't build static libs by default
OPTION_WITH_DEFAULT(SCL_BUILD_STATIC_LIBS "Build static libs" OFF)
# Set version
SET(SCL_VERSION_MAJOR "3")
SET(SCL_VERSION_MINOR "2")
SET(SCL_VERSION_PATCH "0")
SET(SCL_VERSION "${SCL_VERSION_MAJOR}.${SCL_VERSION_MINOR}.${SCL_VERSION_PATCH}")
OPTION_WITH_DEFAULT(SCL_PYTHON_GENERATOR "Compile fedex_python" ON)
OPTION_WITH_DEFAULT(SCL_CPP_GENERATOR "Compile fedex_plus" ON)
OPTION_WITH_DEFAULT(SCL_MEMMGR_ENABLE_CHECKS "Enable scl_memmgr's memory leak detection" OFF)
OPTION_WITH_DEFAULT(SCL_TRACE_FPRINTF "Enable extra comments in generated code so the code's source in fedex_plus may be located" OFF)
# CMake derives much of its functionality from modules, typically
# stored in one directory - let CMake know where to find them.
SET(SCL_CMAKE_DIR "${SCL_SOURCE_DIR}/cmake")
SET(CMAKE_MODULE_PATH "${SCL_CMAKE_DIR};${CMAKE_MODULE_PATH}")
if(NOT IS_SUBBUILD)
SET(CMAKE_MODULE_PATH "${SCL_CMAKE_DIR};${CMAKE_MODULE_PATH}")
else(NOT IS_SUBBUILD)
SET(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH};${SCL_CMAKE_DIR}")
endif(NOT IS_SUBBUILD)
INCLUDE(${SCL_CMAKE_DIR}/SCL_Utils.cmake)
@@ -77,91 +102,89 @@ SET(_orig_lc_all $ENV{LC_ALL})
SET(_orig_lc_messages $ENV{LC_MESSAGES})
SET(_orig_lang $ENV{LANG})
IF(_orig_lc_all)
SET(ENV{LC_ALL} C)
SET(ENV{LC_ALL} C)
ENDIF(_orig_lc_all)
IF(_orig_lc_messages)
SET(ENV{LC_MESSAGES} C)
SET(ENV{LC_MESSAGES} C)
ENDIF(_orig_lc_messages)
IF(_orig_lang)
SET(ENV{LANG} C)
SET(ENV{LANG} C)
ENDIF(_orig_lang)
# For NFS volumes, to ensure proper file creation.
IF(NOT WIN32)
IF(NOT UMASK)
EXEC_PROGRAM(umask ARGS 022 OUTPUT_VARIABLE exec_out)
ELSE(NOT UMASK)
EXEC_PROGRAM(umask ARGS ${UMASK} OUTPUT_VARIABLE exec_out)
ENDIF(NOT UMASK)
ENDIF(NOT WIN32)
#---------------------------------------------------------------------
# Testing option
OPTION( ENABLE_TESTING "Enable unittesting framework" OFF )
IF(ENABLE_TESTING)
set( CMAKE_EXE_LINKER_FLAGS "-fprofile-arcs -ftest-coverage" ) #for code coverage
set( CMAKE_SHARED_LINKER_FLAGS "-fprofile-arcs -ftest-coverage" )
if( NOT DEFINED BUILD_SCHEMAS )
set( BUILD_SCHEMAS "ALL" ) #test all schemas, unless otherwise specified
endif()
INCLUDE(CTest)
ENABLE_TESTING()
ENDIF(ENABLE_TESTING)
OPTION_WITH_DEFAULT( SCL_ENABLE_TESTING "Enable unittesting framework" OFF )
IF(SCL_ENABLE_TESTING)
if( NOT DEFINED SCL_BUILD_SCHEMAS )
set( SCL_BUILD_SCHEMAS "ALL" ) #test all schemas, unless otherwise specified
endif()
INCLUDE(CTest)
ENABLE_TESTING()
ENDIF(SCL_ENABLE_TESTING)
#---------------------------------------------------------------------
# The following logic is what allows binaries to run successfully in
# the build directory AND install directory. Thanks to plplot for
# Coverage option
OPTION_WITH_DEFAULT( SCL_ENABLE_COVERAGE "Enable code coverage test" OFF )
IF(SCL_ENABLE_COVERAGE)
SET(SCL_ENABLE_TESTING ON CACHE BOOL "Testing enabled by coverage option" FORCE)
# build static libs, better coverage report
SET(SCL_BUILD_SHARED_LIBS OFF CACHE BOOL "Build shared libs" FORCE )
SET(SCL_BUILD_STATIC_LIBS ON CACHE BOOL "Build static libs" FORCE )
SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -g -fprofile-arcs -ftest-coverage" CACHE STRING "Extra compile flags required by code coverage" FORCE)
SET(CMAKE_C_FLAGS_DEBUG "-O0 -g -fprofile-arcs -ftest-coverage" CACHE STRING "Extra compile flags required by code coverage" FORCE)
SET(CMAKE_MODULE_LINKER_FLAGS_DEBUG "-fprofile-arcs -ftest-coverage" CACHE STRING "Extra linker flags required by code coverage" FORCE)
SET(SCL_BUILD_TYPE "Debug" CACHE STRING "Build type required by testing framework" FORCE)
ENDIF(SCL_ENABLE_COVERAGE)
#---------------------------------------------------------------------
# The following logic is what allows binaries to run successfully in
# the build directory AND install directory. Thanks to plplot for
# identifying the necessity of setting CMAKE_INSTALL_NAME_DIR on OSX.
# Documentation of these options is available at
# http://www.cmake.org/Wiki/CMake_RPATH_handling
# use, i.e. don't skip the full RPATH for the build tree
SET(CMAKE_SKIP_BUILD_RPATH FALSE)
set(CMAKE_SKIP_BUILD_RPATH FALSE)
# when building, don't use the install RPATH already
# (but later on when installing)
SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
# the RPATH/INSTALL_NAME_DIR to be used when installing
if (NOT APPLE)
SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib:\$ORIGIN/../lib")
endif(NOT APPLE)
SET(CMAKE_INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib")
# On OSX, we need to set INSTALL_NAME_DIR instead of RPATH
# http://www.cmake.org/cmake/help/cmake-2-8-docs.html#variable:CMAKE_INSTALL_NAME_DIR
set(CMAKE_INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib")
# add the automatically determined parts of the RPATH which point to
# add the automatically determined parts of the RPATH which point to
# directories outside the build tree to the install RPATH
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
#-----------------------------------------------------------------------------
# Output directories.
IF(NOT CMAKE_LIBRARY_OUTPUT_DIRECTORY)
IF(WIN32)
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${SCL_BINARY_DIR}/bin CACHE INTERNAL "Single output directory for building all libraries.")
ELSE(WIN32)
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${SCL_BINARY_DIR}/lib CACHE INTERNAL "Single output directory for building all libraries.")
ENDIF(WIN32)
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${SCL_BINARY_DIR}/lib CACHE INTERNAL "Single output directory for building all libraries.")
ENDIF(NOT CMAKE_LIBRARY_OUTPUT_DIRECTORY)
IF(NOT CMAKE_ARCHIVE_OUTPUT_DIRECTORY)
SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${SCL_BINARY_DIR}/lib CACHE INTERNAL "Single output directory for building all archives.")
SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${SCL_BINARY_DIR}/lib CACHE INTERNAL "Single output directory for building all archives.")
ENDIF(NOT CMAKE_ARCHIVE_OUTPUT_DIRECTORY)
IF(NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY)
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${SCL_BINARY_DIR}/bin CACHE INTERNAL "Single output directory for building all executables.")
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${SCL_BINARY_DIR}/bin CACHE INTERNAL "Single output directory for building all executables.")
ENDIF(NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY)
FOREACH(CFG_TYPE ${CMAKE_CONFIGURATION_TYPES})
STRING(TOUPPER "${CFG_TYPE}" CFG_TYPE)
IF(NOT "CMAKE_LIBRARY_OUTPUT_DIRECTORY_${CFG_TYPE}")
IF(WIN32)
SET("CMAKE_LIBRARY_OUTPUT_DIRECTORY_${CFG_TYPE}" ${SCL_BINARY_DIR}/bin CACHE INTERNAL "Single output directory for building all libraries.")
ELSE(WIN32)
SET("CMAKE_LIBRARY_OUTPUT_DIRECTORY_${CFG_TYPE}" ${SCL_BINARY_DIR}/lib CACHE INTERNAL "Single output directory for building all libraries.")
ENDIF(WIN32)
ENDIF(NOT "CMAKE_LIBRARY_OUTPUT_DIRECTORY_${CFG_TYPE}")
IF(NOT "CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${CFG_TYPE}")
SET("CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${CFG_TYPE}" ${SCL_BINARY_DIR}/lib CACHE INTERNAL "Single output directory for building all archives.")
ENDIF(NOT "CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${CFG_TYPE}")
IF(NOT "CMAKE_RUNTIME_OUTPUT_DIRECTORY_${CFG_TYPE}")
SET("CMAKE_RUNTIME_OUTPUT_DIRECTORY_${CFG_TYPE}" ${SCL_BINARY_DIR}/bin CACHE INTERNAL "Single output directory for building all executables.")
ENDIF(NOT "CMAKE_RUNTIME_OUTPUT_DIRECTORY_${CFG_TYPE}")
STRING(TOUPPER "${CFG_TYPE}" CFG_TYPE)
IF(NOT "CMAKE_LIBRARY_OUTPUT_DIRECTORY_${CFG_TYPE}")
SET("CMAKE_LIBRARY_OUTPUT_DIRECTORY_${CFG_TYPE}" ${SCL_BINARY_DIR}/lib CACHE INTERNAL "Single output directory for building all libraries.")
ENDIF(NOT "CMAKE_LIBRARY_OUTPUT_DIRECTORY_${CFG_TYPE}")
IF(NOT "CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${CFG_TYPE}")
SET("CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${CFG_TYPE}" ${SCL_BINARY_DIR}/lib CACHE INTERNAL "Single output directory for building all archives.")
ENDIF(NOT "CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${CFG_TYPE}")
IF(NOT "CMAKE_RUNTIME_OUTPUT_DIRECTORY_${CFG_TYPE}")
SET("CMAKE_RUNTIME_OUTPUT_DIRECTORY_${CFG_TYPE}" ${SCL_BINARY_DIR}/bin CACHE INTERNAL "Single output directory for building all executables.")
ENDIF(NOT "CMAKE_RUNTIME_OUTPUT_DIRECTORY_${CFG_TYPE}")
ENDFOREACH()
@@ -171,33 +194,46 @@ ENDFOREACH()
# The location in which to install SCL. Need a good Debug location
# for Windows. Only do this if CMAKE_INSTALL_PREFIX hasn't been set
# already, to try and allow parent builds (if any) some control.
IF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
IF(NOT WIN32)
IF ("${CMAKE_BUILD_TYPE}" MATCHES "Release")
SET(CMAKE_INSTALL_PREFIX "/usr")
ELSEIF ("${CMAKE_BUILD_TYPE}" MATCHES "Debug")
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")
ENDIF(NOT WIN32)
SET(CMAKE_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX} CACHE STRING "SCL install prefix" FORCE)
SET(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT 0)
ENDIF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
if(NOT SCL_IS_SUBBUILD)
IF(NOT WIN32)
IF (${CMAKE_BUILD_TYPE} MATCHES "Debug")
SET(SCL_INSTALL_PREFIX "${SCL_SOURCE_DIR}/../scl-install")
ELSE()
SET(SCL_INSTALL_PREFIX "/usr/local")
ENDIF()
ENDIF(NOT WIN32)
SET( SCL_INSTALL_PREFIX ${SCL_INSTALL_PREFIX} CACHE
PATH "Install prefix prepended to target to create install location" )
SET( CMAKE_INSTALL_PREFIX ${SCL_INSTALL_PREFIX} CACHE INTERNAL "Prefix prepended to install directories if target destination is not absolute, immutable" FORCE )
endif(NOT SCL_IS_SUBBUILD)
OPTION(SCL-BUILD_EXPRESS_ONLY "Only build express parser." OFF)
MARK_AS_ADVANCED(SCL-BUILD_EXPRESS_ONLY)
OPTION(SCL_BUILD_EXPRESS_ONLY "Only build express parser." OFF)
MARK_AS_ADVANCED(SCL_BUILD_EXPRESS_ONLY)
# Take the scl config file template and copy it to the build directory so CMake
# scripts can append to it if need be
configure_file(${SCL_SOURCE_DIR}/include/scl_cf_cmake.h.in ${SCL_BINARY_DIR}/include/scl_cf.h.in COPYONLY)
# Take the scl config file template as the starting point for
# scl_cf.h.in - scripts may need to append to the template, so
# it is read into memory initially.
SET(CONFIG_H_FILE ${SCL_BINARY_DIR}/include/scl_cf.h.in)
set(CMAKE_CURRENT_PROJECT SCL)
define_property(GLOBAL PROPERTY SCL_CONFIG_H_CONTENTS BRIEF_DOCS "config.h.in contents" FULL_DOCS "config.h.in contents for SCL project")
if(NOT COMMAND CONFIG_H_APPEND)
macro(CONFIG_H_APPEND PROJECT_NAME NEW_CONTENTS)
if(PROJECT_NAME)
get_property(${PROJECT_NAME}_CONFIG_H_CONTENTS GLOBAL PROPERTY ${PROJECT_NAME}_CONFIG_H_CONTENTS)
set(${PROJECT_NAME}_CONFIG_H_FILE_CONTENTS "${${PROJECT_NAME}_CONFIG_H_CONTENTS}${NEW_CONTENTS}")
set_property(GLOBAL PROPERTY ${PROJECT_NAME}_CONFIG_H_CONTENTS "${${PROJECT_NAME}_CONFIG_H_FILE_CONTENTS}")
endif(PROJECT_NAME)
endmacro(CONFIG_H_APPEND NEW_CONTENTS)
endif(NOT COMMAND CONFIG_H_APPEND)
file(READ ${SCL_SOURCE_DIR}/include/scl_cf_cmake.h.in CONFIG_H_FILE_CONTENTS)
CONFIG_H_APPEND(SCL "${CONFIG_H_FILE_CONTENTS}")
INCLUDE(CheckLibraryExists)
INCLUDE(CheckIncludeFile)
INCLUDE(CheckFunctionExists)
INCLUDE(CheckTypeSize)
INCLUDE(CMakePushCheckState)
INCLUDE(CheckCXXSourceRuns)
INCLUDE(${SCL_CMAKE_DIR}/FindLEX.cmake)
INCLUDE(${SCL_CMAKE_DIR}/FindYACC.cmake)
@@ -219,56 +255,110 @@ CHECK_FUNCTION_EXISTS(getopt HAVE_GETOPT)
CHECK_TYPE_SIZE("ssize_t" SSIZE_T)
set( TEST_STD_THREAD "
#include <iostream>
#include <thread>
void do_work() {
std::cout << \"thread\" << std::endl;
}
int main() {
std::thread t(do_work);
t.join();
}
" )
cmake_push_check_state()
if( UNIX )
set( CMAKE_REQUIRED_FLAGS "-pthread -std=c++0x" )
else( UNIX )
# vars probably need set for MSVC11, embarcadero, etc
endif( UNIX )
CHECK_CXX_SOURCE_RUNS( "${TEST_STD_THREAD}" HAVE_STD_THREAD ) #quotes are *required*!
cmake_pop_check_state()
# 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)
get_property(CONFIG_H_FILE_CONTENTS GLOBAL PROPERTY SCL_CONFIG_H_CONTENTS)
file(WRITE ${CONFIG_H_FILE} "${CONFIG_H_FILE_CONTENTS}")
configure_file(${CONFIG_H_FILE} ${SCL_BINARY_DIR}/include/scl_cf.h)
################ 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 )
configure_file(${SCL_CMAKE_DIR}/scl_version_string.cmake ${SCL_BINARY_DIR}/scl_version_string.cmake @ONLY)
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)
-P ${SCL_BINARY_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 )
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 )
# 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__ )
add_definitions( -D__BORLAND__ -D__WIN32__ )
else()
add_definitions( -pedantic -W -Wall -Wundef -Wfloat-equal -Wshadow -Winline -Wno-long-long )
add_definitions( -pedantic -W -Wall -Wundef -Wfloat-equal -Wshadow -Winline -Wno-long-long )
endif()
include_directories(
${SCL_SOURCE_DIR}/include
${SCL_BINARY_DIR}/include
)
${SCL_SOURCE_DIR}/include
${SCL_BINARY_DIR}/include
)
ADD_SUBDIRECTORY(src/base)
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)
ADD_SUBDIRECTORY(src/clutils)
ADD_SUBDIRECTORY(include)
ADD_SUBDIRECTORY(data)
IF(ENABLE_TESTING)
ADD_SUBDIRECTORY( test )
ENDIF(ENABLE_TESTING)
IF(SCL_ENABLE_TESTING)
ADD_SUBDIRECTORY( test )
ENDIF(SCL_ENABLE_TESTING)
ADD_SUBDIRECTORY(doc)
# this is for testing - 'make core' builds everything that isn't generated
add_custom_target( core )
add_dependencies( core stepdai check-express stepeditor fedex_plus )
if(NOT SCL_IS_SUBBUILD)
###############################################################################
# SCL Packaging #
# $make package #
###############################################################################
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "STEPcode")
SET(CPACK_SET_DESTDIR "ON")
SET(CPACK_PACKAGE_VERSION_MAJOR ${SCL_VERSION_MAJOR})
SET(CPACK_PACKAGE_VERSION_MINOR ${SCL_VERSION_MINOR})
SET(CPACK_PACKAGE_NAME SCL )
SET(CPACK_PACKAGE_CONTACT "SCL Developers <scl-dev@googlegroups.com>")
INCLUDE(CPack)
########################################################################################
# Uninstall code #
# From http://www.cmake.org/Wiki/CMake_FAQ#Can_I_do_.22make_uninstall.22_with_CMake.3F #
# ######################################################################################
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
IMMEDIATE @ONLY)
add_custom_target(uninstall
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
endif(NOT SCL_IS_SUBBUILD)
+1 -1
View File
@@ -2,7 +2,7 @@ Modifications to the original NIST code are (C)opyright by their
respective authors. Unless otherwise specified, they are copyright
on the date those changes were committed to whichever repository
they were committed to first (i.e. BRL-CAD on SourceForge.net,
mpictor/StepClassLibrary on github, etc).
mpictor/StepClassLibrary or stepcode/stepcode on github).
Modifications which were first commited to the repository on github
are licensed under the 3-clause BSD license below. Changes committed
+4 -1
View File
@@ -1,5 +1,8 @@
Recent changes are recorded in the publicly available repository:
https://github.com/mpictor/StepClassLibrary
http://github.com/stepcode/stepcode
This repo was moved and renamed in May 2012. Previously, it was at
http://github.com/mpictor/StepClassLibrary
Some are duplicates of changes recorded in the BRL-CAD repo:
http://brlcad.svn.sourceforge.net/viewvc/brlcad/brlcad/trunk/src/other/step/?view=log
+31 -9
View File
@@ -1,12 +1,11 @@
INSTALL
This file is contains installation instructions for the
STEP Class Library.
This file is contains installation instructions for STEPcode.
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 +20,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 +54,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`
+38 -6
View File
@@ -1,4 +1,36 @@
STEP Class Library ------ http://github.com/mpictor/StepClassLibrary
STEPcode ------ http://github.com/stepcode/stepcode
************************************************************************
Release 0.6 (May, 2012)
New since v0.5:
* Renamed from STEP Class Library to STEPcode, moved to github.com/stepcode/stepcode
* Advances in [Python](http://github.com/stepcode/stepcode/wiki/python-generator) support (#185)
* ABI versioning
* Implement memory manager with reporting of memory that isn't freed,
fix many memory leaks (#148, #160, #162, #168)
* MSVC fixes (> 128 nested if...else - #152), etc
* Add AP219, AP238, PDM schema, AP203a1, syntax highlighting files
* Improvements to CMake files, mostly from Cliff @ BRL-CAD (#143, #163, #181)
* Allow runtime bounds for aggregates (discovered with AP209e2) (#166)
* fedex_plus fprintf's can be traced with -DSCL_TRACE_FPRINTF=ON (#176)
************************************************************************
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)
@@ -10,7 +42,7 @@ New since v0.3:
* Enums and entities are allowed to have the same names
(affected ap242,210e3,209)
* Remove the SCLP23 macro
http://github.com/mpictor/StepClassLibrary/wiki/changelog-v0.4
http://github.com/stepcode/stepcode/wiki/changelog-v0.4
************************************************************************
Release 0.3 (Oct 29, 2011)
@@ -40,10 +72,10 @@ What's new since v0.1?
* Add BNF files, schemas, and CAX-IF Part 21 files
For a detailed list of changes, see
https://github.com/mpictor/StepClassLibrary/wiki/changelog-v0.2
https://github.com/stepcode/stepcode/wiki/changelog-v0.2
For a list of closed issues, see
https://github.com/mpictor/StepClassLibrary/issues?state=closed&milestone=2
https://github.com/stepcode/stepcode/issues?state=closed&milestone=2
************************************************************************
@@ -66,10 +98,10 @@ What's new since the SCL 3.2 release in 1998?
parser debug output to a specified range of lines in the schema.
For a detailed list of changes, see
https://github.com/mpictor/StepClassLibrary/wiki/changelog-v0.1
https://github.com/stepcode/stepcode/wiki/changelog-v0.1
For a list of closed issues, see
https://github.com/mpictor/StepClassLibrary/issues?state=closed&milestone=1
https://github.com/stepcode/stepcode/issues?state=closed&milestone=1
Pre-BRL-CAD changes:
* Patches from http://www.statik.tu-cottbus.de/fileadmin/project_dth/scl/
+21 -588
View File
@@ -1,63 +1,34 @@
***********************************************************************
Step Class Library v0.4 -- http://github.com/mpictor/StepClassLibrary
STEPcode v0.6 -- http://github.com/stepcode/stepcode
* 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.
* SCL is packaged along with some other tools. See
"THE NIST STEP TOOLSET", below. In particular, Data Probe
requires InterViews, an obsolete UI toolkit. I (mpictor) have not
had luck building the data probe with it. It may be more productive
to replace InterViews with a modern toolkit such as Qt. I
expect that this would be non-trivial.
* What is STEPcode? SC reads ISO10303-11 EXPRESS schemas and generates
C++ source code that can read and write Part 21 files conforming
to that schema. In addition to C++, SC includes experimental
support for Python.
* Much of the work to update SCL has been done by the developers of
BRL-CAD, and SCL was originally created at NIST in the 90's.
* Renamed in April/May 2012: SC was formerly known as STEP Class
Libraries, SCL for short. It was renamed because the name wasn't
accurate: the class libraries make up only a part of the code.
* 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
* Much of the work to update SC has been done by the developers of
BRL-CAD, and SC (then STEP Class Library) was originally created at
NIST in the 90's.
* 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`
* For information on changes version-by-version, see the NEWS file
* Building and testing SCL - see the INSTALL file
* For more details on the libraries and executables, see the wiki:
http://github.com/stepcode/stepcode/wiki/About-STEPcode
* For license details, see the COPYING file. Summary: 3-clause BSD.
***********************************************************************
***********************************************************************
CODING STANDARDS
SCL's source has been reformatted with astyle. When making changes, try
SC's source has been reformatted with astyle. When making changes, try
to match the current formatting. The main points are:
- compact (java-style) brackets:
@@ -83,542 +54,4 @@ Download astyle from http://sourceforge.net/projects/astyle/files/astyle/
***********************************************************************
***********************************************************************
Notes/TODO items specific to the STEP libraries as included in BRL-CAD:
* Original build system has been replaced with Makefile.am and
configure.ac files in the style of BRL-CAD's autotools build
system.
* Changes have been made to src/express to get it compiling with
the output of different versions of lex/flex/bison. These
changes are not yet tested in terms of impact on functionality
and should be a starting point for any debugging of EXPRESS
parsing issues.
* Of the original test code, only p21read has been incorporated into
the new build system, but they are still present in src/test
* Express and exppp header files have been relocated to subdirectories
in include. The names of the library files being built have been
altered, and clstepcore and cleditor now build as separate libraries.
* Numerous minor changes have been made, mostly including stdlib
and other required files.
***********************************************************************
=====================================================
Much has changed since README.scl was written.
However, it is reproduced in its entirety below.
=====================================================
README.scl (top level README) February 1998
THE NIST STEP TOOLSET
=====================
Included in this release of the NIST STEP Toolset are
STEP Class Library (SCL)
fedex_plus
fedex_idl
fedex_os
Data Probe application
Part 21 Reader application
mkProbe script
NIST EXPRESS Toolkit
NIST EXPRESS Pretty Printing Toolkit
The focus of our work since our last release has been on developing a
reference implementation of the binding of EXPRESS to C++ and IDL as
specified by STEP's Parts 23 and 26 respectively. To this we have
added a persistence capability (based on the ObjectStore OODB from
Object Design, Inc) and a distribution capability (based on Orbix by
Iona Technologies, Ltd). We also experimented with the Open OODB from
Texas Instruments and with DSOM from IBM.
The STEP Class Library (SCL) and fedex_plus are used to build
STEP-related applications in C++. They support STEP Parts 21 (the
exchange file format), 22 (the functional specification of STEP's
Standard Data Access Interface, SDAI), 23 (the C++ binding to SDAI),
and 26 (the IDL interface to SDAI). fedex_plus is an application of
the NIST EXPRESS Toolkit (based on STEP Part 11) which generates a C++
class library representation of an EXPRESS schema based on STEP's Part
23. The generated classes work with the STEP Class Library. The NIST
EXPRESS Pretty Printing Toolkit is used to format and output EXPRESS.
fedex_os is used to generate software (in addition to fedex_plus)
needed to use SCL with the ObjectStore OODB. fedex_idl translates
EXPRESS to the Interface Definition Language (according to Part 26)
for use with Orbix.
The Data Probe software and mkProbe script are used to generate
schema-specific class libraries (a.k.a. "Schema Class Library"), Data
Probe editors, and Part 21 file readers. mkProbe generates a C++
library representing a schema (using fedex_plus) and links the schema
library with other libraries of the SCL and Data Probe to create a
schema specific editor, known as a Data Probe. The Data Probe is a
graphical editor for STEP data; it is used to browse and edit data
instances of the objects in an EXPRESS model. It may also be used to
visually browse the objects contained in the EXPRESS schema itself.
Data Probes are X Windows-based and use the InterViews Toolkit from
Stanford University.
The Data Probe source code was designed with reusability in mind. The
runtime-code uses three class libraries: the STEP Class Library
(developed at NIST), the InterViews Toolkit (user interface
developer's toolkit from Stanford), and a standard C++ Class Library.
The NIST STEP Class Library is divided into component libraries
including STEP Core, Editor, Utilities, Data Access Interface,
Interviews extensions, and Probe. The STEP Core, Editor, and Utils
libraries can be used without the user interface libraries (Interviews
extensions and Probe) for applications needing to represent the
EXPRESS data structures. At this point the Data Access Interface is a
partial implementation of SDAI's Session schema.
Dependencies between these modules have been minimized so that an
executable program, the Data Probe, can be easily reconfigured to
support different conceptual schemas.
We have experimented with replacing the Interviews-based interface
with a tcl interface with good success; however, it is not in our work
plan to complete. If anyone is interested in extending the toolkit
with a more modern interface, we would be glad to discuss it with you.
The Part 21 Reader was originally developed to test whether a Schema
Class built and linked without problems. It is also useful for
checking Part 21 files. It displays the error messages from the STEP
Class Library as a file is read.
SYSTEM REQUIREMENTS
===================
Depending on how you want to use the toolkit, additional pieces of
software will need to be available on your local system:
- UNIX SunOS 4.1.x or Solaris 5.x operating system.
At NIST, the SCL including the Data Probe has been built on
SunOS workstations. The SCL without the Data Probe has been
built on Solaris. (We did not build the InterViews Library
on Solaris.) NOTE: earlier versions of the SCL 2.1 without
the Data Probe had been ported to AIX, HP, linux, and Windows NT.
- a C++ compiler -- cfront version 2.1 or higher
NOTE: The current SCL release has been built with SUN C/C++,
and GNU's gcc/g++ compilers. Earlier versions of the SCL were
built using CenterLine on SunOS and CSet++ on AIX.
If you successfully port the current version to other
compilers and/or operating systems (and are willing to share)
please contact us (stepcl@cme.nist.gov) so that we can point
others to it.
- The NIST EXPRESS Toolkit -- available from NIST
Included in this release; also available as:
ftp.cme.nist.gov:pub/step/npttools/exptk.tar.Z
- The NIST EXPRESS Pretty Printer -- available from NIST
Included in this release; also available as:
ftp.cme.nist.gov:pub/step/npttools/exppp.tar.Z
The following components are optional:
- Version 3.1 of the InterViews Toolkit from Stanford.
ftp://interviews.stanford.edu:pub/3.1.tar.Z
NOTE: InterViews is only needed for the Data Probe portion of
the toolkit. The STEP Class Library without the Data Probe
and InterViews has been built on more platforms than with these
components.
- Orbix version 2.0. Available from Iona Technologies:
http://www.iona.com
- Object Store version 4. Available from Object Design Inc.:
http://www.odi.com.
INSTALLATION INSTRUCTIONS
=========================
Refer to the file INSTALL.
In the instructions below, you will see references to the directory
<ARCH_DIR>. This directory name should be interpreted as the directory
which is named to reflect your compiler and/or system architecture
when installing the SCL using configure: i.e. "arch.centerline" or
"arch-gnu.solaris"
CREATING A NEW SCHEMA CLASS LIBRARY AND/OR DATA PROBE
=====================================================
The <ARCH_DIR>/bin/mkProbe script automates the process of building
new Schema Class Libraries and Data Probe executables. When run with
the -l option only the Schema Class Library will be created. See man
page in ~scl/man.
Examples
Input command line output (name and location)
----------------------------------------------------
mkProbe part41.exp pt41 ./pt41/dp_pt41
mkProbe -i part101.exp dp ~scl/<ARCH_DIR>/Probes/dp/dp_dp
mkProbe -l example.exp example ./example/libCexample.a
mkProbe -p example.exp example ./example/p21read_example
CONTENTS
========
This directory contains the following files and subdirectories.
This software release includes all the NIST software needed for
creating new versions of the Data Probe program. Two example schemas
are included in the data directory.
INSTALL - File discussing installation of SCL.
README.scl - This file.
src/test/README - README discussing SCL coding examples under src/test/
disclaim.txt - NIST disclaimer for this distribution.
build-apps.txt - Discusses how to build applications using the STEP
Class Library.
whatsnew.3-1.txt- Discusses new features in the STEP Class Library and
Data Probe 3.1 release.
whatsnew.2-1.txt- This was the `whatsnew' file released with SCL 2.1.
Most of the information is still relevant.
configure - Script used to install the SCL.
configure.in - File used to create the configure script using gnu's
autoconf software.
configure.files_notes.txt - Discusses various files used by the
configure script.
Makefile - Contains a default rule to build SCL using the
configure installation script.
<ARCH_DIR>/bin/mkProbe - Script used to generate a new Schema Class Library
and/or Data Probe executable.
(see CREATING A NEW SCHEMA CLASS LIBRARY AND/OR DATA PROBE)
config/ - Directory containing various templates needed by the
configure installation script.
config/examples/ - Directory containing examples of using configure to
install SCL.
arch_template/ - Directory containing templates used by configure to
create an architecture specific SCL installation.
src/ - Source code files for the C++ libraries included in this
release.
src/cl* - Directories containing the source code for the C++
libraries in the STEP Class Library. These
libraries are documented in the VTS Design document
(see DOCUMENTATION below). They are as follows:
src/clutils - utilities needed by the other libraries.
src/clstepcore - "core" classes representing EXPRESS types
and dictionary info.
src/cldai - classes for a partial implementation of the
Session schema of STEP's Standard Data
Access Interface (STEP Part 23).
src/cleditor - classes for managing data instances and
exchange files.
src/clivfasd - customizations to the Interviews class
library.
src/clprobe-ui - user interface classes for the Data Probe.
src/clSchemas - Contain subdirectories with schema specific source
code generated by the mkProbe script.
src/express - Directory containing the EXPRESS Toolkit.
src/exppp - Directory containing EXPRESS Pretty Printer Toolkit.
src/test - Directory containing example STEP Class Library
applications.
src/fedex_plus - Directory containing source code and makefile for
fedex_plus, fedex_idl, fedex_os
<ARCH_DIR>
- <ARCH_DIR> is the installer-supplied name of the
directory which is created when you run configure to
install SCL. (See the file INSTALL for more
information.) This directory contains computer
architecture-specific files. Additional arch dirs
may be created to support multiple platforms or C++
compilers which all refer to the same source
code under src/. The arch dir contains the subdirectories
ofiles, bin, lib, and Probes.
<ARCH_DIR>/ofiles/ - Directory containing object (.o) files for SCL.
<ARCH_DIR>/ofiles/sdaiOrbix - Directory containing IDL files and
Makefile needed to build and use SCL with Orbix.
<ARCH_DIR>/lib/ - Directory containing library (.a) files for SCL.
<ARCH_DIR>/Probes/ - The <ARCH_DIR>/Probes directory will contain
directories for versions of the Schema Class Library
and Data Probe generated using the mkProbe script
with the -i option.
<ARCH_DIR>/bin/ - The fedex, fedex_plus, fedex_idl, and fedex_os,
exppp, and symlink executables and mkProbe,
sclbuild, and setup-arch scripts are placed in this
directory during installation.
data/ - Directory containing sample EXPRESS files to use to
create SCL applications such as the Data Probe or
Part 21 Reader. Also contains data for some of the
examples.
bin/ - Directory containing various scripts.
man/ - Directory containing man pages for the software in
the release. You may look at the man page by
issuing the command: nroff -man <manpagefile> or by
adding this directory to your MANPATH.
EXAMPLES
========
Example of creating a Data Probe
--------------------------------
To create a new version of the Data Probe run the script mkProbe. For
example, to create a Data Probe based on the "example_schema" EXPRESS
schema included in this release, issue the following command in a
directory from which you would like a subdirectory containing the new
Data Probe to be created:
% mkProbe ~scl/data/example/example.exp example
This command creates a new version of the Data Probe in the file:
% ./example/dp_example
(It also creates subdirectory example/ if it does not exist already.)
Examples of using the STEP Class Library
----------------------------------------
To use the Schema Class Library source code (without the Data Probe
software) refer to the examples in the directory src/test.
Example of a Part 21 file reader
--------------------------------
To create a file reader based on STEP's Part 21 format use the mkProbe
script with the -p option.
% mkProbe -p ~scl/data/example/example.exp example
The executable p21read_example is created. Run it as follows:
% p21read_example your_part_21_file
This program reads a file the name of which is supplied as an
argument to the program. Any errors encountered when reading the file
are reported to standard output. A summary of the file is also
reported. The file is then written back out to a file the name of
which may be supplied as the second argument to the program. If no
name is given, "file.out" is used.
FOR MORE INFORMATION
====================
SCL HOME PAGE
-------------
The SCL home page is located on the world wide web at,
http://www.nist.gov/scl
The SCL home page will provide important, up-to-date information on
the status of the SCL, new developments and fixes, links to related
software and projects, and may eventually contain an FAQ sheet.
SCL DOCUMENTATION
-----------------
Documentation can be accessed from the SCL world wide web home page
located at http://www.nist.gov/scl
The following files (in postscript format) are particularly relevant:
Design of a C++ Software Library for Implementing EXPRESS: The NIST
STEP Class Library
Data Probe User's Guide
Data Probe: A Tool for EXPRESS-based Data
Architecture for the Validation Testing System Software
Validation Testing System Software Reusable Software Component Design
Diagrams of basic SCL data structures
ISO DOCUMENTATION
-----------------
Copies of the International Standard documents (including STEP Part 11
the EXPRESS Language Reference Manual, Part 21 the STEP Exchange File
Format, Part 22 STEP's Standard Data Access Interface, and Part 23 the
C++ language binding to SDAI) can be ordered from the ISO
International Organization of Standardization or your national
body. The United States distribution is managed by the US Product Data
Exchange Association at:
U.S. Product Data Association (USPro)
Trident Research Center, Suite 204
5300 International Blvd.
N. Charleston, SC 29418
http://www.uspro.scra.org
uspro@scra.org
Ph: 803-760-3327
FAX: 803-760-3349
MAILING LIST
------------
Announcements of new releases or bug fixes will also be sent to the
mailing list scl@cme.nist.gov. To be added to the scl mailing list
send a request to majordomo@cme.nist.gov. Include in the body of the
message:
subscribe scl
For additional help, include in the body of the message:
help
If you use a signature within your email, end your majordomo
command sequence with the word "end". For example,
subscribe scl
end
REPORTING PROBLEMS AND SUGGESTIONS
==================================
We would like feedback on all parts of the software. Please let us
know if you
- have problems following the instructions in the README file,
- have problems installing the software,
- have problems compiling your own valid EXPRESS schema, or
- have suggestions for improvements to the software.
- really like the software :)
Send your comments to
stepcl@cme.nist.gov
(For users of version 2, note the new mailing address of "stepcl...".)
Questions about availability or accessing the software should be
directed to the SOLIS administrator
Gaylen Rinaudot
npt-info@cme.nist.gov
301-975-3386
ACKNOWLEDGMENTS
===============
The STEP Class Library (SCL) was developed by the Manufacturing
Systems Integration Division at the National Institute of Standards
and Technology (http://www.mel/nist.gov/msid) to support testing of
the Standard for the Exchange of Product Model Data (a.k.a STEP) and
validation of STEP's emerging implementation specifications. Funding
for the project has come from the U.S. Department of Commerce, and the
Department of Defense agencies including the Office of the Defense
CALS (Continuous Acquisition and Life-Cycle Support) Executive and the
Defense Advanced Research Projects Agency (DARPA). Recent
enhancements were sponsored by the National Industrial Information
Infrastructure Consortium (NIIIP) (http://www.niiip.org) and the NAMT
Framework project
(http://www.mel.nist.gov/msid/projs/97projs/framewrk.htm) of NIST's
Systems Integration for Manufacturing Applications (SIMA) program
(http://www.mel.nist.gov/msid/sima/sima.htm).
LICENSING RESTRICTIONS and DISCLAIMERS
======================================
This software was produced by the National Institute of Standards and
Technology (NIST), an agency of the U.S. government, and by statute
is not subject to copyright in the United States. Recipients of this
software assume all responsibility associated with its operation,
modification, maintenance, and subsequent re-distribution.
There is no warranty for the NIST STEP Toolkit.
If the NIST STEP Toolkit is modified by someone else and passed on,
NIST wants the Toolkit's recipients to know that what they have is not
what NIST originally distributed.
Distribution Rights
1. Anyone may copy and distribute verbatim copies of the NIST STEP Toolkit
source code as received in any medium.
2. Anyone may modify their copy or copies of the NIST STEP Toolkit source
code or any portion of it, and copy and distribute such modifications
provided that all modifications are clearly associated with the entity
that performs the modifications.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!DISCLAIMERS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Names of companies and products are provided in order to adequately
specify procedures and equipment used. In no case does such
identification imply recommendation or endorsement by the National
Institute of Standards and Technology, nor does it imply that the
products are necessarily the best available for the purpose.
NO WARRANTY
===========
NIST PROVIDES ABSOLUTELY NO WARRANTY. THE NIST STEP TOOLKIT
IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS
WITH YOU. SHOULD ANY PORTION OF THE NIST STEP TOOLKIT PROVE DEFECTIVE,
YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.
IN NO EVENT WILL NIST BE LIABLE FOR DAMAGES, INCLUDING ANY LOST
PROFITS, LOST MONIES, OR OTHER SPECIAL, INCIDENTAL OR CONSEQUENTIAL
DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE (INCLUDING BUT NOT
LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE, OR LOSSES
SUSTAINED BY THIRD PARTIES, OR A FAILURE OF THE PROGRAM TO OPERATE
WITH PROGRAMS NOT DISTRIBUTED BY NIST) THE PROGRAMS, EVEN IF YOU HAVE
BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES, OR FOR ANY CLAIM BY
ANY OTHER PARTY.
For more info, see the wiki.
+1 -1
View File
@@ -1 +1 @@
0.4
0.6
-3
View File
@@ -151,9 +151,6 @@ IF(LEX_EXECUTABLE)
SET(FILE_RUN_DEFINITIONS "-DYYTEXT_POINTER=1")
CHECK_C_FILE_RUNS(${CMAKE_CURRENT_SOURCE_DIR}/cmake/test_srcs/sys_wait_test.c YYTEXT_POINTER)
SET(FILE_RUN_DEFINITIONS)
IF(CONFIG_H_FILE)
FILE(APPEND ${CONFIG_H_FILE} "#cmakedefine YYTEXT_POINTER 1\n")
ENDIF(CONFIG_H_FILE)
ENDIF(LEX_EXECUTABLE)
+120 -58
View File
@@ -1,75 +1,137 @@
# Will need windows logic someday, even though it doesn't work yet, so go ahead
# and add the DLL_DEFINE macro
MACRO(DLL_DEFINE libname)
IF(MSVC)
STRING(REGEX REPLACE "lib" "" LOWERCORE "${libname}")
STRING(TOUPPER ${LOWERCORE} UPPER_CORE)
add_definitions("-D${UPPER_CORE}_EXPORT_DLL")
ENDIF(MSVC)
ENDMACRO()
# set compile definitions for dll exports on windows
MACRO(DEFINE_DLL_EXPORTS libname)
IF( MSVC OR BORLAND )
if( ${libname} MATCHES "sdai_.*" )
set( export "SCL_SCHEMA_DLL_EXPORTS" )
else()
STRING(REGEX REPLACE "lib" "" shortname "${libname}")
STRING(REGEX REPLACE "step" "" LOWERCORE "${shortname}")
STRING(TOUPPER ${LOWERCORE} UPPER_CORE)
set( export "SCL_${UPPER_CORE}_DLL_EXPORTS" )
endif()
get_target_property(defs ${libname} COMPILE_DEFINITIONS )
if( defs ) #if no properties, ${defs} will be defs-NOTFOUND which CMake interprets as false
set( defs "${defs};${export}")
else( defs )
set( defs "${export}")
endif( defs )
set_target_properties(${libname} PROPERTIES COMPILE_DEFINITIONS "${defs}" )
ENDIF( MSVC OR BORLAND )
ENDMACRO(DEFINE_DLL_EXPORTS libname)
# set compile definitions for dll imports on windows
MACRO( DEFINE_DLL_IMPORTS tgt libs )
IF( MSVC OR BORLAND )
get_target_property(defs ${tgt} COMPILE_DEFINITIONS )
if( NOT defs ) #if no properties, ${defs} will be defs-NOTFOUND which CMake interprets as false
set( defs "")
endif( NOT defs )
foreach( lib ${libs} )
STRING(REGEX REPLACE "lib" "" shortname "${lib}")
STRING(REGEX REPLACE "step" "" LOWERCORE "${shortname}")
STRING(TOUPPER ${LOWERCORE} UPPER_CORE)
list( APPEND defs "SCL_${UPPER_CORE}_DLL_IMPORTS" )
endforeach( lib ${libs} )
if( DEFINED defs )
if( defs )
set_target_properties( ${tgt} PROPERTIES COMPILE_DEFINITIONS "${defs}" )
endif( defs )
endif( DEFINED defs )
ENDIF( MSVC OR BORLAND )
ENDMACRO( DEFINE_DLL_IMPORTS tgt libs )
#EXCLUDE_OR_INSTALL(target destination ARGV3)
# installs ${target} in ${destination} unless testing is enabled AND ${arg_3} == "TESTABLE",
# in which case the EXCLUDE_FROM_ALL property is set for testing.
# EXCLUDE_FROM_ALL cannot be set on targets that are to be installed,
# so either test the target or install it - but not both
MACRO(EXCLUDE_OR_INSTALL target dest arg_3 )
if( NOT ( ( SCL_ENABLE_TESTING ) AND ( "${arg_3}" STREQUAL "TESTABLE" ) ) )
INSTALL(TARGETS ${target} DESTINATION ${dest})
else( NOT ( ( SCL_ENABLE_TESTING ) AND ( "${arg_3}" STREQUAL "TESTABLE" ) ) )
set_target_properties( ${target} PROPERTIES EXCLUDE_FROM_ALL ON )
endif( NOT ( ( SCL_ENABLE_TESTING ) AND ( "${arg_3}" STREQUAL "TESTABLE" ) ) )
ENDMACRO(EXCLUDE_OR_INSTALL target dest arg_3 )
#SCL_ADDEXEC( execname "source files" "linked libs" ["TESTABLE"] ["MSVC flag" ...])
# optional 4th argument of "TESTABLE", passed to EXCLUDE_OR_INSTALL macro
# optional args can also be used by MSVC-specific code, but it looks like these two uses
# will not conflict because the MSVC args must contain "STRICT"
MACRO(SCL_ADDEXEC execname srcs libs)
STRING(REGEX REPLACE " " ";" srcslist "${srcs}")
STRING(REGEX REPLACE " " ";" libslist "${libs}")
add_executable(${execname} ${srcslist})
target_link_libraries(${execname} ${libslist})
INSTALL(TARGETS ${execname} DESTINATION bin)
# Enable extra compiler flags if local executables and/or global options dictate
SET(LOCAL_COMPILE_FLAGS "")
FOREACH(extraarg ${ARGN})
IF(${extraarg} MATCHES "STRICT" AND SCL-ENABLE_STRICT)
SET(LOCAL_COMPILE_FLAGS "${LOCAL_COMPILE_FLAGS} ${STRICT_FLAGS}")
ENDIF(${extraarg} MATCHES "STRICT" AND SCL-ENABLE_STRICT)
ENDFOREACH(extraarg ${ARGN})
IF(LOCAL_COMPILE_FLAGS)
SET_TARGET_PROPERTIES(${execname} PROPERTIES COMPILE_FLAGS ${LOCAL_COMPILE_FLAGS})
ENDIF(LOCAL_COMPILE_FLAGS)
STRING(REGEX REPLACE " " ";" srcslist "${srcs}")
STRING(REGEX REPLACE " " ";" libslist "${libs}")
add_executable(${execname} ${srcslist})
target_link_libraries(${execname} ${libslist})
DEFINE_DLL_IMPORTS(${execname} "${libslist}") #add import definitions for all libs that the executable is linked to
EXCLUDE_OR_INSTALL( ${execname} "bin" "${ARGV3}" )
# Enable extra compiler flags if local executables and/or global options dictate
SET(LOCAL_COMPILE_FLAGS "")
FOREACH(extraarg ${ARGN})
IF(${extraarg} MATCHES "STRICT" AND SCL-ENABLE_STRICT)
SET(LOCAL_COMPILE_FLAGS "${LOCAL_COMPILE_FLAGS} ${STRICT_FLAGS}")
ENDIF(${extraarg} MATCHES "STRICT" AND SCL-ENABLE_STRICT)
ENDFOREACH(extraarg ${ARGN})
IF(LOCAL_COMPILE_FLAGS)
SET_TARGET_PROPERTIES(${execname} PROPERTIES COMPILE_FLAGS ${LOCAL_COMPILE_FLAGS})
ENDIF(LOCAL_COMPILE_FLAGS)
ENDMACRO(SCL_ADDEXEC execname srcs libs)
#SCL_ADDLIB( libname "source files" "linked libs" ["TESTABLE"] ["MSVC flag" ...])
# optional 4th argument of "TESTABLE", passed to EXCLUDE_OR_INSTALL macro
# optional args can also be used by MSVC-specific code, but it looks like these two uses
# will not conflict because the MSVC args must contain "STRICT"
MACRO(SCL_ADDLIB libname srcs libs)
STRING(REGEX REPLACE " " ";" srcslist "${srcs}")
STRING(REGEX REPLACE " " ";" libslist1 "${libs}")
STRING(REGEX REPLACE "-framework;" "-framework " libslist "${libslist1}")
DLL_DEFINE(${libname})
IF(BUILD_SHARED_LIBS)
add_library(${libname} SHARED ${srcslist})
if(NOT ${libs} MATCHES "NONE")
target_link_libraries(${libname} ${libslist})
endif(NOT ${libs} MATCHES "NONE")
SET_TARGET_PROPERTIES(${libname} PROPERTIES VERSION ${SCL_VERSION_MAJOR}.${SCL_VERSION_MINOR} SOVERSION ${SCL_VERSION_MAJOR} )
INSTALL(TARGETS ${libname} DESTINATION lib)
ENDIF(BUILD_SHARED_LIBS)
IF(BUILD_STATIC_LIBS AND NOT MSVC)
add_library(${libname}-static STATIC ${srcslist})
if(NOT ${libs} MATCHES "NONE")
target_link_libraries(${libname}-static ${libslist})
endif(NOT ${libs} MATCHES "NONE")
IF(NOT WIN32)
SET_TARGET_PROPERTIES(${libname}-static PROPERTIES OUTPUT_NAME "${libname}")
ENDIF(NOT WIN32)
IF(WIN32)
# We need the lib prefix on win32, so add it even if our add_library
# wrapper function has removed it due to the target name - see
# http://www.cmake.org/Wiki/CMake_FAQ#How_do_I_make_my_shared_and_static_libraries_have_the_same_root_name.2C_but_different_suffixes.3F
SET_TARGET_PROPERTIES(${libname}-static PROPERTIES PREFIX "lib")
ENDIF(WIN32)
INSTALL(TARGETS ${libname}-static DESTINATION lib)
ENDIF(BUILD_STATIC_LIBS AND NOT MSVC)
IF(SCL_BUILD_SHARED_LIBS)
add_library(${libname} SHARED ${srcslist})
DEFINE_DLL_EXPORTS(${libname})
if(NOT ${libs} MATCHES "NONE")
target_link_libraries(${libname} ${libslist})
DEFINE_DLL_IMPORTS(${libname} "${libslist}" )
endif(NOT ${libs} MATCHES "NONE")
SET_TARGET_PROPERTIES(${libname} PROPERTIES VERSION ${SCL_ABI_VERSION} SOVERSION ${SCL_ABI_SOVERSION} )
EXCLUDE_OR_INSTALL( ${libname} "lib" "${ARGV3}" )
if(APPLE)
set_target_properties(${libname} PROPERTIES LINK_FLAGS "-flat_namespace -undefined suppress")
endif(APPLE)
ENDIF(SCL_BUILD_SHARED_LIBS)
IF(SCL_BUILD_STATIC_LIBS AND NOT MSVC)
add_library(${libname}-static STATIC ${srcslist})
DEFINE_DLL_EXPORTS(${libname}-static)
if(NOT ${libs} MATCHES "NONE")
target_link_libraries(${libname}-static "${libslist}")
DEFINE_DLL_IMPORTS(${libname}-static ${libslist} )
endif(NOT ${libs} MATCHES "NONE")
IF(NOT WIN32)
SET_TARGET_PROPERTIES(${libname}-static PROPERTIES OUTPUT_NAME "${libname}")
ENDIF(NOT WIN32)
IF(WIN32)
# We need the lib prefix on win32, so add it even if our add_library
# wrapper function has removed it due to the target name - see
# http://www.cmake.org/Wiki/CMake_FAQ#How_do_I_make_my_shared_and_static_libraries_have_the_same_root_name.2C_but_different_suffixes.3F
SET_TARGET_PROPERTIES(${libname}-static PROPERTIES PREFIX "lib")
ENDIF(WIN32)
EXCLUDE_OR_INSTALL( ${libname}-static "lib" "${ARGV3}" )
if(APPLE)
set_target_properties(${libname}-static PROPERTIES LINK_FLAGS "-flat_namespace -undefined suppress")
endif(APPLE)
ENDIF(SCL_BUILD_STATIC_LIBS AND NOT MSVC)
# Enable extra compiler flags if local libraries and/or global options dictate
SET(LOCAL_COMPILE_FLAGS "")
FOREACH(extraarg ${ARGN})
IF(${extraarg} MATCHES "STRICT" AND SCL-ENABLE_STRICT)
SET(LOCAL_COMPILE_FLAGS "${LOCAL_COMPILE_FLAGS} ${STRICT_FLAGS}")
ENDIF(${extraarg} MATCHES "STRICT" AND SCL-ENABLE_STRICT)
IF(${extraarg} MATCHES "STRICT" AND SCL-ENABLE_STRICT)
SET(LOCAL_COMPILE_FLAGS "${LOCAL_COMPILE_FLAGS} ${STRICT_FLAGS}")
ENDIF(${extraarg} MATCHES "STRICT" AND SCL-ENABLE_STRICT)
ENDFOREACH(extraarg ${ARGN})
IF(LOCAL_COMPILE_FLAGS)
IF(BUILD_SHARED_LIBS)
SET_TARGET_PROPERTIES(${libname} PROPERTIES COMPILE_FLAGS ${LOCAL_COMPILE_FLAGS})
ENDIF(BUILD_SHARED_LIBS)
IF(BUILD_STATIC_LIBS AND NOT MSVC)
SET_TARGET_PROPERTIES(${libname}-static PROPERTIES COMPILE_FLAGS ${LOCAL_COMPILE_FLAGS})
ENDIF(BUILD_STATIC_LIBS AND NOT MSVC)
IF(BUILD_SHARED_LIBS)
SET_TARGET_PROPERTIES(${libname} PROPERTIES COMPILE_FLAGS ${LOCAL_COMPILE_FLAGS})
ENDIF(BUILD_SHARED_LIBS)
IF(BUILD_STATIC_LIBS AND NOT MSVC)
SET_TARGET_PROPERTIES(${libname}-static PROPERTIES COMPILE_FLAGS ${LOCAL_COMPILE_FLAGS})
ENDIF(BUILD_STATIC_LIBS AND NOT MSVC)
ENDIF(LOCAL_COMPILE_FLAGS)
ENDMACRO(SCL_ADDLIB libname srcs libs)
+22
View File
@@ -0,0 +1,22 @@
if (NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
message(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"")
endif(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files)
string(REGEX REPLACE "\n" ";" files "${files}")
list(REVERSE files)
foreach (file ${files})
message(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"")
if (EXISTS "$ENV{DESTDIR}${file}")
execute_process(
COMMAND ${CMAKE_COMMAND} -E remove "$ENV{DESTDIR}${file}"
OUTPUT_VARIABLE rm_out
RESULT_VARIABLE rm_retval
)
if(NOT ${rm_retval} EQUAL 0)
message(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"")
endif (NOT ${rm_retval} EQUAL 0)
else (EXISTS "$ENV{DESTDIR}${file}")
message(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.")
endif (EXISTS "$ENV{DESTDIR}${file}")
endforeach(file)
+17 -7
View File
@@ -7,6 +7,8 @@
#scl_version_string.h defines scl_version() which returns a pretty commit description and a build timestamp.
set(SCL_IS_SUBBUILD "@SCL_IS_SUBBUILD@")
set(VERS_FILE ${SOURCE_DIR}/SCL_VERSION.txt )
if( EXISTS ${SOURCE_DIR}/.git )
find_package(Git QUIET)
@@ -14,15 +16,21 @@ if( EXISTS ${SOURCE_DIR}/.git )
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}." )
if(NOT SCL_IS_SUBBUILD)
message( WARNING "Git failed (probably no tags in repo). Build will contain revision info from ${VERS_FILE}." )
endif(NOT SCL_IS_SUBBUILD)
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}." )
if(NOT SCL_IS_SUBBUILD)
message( WARNING "Git not found. Build will contain revision info from ${VERS_FILE}." )
endif(NOT SCL_IS_SUBBUILD)
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}." )
if(NOT SCL_IS_SUBBUILD)
message( WARNING "Git failed ('.git' not found). Build will contain revision info from ${VERS_FILE}." )
endif(NOT SCL_IS_SUBBUILD)
endif()
string( REPLACE "\n" "" GIT_COMMIT_ID ${GIT_COMMIT_ID} )
@@ -30,10 +38,10 @@ 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"
"/*\n** Returns a string like \"test-1-g5e1fb47, built at TIME on DATE\", 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"
"** 'g' is unknown, 5e1fb47 is the first 7 chars of the git sha1 commit id, and TIME\n"
"** and DATE are substituted by the compiler.\n*/\n\n"
"const char* scl_version() {\n"
" return \"git commit id ${GIT_COMMIT_ID}, built at \"__TIME__\" on \"__DATE__\;\n"
"}\n\n"
@@ -45,4 +53,6 @@ file(WRITE scl_version_string.h.txt ${vstring} )
# 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.")
if(NOT SCL_IS_SUBBUILD)
message("-- scl_version_string.h is up-to-date.")
endif(NOT SCL_IS_SUBBUILD)
+4 -36
View File
@@ -8,49 +8,17 @@ 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
SCL_ENABLE_TESTING:BOOL=ON
SCL_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_configure( BUILD "${CTEST_BINARY_DIRECTORY}" OPTIONS -DSCL_ENABLE_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_....*" )
ctest_test( BUILD "${CTEST_BINARY_DIRECTORY}" INCLUDE_LABEL "cpp_schema_....*" )
message("running python script")
execute_process( COMMAND python ../misc/wiki-scripts/update-matrix.py
+11 -32
View File
@@ -1,14 +1,5 @@
#this sets a property so that the target doesn't get built by 'make' or 'make all'
#useful when testing generation of schema code/compiling schem libs/etc
FUNCTION( TESTABLE_TARGET target )
if(ENABLE_TESTING)
set_target_properties( ${target} PROPERTIES EXCLUDE_FROM_ALL ON )
endif()
ENDFUNCTION( TESTABLE_TARGET )
# To build one or more schemas, configure with
# 'cmake -DBUILD_SCHEMAS="path/to/schema.exp;path/to/schema2.exp"
# 'cmake -DSCL_BUILD_SCHEMAS="path/to/schema.exp;path/to/schema2.exp"
# This function runs fedex on one express file. The generated source goes in a dir
# in the build dir, and it is compiled into a library. A p21read executable is
@@ -51,7 +42,7 @@ FUNCTION(BUILD_A_SCHEMA SCHEMA_FILE)
# multiple schemas, each one will use the include dirs from all previous schemas. Since
# one header (schema.h) is always named the same, this will not work. only workaround
# seems to be set_target_properties( <target> PROPERTIES COMPILE_FLAGS <flags> )
set( ${PROJECT_NAME}_COMPILE_FLAGS "-I${CMAKE_CURRENT_SOURCE_DIR} -I${SCL_SOURCE_DIR}/src/cldai -I${SCL_SOURCE_DIR}/src/cleditor -I${SCL_SOURCE_DIR}/src/clutils -I${SCHEMA_OUTPUT_DIR} -I${SCL_SOURCE_DIR}/src/clstepcore" )
set( ${PROJECT_NAME}_COMPILE_FLAGS "-I${CMAKE_CURRENT_SOURCE_DIR} -I${SCL_SOURCE_DIR}/src/cldai -I${SCL_SOURCE_DIR}/src/cleditor -I${SCL_SOURCE_DIR}/src/clutils -I${SCHEMA_OUTPUT_DIR} -I${SCL_SOURCE_DIR}/src/clstepcore -I${SCL_SOURCE_DIR}/src/base" )
add_custom_target( generate_cpp_${SCHEMA_SHORT_NAME} SOURCES ${FEDEX_OUT} )
add_custom_command( OUTPUT ${SCHEMA_OUTPUT_DIR}
@@ -63,20 +54,11 @@ 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 steputils )
# if testing is enabled, "TESTABLE" sets property EXCLUDE_FROM_ALL and prevents installation
SCL_ADDLIB( ${PROJECT_NAME} "${FEDEX_OUT}" "stepdai stepcore express stepeditor steputils base" "TESTABLE" )
add_dependencies( ${PROJECT_NAME} generate_cpp_${SCHEMA_SHORT_NAME} )
set_target_properties( ${PROJECT_NAME} PROPERTIES COMPILE_FLAGS
${${PROJECT_NAME}_COMPILE_FLAGS} )
TESTABLE_TARGET( ${PROJECT_NAME} )
add_test( NAME generate_cpp_${SCHEMA_SHORT_NAME}
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
@@ -94,19 +76,16 @@ FUNCTION(BUILD_A_SCHEMA SCHEMA_FILE)
set_tests_properties( build_cpp_${PROJECT_NAME} PROPERTIES DEPENDS generate_cpp_${SCHEMA_SHORT_NAME} LABELS cpp_schema_build )
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 )
set( WIN_EXTRA_SRCS ${SCL_SOURCE_DIR}/src/fedex_plus/xgetopt.cc )
endif()
SCL_ADDEXEC( p21read_${PROJECT_NAME} "${SCL_SOURCE_DIR}/src/test/p21read/p21read.cc ${WIN_EXTRA_SRCS}" "${PROJECT_NAME}" "TESTABLE" )
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} )
TESTABLE_TARGET( p21read_${PROJECT_NAME} )
#find all part 21 files in schema dir, add a test for each one
get_filename_component( SCHEMA_DIR ${SCHEMA_FILE} PATH )
file( GLOB_RECURSE P21_FILES ${SCHEMA_DIR}/*.stp ${SCHEMA_DIR}/*.step ${SCHEMA_DIR}/*.p21 )
file( GLOB_RECURSE P21_FILES ${SCHEMA_DIR}/*.stp ${SCHEMA_DIR}/*.step ${SCHEMA_DIR}/*.p21 ${SCHEMA_DIR}/*.ifc )
foreach( TEST_FILE ${P21_FILES} )
get_filename_component( FNAME ${TEST_FILE} NAME_WE )
add_test( NAME read_write_cpp_${SCHEMA_SHORT_NAME}_${FNAME}
@@ -117,11 +96,11 @@ FUNCTION(BUILD_A_SCHEMA SCHEMA_FILE)
ENDFUNCTION(BUILD_A_SCHEMA)
if( DEFINED BUILD_SCHEMAS )
if( BUILD_SCHEMAS STREQUAL "ALL" )
file( GLOB_RECURSE BUILD_SCHEMAS ${SCL_SOURCE_DIR}/data/*.exp )
if( DEFINED SCL_BUILD_SCHEMAS )
if( SCL_BUILD_SCHEMAS STREQUAL "ALL" )
file( GLOB_RECURSE SCL_BUILD_SCHEMAS ${SCL_SOURCE_DIR}/data/*.exp )
endif()
foreach( ap ${BUILD_SCHEMAS} )
foreach( ap ${SCL_BUILD_SCHEMAS} )
BUILD_A_SCHEMA( ${ap} )
endforeach()
endif()
+5328
View File
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 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 it is too large Load Diff
Binary file not shown.
File diff suppressed because it is too large Load Diff
+12 -5
View File
@@ -1,7 +1,14 @@
SET(scl_MANS
man/man1/dataprobe.1
man/man1/fedex.1
man/man1/fedex_plus.1
man/man1/mkProbe.1
man/man1/dataprobe.1
man/man1/fedex.1
man/man1/fedex_plus.1
man/man1/mkProbe.1
)
INSTALL(FILES ${scl_MANS} DESTINATION ${MAN_DIR}/man1)
if(NOT DEFINED MAN_DIR)
set(MAN_DIR share/man)
endif(NOT DEFINED MAN_DIR)
IF(NOT WIN32)
INSTALL(FILES ${scl_MANS} DESTINATION ${CMAKE_INSTALL_PREFIX}/${MAN_DIR}/man1)
ENDIF(NOT WIN32)
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -37,7 +37,7 @@ PROJECT_NUMBER = 3.2
# for a project that appears at the top of each page and should give viewer
# a quick idea about the purpose of the project. Keep the description short.
PROJECT_BRIEF = "STEP Class Library"
PROJECT_BRIEF = "STEPcode"
# With the PROJECT_LOGO tag one can specify an logo or icon that is
# included in the documentation. The maximum height of the logo should not
Binary file not shown.
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 it is too large Load Diff
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -68,7 +68,7 @@
<qtHelp collectionFile="./doc/helpcollection.qhc"
projectFile="./doc/helpcollection.qhcp"
storage="./doc/qch" copyAction="copy">
<title>StepClassLibrary</title>
<title>STEPcode</title>
<startPage>qthelp://com.github.mpictor/doc/index.html</startPage>
<!-- See http://doc.trolltech.com/assistant-custom-help-viewer.html for more
settings in the <assistant> section. -->
@@ -100,7 +100,7 @@
-->
<project>
<!-- The name of the project -->
<name>StepClassLibrary</name>
<name>STEPcode</name>
<!-- The version number of the documentation -->
<version>0.2</version>
<!-- Whether to build version specific documentation for the projects or not.
+10 -10
View File
@@ -47,16 +47,16 @@ $mathjax
<!-- add module list -->
<div id="navrow0" class="tabs">
<ul class="tablist">
<li><a href="../../doc.StepClassLibrary/doxygen-html/index.html"><span>Main</span></a></li>
<li><a href="../../doc.StepClassLibrary.CLDAI/doxygen-html/index.html"><span>CLDAI</span></a></li>
<li><a href="../../doc.StepClassLibrary.CLEditor/doxygen-html/index.html"><span>CLEditor</span></a></li>
<li><a href="../../doc.StepClassLibrary.CLProbe-ui/doxygen-html/index.html"><span>CLProbe-ui</span></a></li>
<li><a href="../../doc.StepClassLibrary.CLStepCore/doxygen-html/index.html"><span>CLStepCore</span></a></li>
<li><a href="../../doc.StepClassLibrary.CLUtils/doxygen-html/index.html"><span>CLUtils</span></a></li>
<li><a href="../../doc.StepClassLibrary.ExPPP/doxygen-html/index.html"><span>ExPPP</span></a></li>
<li><a href="../../doc.StepClassLibrary.Express/doxygen-html/index.html"><span>Express</span></a></li>
<li><a href="../../doc.StepClassLibrary.Fedex-Plus/doxygen-html/index.html"><span>Fedex-Plus</span></a></li>
<li><a href="../../doc.StepClassLibrary.Tests/doxygen-html/index.html"><span>Tests</span></a></li>
<li><a href="../../doc.STEPcode/doxygen-html/index.html"><span>Main</span></a></li>
<li><a href="../../doc.STEPcode.CLDAI/doxygen-html/index.html"><span>CLDAI</span></a></li>
<li><a href="../../doc.STEPcode.CLEditor/doxygen-html/index.html"><span>CLEditor</span></a></li>
<li><a href="../../doc.STEPcode.CLProbe-ui/doxygen-html/index.html"><span>CLProbe-ui</span></a></li>
<li><a href="../../doc.STEPcode.CLStepCore/doxygen-html/index.html"><span>CLStepCore</span></a></li>
<li><a href="../../doc.STEPcode.CLUtils/doxygen-html/index.html"><span>CLUtils</span></a></li>
<li><a href="../../doc.STEPcode.ExPPP/doxygen-html/index.html"><span>ExPPP</span></a></li>
<li><a href="../../doc.STEPcode.Express/doxygen-html/index.html"><span>Express</span></a></li>
<li><a href="../../doc.STEPcode.Fedex-Plus/doxygen-html/index.html"><span>Fedex-Plus</span></a></li>
<li><a href="../../doc.STEPcode.Tests/doxygen-html/index.html"><span>Tests</span></a></li>
</ul>
</div>
<!-- end module list -->
BIN
View File
Binary file not shown.
-6105
View File
File diff suppressed because it is too large Load Diff
+1
View File
@@ -106,6 +106,7 @@ GLOBAL SCL_EXPRESS_EXPORT char DICT_type; /**< set as a side-effect of DICT loo
/***********************/
extern SCL_EXPRESS_EXPORT void DICTinitialize PROTO( ( void ) );
extern SCL_EXPRESS_EXPORT void DICTcleanup 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 * ) );
+2
View File
@@ -184,10 +184,12 @@ static_inline void ERRORflush_messages( void ) {
extern SCL_EXPRESS_EXPORT void ERRORinitialize PROTO( ( void ) );
extern SCL_EXPRESS_EXPORT void ERRORinitialize_after_LIST PROTO( ( void ) );
extern SCL_EXPRESS_EXPORT void ERRORcleanup 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, ... ) );
extern SCL_EXPRESS_EXPORT void ERRORdestroy PROTO( ( Error ) );
struct Symbol_; /* mention Symbol to avoid warning on following line */
extern SCL_EXPRESS_EXPORT void ERRORreport_with_symbol PROTO( ( Error, struct Symbol_ *, ... ) );
+1
View File
@@ -270,6 +270,7 @@ extern SCL_EXPRESS_EXPORT Expression BIN_EXPcreate PROTO( ( Op_Code, Expressio
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 void EXPcleanup PROTO( ( void ) );
extern SCL_EXPRESS_EXPORT Type EXPtype PROTO( ( Expression, struct Scope_ * ) );
extern SCL_EXPRESS_EXPORT int EXPget_integer_value PROTO( ( Expression ) );
+2
View File
@@ -266,8 +266,10 @@ GLOBAL SCL_EXPRESS_EXPORT char * KW_XOR INITIALLY( "XOR" );
/***********************/
extern SCL_EXPRESS_EXPORT Express EXPRESScreate PROTO( ( void ) );
extern SCL_EXPRESS_EXPORT void EXPRESSdestroy PROTO( ( Express ) );
extern SCL_EXPRESS_EXPORT void EXPRESSparse PROTO( ( Express, FILE *, char * ) );
extern SCL_EXPRESS_EXPORT void EXPRESSinitialize PROTO( ( void ) );
extern SCL_EXPRESS_EXPORT void EXPRESScleanup 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 ) );
+1
View File
@@ -135,6 +135,7 @@ GLOBAL SCL_EXPRESS_EXPORT Linked_List LINK__l; /* for LISTcreate_with macro
/***********************/
extern SCL_EXPRESS_EXPORT void LISTinitialize PROTO( ( void ) );
extern SCL_EXPRESS_EXPORT void LISTcleanup 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 ) );
+1
View File
@@ -108,6 +108,7 @@ GLOBAL SCL_EXPRESS_EXPORT struct Object * OBJ;
/***********************/
extern SCL_EXPRESS_EXPORT void OBJinitialize PROTO( ( void ) );
extern SCL_EXPRESS_EXPORT void OBJcleanup 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 ) );
+1
View File
@@ -82,6 +82,7 @@ GLOBAL SCL_EXPRESS_EXPORT Error ERROR_ambiguous_group INITIALLY( ERROR_
/***********************/
extern SCL_EXPRESS_EXPORT void RESOLVEinitialize PROTO( ( void ) );
extern SCL_EXPRESS_EXPORT void RESOLVEcleanup 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 ) );
+1
View File
@@ -155,6 +155,7 @@ extern SCL_EXPRESS_EXPORT Generic SCHEMAfind PROTO( ( Schema, char * name, int
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 void SCOPEdestroy PROTO( ( Scope ) );
extern SCL_EXPRESS_EXPORT Linked_List SCHEMAget_entities_use PROTO( ( Scope ) );
extern SCL_EXPRESS_EXPORT Linked_List SCHEMAget_entities_ref PROTO( ( Scope ) );
+11
View File
@@ -132,6 +132,13 @@ struct Scope_ {
#define SCOPEdo_entities(s,t,de) DICTdo_type_init(s->symbol_table,&de,OBJ_ENTITY); { \
Entity t; \
while (0 != (t = (Entity)DICTdo(&de))) {
#define SCOPEdo_functions(s,t,de) DICTdo_type_init(s->symbol_table,&de,OBJ_FUNCTION); { \
Entity t; \
while (0 != (t = (Entity)DICTdo(&de))) {
#define SCOPEdo_rules(s,t,de) DICTdo_type_init(s->symbol_table,&de,OBJ_RULE); { \
Entity t; \
while (0 != (t = (Entity)DICTdo(&de))) {
#define SCOPEod }}
/***********************/
@@ -143,5 +150,9 @@ extern SCL_EXPRESS_EXPORT void SCOPE_get_entities PROTO( ( Scope, Linked_Lis
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 ) );
extern SCL_EXPRESS_EXPORT void SCOPE_get_functions PROTO( ( Scope, Linked_List ) );
extern SCL_EXPRESS_EXPORT Linked_List SCOPEget_functions PROTO( ( Scope ) );
extern SCL_EXPRESS_EXPORT void SCOPE_get_rules PROTO( ( Scope, Linked_List ) );
extern SCL_EXPRESS_EXPORT Linked_List SCOPEget_rules PROTO( ( Scope ) );
#endif /* SCOPE_H */
+3
View File
@@ -235,6 +235,8 @@ GLOBAL SCL_EXPRESS_EXPORT 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_)
@@ -302,6 +304,7 @@ 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 ) );
extern SCL_EXPRESS_EXPORT void TYPEcleanup PROTO( ( void ) );
extern SCL_EXPRESS_EXPORT bool TYPEinherits_from PROTO( ( Type, enum type_enum ) );
extern SCL_EXPRESS_EXPORT Type TYPEget_nonaggregate_base_type PROTO( ( Type ) );
+6
View File
@@ -13,6 +13,10 @@
#cmakedefine HAVE_PROCESS_H 1
#cmakedefine HAVE_IO_H 1
#cmakedefine YYTEXT_POINTER 1
#cmakedefine SCL_TRACE_FPRINTF 1
#cmakedefine SCL_MEMMGR_ENABLE_CHECKS 1
#cmakedefine HAVE_ABS 1
#cmakedefine HAVE_MEMCPY 1
#cmakedefine HAVE_MEMMOVE 1
@@ -20,4 +24,6 @@
#cmakedefine HAVE_SSIZE_T 1
#cmakedefine HAVE_STD_THREAD 1
#endif /* SCL_CF_H */
+13
View File
@@ -1,6 +1,19 @@
#ifndef SCL_EXPORT_H
#define SCL_EXPORT_H
/* Import/Export flags for base. */
#ifndef SCL_BASE_EXPORT
# if defined(SCL_BASE_DLL_EXPORTS) && defined(SCL_BASE_DLL_IMPORTS)
# error "Only SCL_BASE_DLL_EXPORTS or SCL_BASE_DLL_IMPORTS can be defined, not both."
# elif defined(SCL_BASE_DLL_EXPORTS)
# define SCL_BASE_EXPORT __declspec(dllexport)
# elif defined(SCL_BASE_DLL_IMPORTS)
# define SCL_BASE_EXPORT __declspec(dllimport)
# else
# define SCL_BASE_EXPORT
# endif
#endif
/* Import/Export flags for express. */
#ifndef SCL_EXPRESS_EXPORT
# if defined(SCL_EXPRESS_DLL_EXPORTS) && defined(SCL_EXPRESS_DLL_IMPORTS)
+229
View File
@@ -0,0 +1,229 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd">
<!--
EXPRESS syntax definition based on sql-mysql.xml by Shane Wright (me@shanewright.co.uk)
This is for Kate, the KDE editor. Rename to express.xml and place in the syntax directory (on Debian, this is /usr/share/kde4/apps/katepart/syntax )
-->
<language name="EXPRESS" version="0.1" kateversion="2.5" section="Database" extensions="*.exp;*.EXP;*.p11" mimetype="text/x-express" casesensitive="0" author="Mark Pictor (mpictor@gmail.com)" license="">
<highlighting>
<list name="keywords">
<item> of </item>
<item> or </item>
<item> to </item>
<item> where </item>
<item> subtype </item>
<item> supertype </item>
<item> abstract </item>
<item> oneof </item>
<item> not </item>
<item> in </item>
<item> and </item>
<item> return </item>
<item> then </item>
<item> derive </item>
<item> optional </item>
<!-- put SCHEMA and END_SCHEMA here so code folding will fold
everything in a schema, and not collapse the schema itself -->
<item> schema </item>
<item> end_schema </item>
</list>
<list name="kw_begin"> <!-- kw's that can begin a foldable region -->
<item> type </item>
<item> entity </item>
<item> function </item>
<item> rule </item>
<item> constant </item>
<item> if </item>
<item> local </item>
<item> repeat </item>
<item> begin </item>
<item> case </item>
</list>
<list name="kw_end"> <!-- kw's that can end a foldable region -->
<item> end </item>
<item> end_type </item>
<item> end_entity </item>
<item> end_function </item>
<item> end_rule </item>
<item> end_constant </item>
<item> end_if </item>
<item> end_local </item>
<item> end_repeat </item>
<item> end_case </item>
</list>
<list name="kw_end_begin"> <!-- end one foldable region, begin another -->
<item> else </item>
</list>
<list name="interface_specification"> <!-- USE FROM, REFERENCE FROM -->
<item> use </item>
<item> reference </item>
</list>
<list name="operators">
<item> : </item>
<item> , </item>
<item> || </item>
<item> . </item>
<item> = </item>
<item> ** </item>
<item> | </item>
<item> &lt;* </item>
<item> &gt;= </item>
<item> &gt; </item>
<item> :=: </item>
<item> :&lt;&gt;: </item>
<item> [ </item>
<item> { </item>
<item> ( </item>
<item> &lt;= </item>
<item> &lt; </item>
<item> - </item>
<item> &lt;&gt; </item>
<item> + </item>
<item> / </item>
<item> ] </item>
<item> } </item>
<item> ) </item>
<item> * </item>
<item> \\ </item>
</list>
<list name="functions">
<item> ABS </item>
<item> ACOS </item>
<item> ASIN </item>
<item> ATAN </item>
<item> BLENGTH </item>
<item> COS </item>
<item> EXISTS </item>
<item> EXP </item>
<item> FORMAT </item>
<item> HIBOUND </item>
<item> HIINDEX </item>
<item> LENGTH </item>
<item> LOBOUND </item>
<item> LOINDEX </item>
<item> LOG </item>
<item> LOG2 </item>
<item> LOG10 </item>
<item> NVL </item>
<item> ODD </item>
<item> ROLESOF </item>
<item> SIN </item>
<item> SIZEOF </item>
<item> SQRT </item>
<item> TAN </item>
<item> TYPEOF </item>
<item> USEDIN </item>
<item> VALUE </item>
<item> VALUE_IN </item>
<item> VALUE_UNIQUE </item>
<item> QUERY </item>
</list>
<list name="constants">
<item> CONST_E </item>
<item> PI </item>
<item> SELF </item>
<!-- <item> ? </item> -->
</list>
<list name="types">
<item> binary </item>
<item> boolean </item>
<item> integer </item>
<item> logical </item>
<item> number </item>
<item> real </item>
<item> string </item>
<item> enumeration </item>
<item> select </item>
<item> array </item>
<item> list </item>
<item> bag </item>
<item> set </item>
<item> generic </item>
</list>
<contexts>
<context name="Normal" attribute="Normal Text" lineEndContext="#stay">
<DetectSpaces />
<!-- Make code folding work for SCHEMA/END_SCHEMA, TYPE/END_TYPE, etc -->
<!-- <RegExpr attribute="Block" context="#stay" String="(?:^|[^\w'])(?:SCHEMA|TYPE|ENTITY|FUNCTION|RULE|CONSTANT|IF|LOCAL|REPEAT|BEGIN)" insensitive="false" beginRegion="Blk" firstNonSpace="false" /> -->
<!-- <RegExpr attribute="Block" context="#stay" String="END_(?:SCHEMA|TYPE|ENTITY|FUNCTION|RULE|CONSTANT|IF|LOCAL|REPEAT)" insensitive="false" endRegion="Blk" firstNonSpace="false" /> -->
<!-- <RegExpr attribute="Block" context="#stay" String="END(?:[^_]|$)" endRegion="Blk" firstNonSpace="false" /> -->
<!-- <RegExpr attribute="Block" context="#stay" String="(?:^|[^\w])ELSE(?:$|[^\w])" endRegion="Blk" beginRegion="Blk" firstNonSpace="false" /> -->
<!-- using the lists -->
<keyword attribute="Keyword" context="#stay" String="keywords"/>
<keyword attribute="Keyword" context="#stay" String="kw_begin" beginRegion="Blk" firstNonSpace="false"/>
<keyword attribute="Keyword" context="#stay" String="kw_end_begin" endRegion="Blk" beginRegion="Blk" firstNonSpace="false" />
<keyword attribute="Keyword" context="#stay" String="kw_end" endRegion="Blk" firstNonSpace="false"/>
<keyword attribute="Operator" context="#stay" String="operators"/>
<keyword attribute="Function" context="#stay" String="functions"/>
<keyword attribute="Constants" context="#stay" String="constants"/>
<keyword attribute="Data Type" context="#stay" String="types"/>
<keyword attribute="Interface Specification" context="Interface Specification" String="interface_specification" firstNonSpace="true" />
<DetectIdentifier />
<!-- extra data types -->
<!-- numbers -->
<HlCHex attribute="Hex" context="#stay"/>
<Float attribute="Float" context="#stay"/>
<Int attribute="Decimal" context="#stay"/>
<!-- strings -->
<DetectChar attribute="String" context="String" char="'"/>
<DetectChar attribute="String" context="String2" char="&quot;"/>
<!-- comments -->
<Detect2Chars attribute="Comment" context="SingleLineComment" char="-" char1="-"/>
<Detect2Chars attribute="Comment" context="MultiLineComment" char="(" char1="*" beginRegion="Comment"/>
<DetectChar attribute="Constants" context="#stay" char="?"/>
</context>
<!-- 'string' -->
<context name="String" attribute="String" lineEndContext="#stay">
<LineContinue attribute="String" context="#pop"/>
<DetectChar attribute="String" context="#pop" char="'"/>
</context>
<!-- "string", extra context needed to enable "str'ing" and 'str"ing' -->
<context name="String2" attribute="String" lineEndContext="#stay">
<LineContinue attribute="String" context="#pop"/>
<HlCStringChar attribute="String Char" context="#stay"/>
<DetectChar attribute="String" context="#pop" char="&quot;"/>
</context>
<!-- comments -->
<context name="SingleLineComment" attribute="Comment" lineEndContext="#pop"/>
<context name="MultiLineComment" attribute="Comment" lineEndContext="#stay">
<Detect2Chars attribute="Comment" context="#pop" char="*" char1=")" endRegion="Comment" />
</context>
<context name="Interface Specification" attribute="Interface Specification" >
<!-- lineEndContext="#pop" -->
<DetectChar attribute="Interface Specification" context="#pop" char=";"/>
</context>
</contexts>
<itemDatas>
<itemData name="Normal Text" defStyleNum="dsNormal" spellChecking="false"/>
<itemData name="Keyword" defStyleNum="dsKeyword" spellChecking="false"/>
<itemData name="Block" defStyleNum="dsKeyword" spellChecking="false"/>
<itemData name="Operator" defStyleNum="dsNormal" spellChecking="false"/>
<itemData name="Function" defStyleNum="dsFunction" spellChecking="false"/>
<itemData name="Constants" defStyleNum="dsOthers" spellChecking="false"/>
<itemData name="Data Type" defStyleNum="dsDataType" spellChecking="false"/>
<itemData name="Decimal" defStyleNum="dsDecVal" spellChecking="false"/>
<itemData name="Float" defStyleNum="dsFloat" spellChecking="false"/>
<itemData name="Hex" defStyleNum="dsBaseN" spellChecking="false"/>
<itemData name="String" defStyleNum="dsString"/>
<itemData name="String Char" defStyleNum="dsChar" spellChecking="false"/>
<itemData name="Comment" defStyleNum="dsComment"/>
<itemData name="Interface Specification" defStyleNum="dsOthers" spellChecking="false"/>
</itemDatas>
</highlighting>
<general>
<comments>
<comment name="singleLine" start="--"/>
<comment name="multiLine" start="(*" end="*)"/>
</comments>
<keywords casesensitive="0" additionalDeliminator="'" />
<!-- weakDeliminator="+-*/|=!&lt;&gt;~^:." -->
</general>
</language>
@@ -0,0 +1,36 @@
<NotepadPlus>
<UserLang name="Express Schema" ext="exp">
<Settings>
<Global caseIgnored="yes" />
<TreatAsSymbol comment="no" commentLine="no" />
<Prefix words1="no" words2="no" words3="no" words4="no" />
</Settings>
<KeywordLists>
<Keywords name="Delimiters">000000</Keywords>
<Keywords name="Folder+">type entity function rule constant if local repeat begin case else</Keywords>
<Keywords name="Folder-">end_type end_entity end_function end_rule end_constant end_if end_local end_repeat end end_base else</Keywords>
<Keywords name="Operators">&quot; , . / : ; [ \ ] { | } &lt; = &gt;</Keywords>
<Keywords name="Comment"> 1(* 2*) 0--</Keywords>
<Keywords name="Words1">of or to where subtype supertype abstract oneof not in and return then derive optional schema end_schema</Keywords>
<Keywords name="Words2">abs acos asin atan blength cos exists exp format hibound hiindex length lobound loindex log log2 log10 nvl odd rolesof sin sizeof sqrt tan typeof usedin value value_in value_unique query</Keywords>
<Keywords name="Words3">const_e pi self</Keywords>
<Keywords name="Words4">binary boolean integer logical number real string enumeration select array list bag set generic</Keywords>
</KeywordLists>
<Styles>
<WordsStyle name="DEFAULT" styleID="11" fgColor="000000" bgColor="FFFFFF" fontStyle="0" />
<WordsStyle name="FOLDEROPEN" styleID="12" fgColor="800000" bgColor="FFFFFF" fontStyle="0" />
<WordsStyle name="FOLDERCLOSE" styleID="13" fgColor="800000" bgColor="FFFFFF" fontStyle="0" />
<WordsStyle name="KEYWORD1" styleID="5" fgColor="800000" bgColor="FFFFFF" fontStyle="0" />
<WordsStyle name="KEYWORD2" styleID="6" fgColor="800000" bgColor="FFFFFF" fontStyle="0" />
<WordsStyle name="KEYWORD3" styleID="7" fgColor="FF8000" bgColor="FFFFFF" fontStyle="0" />
<WordsStyle name="KEYWORD4" styleID="8" fgColor="0000FF" bgColor="FFFFFF" fontStyle="0" />
<WordsStyle name="COMMENT" styleID="1" fgColor="008000" bgColor="FFFFFF" fontStyle="0" />
<WordsStyle name="COMMENT LINE" styleID="2" fgColor="008000" bgColor="FFFFFF" fontStyle="0" />
<WordsStyle name="NUMBER" styleID="4" fgColor="000000" bgColor="FFFFFF" fontStyle="0" />
<WordsStyle name="OPERATOR" styleID="10" fgColor="FF0000" bgColor="FFFFFF" fontStyle="0" />
<WordsStyle name="DELIMINER1" styleID="14" fgColor="000000" bgColor="FFFFFF" fontStyle="0" />
<WordsStyle name="DELIMINER2" styleID="15" fgColor="000000" bgColor="FFFFFF" fontStyle="0" />
<WordsStyle name="DELIMINER3" styleID="16" fgColor="000000" bgColor="FFFFFF" fontStyle="0" />
</Styles>
</UserLang>
</NotepadPlus>
+21 -42
View File
@@ -8,8 +8,8 @@ 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
SCL_ENABLE_TESTING:BOOL=ON
SCL_BUILD_TYPE:STRING=Debug
")
@@ -50,38 +50,6 @@ function( SUBMIT_TEST part )
endif()
endfunction( SUBMIT_TEST part )
# 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}")
######################################################
##### To disable reporting of a set of tests, comment
##### out the SUBMIT_TEST line immediately following
@@ -94,29 +62,33 @@ set(CTEST_BUILD_FLAGS "-j${PROCESSOR_COUNT}")
ctest_start(Experimental)
ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY})
ctest_configure( BUILD "${CTEST_BINARY_DIRECTORY}" APPEND OPTIONS -DENABLE_TESTING=ON )
file(WRITE "${CTEST_BINARY_DIRECTORY}/CTestCustom.cmake" "
set( CTEST_CUSTOM_ERROR_EXCEPTION \"{standard input}:[0-9][0-9]*: WARNING: \")
")
ctest_configure( BUILD "${CTEST_BINARY_DIRECTORY}" APPEND OPTIONS -DSCL_ENABLE_TESTING=ON )
SUBMIT_TEST( Configure )
ctest_build( BUILD "${CTEST_BINARY_DIRECTORY}" APPEND )
SUBMIT_TEST( Build )
# ctest_memcheck( BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res PARALLEL_LEVEL ${PROCESSOR_COUNT} )
# ctest_memcheck( BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res )
if(NOT SKIP_TEST_UNITARY_SCHEMAS )
ctest_test( BUILD "${CTEST_BINARY_DIRECTORY}" APPEND
PARALLEL_LEVEL ${PROCESSOR_COUNT} INCLUDE_LABEL "unitary_schemas" )
INCLUDE_LABEL "unitary_schemas" )
SUBMIT_TEST( Test )
endif()
if(NOT SKIP_CPP_TEST_SCHEMA_GEN )
ctest_test( BUILD "${CTEST_BINARY_DIRECTORY}" APPEND
PARALLEL_LEVEL ${PROCESSOR_COUNT} INCLUDE_LABEL "cpp_schema_gen" )
INCLUDE_LABEL "cpp_schema_gen" )
SUBMIT_TEST( Test )
if(NOT SKIP_CPP_TEST_SCHEMA_BUILD )
ctest_test( BUILD "${CTEST_BINARY_DIRECTORY}" APPEND
PARALLEL_LEVEL ${PROCESSOR_COUNT} INCLUDE_LABEL "cpp_schema_build" )
INCLUDE_LABEL "cpp_schema_build" )
SUBMIT_TEST( Test )
if(NOT SKIP_CPP_TEST_SCHEMA_RW )
ctest_test( BUILD "${CTEST_BINARY_DIRECTORY}" APPEND
PARALLEL_LEVEL ${PROCESSOR_COUNT} INCLUDE_LABEL "cpp_schema_rw" )
INCLUDE_LABEL "cpp_schema_rw" )
SUBMIT_TEST( Test )
endif()
endif()
@@ -125,12 +97,19 @@ endif()
if(NOT SKIP_TEST_EXCHANGE_FILE )
if( SKIP_CPP_TEST_SCHEMA_BUILD )
ctest_test( BUILD "${CTEST_BINARY_DIRECTORY}" APPEND
PARALLEL_LEVEL ${PROCESSOR_COUNT} INCLUDE "build_cpp_sdai_AP214E3_2010" )
INCLUDE "build_cpp_sdai_AP214E3_2010" )
SUBMIT_TEST( Test )
endif()
ctest_test( BUILD "${CTEST_BINARY_DIRECTORY}" APPEND
PARALLEL_LEVEL ${PROCESSOR_COUNT} INCLUDE_LABEL "exchange_file" )
INCLUDE_LABEL "exchange_file" )
SUBMIT_TEST( Test )
endif()
if(NOT SKIP_TEST_CPP_SCHEMA_SPECIFIC )
ctest_test( BUILD "${CTEST_BINARY_DIRECTORY}" APPEND
INCLUDE_LABEL "cpp_schema_specific" )
SUBMIT_TEST( Test )
endif()
# ctest_coverage( )
+15
View File
@@ -0,0 +1,15 @@
set(SCL_BASE_SOURCES
scl_memmgr.cc
scl_trace_fprintf.c
)
include_directories(
${SCL_SOURCE_DIR}/include
)
if(MSVC OR BORLAND)
add_definitions( -DSCL_BASE_DLL_EXPORTS )
endif()
SCL_ADDLIB(base "${SCL_BASE_SOURCES}" "")
+408
View File
@@ -0,0 +1,408 @@
#define SCL_MEMMGR_CC
#include <scl_cf.h>
#include "scl_memmgr.h"
#if __APPLE__
# include <malloc/malloc.h>
#else
# include <malloc.h>
#endif
#include <stdio.h>
#include <string>
#include <set>
#ifdef SCL_MEMMGR_ENABLE_CHECKS
/**
scl_memmgr_error definition
*/
class scl_memmgr_error {
private:
std::string _srcfile;
unsigned int _srcline;
unsigned int _occurences;
public:
scl_memmgr_error( const std::string &file, const unsigned int line );
scl_memmgr_error( const scl_memmgr_error &rhs );
~scl_memmgr_error( void );
bool operator<( const scl_memmgr_error &rhs ) const;
std::string getsrcfile( void ) const;
unsigned int getsrcline( void ) const;
unsigned int getoccurences( void ) const;
};
typedef std::set<scl_memmgr_error> scl_memmgr_errors;
typedef std::set<scl_memmgr_error>::iterator scl_memmgr_error_iterator;
/**
scl_memmgr_record definition
*/
class scl_memmgr_record {
private:
void * _addr;
size_t _size;
std::string _srcfile;
unsigned int _srcline;
public:
scl_memmgr_record( void * addr, size_t size, const char *file, const unsigned int line );
scl_memmgr_record( void * addr );
scl_memmgr_record( const scl_memmgr_record &rhs );
~scl_memmgr_record( void );
bool operator<( const scl_memmgr_record &rhs ) const;
void * getaddr( void ) const;
size_t getsize( void ) const;
std::string getsrcfile( void ) const;
unsigned int getsrcline( void ) const;
};
typedef std::set<scl_memmgr_record> scl_memmgr_records;
typedef std::set<scl_memmgr_record>::iterator scl_memmgr_record_iterator;
#endif /* SCL_MEMMGR_ENABLE_CHECKS */
/**
scl_memmgr definition
*/
class scl_memmgr {
private:
#ifdef SCL_MEMMGR_ENABLE_CHECKS
bool _record_insert_busy, _record_erase_busy;
// memory allocation/reallocation records, inserted at allocation, erased at deallocation.
scl_memmgr_records _records;
// memory stats
unsigned int _allocated; // amount of memory allocated simultaniously
unsigned int _maximum_allocated; // maximum amount of memory allocated simultaniously
unsigned int _allocated_total; // total amount of memory allocated in bytes
unsigned int _reallocated_total; // total amount of memory reallocated in bytes
unsigned int _deallocated_total; // total amount of memory deallocated in bytes
#endif /* SCL_MEMMGR_ENABLE_CHECKS */
protected:
public:
scl_memmgr(void);
~scl_memmgr(void);
void * allocate( size_t size, const char *file, const int line );
void * reallocate( void * addr, size_t size, const char *file, const int line );
void deallocate( void * addr, const char *file, const int line );
};
/**
scl_memmgr instance.
There should be one static instance of memmgr.
This instance is automatically destroyed when application exits, so this allows us to add
memory leak detection in it's destructor.
*/
scl_memmgr memmgr;
/**
c memory functions implementation
*/
extern "C" {
void * scl_malloc_fn( unsigned int size, const char * file, const int line ) {
return memmgr.allocate(size, file, line);
}
void * scl_calloc_fn( unsigned int count, unsigned int size, const char * file, const int line ) {
return memmgr.allocate(count * size, file, line);
}
void * scl_realloc_fn( void * addr, unsigned int size, const char * file, const int line ) {
return memmgr.reallocate(addr, size, file, line);
}
void scl_free_fn( void * addr ) {
memmgr.deallocate(addr, "", 0);
}
}
/**
c++ memory operators implementation
*/
void * scl_operator_new( size_t size, const char * file, const int line ) {
return memmgr.allocate(size, file, line);
}
void scl_operator_delete( void * addr, const char * file, const int line ) {
memmgr.deallocate(addr, file, line);
}
void scl_operator_delete( void * addr ) {
memmgr.deallocate(addr, "", 0);
}
/**
scl_memmgr implementation
*/
scl_memmgr::scl_memmgr(void) {
#ifdef SCL_MEMMGR_ENABLE_CHECKS
_record_insert_busy = false;
_record_erase_busy = false;
_allocated = 0;
_maximum_allocated = 0;
_allocated_total = 0;
_reallocated_total = 0;
_deallocated_total = 0;
#endif /* SCL_MEMMGR_ENABLE_CHECKS */
}
/**
Destructor:
scl_memmgr::~scl_memmgr(void)
Description:
The scl_memmgr destructor is used to check for memory leaks when enabled.
All records still present when scl_memmgr instance is destroyed can be considered as
memory leaks.
*/
scl_memmgr::~scl_memmgr(void) {
#ifdef SCL_MEMMGR_ENABLE_CHECKS
scl_memmgr_record_iterator irecord;
scl_memmgr_errors errors;
scl_memmgr_error_iterator ierror;
// Check if total allocated equals total deallocated
if (_allocated_total != _deallocated_total) {
// todo: generate warning for possible memory leaks, enable full memory leak checking
printf("scl_memmgr warning: Possible memory leaks detected (%d of %d bytes)\n", _allocated_total - _deallocated_total, _allocated_total);
}
// Compact leaks into an error list to prevent same leak being reported multiple times.
_record_insert_busy = true;
_record_erase_busy = true;
for (irecord = _records.begin();
irecord != _records.end();
irecord ++) {
scl_memmgr_error error(irecord->getsrcfile(), irecord->getsrcline());
ierror = errors.find(error);
if (ierror == errors.end())
errors.insert(error);
//else
// ierror->occurences ++;
}
_record_insert_busy = false;
_record_erase_busy = false;
// Loop through memory leaks to generate/buffer errors
for (ierror = errors.begin();
ierror != errors.end();
ierror ++) {
// todo: generate error for memory leak
printf("scl_memmgr warning: Possible memory leak in %s line %d\n", ierror->getsrcfile().c_str(), ierror->getsrcline());
}
// Clear remaining records
_record_erase_busy = true;
_records.clear();
errors.clear();
_record_erase_busy = false;
#endif /* SCL_MEMMGR_ENABLE_CHECKS */
}
void * scl_memmgr::allocate( size_t size, const char *file, const int line ) {
void * addr;
// Allocate
addr = malloc(size);
if (addr == NULL) {
// todo: error allocation failed
printf("scl_memmgr error: Memory allocation failed in %s line %d\n", file, line);
}
// Some stl implementations (for example debian gcc) use the new operator to construct
// new elements when inserting scl_memmgr_record. When this our new operator gets used
// for this operation, this would result in an infinite loop. This is fixed by the
// _record_insert_busy flag.
#ifdef SCL_MEMMGR_ENABLE_CHECKS
if (!_record_insert_busy)
{
// Store record for this allocation
_record_insert_busy = true;
_records.insert(scl_memmgr_record(addr, size, file, line));
_record_insert_busy = false;
// Update stats
_allocated += size;
if (_allocated > _maximum_allocated)
_maximum_allocated = _allocated;
_allocated_total += size;
}
#endif /* SCL_MEMMGR_ENABLE_CHECKS */
return addr;
}
void * scl_memmgr::reallocate( void * addr, size_t size, const char *file, const int line ) {
#ifdef SCL_MEMMGR_ENABLE_CHECKS
scl_memmgr_record_iterator record;
if (!_record_insert_busy)
{
// Find record of previous allocation/reallocation
record = _records.find(scl_memmgr_record(addr));
if (record == _records.end()) {
// todo: error reallocating memory not allocated?
printf("scl_memmgr warning: Reallocation of not allocated memory at %s line %d\n", file, line);
}
else {
// Update stats
_allocated -= record->getsize();
_deallocated_total += record->getsize();
// Erase previous allocation/reallocation
_record_erase_busy = true;
_records.erase(record);
_record_erase_busy = false;
}
}
#endif /* SCL_MEMMGR_ENABLE_CHECKS */
// Reallocate
addr = realloc(addr, size);
if (addr == NULL) {
// todo: error reallocation failed
printf("scl_memmgr error: Reallocation failed at %s line %d\n", file, line);
}
#ifdef SCL_MEMMGR_ENABLE_CHECKS
if (!_record_insert_busy)
{
// Store record for this reallocation
_record_insert_busy = true;
_records.insert(scl_memmgr_record(addr, size, file, line));
_record_insert_busy = false;
// Update stats
_allocated += size;
if (_allocated > _maximum_allocated)
_maximum_allocated = _allocated;
_allocated_total += size;
_reallocated_total += size;
}
#endif /* SCL_MEMMGR_ENABLE_CHECKS */
return addr;
}
void scl_memmgr::deallocate( void * addr, const char *file, const int line ) {
#ifdef SCL_MEMMGR_ENABLE_CHECKS
scl_memmgr_record_iterator record;
if (!_record_erase_busy)
{
// Find record of previous allocation/reallocation
record = _records.find(scl_memmgr_record(addr));
if (record == _records.end()) {
// todo: error free called for not allocated memory?
printf("scl_memmgr warning: Deallocate of not allocated memory at %s line %d\n", file, line);
}
else {
// Update stats
_allocated -= record->getsize();
_deallocated_total += record->getsize();
// Erase record
_record_erase_busy = true;
_records.erase(record);
_record_erase_busy = false;
}
}
#endif /* SCL_MEMMGR_ENABLE_CHECKS */
// Deallocate
free(addr);
}
#ifdef SCL_MEMMGR_ENABLE_CHECKS
/**
scl_memmgr_error implementation
*/
scl_memmgr_error::scl_memmgr_error( const std::string &file, const unsigned int line ) {
_srcfile = file;
_srcline = line;
_occurences = 1;
}
scl_memmgr_error::scl_memmgr_error( const scl_memmgr_error &rhs ) {
_srcfile = rhs._srcfile;
_srcline = rhs._srcline;
_occurences = rhs._occurences;
}
scl_memmgr_error::~scl_memmgr_error( void ) {
}
bool scl_memmgr_error::operator<( const scl_memmgr_error &rhs ) const {
if (_srcfile == rhs._srcfile)
return _srcline < rhs._srcline;
return _srcfile < rhs._srcfile;
}
std::string scl_memmgr_error::getsrcfile( void ) const {
return _srcfile;
}
unsigned int scl_memmgr_error::getsrcline( void ) const {
return _srcline;
}
unsigned int scl_memmgr_error::getoccurences( void ) const {
return _occurences;
}
/**
scl_memmgr_record implementation
*/
scl_memmgr_record::scl_memmgr_record( void * addr, size_t size, const char *file, const unsigned int line ) {
_addr = addr;
_size = size;
_srcfile = file;
_srcline = line;
}
scl_memmgr_record::scl_memmgr_record( void * addr ) {
_addr = addr;
_size = 0;
_srcfile = "";
_srcline = -1;
}
scl_memmgr_record::scl_memmgr_record( const scl_memmgr_record &rhs ) {
_addr = rhs._addr;
_size = rhs._size;
_srcfile = rhs._srcfile;
_srcline = rhs._srcline;
}
scl_memmgr_record::~scl_memmgr_record( void ) {
}
bool scl_memmgr_record::operator<( const scl_memmgr_record &rhs ) const {
return _addr < rhs._addr;
}
void * scl_memmgr_record::getaddr( void ) const {
return _addr;
}
size_t scl_memmgr_record::getsize( void ) const {
return _size;
}
std::string scl_memmgr_record::getsrcfile( void ) const {
return _srcfile;
}
unsigned int scl_memmgr_record::getsrcline( void ) const {
return _srcline;
}
#endif /* SCL_MEMMGR_ENABLE_CHECKS */
+80
View File
@@ -0,0 +1,80 @@
#ifndef SCL_MEMMGR_H
#define SCL_MEMMGR_H
#include <scl_export.h>
/**
Platform specific defines
*/
#if defined(__MSVC__) || defined(__BORLAND__)
#define THROW_STD_BAD_ALLOC
#define THROW_EMPTY
#else
#define THROW_STD_BAD_ALLOC throw (std::bad_alloc)
#define THROW_EMPTY throw ()
#endif
#ifdef __cplusplus
#include <cstddef>
extern "C" {
#endif /* __cplusplus */
SCL_BASE_EXPORT void * scl_malloc_fn( unsigned int size, const char *file, const int line );
SCL_BASE_EXPORT void * scl_calloc_fn( unsigned int count, unsigned int size, const char *file, const int line );
SCL_BASE_EXPORT void * scl_realloc_fn( void * addr, unsigned int size, const char *file, const int line );
SCL_BASE_EXPORT void scl_free_fn( void * addr );
#ifdef __cplusplus
}
#endif /* __cplusplus */
#ifdef __cplusplus
SCL_BASE_EXPORT void * scl_operator_new( size_t size, const char * file, const int line );
SCL_BASE_EXPORT void scl_operator_delete( void * addr, const char *file, const int line );
SCL_BASE_EXPORT void scl_operator_delete( void * addr );
#endif /* __cplusplus */
#ifndef SCL_MEMMGR_CC
#define scl_malloc(size) scl_malloc_fn(size, __FILE__, __LINE__)
#define scl_calloc(count, size) scl_calloc_fn(count, size, __FILE__, __LINE__)
#define scl_realloc(addr, size) scl_realloc_fn(addr, size, __FILE__, __LINE__)
#define scl_free(addr) scl_free_fn(addr)
#ifdef __cplusplus
#include <new>
inline void * operator new( size_t size, const char *file, const int line ) THROW_STD_BAD_ALLOC {
return scl_operator_new(size, file, line);
}
inline void * operator new[]( size_t size, const char *file, const int line ) THROW_STD_BAD_ALLOC {
return scl_operator_new(size, file, line);
}
inline void operator delete( void *addr, const char *file, const int line ) THROW_STD_BAD_ALLOC {
scl_operator_delete(addr, file, line);
}
inline void operator delete[]( void *addr, const char *file, const int line ) THROW_STD_BAD_ALLOC {
scl_operator_delete(addr, file, line);
}
inline void operator delete( void * addr ) THROW_EMPTY {
scl_operator_delete(addr);
}
inline void operator delete[]( void * addr ) THROW_EMPTY {
scl_operator_delete(addr);
}
#define new new(__FILE__, __LINE__)
#endif /* __cplusplus */
#endif /* SCL_MEMMGR_CC */
#endif /* SCL_MEMMGR_H */
+16
View File
@@ -0,0 +1,16 @@
#include <stdarg.h>
#include <stdio.h>
#include "scl_trace_fprintf.h"
void trace_fprintf (char const *sourcefile, int line, FILE* file, const char *format, ...) {
va_list args;
if( (file != stdout) && (file != stderr ) ) {
fprintf(file, "/* source: %s:%d */", sourcefile, line);
}
va_start (args, format);
vfprintf(file, format, args);
va_end (args);
}
+32
View File
@@ -0,0 +1,32 @@
#ifndef SCL_TRACE_FPRINTF_H
#define SCL_TRACE_FPRINTF_H
/** \file scl_trace_fprintf.h
* Used to track the source file and line where generated code is printed from
* When enabled, comments are printed into the generated files for every 'fprintf':
* / * source: scl/src/fedex_plus/selects.c:1375 * /
* To enable, configure with 'cmake .. -DSCL_TRACE_FPRINTF=ON'
*
* This header must be included *after* all other headers, otherwise the compiler will
* report errors in system headers.
* \sa trace_fprintf
**/
#include "scl_export.h"
/** used to find where generated c++ originates from in fedex_plus
* To enable, configure with 'cmake .. -DSCL_TRACE_FPRINTF=ON'
*/
#ifdef __cplusplus
extern "C" {
#endif
SCL_BASE_EXPORT void trace_fprintf (char const *sourcefile, int line, FILE* file, const char *format, ...);
#ifdef __cplusplus
}
#endif
#ifdef SCL_TRACE_FPRINTF
# define fprintf(...) trace_fprintf(__FILE__, __LINE__, __VA_ARGS__)
#endif /* SCL_TRACE_FPRINTF */
#endif /* SCL_TRACE_FPRINTF_H */
+8 -16
View File
@@ -8,9 +8,9 @@ set(LIBSTEPDAI_SRCS
sdaiEntity_extent_set.cc
sdaiModel_contents.cc
sdaiModel_contents_list.cc
sdaiEnum.cc
sdaiString.cc
sdaiBinary.cc
sdaiEnum.cc
sdaiString.cc
sdaiBinary.cc
)
SET(LIBSTEPDAI_PRIVATE_HDRS
@@ -23,24 +23,16 @@ SET(LIBSTEPDAI_PRIVATE_HDRS
sdaiObject.h
sdaiSession_instance.h
StrUtil.hh
sdaiEnum.h
sdaiString.h
sdaiBinary.h
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/base
${SCL_SOURCE_DIR}/src/clstepcore
${SCL_SOURCE_DIR}/src/clutils
)
SCL_ADDLIB(stepdai "${LIBSTEPDAI_SRCS}" "steputils")
if(APPLE)
set_target_properties(stepdai PROPERTIES LINK_FLAGS "-flat_namespace -undefined suppress")
endif(APPLE)
SCL_ADDLIB(stepdai "${LIBSTEPDAI_SRCS}" "steputils base")
@@ -29,6 +29,7 @@
#include <memory.h>
#include <math.h>
#include "scl_memmgr.h"
// to help ObjectCenter
#ifndef HAVE_MEMMOVE
+1
View File
@@ -11,6 +11,7 @@
#include <sstream>
#include <sdai.h>
#include "scl_memmgr.h"
SDAI_Binary::SDAI_Binary( const char * str, int max ) {
content = std::string( str, max );
+1
View File
@@ -3,6 +3,7 @@
#include <math.h>
#include <sdai.h>
#include "scl_memmgr.h"
// to help ObjectCenter
#ifndef HAVE_MEMMOVE
+1
View File
@@ -3,6 +3,7 @@
//#include <EntityExtent.h>
#include <sdai.h>
#include "scl_memmgr.h"
SDAI_Entity_extent::SDAI_Entity_extent( )
: _definition( 0 ), _definition_name( 0 ), _owned_by( 0 ) {
+1
View File
@@ -27,6 +27,7 @@
#include <math.h>
#include <sdai.h>
#include "scl_memmgr.h"
/*
#include <EntityExtent.h>
+1
View File
@@ -1,5 +1,6 @@
#include <sdai.h>
#include "scl_memmgr.h"
/*
* NIST STEP Core Class Library
+1
View File
@@ -1,5 +1,6 @@
#include <sdai.h>
#include "scl_memmgr.h"
///////// SDAI_Model_contents_instances
+1
View File
@@ -24,6 +24,7 @@
* UArray implementation.
*/
#include <sdai.h>
#include "scl_memmgr.h"
// to help ObjectCenter
#ifndef HAVE_MEMMOVE
+1
View File
@@ -1,4 +1,5 @@
#include <sdai.h>
#include "scl_memmgr.h"
SDAI_sdaiObject::SDAI_sdaiObject() {
}
+1
View File
@@ -1,4 +1,5 @@
#include <sdai.h>
#include "scl_memmgr.h"
SDAI_Session_instance::SDAI_Session_instance() {
}
+1
View File
@@ -11,6 +11,7 @@
#include <sdai.h>
#include <sstream>
#include "scl_memmgr.h"
SDAI_String::SDAI_String( const char * str, int max ) {
content = std::string( str, max );
+2 -12
View File
@@ -35,20 +35,10 @@ SET(LIBSTEPEDITOR_PRIVATE_HDRS
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${SCL_SOURCE_DIR}/src/base
${SCL_SOURCE_DIR}/src/cldai
${SCL_SOURCE_DIR}/src/clstepcore
${SCL_SOURCE_DIR}/src/clutils
)
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")
endif(APPLE)
SCL_ADDLIB(stepeditor "${LIBSTEPEDITOR_SRCS}" "stepcore stepdai steputils base")
+159 -739
View File
File diff suppressed because it is too large Load Diff
+25 -19
View File
@@ -49,29 +49,35 @@ class SCL_EDITOR_EXPORT STEPfile {
Registry & reg() {
return _reg;
}
int _fileIdIncr; //Increment value to be added to FileId Numbers on input
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
int _headerId; ///< STEPfile_id given to SDAI_Application_instance from header section
//file information
DirObj * _currentDir;
std::string _fileName;
//the following are used to compute read/write progress
std::ifstream::pos_type _iFileSize; ///< input file size
std::ifstream::pos_type _iFileCurrentPosition; ///< input file position (from ifstream::tellg())
bool _iFileStage1Done; ///< set immediately before ReadData1() returns
int _oFileInstsWritten; ///< number of instances that have been written
//error information
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
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;
@@ -111,6 +117,8 @@ class SCL_EDITOR_EXPORT STEPfile {
}
const std::string SetFileName( const std::string name = "" );
const std::string TruncFileName( const std::string name ) const;
float GetReadProgress() const;
float GetWriteProgress() const;
//error information
ErrorDescriptor & Error() { /* const */
@@ -165,8 +173,8 @@ class SCL_EDITOR_EXPORT STEPfile {
protected:
//member functions
const std::string schemaName(); // returns and copies out schema name from header instances
//called by ReadExchangeFile
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 );
@@ -178,9 +186,8 @@ class SCL_EDITOR_EXPORT STEPfile {
int HeaderId( int increment = 1 );
int HeaderId( const std::string name );
int ReadData1( istream & in ); // first pass to create instances
// second pass to read instances
int ReadData2( istream & in, bool useTechCor = true );
int ReadData1( istream & in ); /**< First pass, to create instances */
int ReadData2( istream & in, bool useTechCor = true ); /**< Second pass, to read instances */
// obsolete
int ReadWorkingData1( istream & in );
@@ -188,18 +195,17 @@ class SCL_EDITOR_EXPORT STEPfile {
void ReadRestOfFile( istream & in );
// create instance - used by ReadData1()
/// create instance - used by ReadData1()
SDAI_Application_instance * CreateInstance( istream & in, ostream & out );
// create complex instance - used by CreateInstance()
/// create complex instance - used by CreateInstance()
SDAI_Application_instance * CreateSubSuperInstance( istream & in, int fileid,
ErrorDescriptor & );
// read the instance - used by ReadData2()
/// 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
/// reading scopes are still incomplete, CreateScopeInstances and ReadScopeInstances are stubs
Severity CreateScopeInstances( istream & in, SDAI_Application_instance_ptr ** scopelist );
Severity ReadScopeInstances( istream & in );
// Severity ReadSubSuperInstance(istream& in);
+16 -3
View File
@@ -17,6 +17,7 @@
#include <cmath>
#include <cstring>
#include "scl_memmgr.h"
extern void HeaderSchemaInit( Registry & reg );
@@ -28,7 +29,9 @@ STEPfile::STEPfile( Registry & r, InstMgr & i, const std::string filename, bool
_instances( i ), _reg( r ), _fileIdIncr( 0 ), _headerId( 0 ),
_entsNotCreated( 0 ), _entsInvalid( 0 ), _entsIncomplete( 0 ),
_entsWarning( 0 ), _errorCount( 0 ), _warningCount( 0 ),
_maxErrorCount( 5000 ), _strict( strict ) {
_maxErrorCount( 5000 ), _strict( strict ),_iFileSize( 0 ),
_iFileCurrentPosition( 0 ), _oFileInstsWritten( 0 ),
_iFileStage1Done( false ) {
SetFileType( VERSION_CURRENT );
SetFileIdIncrement();
_currentDir = new DirObj( "" );
@@ -42,8 +45,6 @@ STEPfile::STEPfile( Registry & r, InstMgr & i, const std::string filename, bool
STEPfile::~STEPfile() {
delete _currentDir;
// remove everything from the Registry before deleting it
_headerRegistry->DeleteContents();
delete _headerRegistry;
_headerInstances->DeleteInstances();
@@ -173,6 +174,8 @@ Severity STEPfile::AppendWorkingFile( const std::string filename, bool useTechCo
/******************************************************/
istream * STEPfile::OpenInputFile( const std::string filename ) {
_iFileCurrentPosition = 0;
// if there's no filename to use, fail
if( filename.empty() && FileName().empty() ) {
_error.AppendToUserMsg( "Unable to open file for input. No current file name.\n" );
@@ -204,6 +207,10 @@ istream * STEPfile::OpenInputFile( const std::string filename ) {
return ( 0 );
}
//check size of file
in->seekg( 0, std::ifstream::end );
_iFileSize = in->tellg();
in->seekg( 0, std::ifstream::beg );
return in;
}
@@ -212,6 +219,10 @@ void STEPfile::CloseInputFile( istream * in ) {
if( in && *in != std::cin ) {
delete in;
}
//reset file size
_iFileSize = 0;
_iFileCurrentPosition = 0;
}
@@ -239,10 +250,12 @@ ofstream * STEPfile::OpenOutputFile( const std::string filename ) {
_error.AppendToUserMsg( "unable to open file for output\n" );
_error.GreaterSeverity( SEVERITY_INPUT_ERROR );
}
_oFileInstsWritten = 0;
return out;
}
void STEPfile::CloseOutputFile( ostream * out ) {
_oFileInstsWritten = 0;
delete out;
}
+1
View File
@@ -13,6 +13,7 @@ extern ofstream * logStream;
#include <ExpDict.h>
#include <STEPattribute.h>
#include <SdaiHeaderSchema.h>
#include "scl_memmgr.h"
Schema * s_header_section_schema = 0;
+1
View File
@@ -5,6 +5,7 @@
// regenerate it.
#include <SdaiHeaderSchema.h>
#include "scl_memmgr.h"
void HeaderInitSchemasAndEnts( Registry & reg ) {
Uniqueness_rule_ptr ur;
+19 -12
View File
@@ -8,6 +8,7 @@
#include <ExpDict.h>
#include <STEPattribute.h>
#include <SdaiHeaderSchema.h>
#include "scl_memmgr.h"
void SdaiHEADER_SECTION_SCHEMAInit( Registry & reg ) {
header_section_schemat_time_stamp_text->ReferentType( t_sdaiSTRING );
@@ -52,12 +53,13 @@ void SdaiHEADER_SECTION_SCHEMAInit( Registry & reg ) {
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->SetBound1( 1 );
t_0->SetBound2( 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 );
s_header_section_schema->AddUnnamedType(t_0);
a_4governed_sections =
new AttrDescriptor( "governed_sections", t_0, LTrue, LFalse, AttrType_Explicit,
*header_section_schemae_file_population );
@@ -79,24 +81,26 @@ void SdaiHEADER_SECTION_SCHEMAInit( Registry & reg ) {
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->SetBound1( 1 );
t_1->SetBound2( 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 );
s_header_section_schema->AddUnnamedType(t_1);
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->SetBound1( 1 );
t_2->SetBound2( 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 );
s_header_section_schema->AddUnnamedType(t_2);
a_8organization =
new AttrDescriptor( "organization", t_2, LFalse, LFalse, AttrType_Explicit,
*header_section_schemae_file_name );
@@ -128,12 +132,13 @@ void SdaiHEADER_SECTION_SCHEMAInit( Registry & reg ) {
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->SetBound1( 1 );
t_3->SetBound2( 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 );
s_header_section_schema->AddUnnamedType(t_3);
a_13context_identifiers =
new AttrDescriptor( "context_identifiers", t_3, LFalse, LFalse, AttrType_Explicit,
*header_section_schemae_section_context );
@@ -145,12 +150,13 @@ void SdaiHEADER_SECTION_SCHEMAInit( Registry & reg ) {
ListTypeDescriptor * t_4 = new ListTypeDescriptor;
t_4->AssignAggrCreator( ( AggregateCreator ) create_StringAggregate ); // Creator function
t_4->Bound1( 1 );
t_4->Bound2( 2147483647 );
t_4->SetBound1( 1 );
t_4->SetBound2( 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 );
s_header_section_schema->AddUnnamedType(t_4);
a_14description =
new AttrDescriptor( "description", t_4, LFalse, LFalse, AttrType_Explicit,
*header_section_schemae_file_description );
@@ -167,13 +173,14 @@ void SdaiHEADER_SECTION_SCHEMAInit( Registry & reg ) {
ListTypeDescriptor * t_5 = new ListTypeDescriptor;
t_5->AssignAggrCreator( ( AggregateCreator ) create_StringAggregate ); // Creator function
t_5->Bound1( 1 );
t_5->Bound2( 2147483647 );
t_5->SetBound1( 1 );
t_5->SetBound2( 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 );
s_header_section_schema->AddUnnamedType(t_5);
a_16schema_identifiers =
new AttrDescriptor( "schema_identifiers", t_5, LFalse, LFalse, AttrType_Explicit,
*header_section_schemae_file_schema );
+1
View File
@@ -5,6 +5,7 @@
// regenerate it.
#include <SdaiSchemaInit.h>
#include "scl_memmgr.h"
void HeaderSchemaInit( Registry & reg ) {
HeaderInitSchemasAndEnts( reg );
+1 -1
View File
@@ -11,7 +11,7 @@
*/
#include <cmdmgr.h>
#include "scl_memmgr.h"
ReplicateLinkNode * ReplicateList::FindNode( MgrNode * mn ) {
ReplicateLinkNode * rln = ( ReplicateLinkNode * )GetHead();
+1
View File
@@ -18,6 +18,7 @@
#include <dispnode.h>
#include <dispnodelist.h>
#include "scl_memmgr.h"
// define this to be the name of the display object
class StepEntityEditor;
+1 -1
View File
@@ -19,7 +19,7 @@
#include <mgrnodelist.h>
#include <dispnode.h>
#include <dispnodelist.h>
#include "scl_memmgr.h"
void DisplayNodeList::Remove( GenericNode * node ) {
GenNodeList::Remove( node );
+1
View File
@@ -18,6 +18,7 @@
#include <sdai.h>
#include <instmgr.h>
#include "scl_memmgr.h"
///////////////////////////////////////////////////////////////////////////////
// debug_level >= 2 => tells when a command is chosen
+2 -2
View File
@@ -53,11 +53,11 @@ class SCL_EDITOR_EXPORT InstMgr {
virtual ~InstMgr();
// MASTER LIST OPERATIONS
int InstanceCount() {
int InstanceCount() const {
return master->Count();
}
int OwnsInstances() {
int OwnsInstances() const {
return _ownsInstances;
}
void OwnsInstances( int ownsInstances ) {

Some files were not shown because too many files have changed in this diff Show More