fbxfilesdk_new.h File Reference

#include <new>
#include <stdlib.h>
#include <fbxfilesdk/fbxfilesdk_memory.h>
#include <fbxfilesdk/fbxfilesdk_nsbegin.h>
#include <fbxfilesdk/fbxfilesdk_nsend.h>

Go to the source code of this file.

Classes

struct   SimpleType< T >
struct   SimpleType< T * >
struct   SimpleType< const T >
struct   SimpleType< T[n]>

Defines

#define  KFBX_SIMPLE_TYPE(T)
#define  KFBX_IS_SIMPLE_TYPE(T)   ((bool) SimpleType<T>::value)
#define  KFBXNEW_DECLARE_FRIEND

Functions

  KFBX_SIMPLE_TYPE (bool)
  KFBX_SIMPLE_TYPE (char)
  KFBX_SIMPLE_TYPE (unsigned char)
  KFBX_SIMPLE_TYPE (short)
  KFBX_SIMPLE_TYPE (int)
  KFBX_SIMPLE_TYPE (long)
  KFBX_SIMPLE_TYPE (float)
  KFBX_SIMPLE_TYPE (double)
  KFBX_SIMPLE_TYPE (unsigned long long)
template<typename T >
T *  FbxSdkNew ()
template<typename T , typename T1 >
T *  FbxSdkNew (T1 &p1)
template<typename T , typename T1 >
T *  FbxSdkNew (const T1 &p1)
template<typename T , typename T1 , typename T2 >
T *  FbxSdkNew (T1 &p1, T2 &p2)
template<typename T , typename T1 , typename T2 >
T *  FbxSdkNew (T1 &p1, const T2 &p2)
template<typename T , typename T1 , typename T2 >
T *  FbxSdkNew (const T1 &p1, T2 &p2)
template<typename T , typename T1 , typename T2 >
T *  FbxSdkNew (const T1 &p1, const T2 &p2)
template<typename T , typename T1 , typename T2 , typename T3 >
T *  FbxSdkNew (T1 &p1, T2 &p2, T3 &p3)
template<typename T , typename T1 , typename T2 , typename T3 >
T *  FbxSdkNew (T1 &p1, T2 &p2, const T3 &p3)
template<typename T , typename T1 , typename T2 , typename T3 >
T *  FbxSdkNew (T1 &p1, const T2 &p2, T3 &p3)
template<typename T , typename T1 , typename T2 , typename T3 >
T *  FbxSdkNew (T1 &p1, const T2 &p2, const T3 &p3)
template<typename T , typename T1 , typename T2 , typename T3 >
T *  FbxSdkNew (const T1 &p1, T2 &p2, T3 &p3)
template<typename T , typename T1 , typename T2 , typename T3 >
T *  FbxSdkNew (const T1 &p1, T2 &p2, const T3 &p3)
template<typename T , typename T1 , typename T2 , typename T3 >
T *  FbxSdkNew (const T1 &p1, const T2 &p2, T3 &p3)
template<typename T , typename T1 , typename T2 , typename T3 >
T *  FbxSdkNew (const T1 &p1, const T2 &p2, const T3 &p3)
template<typename T , typename T1 , typename T2 , typename T3 , typename T4 >
T *  FbxSdkNew (T1 &p1, T2 &p2, T3 &p3, T4 &p4)
template<typename T , typename T1 , typename T2 , typename T3 , typename T4 >
T *  FbxSdkNew (T1 &p1, T2 &p2, T3 &p3, const T4 &p4)
template<typename T , typename T1 , typename T2 , typename T3 , typename T4 >
T *  FbxSdkNew (T1 &p1, T2 &p2, const T3 &p3, T4 &p4)
template<typename T , typename T1 , typename T2 , typename T3 , typename T4 >
T *  FbxSdkNew (T1 &p1, T2 &p2, const T3 &p3, const T4 &p4)
template<typename T , typename T1 , typename T2 , typename T3 , typename T4 >
T *  FbxSdkNew (T1 &p1, const T2 &p2, T3 &p3, T4 &p4)
template<typename T , typename T1 , typename T2 , typename T3 , typename T4 >
T *  FbxSdkNew (T1 &p1, const T2 &p2, T3 &p3, const T4 &p4)
template<typename T , typename T1 , typename T2 , typename T3 , typename T4 >
T *  FbxSdkNew (T1 &p1, const T2 &p2, const T3 &p3, T4 &p4)
template<typename T , typename T1 , typename T2 , typename T3 , typename T4 >
T *  FbxSdkNew (T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4)
template<typename T , typename T1 , typename T2 , typename T3 , typename T4 >
T *  FbxSdkNew (const T1 &p1, T2 &p2, T3 &p3, T4 &p4)
template<typename T , typename T1 , typename T2 , typename T3 , typename T4 >
T *  FbxSdkNew (const T1 &p1, T2 &p2, T3 &p3, const T4 &p4)
template<typename T , typename T1 , typename T2 , typename T3 , typename T4 >
T *  FbxSdkNew (const T1 &p1, T2 &p2, const T3 &p3, T4 &p4)
template<typename T , typename T1 , typename T2 , typename T3 , typename T4 >
T *  FbxSdkNew (const T1 &p1, T2 &p2, const T3 &p3, const T4 &p4)
template<typename T , typename T1 , typename T2 , typename T3 , typename T4 >
T *  FbxSdkNew (const T1 &p1, const T2 &p2, T3 &p3, T4 &p4)
template<typename T , typename T1 , typename T2 , typename T3 , typename T4 >
T *  FbxSdkNew (const T1 &p1, const T2 &p2, T3 &p3, const T4 &p4)
template<typename T , typename T1 , typename T2 , typename T3 , typename T4 >
T *  FbxSdkNew (const T1 &p1, const T2 &p2, const T3 &p3, T4 &p4)
template<typename T , typename T1 , typename T2 , typename T3 , typename T4 >
T *  FbxSdkNew (const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4)
template<typename T , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 >
T *  FbxSdkNew (const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5)
template<typename T , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 >
T *  FbxSdkNew (const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5, const T6 &p6)
template<typename T , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 >
T *  FbxSdkNew (const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5, const T6 &p6, const T7 &p7)
template<typename T , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 >
T *  FbxSdkNew (const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5, const T6 &p6, const T7 &p7, const T8 &p8)
template<typename T , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 >
T *  FbxSdkNew (const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5, const T6 &p6, const T7 &p7, const T8 &p8, const T9 &p9)
template<typename T >
void  FbxSdkDelete (T *p)
template<typename T >
void  FbxSdkDelete (const T *p)
template<typename T >
T *  FbxSdkNewArray (int n)
template<typename T >
void  FbxSdkDeleteArray (T *p)

