- Main Page
- Classes
- Files
- Directories
- Examples

- File List
- File Members

Classes | Functions

# fbxfile.h File Reference

`#include <fbxsdk/fbxsdk_def.h>`
`#include <fbxsdk/core/base/fbxstring.h>`
`#include <fbxsdk/fbxsdk_nsbegin.h>`
`#include <fbxsdk/fbxsdk_nsend.h>`

Go to the source code of this file.

## Classes
class | FbxFile
class | FbxFileUtils
## Functions
template<class T >
const T | FbxSwab (const T &x)

## Detailed Description

Definition in file fbxfile.h.

## Function Documentation

const T FbxSwab | ( | const T & | x | ) | `[inline]`

Search for all occurrences

Definition at line 120 of file fbxfile.h.

    {
        switch( sizeof(x) )
        {
            case 2:
            {
                FbxUInt8 t[2];
                t[0] = ((FbxUInt8*)&x)[1];
                t[1] = ((FbxUInt8*)&x)[0];
                return *(T*)&t;
            }

            case 4:
            {
                FbxUInt8 t[4];
                t[0] = ((FbxUInt8*)&x)[3];
                t[1] = ((FbxUInt8*)&x)[2];
                t[2] = ((FbxUInt8*)&x)[1];
                t[3] = ((FbxUInt8*)&x)[0];
                return *(T*)&t;
            }

            case 8:
            {
                FbxUInt8 t[8];
                t[0] = ((FbxUInt8*)&x)[7];
                t[1] = ((FbxUInt8*)&x)[6];
                t[2] = ((FbxUInt8*)&x)[5];
                t[3] = ((FbxUInt8*)&x)[4];
                t[4] = ((FbxUInt8*)&x)[3];
                t[5] = ((FbxUInt8*)&x)[2];
                t[6] = ((FbxUInt8*)&x)[1];
                t[7] = ((FbxUInt8*)&x)[0];
                return *(T*)&t;
            }

            default:
                return x;
        }
    }