FBX C++ API Reference
fbxnew.h File Reference
#include <fbxsdk/fbxsdk_def.h>
#include <new>
#include <fbxsdk/fbxsdk_nsbegin.h>
#include <fbxsdk/fbxsdk_nsend.h>

File Description

New operator override templates.

Instead of overloading the operator new in the FBX SDK, we provide a set of templates that are used internally to create objects. This mechanic allows the FBX SDK to call a different memory allocator.

See also
FbxSetMallocHandler FbxSetCallocHandler FbxSetReallocHandler FbxSetFreeHandler FbxSetMSizeHandler

Definition in file fbxnew.h.

Classes

struct  FbxSimpleType< T >
 
struct  FbxSimpleType< T * >
 
struct  FbxSimpleType< const T >
 
struct  FbxSimpleType< T[n]>
 
struct  FbxSimpleType< bool >
 
struct  FbxSimpleType< char >
 
struct  FbxSimpleType< unsigned char >
 
struct  FbxSimpleType< short >
 
struct  FbxSimpleType< unsigned short >
 
struct  FbxSimpleType< int >
 
struct  FbxSimpleType< unsigned int >
 
struct  FbxSimpleType< long >
 
struct  FbxSimpleType< unsigned long >
 
struct  FbxSimpleType< float >
 
struct  FbxSimpleType< double >
 
struct  FbxSimpleType< long double >
 
struct  FbxSimpleType< long long >
 
struct  FbxSimpleType< unsigned long long >
 

Macros

#define FBXSDK_DEFINE_SIMPLE_TYPE(T)   template<> struct FbxSimpleType<T>{ union {T t;} catcherr; enum {value = 1};}
 
#define FBXSDK_IS_SIMPLE_TYPE(T)   ((bool)FbxSimpleType<T>::value)
 
#define FBXSDK_FRIEND_NEW()
 

Functions

template<typename T >
T * FbxNew ()
 
template<typename T , typename T1 >
T * FbxNew (T1 &p1)
 
template<typename T , typename T1 >
T * FbxNew (const T1 &p1)
 
template<typename T , typename T1 , typename T2 >
T * FbxNew (T1 &p1, T2 &p2)
 
template<typename T , typename T1 , typename T2 >
T * FbxNew (T1 &p1, const T2 &p2)
 
template<typename T , typename T1 , typename T2 >
T * FbxNew (const T1 &p1, T2 &p2)
 
template<typename T , typename T1 , typename T2 >
T * FbxNew (const T1 &p1, const T2 &p2)
 
template<typename T , typename T1 , typename T2 , typename T3 >
T * FbxNew (T1 &p1, T2 &p2, T3 &p3)
 
template<typename T , typename T1 , typename T2 , typename T3 >
T * FbxNew (T1 &p1, T2 &p2, const T3 &p3)
 
template<typename T , typename T1 , typename T2 , typename T3 >
T * FbxNew (T1 &p1, const T2 &p2, T3 &p3)
 
template<typename T , typename T1 , typename T2 , typename T3 >
T * FbxNew (T1 &p1, const T2 &p2, const T3 &p3)
 
template<typename T , typename T1 , typename T2 , typename T3 >
T * FbxNew (const T1 &p1, T2 &p2, T3 &p3)
 
template<typename T , typename T1 , typename T2 , typename T3 >
T * FbxNew (const T1 &p1, T2 &p2, const T3 &p3)
 
template<typename T , typename T1 , typename T2 , typename T3 >
T * FbxNew (const T1 &p1, const T2 &p2, T3 &p3)
 
template<typename T , typename T1 , typename T2 , typename T3 >
T * FbxNew (const T1 &p1, const T2 &p2, const T3 &p3)
 
template<typename T , typename T1 , typename T2 , typename T3 , typename T4 >
T * FbxNew (T1 &p1, T2 &p2, T3 &p3, T4 &p4)
 
