GME  13
Classes | Defines | Typedefs | Functions | Variables
MgaTrukk.h File Reference

Go to the source code of this file.

Classes

struct  coreobj_hashfunc
class  FCOPtr
struct  FCOPtr_hashfunc
class  IMyErrorInfoBase
class  IMyErrorInfoImpl< piid >
class  Transaction
class  booltempflag

Defines

#define DIM(x)   (sizeof(x)/ sizeof((x)[0]))
#define COLLECTIONTYPE_FOR2(t1, t2)   CCoreCollection<t2, std::vector<t1*>, t1, t1>
#define CREATECOLLECTION_FOR2(t1, t2, q)   CComPtr< COLLECTIONTYPE_FOR2(t1, t2) > q; CreateComObject(q);
#define COLLECTIONTYPE_FOR(t)   COLLECTIONTYPE_FOR2(t, t##s)
#define CREATECOLLECTION_FOR(t, q)   CREATECOLLECTION_FOR2(t, t##s, q)
#define ITERATE_THROUGH(ci)
#define ITERATE_THROUGH_BACK(ci)
#define ITER   (*it_i)
#define ITER_BROKEN   (it_i != it_e)
#define COM_EQUAL(a, b)   (static_cast<IUnknown *>(a) == b ? true : a.IsEqualObject(b))
#define CHECK_INPTRPAR(p)   { if(p == NULL) COMTHROW( E_MGA_INPTR_NULL); }
#define CHECK_MYINPTRPARVALIDNULL(p)   { if(p != NULL) COMTHROW(p->CheckProject(mgaproject)); }
#define CHECK_MYINPTRPAR(p)
#define CHECK_MYINPTRSPAR(p)
#define CHECK_MYINPTRSPARFOLDER(p)
#define CHECK_INSTRPAR(p)   { }
#define CHECK_OUTSTRPAR(p)   { if(p == NULL) COMTHROW(E_MGA_OUTPTR_NULL); if(*p != NULL) COMTHROW(E_MGA_OUTPTR_NONEMPTY); }
#define CHECK_OUTPTRPAR(p)   { if(p == NULL) COMTHROW(E_MGA_OUTPTR_NULL); if(*p != NULL) COMTHROW(E_MGA_OUTPTR_NONEMPTY); }
#define CHECK_OUTPTRPARVALIDNULL(p)   { if(p != NULL && *p != NULL) COMTHROW(E_MGA_OUTPTR_NONEMPTY); }
#define CHECK_INPAR(p)
#define CHECK_INBOOLPAR(p)   { if(p != VARIANT_FALSE && p != VARIANT_TRUE) COMTHROW(E_MGA_BAD_ENUMVALUE); }
#define CHECK_OUTPAR(p)   { if(p == NULL) COMTHROW(E_MGA_OUTPTR_NULL); }
#define CHECK_OUTVARIANTPAR(p)   { if(p == NULL) COMTHROW(E_MGA_OUTPTR_NULL); }
#define DEFSIG
#define INITSIG(a)
#define MARKSIG(a)
#define ISupportErrorInfoImpl   IMyErrorInfoImpl
#define COMTRY_IN_TRANSACTION
#define COMRETURN_IN_TRANSACTION(hr)
#define COMCATCH_IN_TRANSACTION(CLEANUP)
#define MGAPREF_NO_NESTED_TX   0x00000080
#define COMTRY_IN_TRANSACTION_MAYBE
#define COMCATCH_IN_TRANSACTION_MAYBE(CLEANUP)
#define COMRETURN_IN_TRANSACTION_MAYBE(hr)
#define MODIFIED   { if(mgaproject->opened < 1000) mgaproject->opened++; }
#define COMCATCH(CLEANUP)

Typedefs

typedef CComBSTR CComBSTRNoAt
typedef stdext::hash_map
< CoreObj, CoreObj,
coreobj_hashfunc
coreobjpairhash
typedef stdext::hash_map
< CoreObj, int,
coreobj_hashfunc
coreobjhash

Functions

template<class COLLITF >
void GetAll2 (COLLITF *coll, std::vector< CoreObj > &ret)
template<class avt >
void Sort (CoreObjs &coll, attrid_type ai)
CComBSTR Now (void)
 THROW!!!
bool MgaSetErrorInfo (HRESULT hr)

Variables

const CoreObj NULLCOREOBJ
const CComVariant NULLVARIANT

Define Documentation

#define CHECK_INBOOLPAR (   p)    { if(p != VARIANT_FALSE && p != VARIANT_TRUE) COMTHROW(E_MGA_BAD_ENUMVALUE); }

Definition at line 74 of file MgaTrukk.h.

