- Main Page
- Classes
- Files
- Directories
- Examples

- File List
- File Members

# fbxstream.h

Go to the documentation of this file.

    00001 /****************************************************************************************
    00002
    00003    Copyright (C) 2012 Autodesk, Inc.
    00004    All rights reserved.
    00005
    00006    Use of this software is subject to the terms of the Autodesk license agreement
    00007    provided at the time of installation or download, or which otherwise accompanies
    00008    this software in either electronic or hard copy form.
    00009
    00010 ****************************************************************************************/
    00011
    00013 #ifndef _FBXSDK_CORE_STREAM_H_
    00014 #define _FBXSDK_CORE_STREAM_H_
    00015
    00016 #include <fbxsdk/fbxsdk_def.h>
    00017 #include <fbxsdk/core/base/fbxfile.h>
    00018 #include <fbxsdk/core/arch/fbxtypes.h>
    00019
    00020 #include <fbxsdk/fbxsdk_nsbegin.h>
    00021
    00024 class FBXSDK_DLL FbxStream
    00025 {
    00026 public:
    00032     enum EState {eClosed, eOpen, eEmpty};
    00033
    00035     FbxStream() {};
    00036
    00038     virtual ~FbxStream() {};
    00039
    00042     virtual EState GetState() = 0;
    00043
    00047     virtual bool Open( void* pStreamData ) = 0;
    00048
    00052     virtual bool Close() = 0;
    00053
    00057     virtual bool Flush() = 0;
    00058
    00064     virtual int Write(const void* /*pData*/, int /*pSize*/) = 0;
    00065
    00071     virtual int Read(void* /*pData*/, int /*pSize*/) const = 0;
    00072
    00084     virtual char* ReadString(char* pBuffer, int pMaxSize, bool pStopAtFirstWhiteSpace=false);
    00085
    00087 //
    00088 //  WARNING!
    00089 //
    00090 //  Anything beyond these lines may not be documented accurately and is
    00091 //  subject to change without notice.
    00092 //
    00094 #ifndef DOXYGEN_SHOULD_SKIP_THIS
    00095     int Write(const char* pData, int pSize){ return Write((void*)pData, pSize); }
    00096     int Write(const int* pData, int pSize){ return Write((void*)pData, pSize); }
    00097     int Read(char* pData, int pSize) const { return Read((void*)pData, pSize); }
    00098     int Read(int* pData, int pSize) const { return Read((void*)pData, pSize); }
    00099 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
    00100
    00106     virtual int GetReaderID() const = 0;
    00107
    00113     virtual int GetWriterID() const = 0;
    00114
    00119     virtual void Seek(const FbxInt64& pOffset, const FbxFile::ESeekPos& pSeekPos)=0;
    00120
    00124     virtual long GetPosition() const = 0;
    00125
    00129     virtual void SetPosition(long pPosition)=0;
    00130
    00135     virtual int GetError() const = 0;
    00136
    00139     virtual void ClearError() = 0;
    00140 };
    00141
    00142 #include <fbxsdk/fbxsdk_nsend.h>
    00143
    00144 #endif /* _FBXSDK_CORE_STREAM_H_ */