template<typename T , typename T1 , typename T2 , typename T3 , typename T4 >
T * FbxNew (T1 &p1, T2 &p2, T3 &p3, const T4 &p4)
 
template<typename T , typename T1 , typename T2 , typename T3 , typename T4 >
T * FbxNew (T1 &p1, T2 &p2, const T3 &p3, T4 &p4)
 
template<typename T , typename T1 , typename T2 , typename T3 , typename T4 >
T * FbxNew (T1 &p1, T2 &p2, const T3 &p3, const T4 &p4)
 
template<typename T , typename T1 , typename T2 , typename T3 , typename T4 >
T * FbxNew (T1 &p1, const T2 &p2, T3 &p3, T4 &p4)
 
template<typename T , typename T1 , typename T2 , typename T3 , typename T4 >
T * FbxNew (T1 &p1, const T2 &p2, T3 &p3, const T4 &p4)
 
template<typename T , typename T1 , typename T2 , typename T3 , typename T4 >
T * FbxNew (T1 &p1, const T2 &p2, const T3 &p3, T4 &p4)
 
template<typename T , typename T1 , typename T2 , typename T3 , typename T4 >
T * FbxNew (T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4)
 
template<typename T , typename T1 , typename T2 , typename T3 , typename T4 >
T * FbxNew (const T1 &p1, T2 &p2, T3 &p3, T4 &p4)
 
template<typename T , typename T1 , typename T2 , typename T3 , typename T4 >
T * FbxNew (const T1 &p1, T2 &p2, T3 &p3, const T4 &p4)
 
template<typename T , typename T1 , typename T2 , typename T3 , typename T4 >
T * FbxNew (const T1 &p1, T2 &p2, const T3 &p3, T4 &p4)
 
template<typename T , typename T1 , typename T2 , typename T3 , typename T4 >
T * FbxNew (const T1 &p1, T2 &p2, const T3 &p3, const T4 &p4)
 
template<typename T , typename T1 , typename T2 , typename T3 , typename T4 >
T * FbxNew (const T1 &p1, const T2 &p2, T3 &p3, T4 &p4)
 
template<typename T , typename T1 , typename T2 , typename T3 , typename T4 >
T * FbxNew (const T1 &p1, const T2 &p2, T3 &p3, const T4 &p4)
 
template<typename T , typename T1 , typename T2 , typename T3 , typename T4 >
T * FbxNew (const T1 &p1, const T2 &p2, const T3 &p3, T4 &p4)
 