#define CHECK_INPAR (   p)

Definition at line 73 of file MgaTrukk.h.

#define CHECK_INPTRPAR (   p)    { if(p == NULL) COMTHROW( E_MGA_INPTR_NULL); }

Definition at line 59 of file MgaTrukk.h.

#define CHECK_INSTRPAR (   p)    { }

Definition at line 69 of file MgaTrukk.h.

#define CHECK_MYINPTRPAR (   p)
Value:
{ if(p == NULL)                          COMTHROW( E_MGA_INPTR_NULL); \
                                                                COMTHROW(p->CheckProject(mgaproject)); }

Definition at line 61 of file MgaTrukk.h.

#define CHECK_MYINPTRPARVALIDNULL (   p)    { if(p != NULL) COMTHROW(p->CheckProject(mgaproject)); }

Definition at line 60 of file MgaTrukk.h.

#define CHECK_MYINPTRSPAR (   p)
Value:
{ if(p == NULL)                          COMTHROW( E_MGA_INPTR_NULL); \
                                                                COMTHROW( mgaproject->CheckCollection(p)); }

Definition at line 63 of file MgaTrukk.h.

#define CHECK_MYINPTRSPARFOLDER (   p)
Value:
{ if(p == NULL)                          COMTHROW( E_MGA_INPTR_NULL); \
                                                                COMTHROW( mgaproject->CheckFolderCollection(p)); }

Definition at line 66 of file MgaTrukk.h.

#define CHECK_OUTPAR (   p)    { if(p == NULL) COMTHROW(E_MGA_OUTPTR_NULL); }

Definition at line 75 of file MgaTrukk.h.

#define CHECK_OUTPTRPAR (   p)    { if(p == NULL) COMTHROW(E_MGA_OUTPTR_NULL); if(*p != NULL) COMTHROW(E_MGA_OUTPTR_NONEMPTY); }

Definition at line 71 of file MgaTrukk.h.

#define CHECK_OUTPTRPARVALIDNULL (   p)    { if(p != NULL && *p != NULL) COMTHROW(E_MGA_OUTPTR_NONEMPTY); }

Definition at line 72 of file MgaTrukk.h.

#define CHECK_OUTSTRPAR (   p)    { if(p == NULL) COMTHROW(E_MGA_OUTPTR_NULL); if(*p != NULL) COMTHROW(E_MGA_OUTPTR_NONEMPTY); }

Definition at line 70 of file MgaTrukk.h.

#define CHECK_OUTVARIANTPAR (   p)    { if(p == NULL) COMTHROW(E_MGA_OUTPTR_NULL); }

Definition at line 76 of file MgaTrukk.h.

#define COLLECTIONTYPE_FOR (   t)    COLLECTIONTYPE_FOR2(t, t##s)

Definition at line 24 of file MgaTrukk.h.

#define COLLECTIONTYPE_FOR2 (   t1,
  t2 
)    CCoreCollection<t2, std::vector<t1*>, t1, t1>

Definition at line 20 of file MgaTrukk.h.

#define COM_EQUAL (   a,
  b 
)    (static_cast<IUnknown *>(a) == b ? true : a.IsEqualObject(b))

Definition at line 57 of file MgaTrukk.h.

#define COMCATCH (   CLEANUP)
Value:
catch(hresult_exception &e) \
        { \
                ASSERT( FAILED(e.hr) ); \
                { \
                        CLEANUP; \
                } \
                MgaSetErrorInfo(e.hr); \
                return e.hr; \
        } \
        catch(_com_error &err) \
        { \
                struct { HRESULT hr; } e = { err.Error() }; \
                { CLEANUP; } \
                if (err.Description() != _bstr_t()) \
                        SetErrorInfo(err.Description()); \
		else \
			SetStandardOrGMEErrorInfo(err.Error()); \
                return e.hr; \
        } \
        catch(std::bad_alloc&) \
        { \
                struct { HRESULT hr; } e = { E_OUTOFMEMORY }; \
                { \
                        CLEANUP; \
                } \
                SetStandardOrGMEErrorInfo(e.hr); \
                return e.hr; \
        } \
        return S_OK;

Definition at line 425 of file MgaTrukk.h.

#define COMCATCH_IN_TRANSACTION (   CLEANUP)

Definition at line 320 of file MgaTrukk.h.

#define COMCATCH_IN_TRANSACTION_MAYBE (   CLEANUP)

Definition at line 363 of file MgaTrukk.h.

#define COMRETURN_IN_TRANSACTION (   hr)
Value:
if (FAILED(hr)) { \
                HRESULT hrTx = ttt.Abort(); \
                if (FAILED(hrTx)) return hrTx; \
                return hr; \
        } else { return ttt.Commit(); }

