IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 7, 2005, 1:26:25 PM (21 years ago)
Author:
desonia
Message:

* empty log message *

Location:
trunk/psLib/src/sysUtils
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/sysUtils/psError.h

    r3115 r3145  
    1212 *  @author Eric Van Alst, MHPCC
    1313 *
    14  *  @version $Revision: 1.17 $ $Name: not supported by cvs2svn $
    15  *  @date $Date: 2005-02-03 00:54:11 $
     14 *  @version $Revision: 1.18 $ $Name: not supported by cvs2svn $
     15 *  @date $Date: 2005-02-07 23:26:24 $
    1616 *
    1717 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    116116 *  @return psErrorCode    the given error code
    117117 */
     118#ifdef DOXYGEN
     119psErrorCode 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
    118126psErrorCode p_psError(
    119127    const char* file,
     
    126134);
    127135
     136#ifndef SWIG
    128137#define psError(code,new,...) p_psError(__FILE__,__LINE__,__func__,code,new,__VA_ARGS__)
     138#endif
     139
     140#endif
    129141
    130142/** Create a new psErr struct
  • trunk/psLib/src/sysUtils/psMemory.h

    r2391 r3145  
    1212 *  @ingroup MemoryManagement
    1313 *
    14  *  @version $Revision: 1.32 $ $Name: not supported by cvs2svn $
    15  *  @date $Date: 2004-11-22 20:49:59 $
     14 *  @version $Revision: 1.33 $ $Name: not supported by cvs2svn $
     15 *  @date $Date: 2005-02-07 23:26:24 $
    1616 *
    1717 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    127127 *  @see psFree
    128128 */
    129 #ifdef DOXYGEN
     129#if defined(DOXYGEN) || defined(SWIG)
    130130psPtr psAlloc(size_t size       ///< Size required
    131131             );
    132 #else
    133 
     132#endif
     133
     134#ifndef DOXYGEN
    134135psPtr p_psAlloc(size_t size,    ///< Size required
    135136                const char *file,       ///< File of call
     
    138139
    139140/// Memory allocation. psAlloc sends file and line number to p_psAlloc.
     141#ifndef SWIG
    140142#define psAlloc(size) p_psAlloc(size, __FILE__, __LINE__)
     143#endif
     144
    141145#endif
    142146
     
    200204 *  @see psAlloc, psFree
    201205 */
    202 #ifdef DOXYGEN
     206#if defined(DOXYGEN) || defined(SWIG)
    203207psPtr 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
    209214psPtr p_psRealloc(
    210215    psPtr ptr,                         ///< Pointer to re-allocate
    211216    size_t size,                       ///< Size required
    212217    const char *file,                  ///< File of call
    213     psS32 lineno                         ///< Line number of call
     218    psS32 lineno                       ///< Line number of call
    214219);
    215220
    216221/// Memory re-allocation.  psRealloc sends file and line number to p_psRealloc.
     222#ifndef SWIG
    217223#define psRealloc(ptr, size) p_psRealloc(ptr, size, __FILE__, __LINE__)
     224#endif
    218225
    219226#endif
     
    223230 *  @see psAlloc, psRealloc
    224231 */
    225 #ifdef DOXYGEN
     232#if defined(DOXYGEN) || defined(SWIG)
    226233void 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
    231239void p_psFree(
    232     psPtr ptr,                        ///< Pointer to free
    233     const char *file,                 ///< File of call
    234     psS32 lineno                        ///< Line number of call
     240    psPtr ptr,                         ///< Pointer to free
     241    const char *file,                  ///< File of call
     242    psS32 lineno                       ///< Line number of call
    235243);
    236244
    237245/// 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
    239249
    240250#endif
     
    282292 *  @ingroup memRefCount
    283293 */
    284 #ifdef DOXYGEN
     294#if defined(DOXYGEN) || defined(SWIG)
    285295psPtr psMemIncrRefCounter(
    286296    psPtr vptr                         ///< Pointer to increment refCounter, and return
    287297);
    288 #else
    289 
     298#endif
     299
     300#ifndef DOXYGEN
    290301psPtr p_psMemIncrRefCounter(
    291302    psPtr vptr,                        ///< Pointer to increment refCounter, and return
     
    294305);
    295306
     307#ifndef SWIG
    296308#define psMemIncrRefCounter(vptr) p_psMemIncrRefCounter(vptr, __FILE__, __LINE__)
     309#endif
     310
    297311#endif
    298312
     
    304318 *                   fully dereferenced.
    305319 */
    306 #ifdef DOXYGEN
     320#if defined(DOXYGEN) || defined(SWIG)
    307321psPtr psMemDecrRefCounter(
    308322    psPtr vptr                         ///< Pointer to decrement refCounter, and return
    309323);
    310 #else
    311 
     324#endif
     325
     326#ifndef DOXYGEN
    312327psPtr p_psMemDecrRefCounter(
    313328    psPtr vptr,                        ///< Pointer to decrement refCounter, and return
     
    316331);
    317332
     333#ifndef SWIG
    318334#define psMemDecrRefCounter(vptr) p_psMemDecrRefCounter(vptr, __FILE__, __LINE__)
     335#endif
     336
    319337#endif
    320338
  • trunk/psLib/src/sysUtils/psTrace.h

    r2426 r3145  
    99 *  @author GLG, MHPCC
    1010 *
    11  *  @version $Revision: 1.28 $ $Name: not supported by cvs2svn $
    12  *  @date $Date: 2004-11-24 20:12:28 $
     11 *  @version $Revision: 1.29 $ $Name: not supported by cvs2svn $
     12 *  @date $Date: 2005-02-07 23:26:24 $
    1313 *
    1414 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    5858p_psComponent;
    5959
    60 #ifndef DOXYGEN
     60#ifdef DOXYGEN
     61void psTrace(const char *facil,        ///< facilty of interest
     62             psS32 myLevel,            ///< desired trace level
     63             ...)                      ///< trace message arguments
     64;
     65#else
    6166/// Send a trace message
    62 void p_psTrace(const char *facil,       ///< facilty of interest
    63                psS32 myLevel,     ///< desired trace level
    64                ...)             ///< trace message arguments
     67void p_psTrace(const char *facil,      ///< facilty of interest
     68               psS32 myLevel,          ///< desired trace level
     69               ...)                    ///< trace message arguments
    6570;
     71
     72#ifndef SWIG
     73#define psTrace(facil, level, ...) p_psTrace(facil, level, __VA_ARGS__)
     74#endif
     75
    6676#endif
    6777
     
    8999/* \} */// End of SystemGroup Functions
    90100
    91 #define psTrace(facil, level, ...) p_psTrace(facil, level, __VA_ARGS__)
    92101#endif
    93102
  • trunk/psLib/src/sysUtils/sysUtils.i

    r3115 r3145  
    99%include "psTrace.h"
    1010%include "psType.h"
     11
     12%inline %{
     13
     14psErrorCode psError(psErrorCode code, psBool new, const char* msg) {
     15    return p_psError("UNKNOWN",0,"SWIG",code,new,"%s",msg);
     16}
     17
     18psPtr psAlloc(size_t size) {
     19    return p_psAlloc(size,"UNKNOWN",0);
     20}
     21
     22psPtr psRealloc(psPtr ptr, size_t size) {
     23    return p_psRealloc(ptr,size,"UNKNOWN",0);
     24}
     25
     26void psFree(psPtr ptr) {
     27    p_psFree(ptr,"UNKNOWN",0);
     28}
     29
     30psPtr psMemIncrRefCounter(psPtr vptr) {
     31    return p_psMemIncrRefCounter(vptr,"UNKNOWN",0);
     32}
     33
     34psPtr psMemDecrRefCounter(psPtr vptr) {
     35    return p_psMemDecrRefCounter(vptr,"UNKNOWN",0);
     36}
     37
     38void 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.