Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

Tools/Xabsl2/yabsl/vsyabsl/common.h File Reference

#include <stdlib.h>
#include <stdio.h>
#include <assert.h>
#include <malloc.h>
#include <windows.h>
#include "text.h"
#include "babelservice.h"

Include dependency graph for common.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Defines

#define ASSERT(x)   assert(x)
#define TRACE(s)   Trace(s)
#define TRACE1(s, x)   Trace(s,x)
#define TRACE2(s, x, y)   Trace(s,x,y)
#define TRACE3(s, x, y, z)   Trace(s,x,y,z)
#define TRACE_INIT(name)   TraceInit(name)
#define TRACE_DONE   TraceDone()
#define TRACE_CREATE(name, obj)   TraceCreate(name,obj)
#define TRACE_DESTROY(obj)   TraceDestroy(obj)
#define TRACE_LIVE_OBJECTS   TraceDumpObjects()
#define in
#define out
#define inout
#define OUTARG(p)   ASSERT(p); if (!(p)) return E_INVALIDARG; else *(p) = 0;
#define OUTVAR(v)   ASSERT(v); if (!(v)) return E_INVALIDARG; else VariantInit(v);
#define INOUTARG(p)   ASSERT(p); if (!(p)) return E_INVALIDARG;
#define REFARG(p)   ASSERT(p); if (!(p)) return E_INVALIDARG;
#define ALLOC(tp)   (tp*)malloc(sizeof(tp))
#define NALLOC(tp, n)   (tp*)malloc(sizeof(tp)*(n))
#define FREE(p)   if (p) { free((void*)(p)); (p) = NULL; }
#define DELETE(p)   if (p) { delete (p); (p) = NULL; }
#define RELEASE(p)   if (p) { (p)->Release(); (p) = NULL; }
#define REMOVE(p)   if (p) { while ((p)->Release() != 0) ; (p) = NULL; }
#define ADDREF(p)   ASSERT(p); if (p) { (p)->AddRef(); }
#define WINERROR   HRESULT_FROM_WIN32

Functions

void Trace (const char *format,...)
void TraceInit (const char *moduleName)
void TraceDone ()
void TraceCreate (const char *name, IUnknown *obj)
void TraceDestroy (IUnknown *obj)
void TraceDumpObjects ()
ULONG IncRefCount (inout ULONG *refCount)
ULONG DecRefCount (inout ULONG *refCount)


Define Documentation

#define ASSERT  )     assert(x)
 

Definition at line 47 of file common.h.

#define TRACE  )     Trace(s)
 

Definition at line 48 of file common.h.

Referenced by StdService::ColorCount(), CreateBabelService(), BabelServiceFactory::CreateInstance(), DllMain(), StdService::doneBuffer(), StdService::GetColorInfo(), StdService::ParseSource(), StdService::QueryInterface(), TraceDone(), and TraceDumpObjects().

#define TRACE1 s,
 )     Trace(s,x)
 

Definition at line 49 of file common.h.

Referenced by TraceCreate(), and TraceDestroy().

#define TRACE2 s,
x,
 )     Trace(s,x,y)
 

Definition at line 50 of file common.h.

Referenced by TraceCreate(), and TraceDestroy().

#define TRACE3 s,
x,
y,
 )     Trace(s,x,y,z)
 

Definition at line 51 of file common.h.

Referenced by TraceDumpObjects().

#define TRACE_INIT name   )     TraceInit(name)
 

Definition at line 53 of file common.h.

Referenced by DllMain().

#define TRACE_DONE   TraceDone()
 

Definition at line 54 of file common.h.

Referenced by DllMain().

#define TRACE_CREATE name,
obj   )     TraceCreate(name,obj)
 

Definition at line 55 of file common.h.

Referenced by BabelServiceFactory::BabelServiceFactory().

#define TRACE_DESTROY obj   )     TraceDestroy(obj)
 

Definition at line 56 of file common.h.

Referenced by BabelServiceFactory::~BabelServiceFactory().

#define TRACE_LIVE_OBJECTS   TraceDumpObjects()
 

Definition at line 57 of file common.h.

#define in
 

Definition at line 64 of file common.h.

Referenced by DebugData< T >::changeData(), MessageQueue::MessageQueue(), operator>>(), DebugDataTable::processChangeRequest(), interpol::InterpolationFactory::Read(), BallHandling::serialize(), streamDynamicArray(), streamEnum(), Streamable::streamIn(), streamObject(), and streamStaticArray().

#define out
 

Definition at line 65 of file common.h.

