Skip to content

Commit 275977d

Browse files
committed
remove unused code, clean up formatting
1 parent a0353bc commit 275977d

36 files changed

+1429
-3504
lines changed

CMakeLists.txt

Lines changed: 50 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
# Minimum required version of CMake
4242
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
4343
IF(COMMAND CMAKE_POLICY)
44-
CMAKE_POLICY(SET CMP0003 NEW)
44+
CMAKE_POLICY(SET CMP0003 NEW)
4545
ENDIF(COMMAND CMAKE_POLICY)
4646

4747
# set CMake project name
@@ -77,22 +77,22 @@ SET(_orig_lc_all $ENV{LC_ALL})
7777
SET(_orig_lc_messages $ENV{LC_MESSAGES})
7878
SET(_orig_lang $ENV{LANG})
7979
IF(_orig_lc_all)
80-
SET(ENV{LC_ALL} C)
80+
SET(ENV{LC_ALL} C)
8181
ENDIF(_orig_lc_all)
8282
IF(_orig_lc_messages)
83-
SET(ENV{LC_MESSAGES} C)
83+
SET(ENV{LC_MESSAGES} C)
8484
ENDIF(_orig_lc_messages)
8585
IF(_orig_lang)
86-
SET(ENV{LANG} C)
86+
SET(ENV{LANG} C)
8787
ENDIF(_orig_lang)
8888

8989
# For NFS volumes, to ensure proper file creation.
9090
IF(NOT WIN32)
91-
IF(NOT UMASK)
92-
EXEC_PROGRAM(umask ARGS 022 OUTPUT_VARIABLE exec_out)
93-
ELSE(NOT UMASK)
94-
EXEC_PROGRAM(umask ARGS ${UMASK} OUTPUT_VARIABLE exec_out)
95-
ENDIF(NOT UMASK)
91+
IF(NOT UMASK)
92+
EXEC_PROGRAM(umask ARGS 022 OUTPUT_VARIABLE exec_out)
93+
ELSE(NOT UMASK)
94+
EXEC_PROGRAM(umask ARGS ${UMASK} OUTPUT_VARIABLE exec_out)
95+
ENDIF(NOT UMASK)
9696
ENDIF(NOT WIN32)
9797

9898
#---------------------------------------------------------------------
@@ -109,7 +109,7 @@ SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
109109

110110
# the RPATH/INSTALL_NAME_DIR to be used when installing
111111
if (NOT APPLE)
112-
SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
112+
SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
113113
endif(NOT APPLE)
114114
SET(CMAKE_INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib")
115115

@@ -121,34 +121,34 @@ SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
121121
#-----------------------------------------------------------------------------
122122
# Output directories.
123123
IF(NOT CMAKE_LIBRARY_OUTPUT_DIRECTORY)
124-
IF(WIN32)
125-
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${SCL_BINARY_DIR}/bin CACHE INTERNAL "Single output directory for building all libraries.")
126-
ELSE(WIN32)
127-
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${SCL_BINARY_DIR}/lib CACHE INTERNAL "Single output directory for building all libraries.")
128-
ENDIF(WIN32)
124+
IF(WIN32)
125+
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${SCL_BINARY_DIR}/bin CACHE INTERNAL "Single output directory for building all libraries.")
126+
ELSE(WIN32)
127+
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${SCL_BINARY_DIR}/lib CACHE INTERNAL "Single output directory for building all libraries.")
128+
ENDIF(WIN32)
129129
ENDIF(NOT CMAKE_LIBRARY_OUTPUT_DIRECTORY)
130130
IF(NOT CMAKE_ARCHIVE_OUTPUT_DIRECTORY)
131-
SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${SCL_BINARY_DIR}/lib CACHE INTERNAL "Single output directory for building all archives.")
131+
SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${SCL_BINARY_DIR}/lib CACHE INTERNAL "Single output directory for building all archives.")
132132
ENDIF(NOT CMAKE_ARCHIVE_OUTPUT_DIRECTORY)
133133
IF(NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY)
134-
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${SCL_BINARY_DIR}/bin CACHE INTERNAL "Single output directory for building all executables.")
134+
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${SCL_BINARY_DIR}/bin CACHE INTERNAL "Single output directory for building all executables.")
135135
ENDIF(NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY)
136136

