- Main Page
- Classes
- Files
- Directories

- File List
- File Members

# fbxstream.h

Go to the documentation of this file.

    00001 /****************************************************************************************
    00002
    00003    Copyright (C) 2013 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
    00018 #include <fbxsdk/core/base/fbxfile.h>
    00019
    00020 #include <fbxsdk/fbxsdk_nsbegin.h>
    00021
    00026 class FBXSDK_DLL FbxStream
    00027 {
    00028 public:
    00030     enum EState
    00031     {
    00032         eClosed,
    00033         eOpen,
    00034         eEmpty
    00035     };
    00036
    00038     virtual EState GetState() = 0;
    00039
    00043     virtual bool Open(void* pStreamData) = 0;
    00044
    00048     virtual bool Close() = 0;
    00049
    00052     virtual bool Flush() = 0;
    00053
    00058     virtual int Write(const void* /*pData*/, int /*pSize*/) = 0;
    00059
    00064     virtual int Read(void* /*pData*/, int /*pSize*/) const = 0;
    00065
    00075     virtual char* ReadString(char* pBuffer, int pMaxSize, bool pStopAtFirstWhiteSpace=false);
    00076
    00081     virtual int GetReaderID() const = 0;
    00082
    00087     virtual int GetWriterID() const = 0;
    00088
    00092     virtual void Seek(const FbxInt64& pOffset, const FbxFile::ESeekPos& pSeekPos)=0;
    00093
    00096     virtual long GetPosition() const = 0;
    00097
    00100     virtual void SetPosition(long pPosition)=0;
    00101
    00105     virtual int GetError() const = 0;
    00106
    00108     virtual void ClearError() = 0;
    00109
    00110 /*****************************************************************************************************************************
    00111 ** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
    00112 *****************************************************************************************************************************/
    00113 #ifndef DOXYGEN_SHOULD_SKIP_THIS
    00114     FbxStream(){};
    00115     virtual ~FbxStream(){};
    00116
    00117     int Write(const char* pData, int pSize){ return Write((void*)pData, pSize); }
    00118     int Write(const int* pData, int pSize){ return Write((void*)pData, pSize); }
    00119     int Read(char* pData, int pSize) const { return Read((void*)pData, pSize); }
    00120     int Read(int* pData, int pSize) const { return Read((void*)pData, pSize); }
    00121 #endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
    00122 };
    00123
    00124 #include <fbxsdk/fbxsdk_nsend.h>
    00125
    00126 #endif /* _FBXSDK_CORE_STREAM_H_ */