Changeset 3145 for trunk/psLib/src/sysUtils
- Timestamp:
- Feb 7, 2005, 1:26:25 PM (21 years ago)
- Location:
- trunk/psLib/src/sysUtils
- Files:
-
- 4 edited
-
psError.h (modified) (3 diffs)
-
psMemory.h (modified) (9 diffs)
-
psTrace.h (modified) (3 diffs)
-
sysUtils.i (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/sysUtils/psError.h
r3115 r3145 12 12 * @author Eric Van Alst, MHPCC 13 13 * 14 * @version $Revision: 1.1 7$ $Name: not supported by cvs2svn $15 * @date $Date: 2005-02-0 3 00:54:11$14 * @version $Revision: 1.18 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2005-02-07 23:26:24 $ 16 16 * 17 17 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 116 116 * @return psErrorCode the given error code 117 117 */ 118 #ifdef DOXYGEN 119 psErrorCode psError( 120 psErrorCode code, ///< Error class code 121 psBool new, ///< true if error originates at this location 122 const char* fmt, 123 ... 124 ); 125 #else 118 126 psErrorCode p_psError( 119 127 const char* file, … … 126 134 ); 127 135 136 #ifndef SWIG 128 137 #define psError(code,new,...) p_psError(__FILE__,__LINE__,__func__,code,new,__VA_ARGS__) 138 #endif 139 140 #endif 129 141 130 142 /** Create a new psErr struct -
trunk/psLib/src/sysUtils/psMemory.h
r2391 r3145 12 12 * @ingroup MemoryManagement 13 13 * 14 * @version $Revision: 1.3 2$ $Name: not supported by cvs2svn $15 * @date $Date: 200 4-11-22 20:49:59$14 * @version $Revision: 1.33 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2005-02-07 23:26:24 $ 16 16 * 17 17 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 127 127 * @see psFree 128 128 */ 129 #if def DOXYGEN129 #if defined(DOXYGEN) || defined(SWIG) 130 130 psPtr psAlloc(size_t size ///< Size required 131 131 ); 132 #else 133 132 #endif 133 134 #ifndef DOXYGEN 134 135 psPtr p_psAlloc(size_t size, ///< Size required 135 136 const char *file, ///< File of call … … 138 139 139 140 /// Memory allocation. psAlloc sends file and line number to p_psAlloc. 141 #ifndef SWIG 140 142 #define psAlloc(size) p_psAlloc(size, __FILE__, __LINE__) 143 #endif 144 141 145 #endif 142 146 … … 200 204 * @see psAlloc, psFree 201 205 */ 202 #if def DOXYGEN206 #if defined(DOXYGEN) || defined(SWIG) 203 207 psPtr psRealloc( 204 psPtr ptr ///< Pointer to re-allocate 205 size_t size, ///< Size required 206 ); 207 #else 208 208 psPtr ptr, ///< Pointer to re-allocate 209 size_t size ///< Size required 210 ); 211 #endif 212 213 #ifndef DOXYGEN 209 214 psPtr p_psRealloc( 210 215 psPtr ptr, ///< Pointer to re-allocate 211 216 size_t size, ///< Size required 212 217 const char *file, ///< File of call 213 psS32 lineno ///< Line number of call218 psS32 lineno ///< Line number of call 214 219 ); 215 220 216 221 /// Memory re-allocation. psRealloc sends file and line number to p_psRealloc. 222 #ifndef SWIG 217 223 #define psRealloc(ptr, size) p_psRealloc(ptr, size, __FILE__, __LINE__) 224 #endif 218 225 219 226 #endif … … 223 230 * @see psAlloc, psRealloc 224 231 */ 225 #if def DOXYGEN232 #if defined(DOXYGEN) || defined(SWIG) 226 233 void psFree( 227 psPtr ptr, ///< Pointer to free, if NULL, function returns immediately. 228 ); 229 #else 230 234 psPtr ptr ///< Pointer to free, if NULL, function returns immediately. 235 ); 236 #endif 237 238 #ifndef DOXYGEN 231 239 void p_psFree( 232 psPtr ptr, ///< Pointer to free233 const char *file, ///< File of call234 psS32 lineno ///< Line number of call240 psPtr ptr, ///< Pointer to free 241 const char *file, ///< File of call 242 psS32 lineno ///< Line number of call 235 243 ); 236 244 237 245 /// Free memory. psFree sends file and line number to p_psFree. 238 #define psFree(size) p_psFree(size, __FILE__, __LINE__) 246 #ifndef SWIG 247 #define psFree(ptr) p_psFree(ptr, __FILE__, __LINE__) 248 #endif 239 249 240 250 #endif … … 282 292 * @ingroup memRefCount 283 293 */ 284 #if def DOXYGEN294 #if defined(DOXYGEN) || defined(SWIG) 285 295 psPtr psMemIncrRefCounter( 286 296 psPtr vptr ///< Pointer to increment refCounter, and return 287 297 ); 288 #else 289 298 #endif 299 300 #ifndef DOXYGEN 290 301 psPtr p_psMemIncrRefCounter( 291 302 psPtr vptr, ///< Pointer to increment refCounter, and return … … 294 305 ); 295 306 307 #ifndef SWIG 296 308 #define psMemIncrRefCounter(vptr) p_psMemIncrRefCounter(vptr, __FILE__, __LINE__) 309 #endif 310 297 311 #endif 298 312 … … 304 318 * fully dereferenced. 305 319 */ 306 #if def DOXYGEN320 #if defined(DOXYGEN) || defined(SWIG) 307 321 psPtr psMemDecrRefCounter( 308 322 psPtr vptr ///< Pointer to decrement refCounter, and return 309 323 ); 310 #else 311 324 #endif 325 326 #ifndef DOXYGEN 312 327 psPtr p_psMemDecrRefCounter( 313 328 psPtr vptr, ///< Pointer to decrement refCounter, and return … … 316 331 ); 317 332 333 #ifndef SWIG 318 334 #define psMemDecrRefCounter(vptr) p_psMemDecrRefCounter(vptr, __FILE__, __LINE__) 335 #endif 336 319 337 #endif 320 338 -
trunk/psLib/src/sysUtils/psTrace.h
r2426 r3145 9 9 * @author GLG, MHPCC 10 10 * 11 * @version $Revision: 1.2 8$ $Name: not supported by cvs2svn $12 * @date $Date: 200 4-11-24 20:12:28$11 * @version $Revision: 1.29 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2005-02-07 23:26:24 $ 13 13 * 14 14 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 58 58 p_psComponent; 59 59 60 #ifndef DOXYGEN 60 #ifdef DOXYGEN 61 void psTrace(const char *facil, ///< facilty of interest 62 psS32 myLevel, ///< desired trace level 63 ...) ///< trace message arguments 64 ; 65 #else 61 66 /// Send a trace message 62 void p_psTrace(const char *facil, ///< facilty of interest63 psS32 myLevel, ///< desired trace level64 ...) ///< trace message arguments67 void p_psTrace(const char *facil, ///< facilty of interest 68 psS32 myLevel, ///< desired trace level 69 ...) ///< trace message arguments 65 70 ; 71 72 #ifndef SWIG 73 #define psTrace(facil, level, ...) p_psTrace(facil, level, __VA_ARGS__) 74 #endif 75 66 76 #endif 67 77 … … 89 99 /* \} */// End of SystemGroup Functions 90 100 91 #define psTrace(facil, level, ...) p_psTrace(facil, level, __VA_ARGS__)92 101 #endif 93 102 -
trunk/psLib/src/sysUtils/sysUtils.i
r3115 r3145 9 9 %include "psTrace.h" 10 10 %include "psType.h" 11 12 %inline %{ 13 14 psErrorCode psError(psErrorCode code, psBool new, const char* msg) { 15 return p_psError("UNKNOWN",0,"SWIG",code,new,"%s",msg); 16 } 17 18 psPtr psAlloc(size_t size) { 19 return p_psAlloc(size,"UNKNOWN",0); 20 } 21 22 psPtr psRealloc(psPtr ptr, size_t size) { 23 return p_psRealloc(ptr,size,"UNKNOWN",0); 24 } 25 26 void psFree(psPtr ptr) { 27 p_psFree(ptr,"UNKNOWN",0); 28 } 29 30 psPtr psMemIncrRefCounter(psPtr vptr) { 31 return p_psMemIncrRefCounter(vptr,"UNKNOWN",0); 32 } 33 34 psPtr psMemDecrRefCounter(psPtr vptr) { 35 return p_psMemDecrRefCounter(vptr,"UNKNOWN",0); 36 } 37 38 void psTrace(const char* facil, psS32 myLevel, const char* msg) { 39 p_psTrace(facil, myLevel, msg); 40 } 41 42 %}
Note:
See TracChangeset
for help on using the changeset viewer.