137137
FOREACH(CFG_TYPE ${CMAKE_CONFIGURATION_TYPES})
138-
STRING(TOUPPER "${CFG_TYPE}" CFG_TYPE)
139-
IF(NOT "CMAKE_LIBRARY_OUTPUT_DIRECTORY_${CFG_TYPE}")
140-
IF(WIN32)
141-
SET("CMAKE_LIBRARY_OUTPUT_DIRECTORY_${CFG_TYPE}" ${SCL_BINARY_DIR}/bin CACHE INTERNAL "Single output directory for building all libraries.")
142-
ELSE(WIN32)
143-
SET("CMAKE_LIBRARY_OUTPUT_DIRECTORY_${CFG_TYPE}" ${SCL_BINARY_DIR}/lib CACHE INTERNAL "Single output directory for building all libraries.")
144-
ENDIF(WIN32)
145-
ENDIF(NOT "CMAKE_LIBRARY_OUTPUT_DIRECTORY_${CFG_TYPE}")
146-
IF(NOT "CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${CFG_TYPE}")
147-
SET("CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${CFG_TYPE}" ${SCL_BINARY_DIR}/lib CACHE INTERNAL "Single output directory for building all archives.")
148-
ENDIF(NOT "CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${CFG_TYPE}")
149-
IF(NOT "CMAKE_RUNTIME_OUTPUT_DIRECTORY_${CFG_TYPE}")
150-
SET("CMAKE_RUNTIME_OUTPUT_DIRECTORY_${CFG_TYPE}" ${SCL_BINARY_DIR}/bin CACHE INTERNAL "Single output directory for building all executables.")
151-
ENDIF(NOT "CMAKE_RUNTIME_OUTPUT_DIRECTORY_${CFG_TYPE}")
138+
STRING(TOUPPER "${CFG_TYPE}" CFG_TYPE)
139+
IF(NOT "CMAKE_LIBRARY_OUTPUT_DIRECTORY_${CFG_TYPE}")
140+
IF(WIN32)
141+
SET("CMAKE_LIBRARY_OUTPUT_DIRECTORY_${CFG_TYPE}" ${SCL_BINARY_DIR}/bin CACHE INTERNAL "Single output directory for building all libraries.")
142+
ELSE(WIN32)
143+
SET("CMAKE_LIBRARY_OUTPUT_DIRECTORY_${CFG_TYPE}" ${SCL_BINARY_DIR}/lib CACHE INTERNAL "Single output directory for building all libraries.")
144+
ENDIF(WIN32)
145+
ENDIF(NOT "CMAKE_LIBRARY_OUTPUT_DIRECTORY_${CFG_TYPE}")
146+
IF(NOT "CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${CFG_TYPE}")
147+
SET("CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${CFG_TYPE}" ${SCL_BINARY_DIR}/lib CACHE INTERNAL "Single output directory for building all archives.")
148+
ENDIF(NOT "CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${CFG_TYPE}")
149+
IF(NOT "CMAKE_RUNTIME_OUTPUT_DIRECTORY_${CFG_TYPE}")
150+
SET("CMAKE_RUNTIME_OUTPUT_DIRECTORY_${CFG_TYPE}" ${SCL_BINARY_DIR}/bin CACHE INTERNAL "Single output directory for building all executables.")
151+
ENDIF(NOT "CMAKE_RUNTIME_OUTPUT_DIRECTORY_${CFG_TYPE}")
152152
ENDFOREACH()
153153

154154

@@ -159,18 +159,18 @@ ENDFOREACH()
159159
# for Windows. Only do this if CMAKE_INSTALL_PREFIX hasn't been set
160160
# already, to try and allow parent builds (if any) some control.
161161
IF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
162-
IF(NOT WIN32)
163-
IF ("${CMAKE_BUILD_TYPE}" MATCHES "Release")
164-
SET(CMAKE_INSTALL_PREFIX "/usr")
165-
ELSEIF ("${CMAKE_BUILD_TYPE}" MATCHES "Debug")
166-
MESSAGE("setting debug output dir")
167-
SET(CMAKE_INSTALL_PREFIX "${SCL_SOURCE_DIR}/../scl-install")
168-
ELSE("${CMAKE_BUILD_TYPE}" MATCHES "Release")
169-
SET(CMAKE_INSTALL_PREFIX "/usr/local")
170-
ENDIF ("${CMAKE_BUILD_TYPE}" MATCHES "Release")
171-
ENDIF(NOT WIN32)
172-
SET(CMAKE_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX} CACHE STRING "SCL install prefix" FORCE)
173-
SET(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT 0)
162+
IF(NOT WIN32)
163+
IF ("${CMAKE_BUILD_TYPE}" MATCHES "Release")
164+
SET(CMAKE_INSTALL_PREFIX "/usr")
165+
ELSEIF ("${CMAKE_BUILD_TYPE}" MATCHES "Debug")
166+
MESSAGE("setting debug output dir")
167+
SET(CMAKE_INSTALL_PREFIX "${SCL_SOURCE_DIR}/../scl-install")
168+
ELSE("${CMAKE_BUILD_TYPE}" MATCHES "Release")
169+
SET(CMAKE_INSTALL_PREFIX "/usr/local")
170+
ENDIF ("${CMAKE_BUILD_TYPE}" MATCHES "Release")
171+
ENDIF(NOT WIN32)
172+
SET(CMAKE_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX} CACHE STRING "SCL install prefix" FORCE)
173+
SET(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT 0)
174174
ENDIF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
175175

