Alex Lin 19025d77ad Standardize directory names
Reorganized.  Created a new top level include directory that will hold all of Trick's header files. Moved all of the Trick headers to this directory.  Created a libexec directory that holds all of the executables that users don't need to execute directly.  Changed all of the executables remaining in bin to start with "trick-".  In the sim_services directories changed all source files to find the Trick headers in their new location.  Since all of the include files are gone in sim_services, removed the src directories as well, moving all of the source files up a level.  Moved the makefiles, docs, man, and other architecture independent files into a top level share directory.  Renamed lib_${TRICK_HOST_CPU} to lib64 or lib depending on the platform we're currently on.

refs #63
2015-06-09 08:44:42 -05:00

103 lines
3.5 KiB
OpenEdge ABL

/* include support for STLs */
%include "std_list.i"
%include "std_map.i"
%include "std_string.i"
%include "std_vector.i"
%include "trick_swig/swig_extend_str.i"
%include "trick_swig/swig_class_typedef.i"
%include "trick_swig/cast_as.i"
%include "trick_swig/swig_int_typemap.i"
/* SWIG can't understand GNU C keyword "__attribute__" */
#ifdef SWIG
#define __attribute__(x)
#endif
%{
#include <sstream>
#include "trick/UnitsMap.hh"
#include "trick/Unit.hh"
#include "trick/MemoryManager.hh"
#include "trick/reference.h"
#include "trick/memorymanager_c_intf.h"
#include "trick/PythonPrint.hh"
#ifndef SWIG_as_voidptr
#define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a))
#endif
#ifndef SWIG_as_voidptrptr
#define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a))
#endif
#ifndef SWIG_IsOK
#define SWIG_IsOK(r) (r >= 0)
#endif
#ifndef SWIG_Error
#define SWIG_Error(code, msg) std::cout<<"SWIG_Error(errorcode, "<<msg<<")"<<std::endl
#endif
#ifndef SWIG_exception_fail
#define SWIG_exception_fail(code, msg) std::cout<<"SWIG_exception_fail(errorcode, "<<msg<<")"<<std::endl
#endif
#ifndef Py_RETURN_TRUE
#define Py_RETURN_TRUE return Py_INCREF(Py_True), Py_True
#endif
#ifndef Py_RETURN_FALSE
#define Py_RETURN_FALSE return Py_INCREF(Py_False), Py_False
#endif
#ifndef Py_RETURN_NONE
#define Py_RETURN_NONE return Py_INCREF(Py_None), Py_None
#endif
%}
// This pythoncode section overrides the default swig defined functions in each py file.
// It sets the "static" argument to 1 which disallows new attributes
// to be created in our classes.
// It also provides more information to the user about how to correct the problem
#if SWIG_VERSION > 0x010321
%pythoncode %{
def _swig_getattr(self,class_type,name):
if (name == "thisown"): return self.this.own()
method = class_type.__swig_getmethods__.get(name,None)
if method: return method(self)
all_keys = [attr for attr in dir(class_type) if not attr.startswith('__')and attr != '_s' ]
data_keys = sorted(class_type.__swig_setmethods__.keys())
method_keys = [ x for x in all_keys if x not in data_keys ]
raise AttributeError("Type %s does not contain member %s.\n%s data = %s\n%s methods = %s" %
(self.__class__.__name__,name,self.__class__.__name__,data_keys,self.__class__.__name__,method_keys))
def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
if (name == "thisown"): return self.this.own(value)
if (name == "this"):
# this line is changed to handle older swigs that used PySwigObject instead of the current SwigPyObject
if type(value).__name__ == 'SwigPyObject' or type(value).__name__ == 'PySwigObject' :
self.__dict__[name] = value
return
method = class_type.__swig_setmethods__.get(name,None)
if method: return method(self,value)
if (not static) or hasattr(self,name):
self.__dict__[name] = value
else:
all_keys = [attr for attr in dir(class_type) if not attr.startswith('__') and attr != '_s' ]
data_keys = sorted(class_type.__swig_setmethods__.keys())
method_keys = [ x for x in all_keys if x not in data_keys ]
raise AttributeError("Type %s does not contain member %s.\n%s data = %s\n%s methods = %s" %
(self.__class__.__name__,name,self.__class__.__name__,data_keys,self.__class__.__name__,method_keys))
def _swig_setattr(self,class_type,name,value):
return _swig_setattr_nondynamic(self,class_type,name,value,1)
%}
#endif