Referenced by GTXabsl2Profiler::init(), MessageQueue::MessageQueue(), operator<<(), LA::operator<<(), GTXabsl2EngineExecutor::sendDebugMessage(), GT2005WalkingEngine::sendPolys(), BallHandling::serialize(), GT2005WalkingEngine::streamDebugData(), streamDynamicArray(), streamEnum(), streamObject(), Streamable::streamOut(), streamStaticArray(), interpol::InterpolationFactory::Write(), GTXabsl2Profiler::writeCompleteLogToFileAndClear(), and GTXabsl2Profiler::writeLogEntriesToFileAndRemove().

#define inout
 

Definition at line 66 of file common.h.

#define OUTARG  )     ASSERT(p); if (!(p)) return E_INVALIDARG; else *(p) = 0;
 

Definition at line 72 of file common.h.

Referenced by CreateBabelService(), BabelServiceFactory::CreateInstance(), DllGetClassObject(), StdService::GetImageList(), StdService::GetTypeInfo(), StdService::GetTypeInfoCount(), StdService::QueryInterface(), and BabelServiceFactory::QueryInterface().

#define OUTVAR  )     ASSERT(v); if (!(v)) return E_INVALIDARG; else VariantInit(v);
 

Definition at line 73 of file common.h.

#define INOUTARG  )     ASSERT(p); if (!(p)) return E_INVALIDARG;
 

Definition at line 75 of file common.h.

#define REFARG  )     ASSERT(p); if (!(p)) return E_INVALIDARG;
 

Definition at line 76 of file common.h.

#define ALLOC tp   )     (tp*)malloc(sizeof(tp))
 

Definition at line 86 of file common.h.

Referenced by TraceCreate().

#define NALLOC tp,
 )     (tp*)malloc(sizeof(tp)*(n))
 

Definition at line 87 of file common.h.

#define FREE  )     if (p) { free((void*)(p)); (p) = NULL; }
 

Definition at line 89 of file common.h.

Referenced by TraceDestroy(), and TraceDone().

#define DELETE  )     if (p) { delete (p); (p) = NULL; }
 

Definition at line 90 of file common.h.

#define RELEASE  )     if (p) { (p)->Release(); (p) = NULL; }
 

Definition at line 91 of file common.h.

Referenced by BabelServiceFactory::CreateInstance(), DllGetClassObject(), DllMain(), StdService::doneBuffer(), StdService::loadScope(), LoadTypeInfo(), StdService::searchFile(), and LexBuffer::~LexBuffer().

#define REMOVE  )     if (p) { while ((p)->Release() != 0) ; (p) = NULL; }
 

Definition at line 92 of file common.h.

#define ADDREF  )     ASSERT(p); if (p) { (p)->AddRef(); }
 

Definition at line 93 of file common.h.

#define WINERROR   HRESULT_FROM_WIN32
 

Definition at line 107 of file common.h.

Referenced by RegDeleteRecursive().


Function Documentation

void Trace const char *  format,
... 
 

Definition at line 34 of file common.cpp.

References g_traceGuard, g_traceModuleName, and g_traceThreadID.

void TraceInit const char *  moduleName  ) 
 

void TraceDone  ) 
 

Definition at line 111 of file common.cpp.

References FREE, g_traceGuard, ObjectInfo::next, objectList, TRACE, and TraceDumpObjects().

Here is the call graph for this function:

void TraceCreate const char *  name,
IUnknown *  obj
 

Definition at line 140 of file common.cpp.

References ALLOC, g_traceGuard, ObjectInfo::name, ObjectInfo::next, ObjectInfo::obj, objectList, TRACE1, and TRACE2.

void TraceDestroy IUnknown *  obj  ) 
 

Definition at line 161 of file common.cpp.

References FREE, g_traceGuard, ObjectInfo::name, ObjectInfo::next, ObjectInfo::obj, objectList, TRACE1, and TRACE2.

void TraceDumpObjects  ) 
 

Definition at line 82 of file common.cpp.

References g_traceGuard, ObjectInfo::name, ObjectInfo::next, ObjectInfo::obj, objectList, TRACE, and TRACE3.

Referenced by TraceDone().

ULONG IncRefCount inout ULONG *  refCount  ) 
 

Definition at line 15 of file common.cpp.

Referenced by BabelServiceFactory::LockServer(), and STDMETHODIMP_().

ULONG DecRefCount inout ULONG *  refCount  ) 
 

Definition at line 20 of file common.cpp.

Referenced by BabelServiceFactory::LockServer().


Generated on Mon Mar 20 22:10:35 2006 for GT2005 by doxygen 1.3.6