176176
OPTION(SCL-BUILD_EXPRESS_ONLY "Only build express parser." OFF)
@@ -200,17 +200,19 @@ CHECK_FUNCTION_EXISTS(memmove HAVE_MEMMOVE)
200200

201201
CHECK_TYPE_SIZE("ssize_t" SSIZE_T)
202202

203+
204+
203205
# Now that all the tests are done, configure the scl_cf.h file:
204206
configure_file(${SCL_BINARY_DIR}/include/scl_cf.h.in ${SCL_BINARY_DIR}/include/scl_cf.h)
205207

206208
add_definitions(
207-
-DHAVE_CONFIG_H -Wall
208-
)
209+
-DHAVE_CONFIG_H -Wall
210+
)
209211

210212
include_directories(
211-
${SCL_SOURCE_DIR}/include
212-
${SCL_BINARY_DIR}/include
213-
)
213+
${SCL_SOURCE_DIR}/include
214+
${SCL_BINARY_DIR}/include
215+
)
214216

215217
ADD_SUBDIRECTORY(src/express)
216218
ADD_SUBDIRECTORY(src/exppp)

src/cldai/sdaiDaObject.h

Lines changed: 6 additions & 115 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,7 @@
11
#ifndef SDAIDAOBJECT_H
22
#define SDAIDAOBJECT_H 1
33

4-
/*
5-
#include <sclprefixes.h>
6-
7-
#ifdef PART26
8-
#include <CORBA.h>
9-
#include <corbaIncludes.h>
10-
#else
11-
typedef char* DAObjectID;
12-
#endif
13-
14-
#include <Object.h>
15-
*/
16-
17-
#ifndef PART26
184
typedef char* SCLP23_NAME(DAObjectID);
19-
#endif
205

216
// interface PID (ISO/DIS 10303-23:1996(E) 5.3.10.1)
227
// Also, CORBA POS specification, Section 5.4
@@ -56,7 +41,6 @@ class SCLP23_NAME(PID) : public SCLP23_NAME(sdaiObject)
5641
SCLP23_NAME(PID)();
5742
virtual ~SCLP23_NAME(PID)();
5843

59-
#ifndef PART26
6044
/*
6145
The Datestore_type attribute shall identify the type of the underlying
6246
datastore.
@@ -68,23 +52,8 @@ class SCLP23_NAME(PID) : public SCLP23_NAME(sdaiObject)
6852
This function shall return a string version of the receiver.
6953
*/
7054
char* get_PIDString();
71-
#else
72-
virtual void datastore_type (const char * x, CORBA::Environment &IT_env=CORBA::IT_chooseDefaultEnv ()) throw (CORBA::SystemException)
73-
{ _datastore_type = x; }
74-
75-
virtual char * datastore_type (CORBA::Environment &IT_env=CORBA::IT_chooseDefaultEnv ()) throw (CORBA::SystemException)
76-
{ return CORBA::string_dupl(_datastore_type); }
77-
78-
virtual char * get_PIDString (CORBA::Environment &IT_env=CORBA::IT_chooseDefaultEnv ()) throw (CORBA::SystemException)
79-
{ return CORBA::string_dupl(_pidstring); }
80-
#endif
81-
8255
};
8356

84-
#ifdef PART26
85-
//DEF_TIE_PID( SCLP23_NAME(PID) )
86-
#endif
87-
8857
typedef SCLP23_NAME(PID)* SCLP23_NAME(PID_ptr);
8958
typedef SCLP23_NAME(PID_ptr) SCLP23_NAME(PID_var);
9059

@@ -132,25 +101,11 @@ class SCLP23_NAME(PID_DA): public SCLP23_NAME(PID)
132101
SCLP23_NAME(PID_DA)();
133102
virtual ~SCLP23_NAME(PID_DA)();
134103