Detailed Description

Definition in file fbxfilesdk_new.h.


Define Documentation

#define KFBX_SIMPLE_TYPE (   T )
Value:
template<> struct SimpleType<T> {       \
union {                                     \
    T t;                                    \
} catcherr;                                 \
    enum {value = 1};                       \
}

Definition at line 81 of file fbxfilesdk_new.h.

#define KFBX_IS_SIMPLE_TYPE (   T )    ((bool) SimpleType<T>::value)

Definition at line 104 of file fbxfilesdk_new.h.

#define KFBXNEW_DECLARE_FRIEND

Definition at line 381 of file fbxfilesdk_new.h.


Function Documentation

KFBX_SIMPLE_TYPE ( bool  )
KFBX_SIMPLE_TYPE ( char  )
KFBX_SIMPLE_TYPE ( unsigned  char )
KFBX_SIMPLE_TYPE ( short  )
KFBX_SIMPLE_TYPE ( int  )
KFBX_SIMPLE_TYPE ( long  )
KFBX_SIMPLE_TYPE ( float  )
KFBX_SIMPLE_TYPE ( double  )
KFBX_SIMPLE_TYPE ( unsigned long  long )
T* FbxSdkNew ( )

Definition at line 108 of file fbxfilesdk_new.h.

{
    T* p = (T*)FBXFILESDK_NAMESPACE::FbxSdkMalloc(sizeof(T));
    return new(p)T();
}
T* FbxSdkNew ( T1 &  p1 )

Definition at line 114 of file fbxfilesdk_new.h.

{
    T* p = (T*)FBXFILESDK_NAMESPACE::FbxSdkMalloc(sizeof(T));
    return new(p)T(p1);
}
T* FbxSdkNew ( const T1 &  p1 )

Definition at line 120 of file fbxfilesdk_new.h.

{
    T* p = (T*)FBXFILESDK_NAMESPACE::FbxSdkMalloc(sizeof(T));
    return new(p)T(p1);
}
T* FbxSdkNew ( T1 &  p1,
T2 &  p2 
)

Definition at line 126 of file fbxfilesdk_new.h.

{
    T* p = (T*)FBXFILESDK_NAMESPACE::FbxSdkMalloc(sizeof(T));
    return new(p)T(p1, p2);
}
T* FbxSdkNew ( T1 &  p1,
const T2 &  p2 
)