Definition at line 313 of file MgaTrukk.h.

Value:
do { \
        HRESULT _hr = hr; \
        if (FAILED(_hr)) { \
                if (!(this->mgaproject->preferences & MGAPREF_NO_NESTED_TX)) \
                { \
                        HRESULT hrTx = ttt.Abort(); \
                        if (FAILED(hrTx)) return hrTx; \
                } \
                return _hr; \
        } else { \
                if (!(this->mgaproject->preferences & MGAPREF_NO_NESTED_TX)) \
                        return ttt.Commit(); \
                else \
                        return S_OK; \
        } \
  } while(0);

Definition at line 402 of file MgaTrukk.h.

Value:
{ \
        Transaction ttt; \
        HRESULT hr = ttt.Begin(mgaproject); \
        if(hr != S_OK) { return hr; } \
        try

Definition at line 305 of file MgaTrukk.h.

Value:
Transaction ttt; \
if (!(this->mgaproject->preferences & MGAPREF_NO_NESTED_TX)) { \
  HRESULT hr = ttt.Begin(mgaproject); \
  if (hr != S_OK) { return hr; } \
} \
try

Definition at line 355 of file MgaTrukk.h.

#define CREATECOLLECTION_FOR (   t,
 
)    CREATECOLLECTION_FOR2(t, t##s, q)

Definition at line 25 of file MgaTrukk.h.

#define CREATECOLLECTION_FOR2 (   t1,
  t2,
 
)    CComPtr< COLLECTIONTYPE_FOR2(t1, t2) > q; CreateComObject(q);

Definition at line 21 of file MgaTrukk.h.

#define DEFSIG

Definition at line 234 of file MgaTrukk.h.

#define DIM (   x)    (sizeof(x)/ sizeof((x)[0]))

Definition at line 10 of file MgaTrukk.h.

#define INITSIG (   a)

Definition at line 235 of file MgaTrukk.h.

Definition at line 243 of file MgaTrukk.h.

#define ITER   (*it_i)

Definition at line 50 of file MgaTrukk.h.

#define ITER_BROKEN   (it_i != it_e)

Definition at line 51 of file MgaTrukk.h.

#define ITERATE_THROUGH (   ci)
Value:
CoreObjs collifptr=ci; \
ASSERT( collifptr != NULL );                            \
std::vector< CoreObj> vect;                     \
GetAll2<ICoreObjects>(collifptr, vect);\
std::vector< CoreObj>::iterator it_i = vect.begin(), it_e = vect.end(); \
for(;it_i != it_e; ++it_i )

Definition at line 34 of file MgaTrukk.h.

#define ITERATE_THROUGH_BACK (   ci)
Value:
CoreObjs collifptr=ci; \
ASSERT( collifptr != NULL );                            \
std::vector< CoreObj> vect;                     \
GetAll2<ICoreObjects>(collifptr, vect);\
std::vector< CoreObj>::iterator it_b = vect.begin(), it_i = vect.end(); \
while(it_i-- != it_b)

Definition at line 42 of file MgaTrukk.h.

#define MARKSIG (   a)

Definition at line 236 of file MgaTrukk.h.

#define MGAPREF_NO_NESTED_TX   0x00000080

Definition at line 353 of file MgaTrukk.h.

#define MODIFIED   { if(mgaproject->opened < 1000) mgaproject->opened++; }

Definition at line 422 of file MgaTrukk.h.


Typedef Documentation

typedef CComBSTR CComBSTRNoAt

Definition at line 111 of file MgaTrukk.h.

typedef stdext::hash_map<CoreObj, int, coreobj_hashfunc> coreobjhash

Definition at line 154 of file MgaTrukk.h.

typedef stdext::hash_map<CoreObj, CoreObj, coreobj_hashfunc> coreobjpairhash

Definition at line 153 of file MgaTrukk.h.


Function Documentation

template<class COLLITF >
void GetAll2 ( COLLITF *  coll,
std::vector< CoreObj > &  ret 
)

Definition at line 83 of file MgaTrukk.h.

bool MgaSetErrorInfo ( HRESULT  hr)

Definition at line 183 of file CommonError.cpp.

CComBSTR Now ( void  )

THROW!!!

Definition at line 122 of file Mga.cpp.

template<class avt >
void Sort ( CoreObjs coll,
attrid_type  ai 
)

Definition at line 162 of file MgaTrukk.h.


Variable Documentation

Definition at line 100 of file Mga.cpp.

const CComVariant NULLVARIANT

Definition at line 101 of file Mga.cpp.