template<typename T , typename T1 , typename T2 , typename T3 , typename T4 >
T * FbxNew (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 * FbxNew (T1 &p1, T2 &p2, T3 &p3, T4 &p4, T5 &p5)
 
template<typename T , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 >
T * FbxNew (const T1 &p1, T2 &p2, T3 &p3, T4 &p4, T5 &p5)
 
template<typename T , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 >
T * FbxNew (const T1 &p1, const T2 &p2, T3 &p3, T4 &p4, T5 &p5)
 
template<typename T , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 >
T * FbxNew (const T1 &p1, T2 &p2, const T3 &p3, T4 &p4, T5 &p5)
 
template<typename T , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 >
T * FbxNew (const T1 &p1, T2 &p2, T3 &p3, const T4 &p4, T5 &p5)
 
template<typename T , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 >
T * FbxNew (const T1 &p1, T2 &p2, T3 &p3, T4 &p4, const T5 &p5)
 
template<typename T , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 >
T * FbxNew (const T1 &p1, const T2 &p2, const T3 &p3, T4 &p4, T5 &p5)
 
template<typename T , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 >
T * FbxNew (const T1 &p1, const T2 &p2, T3 &p3, const T4 &p4, T5 &p5)
 
template<typename T , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 >
T * FbxNew (const T1 &p1, const T2 &p2, T3 &p3, T4 &p4, const T5 &p5)
 
template<typename T , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 >
T * FbxNew (const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, T5 &p5)
 
template<typename T , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 >
T * FbxNew (const T1 &p1, const T2 &p2, const T3 &p3, T4 &p4, const T5 &p5)
 
template<typename T , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 >
T * FbxNew (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 * FbxNew (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 * FbxNew (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 * FbxNew (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 * FbxNew (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 FbxDelete (T *p)
 Deletion policy for pointer template classes that uses the FbxDelete() function. More...
 
template<typename T >
void FbxDelete (const T *p)
 
template<typename T >
T * FbxNewArray (const int n)
 
template<typename T >
void FbxDeleteArray (T *p)
 

Macro Definition Documentation

◆ FBXSDK_DEFINE_SIMPLE_TYPE

#define FBXSDK_DEFINE_SIMPLE_TYPE (   T)    template<> struct FbxSimpleType<T>{ union {T t;} catcherr; enum {value = 1};}

Definition at line 40 of file fbxnew.h.

◆ FBXSDK_IS_SIMPLE_TYPE

#define FBXSDK_IS_SIMPLE_TYPE (   T)    ((bool)FbxSimpleType<T>::value)

Definition at line 57 of file fbxnew.h.

◆ FBXSDK_FRIEND_NEW

#define FBXSDK_FRIEND_NEW ( )

Definition at line 397 of file fbxnew.h.

Function Documentation

◆ FbxNew() [1/47]

T* FbxNew ( )

Definition at line 59 of file fbxnew.h.

60 {
61  T* p = (T*)FbxMalloc(sizeof(T));
62  return new(p)T();
63 }

◆ FbxNew() [2/47]

T* FbxNew ( T1 &  p1)

Definition at line 65 of file fbxnew.h.

66 {
67  T* p = (T*)FbxMalloc(sizeof(T));
68  return new(p)T(p1);
69 }

◆ FbxNew() [3/47]

T* FbxNew ( const T1 &  p1)

Definition at line 71 of file fbxnew.h.

72 {
73  T* p = (T*)FbxMalloc(sizeof(T));
74  return new(p)T(p1);
75 }

◆ FbxNew() [4/47]

T* FbxNew ( T1 &  p1,
T2 &  p2 
)

Definition at line 77 of file fbxnew.h.

78 {
79  T* p = (T*)FbxMalloc(sizeof(T));
80  return new(p)T(p1, p2);
81 }

◆ FbxNew() [5/47]

T* FbxNew ( T1 &  p1,
const T2 &  p2 
)

Definition at line 83 of file fbxnew.h.

84 {
85  T* p = (T*)FbxMalloc(sizeof(T));
86  return new(p)T(p1, p2);
87 }

◆ FbxNew() [6/47]

T* FbxNew ( const T1 &  p1,
T2 &  p2 
)

Definition at line 89 of file fbxnew.h.

90 {
91  T* p = (T*)FbxMalloc(sizeof(T));
92  return new(p)T(p1, p2);
93 }

◆ FbxNew() [7/47]

T* FbxNew ( const T1 &  p1,
const T2 &  p2 
)

Definition at line 95 of file fbxnew.h.

96 {
97  T* p = (T*)FbxMalloc(sizeof(T));
98  return new(p)T(p1, p2);
99 }

◆ FbxNew() [8/47]

T* FbxNew ( T1 &  p1,
T2 &  p2,
T3 &  p3 
)

Definition at line 101 of file fbxnew.h.

102 {
103  T* p = (T*)FbxMalloc(sizeof(T));
104  return new(p)T(p1, p2, p3);
105 }

◆ FbxNew() [9/47]

T* FbxNew ( T1 &  p1,
T2 &  p2,
const T3 &  p3 
)

Definition at line 107 of file fbxnew.h.

108 {
109  T* p = (T*)FbxMalloc(sizeof(T));
110  return new(p)T(p1, p2, p3);
111 }

◆ FbxNew() [10/47]

T* FbxNew ( T1 &  p1,
const T2 &  p2,
T3 &  p3 
)

Definition at line 113 of file fbxnew.h.

114 {
115  T* p = (T*)FbxMalloc(sizeof(T));
116  return new(p)T(p1, p2, p3);
117 }

◆ FbxNew() [11/47]

T* FbxNew ( T1 &  p1,
const T2 &  p2,
const T3 &  p3 
)

Definition at line 119 of file fbxnew.h.

120 {
121  T* p = (T*)FbxMalloc(sizeof(T));
122  return new(p)T(p1, p2, p3);
123 }

◆ FbxNew() [12/47]

T* FbxNew ( const T1 &  p1,
T2 &  p2,
T3 &  p3 
)

Definition at line 125 of file fbxnew.h.

126 {
127  T* p = (T*)FbxMalloc(sizeof(T));
128  return new(p)T(p1, p2, p3);
129 }

◆ FbxNew() [13/47]

T* FbxNew ( const T1 &  p1,
T2 &  p2,
const T3 &  p3 
)

Definition at line 131 of file fbxnew.h.

132 {
133  T* p = (T*)FbxMalloc(sizeof(T));
134  return new(p)T(p1, p2, p3);
135 }

◆ FbxNew() [14/47]

T* FbxNew ( const T1 &  p1,
const T2 &  p2,
T3 &  p3 
)

Definition at line 137 of file fbxnew.h.

138 {
139  T* p = (T*)FbxMalloc(sizeof(T));
140  return new(p)T(p1, p2, p3);
141 }

◆ FbxNew() [15/47]

T* FbxNew ( const T1 &  p1,
const T2 &  p2,
const T3 &  p3 
)

Definition at line 143 of file fbxnew.h.

144 {
145  T* p = (T*)FbxMalloc(sizeof(T));
146  return new(p)T(p1, p2, p3);
147 }

◆ FbxNew() [16/47]

T* FbxNew ( T1 &  p1,
T2 &  p2,
T3 &  p3,
T4 &  p4 
)

Definition at line 149 of file fbxnew.h.

150 {
151  T* p = (T*)FbxMalloc(sizeof(T));
152  return new(p)T(p1, p2, p3, p4);
153 }

◆ FbxNew() [17/47]

T* FbxNew ( T1 &  p1,
T2 &  p2,
T3 &  p3,
const T4 &  p4 
)

Definition at line 155 of file fbxnew.h.

156 {
157  T* p = (T*)FbxMalloc(sizeof(T));
158  return new(p)T(p1, p2, p3, p4);
159 }

◆ FbxNew() [18/47]

T* FbxNew ( T1 &  p1,
T2 &  p2,
const T3 &  p3,
T4 &  p4 
)

Definition at line 161 of file fbxnew.h.

162 {
163  T* p = (T*)FbxMalloc(sizeof(T));
164  return new(p)T(p1, p2, p3, p4);
165 }

◆ FbxNew() [19/47]

T* FbxNew ( T1 &  p1,
T2 &  p2,
const T3 &  p3,
const T4 &  p4 
)

Definition at line 167 of file fbxnew.h.

168 {
169  T* p = (T*)FbxMalloc(sizeof(T));
170  return new(p)T(p1, p2, p3, p4);
171 }

◆ FbxNew() [20/47]

T* FbxNew ( T1 &  p1,
const T2 &  p2,
T3 &  p3,
T4 &  p4 
)

Definition at line 173 of file fbxnew.h.

174 {
175  T* p = (T*)FbxMalloc(sizeof(T));
176  return new(p)T(p1, p2, p3, p4);
177 }

◆ FbxNew() [21/47]

T* FbxNew ( T1 &  p1,
const T2 &  p2,
T3 &  p3,
const T4 &  p4 
)

Definition at line 179 of file fbxnew.h.

180 {
181  T* p = (T*)FbxMalloc(sizeof(T));
182  return new(p)T(p1, p2, p3, p4);
183 }

◆ FbxNew() [22/47]

T* FbxNew ( T1 &  p1,
const T2 &  p2,
const T3 &  p3,
T4 &  p4 
)

Definition at line 185 of file fbxnew.h.

186 {
187  T* p = (T*)FbxMalloc(sizeof(T));
188  return new(p)T(p1, p2, p3, p4);
189 }

◆ FbxNew() [23/47]

T* FbxNew ( T1 &  p1,
const T2 &  p2,
const T3 &  p3,
const T4 &  p4 
)

Definition at line 191 of file fbxnew.h.

192 {
193  T* p = (T*)FbxMalloc(sizeof(T));
194  return new(p)T(p1, p2, p3, p4);
195 }

◆ FbxNew() [24/47]

T* FbxNew ( const T1 &  p1,
T2 &  p2,
T3 &  p3,
T4 &  p4 
)

Definition at line 197 of file fbxnew.h.

198 {
199  T* p = (T*)FbxMalloc(sizeof(T));
200  return new(p)T(p1, p2, p3, p4);
201 }

◆ FbxNew() [25/47]

T* FbxNew ( const T1 &  p1,
T2 &  p2,
T3 &  p3,
const T4 &  p4 
)

Definition at line 203 of file fbxnew.h.

204 {
205  T* p = (T*)FbxMalloc(sizeof(T));
206  return new(p)T(p1, p2, p3, p4);
207 }

◆ FbxNew() [26/47]

T* FbxNew ( const T1 &  p1,
T2 &  p2,
const T3 &  p3,
T4 &  p4 
)

Definition at line 209 of file fbxnew.h.

210 {
211  T* p = (T*)FbxMalloc(sizeof(T));
212  return new(p)T(p1, p2, p3, p4);
213 }

◆ FbxNew() [27/47]

T* FbxNew ( const T1 &  p1,
T2 &  p2,
const T3 &  p3,
const T4 &  p4 
)

Definition at line 215 of file fbxnew.h.

216 {
217  T* p = (T*)FbxMalloc(sizeof(T));
218  return new(p)T(p1, p2, p3, p4);
219 }

◆ FbxNew() [28/47]

T* FbxNew ( const T1 &  p1,
const T2 &  p2,
T3 &  p3,
T4 &  p4 
)

Definition at line 221 of file fbxnew.h.

222 {
223  T* p = (T*)FbxMalloc(sizeof(T));
224  return new(p)T(p1, p2, p3, p4);
225 }

◆ FbxNew() [29/47]

T* FbxNew ( const T1 &  p1,
const T2 &  p2,
T3 &  p3,
const T4 &  p4 
)

Definition at line 227 of file fbxnew.h.

228 {
229  T* p = (T*)FbxMalloc(sizeof(T));
230  return new(p)T(p1, p2, p3, p4);
231 }

◆ FbxNew() [30/47]

T* FbxNew ( const T1 &  p1,
const T2 &  p2,
const T3 &  p3,
T4 &  p4 
)

Definition at line 233 of file fbxnew.h.

234 {
235  T* p = (T*)FbxMalloc(sizeof(T));
236  return new(p)T(p1, p2, p3, p4);
237 }

◆ FbxNew() [31/47]

T* FbxNew ( const T1 &  p1,
const T2 &  p2,
const T3 &  p3,
const T4 &  p4 
)

Definition at line 239 of file fbxnew.h.

240 {
241  T* p = (T*)FbxMalloc(sizeof(T));
242  return new(p)T(p1, p2, p3, p4);
243 }

◆ FbxNew() [32/47]

T* FbxNew ( T1 &  p1,
T2 &  p2,
T3 &  p3,
T4 &  p4,
T5 &  p5 
)

Definition at line 245 of file fbxnew.h.

246 {
247  T* p = (T*)FbxMalloc(sizeof(T));
248  return new(p)T(p1,p2,p3,p4,p5);
249 }

◆ FbxNew() [33/47]

T* FbxNew ( const T1 &  p1,
T2 &  p2,
T3 &  p3,
T4 &  p4,
T5 &  p5 
)

Definition at line 251 of file fbxnew.h.

252 {
253  T* p = (T*)FbxMalloc(sizeof(T));
254  return new(p)T(p1,p2,p3,p4,p5);
255 }

◆ FbxNew() [34/47]

T* FbxNew ( const T1 &  p1,
const T2 &  p2,
T3 &  p3,
T4 &  p4,
T5 &  p5 
)

Definition at line 257 of file fbxnew.h.

258 {
259  T* p = (T*)FbxMalloc(sizeof(T));
260  return new(p)T(p1,p2,p3,p4,p5);
261 }

◆ FbxNew() [35/47]

T* FbxNew ( const T1 &  p1,
T2 &  p2,
const T3 &  p3,
T4 &  p4,
T5 &  p5 
)

Definition at line 263 of file fbxnew.h.

264 {
265  T* p = (T*)FbxMalloc(sizeof(T));
266  return new(p)T(p1,p2,p3,p4,p5);
267 }

◆ FbxNew() [36/47]

T* FbxNew ( const T1 &  p1,
T2 &  p2,
T3 &  p3,
const T4 &  p4,
T5 &  p5 
)

Definition at line 269 of file fbxnew.h.

270 {
271  T* p = (T*)FbxMalloc(sizeof(T));
272  return new(p)T(p1,p2,p3,p4,p5);
273 }

◆ FbxNew() [37/47]

T* FbxNew ( const T1 &  p1,
T2 &  p2,
T3 &  p3,
T4 &  p4,
const T5 &  p5 
)

Definition at line 275 of file fbxnew.h.

276 {
277  T* p = (T*)FbxMalloc(sizeof(T));
278  return new(p)T(p1,p2,p3,p4,p5);
279 }

◆ FbxNew() [38/47]

T* FbxNew ( const T1 &  p1,
const T2 &  p2,
const T3 &  p3,
T4 &  p4,
T5 &  p5 
)

Definition at line 281 of file fbxnew.h.

282 {
283  T* p = (T*)FbxMalloc(sizeof(T));
284  return new(p)T(p1,p2,p3,p4,p5);
285 }

◆ FbxNew() [39/47]

T* FbxNew ( const T1 &  p1,
const T2 &  p2,
T3 &  p3,
const T4 &  p4,
T5 &  p5 
)

Definition at line 287 of file fbxnew.h.

288 {
289  T* p = (T*)FbxMalloc(sizeof(T));
290  return new(p)T(p1,p2,p3,p4,p5);
291 }

◆ FbxNew() [40/47]

T* FbxNew ( const T1 &  p1,
const T2 &  p2,
T3 &  p3,
T4 &  p4,
const T5 &  p5 
)

Definition at line 293 of file fbxnew.h.

294 {
295  T* p = (T*)FbxMalloc(sizeof(T));
296  return new(p)T(p1,p2,p3,p4,p5);
297 }

◆ FbxNew() [41/47]

T* FbxNew ( const T1 &  p1,
const T2 &  p2,
const T3 &  p3,
const T4 &  p4,
T5 &  p5 
)

Definition at line 299 of file fbxnew.h.

300 {
301  T* p = (T*)FbxMalloc(sizeof(T));
302  return new(p)T(p1,p2,p3,p4,p5);
303 }

◆ FbxNew() [42/47]

T* FbxNew ( const T1 &  p1,
const T2 &  p2,
const T3 &  p3,
T4 &  p4,
const T5 &  p5 
)

Definition at line 305 of file fbxnew.h.

306 {
307  T* p = (T*)FbxMalloc(sizeof(T));
308  return new(p)T(p1,p2,p3,p4,p5);
309 }

◆ FbxNew() [43/47]

T* FbxNew ( const T1 &  p1,
const T2 &  p2,
const T3 &  p3,
const T4 &  p4,
const T5 &  p5 
)

Definition at line 311 of file fbxnew.h.

312 {
313  T* p = (T*)FbxMalloc(sizeof(T));
314  return new(p)T(p1,p2,p3,p4,p5);
315 }

◆ FbxNew() [44/47]

T* FbxNew ( const T1 &  p1,
const T2 &  p2,
const T3 &  p3,
const T4 &  p4,
const T5 &  p5,
const T6 &  p6 
)

Definition at line 317 of file fbxnew.h.

318 {
319  T* p = (T*)FbxMalloc(sizeof(T));
320  return new(p)T(p1,p2,p3,p4,p5,p6);
321 }

◆ FbxNew() [45/47]

T* FbxNew ( const T1 &  p1,
const T2 &  p2,
const T3 &  p3,
const T4 &  p4,
const T5 &  p5,
const T6 &  p6,
const T7 &  p7 
)

Definition at line 323 of file fbxnew.h.

324 {
325  T* p = (T*)FbxMalloc(sizeof(T));
326  return new(p)T(p1,p2,p3,p4,p5,p6,p7);
327 }

◆ FbxNew() [46/47]

T* FbxNew ( 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 329 of file fbxnew.h.

330 {
331  T* p = (T*)FbxMalloc(sizeof(T));
332  return new(p)T(p1,p2,p3,p4,p5,p6,p7,p8);
333 }

◆ FbxNew() [47/47]

T* FbxNew ( 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 335 of file fbxnew.h.

336 {
337  T* p = (T*)FbxMalloc(sizeof(T));
338  return new(p)T(p1,p2,p3,p4,p5,p6,p7,p8,p9);
339 }

◆ FbxDelete() [1/2]

void FbxDelete ( T *  p)

Deletion policy for pointer template classes that uses the FbxDelete() function.

Definition at line 341 of file fbxnew.h.

342 {
343  if( p )
344  {
345  ((T*)p)->~T();
346  FbxFree(p);
347  }
348 }

◆ FbxDelete() [2/2]

void FbxDelete ( const T *  p)

Definition at line 350 of file fbxnew.h.

351 {
352  if( p )
353  {
354  ((T*)p)->~T();
355  FbxFree(const_cast<T*>(p));
356  }
357 }

◆ FbxNewArray()

T* FbxNewArray ( const int  n)

Definition at line 359 of file fbxnew.h.

360 {
361  if( FBXSDK_IS_SIMPLE_TYPE(T) )
362  {
363  return (T*)FbxMalloc(sizeof(T)*n);
364  }
365  else
366  {
367  void* pTmp = FbxMalloc(sizeof(T) * n + sizeof(int));
368  T* p = (T*)((int*)pTmp+1);
369  *((int*)pTmp) = n;
370  for( int i = 0; i < n; ++i )
371  {
372  new((T*)p+i)T; //in-place new, not allocating memory so it is safe.
373  }
374  return p;
375  }
376 }
#define FBXSDK_IS_SIMPLE_TYPE(T)
Definition: fbxnew.h:57

◆ FbxDeleteArray()

void FbxDeleteArray ( T *  p)

Definition at line 378 of file fbxnew.h.

379 {
380  if( p )
381  {
382  if( !FBXSDK_IS_SIMPLE_TYPE(T) )
383  {
384  for( int i = 0; i < ((int*)p)[-1]; ++i )
385  {
386  ((T*)p)[i].~T();
387  }
388  FbxFree((int*)p-1);
389  }
390  else
391  {
392  FbxFree((void*)p);
393  }
394  }
395 }
#define FBXSDK_IS_SIMPLE_TYPE(T)
Definition: fbxnew.h:57

Go to the source code of this file.