135-
#ifndef PART26
136104
virtual void oid (const SCLP23_NAME(DAObjectID) x) { _oid = x; }
137105
virtual SCLP23_NAME(DAObjectID) oid () const
138106
{ return const_cast<char *>(_oid.c_str()); }
139-
#else
140-
// virtual void oid (const SCLP26(DAObjectID) x, CORBA::Environment &IT_env=CORBA::IT_chooseDefaultEnv ()) throw (CORBA::SystemException)
141-
virtual void oid (const DAObjectID x, CORBA::Environment &IT_env=CORBA::IT_chooseDefaultEnv ()) throw (CORBA::SystemException)
142-
{ _oid = x; }
143-
// virtual SCLP26(DAObjectID) oid (CORBA::Environment &IT_env=CORBA::IT_chooseDefaultEnv ()) throw (CORBA::SystemException)
144-
virtual DAObjectID oid (CORBA::Environment &IT_env=CORBA::IT_chooseDefaultEnv ()) throw (CORBA::SystemException)
145-
{ return CORBA::string_dupl(_oid); }
146-
#endif
147-
148107
};
149108

150-
#ifdef PART26
151-
//DEF_TIE_PID_DA( SCLP23(PID_DA) )
152-
#endif
153-
154109
typedef SCLP23_NAME(PID_DA)* SCLP23_NAME(PID_DA_ptr);
155110
typedef SCLP23_NAME(PID_DA_ptr) SCLP23_NAME(PID_DA_var);
156111

@@ -164,10 +119,6 @@ class SCLP23_NAME(PID_SDAI) : public SCLP23_NAME(PID)
164119
public:
165120
SCLP23_NAME(String) _modelid ;
166121

167-
// static PID_SDAI_ptr _duplicate(PID_SDAI_ptr);
168-
// static PID_SDAI_ptr _narrow(SCLP23_NAME(sdaiObject_ptr));
169-
// static PID_SDAI_ptr _nil();
170-
171122
// constructor/destructor
172123
SCLP23_NAME(PID_SDAI)();
173124
virtual ~SCLP23_NAME(PID_SDAI)();
@@ -178,23 +129,10 @@ class SCLP23_NAME(PID_SDAI) : public SCLP23_NAME(PID)
178129
// the persistent identifier of the cluster of data for the
179130
// Model_contents referred to by this PID.
180131
//
181-
#ifndef PART26
182132
virtual void Modelid (const char * x) { _modelid = x; }
183133
virtual char * Modelid () const { return const_cast<char *>(_modelid.c_str()); }
184-
#else
185-
virtual void Modelid (const char * x, CORBA::Environment &IT_env=CORBA::IT_chooseDefaultEnv ()) throw (CORBA::SystemException)
186-
{ _modelid = x; }
187-
188-
virtual char * Modelid (CORBA::Environment &IT_env=CORBA::IT_chooseDefaultEnv ()) throw (CORBA::SystemException)
189-
{ return CORBA::string_dupl(_modelid); }
190-
#endif
191-
192134
};
193135

194-
#ifdef PART26
195-
//DEF_TIE_PID_SDAI( SCLP23(PID_SDAI) )
196-
#endif
197-
198136
typedef SCLP23_NAME(PID_SDAI)* SCLP23_NAME(PID_SDAI_ptr);
199137
typedef SCLP23_NAME(PID_SDAI_ptr) SCLP23_NAME(PID_SDAI_var);
200138

@@ -215,14 +153,10 @@ typedef SCLP23_NAME(DAObject)* SCLP23_NAME(DAObject_ptr);
215153
typedef SCLP23_NAME(DAObject_ptr) SCLP23_NAME(DAObject_var);
216154