Definition at line 132 of file fbxfilesdk_new.h.

{
    T* p = (T*)FBXFILESDK_NAMESPACE::FbxSdkMalloc(sizeof(T));
    return new(p)T(p1, p2);
}
T* FbxSdkNew ( const T1 &  p1,
T2 &  p2 
)

Definition at line 138 of file fbxfilesdk_new.h.

{
    T* p = (T*)FBXFILESDK_NAMESPACE::FbxSdkMalloc(sizeof(T));
    return new(p)T(p1, p2);
}
T* FbxSdkNew ( const T1 &  p1,
const T2 &  p2 
)

Definition at line 144 of file fbxfilesdk_new.h.

{
    T* p = (T*)FBXFILESDK_NAMESPACE::FbxSdkMalloc(sizeof(T));
    return new(p)T(p1, p2);
}
T* FbxSdkNew ( T1 &  p1,
T2 &  p2,
T3 &  p3 
)

Definition at line 150 of file fbxfilesdk_new.h.

{
    T* p = (T*)FBXFILESDK_NAMESPACE::FbxSdkMalloc(sizeof(T));
    return new(p)T(p1, p2, p3);
}
T* FbxSdkNew ( T1 &  p1,
T2 &  p2,
const T3 &  p3 
)

Definition at line 156 of file fbxfilesdk_new.h.

{
    T* p = (T*)FBXFILESDK_NAMESPACE::FbxSdkMalloc(sizeof(T));
    return new(p)T(p1, p2, p3);
}
T* FbxSdkNew ( T1 &  p1,
const T2 &  p2,
T3 &  p3 
)

Definition at line 162 of file fbxfilesdk_new.h.

{
    T* p = (T*)FBXFILESDK_NAMESPACE::FbxSdkMalloc(sizeof(T));
    return new(p)T(p1, p2, p3);
}
T* FbxSdkNew ( T1 &  p1,
const T2 &  p2,
const T3 &  p3 
)

Definition at line 168 of file fbxfilesdk_new.h.

{
    T* p = (T*)FBXFILESDK_NAMESPACE::FbxSdkMalloc(sizeof(T));
    return new(p)T(p1, p2, p3);
}
T* FbxSdkNew ( const T1 &  p1,
T2 &  p2,
T3 &  p3 
)

Definition at line 174 of file fbxfilesdk_new.h.

{
    T* p = (T*)FBXFILESDK_NAMESPACE::FbxSdkMalloc(sizeof(T));
    return new(p)T(p1, p2, p3);
}
T* FbxSdkNew ( const T1 &  p1,
T2 &  p2,
const T3 &  p3 
)

Definition at line 180 of file fbxfilesdk_new.h.

{
    T* p = (T*)FBXFILESDK_NAMESPACE::FbxSdkMalloc(sizeof(T));
    return new(p)T(p1, p2, p3);
}
T* FbxSdkNew ( const T1 &  p1,
const T2 &  p2,
T3 &  p3 
)

Definition at line 186 of file fbxfilesdk_new.h.

{
    T* p = (T*)FBXFILESDK_NAMESPACE::FbxSdkMalloc(sizeof(T));
    return new(p)T(p1, p2, p3);
}
T* FbxSdkNew ( const T1 &  p1,
const T2 &  p2,
const T3 &  p3 
)

Definition at line 192 of file fbxfilesdk_new.h.

{
    T* p = (T*)FBXFILESDK_NAMESPACE::FbxSdkMalloc(sizeof(T));
    return new(p)T(p1, p2, p3);
}
T* FbxSdkNew ( T1 &  p1,
T2 &  p2,
T3 &  p3,
T4 &  p4 
)

Definition at line 198 of file fbxfilesdk_new.h.

{
    T* p = (T*)FBXFILESDK_NAMESPACE::FbxSdkMalloc(sizeof(T));
    return new(p)T(p1, p2, p3, p4);
}
T* FbxSdkNew ( T1 &  p1,
T2 &  p2,
T3 &  p3,
const T4 &  p4 
)

Definition at line 204 of file fbxfilesdk_new.h.

{
    T* p = (T*)FBXFILESDK_NAMESPACE::FbxSdkMalloc(sizeof(T));
    return new(p)T(p1, p2, p3, p4);
}
T* FbxSdkNew ( T1 &  p1,
T2 &  p2,
const T3 &  p3,
T4 &  p4 
)

Definition at line 210 of file fbxfilesdk_new.h.

