FUtils/FUtils.h File Reference

Includes the common utilities classes and macros. More...

#include <string>
#include <vector>
#include <set>
#include <xtree>
#include <map>
#include <algorithm>
#include "FUtils/Platforms.h"
#include "FUtils/FUAssert.h"
#include "FMath/FMath.h"
#include <libxml/tree.h>
#include "FUtils/FUString.h"
#include "FUtils/FUCrc32.h"
#include "FUtils/FUDebug.h"
#include "FUtils/FUStatus.h"

Go to the source code of this file.

Defines

#define HAS_VECTORTYPES
 Used by FCollada, this define implies that we are including all the common dynamically-sized arrays.
#define HAS_LIBXML
 Used by FCollada, this define implies that we are including LibXML functions in the library interface.
#define LIBXML_STATIC
 Used by LibXML, this define implies that we are statically-linking the LibXML.
#define SAFE_DELETE(ptr)   if ((ptr) != NULL) { delete (ptr); (ptr) = NULL; }
 This macro safely deletes a pointer and sets the given pointer to NULL.
#define SAFE_DELETE_ARRAY(ptr)   if (ptr != NULL) { delete [] ptr; ptr = NULL; }
 This macro safely deletes an heap array and sets the given pointer to NULL.
#define SAFE_FREE(ptr)   if (ptr != NULL) { free(ptr); ptr = NULL; }
 This macro safely frees a memory block and sets the given pointer to NULL.
#define SAFE_RELEASE(ptr)   if ((ptr) != NULL) { (ptr)->Release(); (ptr) = NULL; }
 This macro safely releases an interface and sets the given pointer to NULL.
#define CLEAR_POINTER_VECTOR(a)   { size_t l = (a).size(); for (size_t i = 0; i < l; ++i) SAFE_DELETE((a)[i]); (a).clear(); }
 This macro deletes all the object pointers contained within a vector and clears it.
#define CLEAR_POINTER_MAP(mapT, a)   { for (mapT::iterator it = (a).begin(); it != (a).end(); ++it) SAFE_DELETE((*it).second); (a).clear(); }
 This macro deletes all the object pointers contained within a map and clears it.
#define UNUSED(a)
 Removes a piece of code during the pre-process.
#define UNUSED_NDEBUG(a)
 Removes a piece of debug code during the pre-process.
#define min(a, b)   std::min(a, b)
 Retrieves the smallest of two values.
#define max(a, b)   std::max(a, b)
 Retrieves the largest of two values.

Typedefs

typedef vector< struct _xmlNode * > xmlNodeList
 A dynamically-sized array of XML nodes.

Functions

template<class T>
bool IsEquivalent (const T &v1, const T &v2)
 Retrieves whether two values are equivalent.


Detailed Description

Includes the common utilities classes and macros.


Define Documentation

#define UNUSED  ) 
 

Removes a piece of code during the pre-process.

This macro is useful for these pesky unused variable warnings.

#define UNUSED_NDEBUG  ) 
 

Removes a piece of debug code during the pre-process.

This macro is useful for these pesky unused variable warnings.


Function Documentation

template<class T>
bool IsEquivalent const T &  v1,
const T &  v2
 

Retrieves whether two values are equivalent.

This template simply calls the operator== on the two values.

Parameters:
v1 A first value.
v2 A second value.
Returns:
Whether the two values are equivalent.


Generated on Fri May 12 16:44:40 2006 for FCollada by  doxygen 1.4.6-NO