217155
class SCLP23_NAME(DAObject) : public SCLP23_NAME(sdaiObject)
218-
//class DAObject : public SCLP23_NAME(sdaiObject)
219156
{
220157
public:
221158

222159
SCLP23_NAME(String) _dado_oid;
223-
// static DAObject_ptr _duplicate(DAObject_ptr);
224-
// static DAObject_ptr _narrow(SCLP23_NAME(sdaiObject_ptr));
225-
// static DAObject_ptr _nil();
226160

227161
// dado_same (ISO/DIS 10303-23:1996(E) 5.3.10.5)
228162
//
@@ -238,21 +172,9 @@ class SCLP23_NAME(DAObject) : public SCLP23_NAME(sdaiObject)
238172
SCLP23_NAME(DAObject)();
239173
virtual ~SCLP23_NAME(DAObject)();
240174

241-
#ifdef PART26
242-
// virtual SCLP26(Application_instance_ptr) create_TIE();
243-
virtual IDL_Application_instance_ptr create_TIE();
244-
#endif
245-
246-
#ifndef PART26
247-
Boolean dado_same(SCLP23_NAME(DAObject_ptr) obj)
248-
{
249-
// this will make the compiler happy that we used obj
250-
strcmp(obj->dado_oid(),dado_oid());
251-
return BUnset;
252-
}
253-
#else
254-
virtual Boolean dado_same (SCLP23_NAME(DAObject_ptr) obj, CORBA::Environment &IT_env=CORBA::IT_chooseDefaultEnv ()) throw (CORBA::SystemException) { return BUnset; }
255-
#endif
175+
Logical dado_same(SCLP23_NAME(DAObject_ptr) obj) {
176+
return LUnknown;
177+
}
256178

257179
// Get persistent label (ISO/DIS 10303-22:1996(E) 10.11.6)
258180
//
@@ -283,14 +205,8 @@ class SCLP23_NAME(DAObject) : public SCLP23_NAME(sdaiObject)
283205
note that the return value as described in the text above
284206
should be a string type.
285207
*/
286-
#ifndef PART26
287208
SCLP23_NAME(DAObjectID) dado_oid()
288209
{ return const_cast<char *>(_dado_oid.c_str()); }
289-
#else
290-
// virtual SCLP26(DAObjectID) dado_oid (CORBA::Environment &IT_env=CORBA::IT_chooseDefaultEnv ()) throw (CORBA::SystemException)
291-
virtual DAObjectID dado_oid (CORBA::Environment &IT_env=CORBA::IT_chooseDefaultEnv ()) throw (CORBA::SystemException)
292-
{ return CORBA::string_dupl(_dado_oid); }
293-
#endif
294210

295211
// dado_pid
296212
//
@@ -301,13 +217,7 @@ class SCLP23_NAME(DAObject) : public SCLP23_NAME(sdaiObject)
301217
part of interface DAObject in the specification of the
302218
Persistent Object Service.
303219
*/
304-
#ifndef PART26
305-
SCLP23_NAME(PID_DA_ptr) dado_pid()
306-
{ return 0; }
307-
#else
308-
virtual SCLP23_NAME(PID_DA_ptr) dado_pid (CORBA::Environment &IT_env=CORBA::IT_chooseDefaultEnv ()) throw (CORBA::SystemException)
309-
{ return 0; }
310-
#endif
220+
SCLP23_NAME(PID_DA_ptr) dado_pid() { return 0; }
311221

312222
// dado_remove (ISO/DIS 10303-23:1996(E) 5.3.10.5)
313223
//
@@ -318,13 +228,7 @@ class SCLP23_NAME(DAObject) : public SCLP23_NAME(sdaiObject)
318228
// POS specification description: This deletes the object from the
319229
// persistent store and deletes the in-memory data object.
320230
//
321-
#ifndef PART26
322-
void dado_remove()
323-
{ }
324-
#else
325-
virtual void dado_remove (CORBA::Environment &IT_env=CORBA::IT_chooseDefaultEnv ()) throw (CORBA::SystemException)
326-
{ }
327-
#endif
231+
void dado_remove() { }
328232

329233
// dado_free (ISO/DIS 10303-23:1996(E) 5.3.10.5)
330234
//
@@ -338,14 +242,7 @@ class SCLP23_NAME(DAObject) : public SCLP23_NAME(sdaiObject)
338242
// referenced. This operation is only a hint and is provided to improve
339243
// performance and resource usage.
340244
//
341-
#ifndef PART26
342-
void dado_free()
343-
{ }
344-
#else
345-
virtual void dado_free (CORBA::Environment &IT_env=CORBA::IT_chooseDefaultEnv ()) throw (CORBA::SystemException)
346-
{ }
347-
#endif
348-
245+
void dado_free() { }
349246
};
350247

351248
/*
@@ -356,15 +253,9 @@ class SCLP23_NAME(DAObject_SDAI) : public SCLP23_NAME(DAObject) {
356253

357254
public:
358255
SCLP23_NAME(DAObject_SDAI)();
359-
// SCLP23_NAME(DAObject_SDAI)(const SCLP23_NAME(DAObject_SDAI)&);
360256

361257
virtual ~SCLP23_NAME(DAObject_SDAI)();
362258

363-
#ifdef PART26
364-
// virtual SCLP26(Application_instance_ptr) create_TIE();
365-
virtual IDL_Application_instance_ptr create_TIE();
366-
#endif
367-
368259
/*
369260
5.3.10.1.1 Find entity instance SDAI-model
370261
*/

0 commit comments

Comments
 (0)