{
    T* p = (T*)FBXFILESDK_NAMESPACE::FbxSdkMalloc(sizeof(T));
    return new(p)T(p1, p2, p3, p4);
}
T* FbxSdkNew ( T1 &  p1,
T2 &  p2,
const T3 &  p3,
const T4 &  p4 
)

Definition at line 216 of file fbxfilesdk_new.h.

{
    T* p = (T*)FBXFILESDK_NAMESPACE::FbxSdkMalloc(sizeof(T));
    return new(p)T(p1, p2, p3, p4);
}
T* FbxSdkNew ( T1 &  p1,
const T2 &  p2,
T3 &  p3,
T4 &  p4 
)

Definition at line 222 of file fbxfilesdk_new.h.

{
    T* p = (T*)FBXFILESDK_NAMESPACE::FbxSdkMalloc(sizeof(T));
    return new(p)T(p1, p2, p3, p4);
}
T* FbxSdkNew ( T1 &  p1,
const T2 &  p2,
T3 &  p3,
const T4 &  p4 
)

Definition at line 228 of file fbxfilesdk_new.h.

{
    T* p = (T*)FBXFILESDK_NAMESPACE::FbxSdkMalloc(sizeof(T));
    return new(p)T(p1, p2, p3, p4);
}
T* FbxSdkNew ( T1 &  p1,
const T2 &  p2,
const T3 &  p3,
T4 &  p4 
)

Definition at line 234 of file fbxfilesdk_new.h.

{
    T* p = (T*)FBXFILESDK_NAMESPACE::FbxSdkMalloc(sizeof(T));
    return new(p)T(p1, p2, p3, p4);
}
T* FbxSdkNew ( T1 &  p1,
const T2 &  p2,
const T3 &  p3,
const T4 &  p4 
)

Definition at line 240 of file fbxfilesdk_new.h.

{
    T* p = (T*)FBXFILESDK_NAMESPACE::FbxSdkMalloc(sizeof(T));
    return new(p)T(p1, p2, p3, p4);
}
T* FbxSdkNew ( const T1 &  p1,
T2 &  p2,
T3 &  p3,
T4 &  p4 
)

Definition at line 246 of file fbxfilesdk_new.h.

{
    T* p = (T*)FBXFILESDK_NAMESPACE::FbxSdkMalloc(sizeof(T));
    return new(p)T(p1, p2, p3, p4);
}
T* FbxSdkNew ( const T1 &  p1,
T2 &  p2,
T3 &  p3,
const T4 &  p4 
)

Definition at line 252 of file fbxfilesdk_new.h.

{
    T* p = (T*)FBXFILESDK_NAMESPACE::FbxSdkMalloc(sizeof(T));
    return new(p)T(p1, p2, p3, p4);
}
T* FbxSdkNew ( const T1 &  p1,
T2 &  p2,
const T3 &  p3,
T4 &  p4 
)

Definition at line 258 of file fbxfilesdk_new.h.

{
    T* p = (T*)FBXFILESDK_NAMESPACE::FbxSdkMalloc(sizeof(T));
    return new(p)T(p1, p2, p3, p4);
}
T* FbxSdkNew ( const T1 &  p1,
T2 &  p2,
const T3 &  p3,
const T4 &  p4 
)

Definition at line 264 of file fbxfilesdk_new.h.

{
    T* p = (T*)FBXFILESDK_NAMESPACE::FbxSdkMalloc(sizeof(T));
    return new(p)T(p1, p2, p3, p4);
}
T* FbxSdkNew ( const T1 &  p1,
const T2 &  p2,
T3 &  p3,
T4 &  p4 
)

Definition at line 270 of file fbxfilesdk_new.h.

{
    T* p = (T*)FBXFILESDK_NAMESPACE::FbxSdkMalloc(sizeof(T));
    return new(p)T(p1, p2, p3, p4);
}
T* FbxSdkNew ( const T1 &  p1,
const T2 &  p2,
T3 &  p3,
const T4 &  p4 
)

Definition at line 276 of file fbxfilesdk_new.h.

{
    T* p = (T*)FBXFILESDK_NAMESPACE::FbxSdkMalloc(sizeof(T));
    return new(p)T(p1, p2, p3, p4);
}
T* FbxSdkNew ( const T1 &  p1,
const T2 &  p2,
const T3 &  p3,
T4 &  p4 
)

Definition at line 282 of file fbxfilesdk_new.h.

{
    T* p = (T*)FBXFILESDK_NAMESPACE::FbxSdkMalloc(sizeof(T));
    return new(p)T(p1, p2, p3, p4);
}
T* FbxSdkNew ( const T1 &  p1,
const T2 &  p2,
const T3 &  p3,
const T4 &  p4 
)

Definition at line 288 of file fbxfilesdk_new.h.

{
    T* p = (T*)FBXFILESDK_NAMESPACE::FbxSdkMalloc(sizeof(T));
    return new(p)T(p1, p2, p3, p4);
}
T* FbxSdkNew ( const T1 &  p1,
const T2 &  p2,
const T3 &  p3,
const T4 &  p4,
const T5 &  p5 
)

Definition at line 294 of file fbxfilesdk_new.h.

{
    T* p = (T*)FBXFILESDK_NAMESPACE::FbxSdkMalloc(sizeof(T));
    return new(p)T(p1,p2,p3,p4,p5);
}
T* FbxSdkNew ( const T1 &  p1,
const T2 &  p2,
const T3 &  p3,
const T4 &  p4,
const T5 &  p5,
const T6 &  p6 
)

Definition at line 300 of file fbxfilesdk_new.h.

{
    T* p = (T*)FBXFILESDK_NAMESPACE::FbxSdkMalloc(sizeof(T));
    return new(p)T(p1,p2,p3,p4,p5,p6);
}
T* FbxSdkNew ( const T1 &  p1,
const T2 &  p2,
const T3 &  p3,
const T4 &  p4,
const T5 &  p5,
const T6 &  p6,
const T7 &  p7 
)

Definition at line 306 of file fbxfilesdk_new.h.

{
    T* p = (T*)FBXFILESDK_NAMESPACE::FbxSdkMalloc(sizeof(T));
    return new(p)T(p1,p2,p3,p4,p5,p6,p7);
}
T* FbxSdkNew ( const T1 &  p1,
const T2 &  p2,
const T3 &  p3,
const T4 &  p4,
const T5 &  p5,
const T6 &  p6,
const T7 &  p7,
const T8 &  p8 
)

Definition at line 312 of file fbxfilesdk_new.h.

{
    T* p = (T*)FBXFILESDK_NAMESPACE::FbxSdkMalloc(sizeof(T));
    return new(p)T(p1,p2,p3,p4,p5,p6,p7,p8);
}
T* FbxSdkNew ( const T1 &  p1,
const T2 &  p2,
const T3 &  p3,
const T4 &  p4,
const T5 &  p5,
const T6 &  p6,
const T7 &  p7,
const T8 &  p8,
const T9 &  p9 
)

Definition at line 318 of file fbxfilesdk_new.h.

{
    T* p = (T*)FBXFILESDK_NAMESPACE::FbxSdkMalloc(sizeof(T));
    return new(p)T(p1,p2,p3,p4,p5,p6,p7,p8,p9);
}
void FbxSdkDelete ( T *  p )

Definition at line 325 of file fbxfilesdk_new.h.

{
    if (p)
    {
        ((T*)p)->~T();
        FBXFILESDK_NAMESPACE::FbxSdkFree(p);
    }
}
void FbxSdkDelete ( const T *  p )

Definition at line 335 of file fbxfilesdk_new.h.

{
    if (p)
    {
        ((T*)p)->~T();
        FBXFILESDK_NAMESPACE::FbxSdkFree(const_cast<T*>(p));
    }
}
T* FbxSdkNewArray ( int  n )

Definition at line 345 of file fbxfilesdk_new.h.

{
    if (KFBX_IS_SIMPLE_TYPE(T))
    {
        return (T*)FBXFILESDK_NAMESPACE::FbxSdkMalloc(sizeof(T)*n);
    }
    else
    {
        void *pTmp = FBXFILESDK_NAMESPACE::FbxSdkMalloc(sizeof(T)*n+sizeof(int));
        T* p = (T*)((int*)pTmp+1);
        *((int*)pTmp) = n;
        for(int i=0;i<n;++i)
            new((T*)p+i)T;
        return p;
    }
}
void FbxSdkDeleteArray ( T *  p )

Definition at line 363 of file fbxfilesdk_new.h.

{
    if (p)
    {
        if (!KFBX_IS_SIMPLE_TYPE(T))
        {
            for(int i=0;i<((int*)p)[-1];++i)
                ((T*)p)[i].~T();
            FBXFILESDK_NAMESPACE::FbxSdkFree((int*)p-1);
        }
        else
        {
            FBXFILESDK_NAMESPACE::FbxSdkFree((void*)p);
        }
    }
}