35 #ifndef IE_CORE_STREAMINDEXEDIO_H
36 #define IE_CORE_STREAMINDEXEDIO_H
41 #include "tbb/recursive_mutex.h"
42 #include "boost/optional.hpp"
43 #include "boost/iostreams/filtering_stream.hpp"
45 #include "IECore/Export.h"
46 #include "IECore/IndexedIO.h"
47 #include "IECore/Exception.h"
48 #include "IECore/VectorTypedData.h"
64 IndexedIO::OpenMode openMode()
const override;
66 void path( IndexedIO::EntryIDList &result )
const override;
72 void entryIds( IndexedIO::EntryIDList &names )
const override;
74 void entryIds( IndexedIO::EntryIDList &names, IndexedIO::EntryType type )
const override;
86 void removeAll()
override;
88 IndexedIOPtr parentDirectory()
override;
90 ConstIndexedIOPtr parentDirectory()
const override;
92 IndexedIOPtr directory(
const IndexedIO::EntryIDList &path,
IndexedIO::MissingBehaviour missingBehaviour = IndexedIO::ThrowIfMissing )
override;
94 ConstIndexedIOPtr directory(
const IndexedIO::EntryIDList &path,
IndexedIO::MissingBehaviour missingBehaviour = IndexedIO::ThrowIfMissing )
const override;
96 void commit()
override;
98 void write(
const IndexedIO::EntryID &name,
const float *x,
unsigned long arrayLength)
override;
99 void write(
const IndexedIO::EntryID &name,
const double *x,
unsigned long arrayLength)
override;
100 void write(
const IndexedIO::EntryID &name,
const half *x,
unsigned long arrayLength)
override;
101 void write(
const IndexedIO::EntryID &name,
const int *x,
unsigned long arrayLength)
override;
102 void write(
const IndexedIO::EntryID &name,
const int64_t *x,
unsigned long arrayLength)
override;
103 void write(
const IndexedIO::EntryID &name,
const uint64_t *x,
unsigned long arrayLength)
override;
104 void write(
const IndexedIO::EntryID &name,
const unsigned int *x,
unsigned long arrayLength)
override;
105 void write(
const IndexedIO::EntryID &name,
const char *x,
unsigned long arrayLength)
override;
106 void write(
const IndexedIO::EntryID &name,
const unsigned char *x,
unsigned long arrayLength)
override;
107 void write(
const IndexedIO::EntryID &name,
const std::string *x,
unsigned long arrayLength)
override;
108 void write(
const IndexedIO::EntryID &name,
const short *x,
unsigned long arrayLength)
override;
109 void write(
const IndexedIO::EntryID &name,
const unsigned short *x,
unsigned long arrayLength)
override;
124 void read(
const IndexedIO::EntryID &name,
float *&x,
unsigned long arrayLength)
const override;
125 void read(
const IndexedIO::EntryID &name,
double *&x,
unsigned long arrayLength)
const override;
126 void read(
const IndexedIO::EntryID &name, half *&x,
unsigned long arrayLength)
const override;
127 void read(
const IndexedIO::EntryID &name,
int *&x,
unsigned long arrayLength)
const override;
128 void read(
const IndexedIO::EntryID &name, int64_t *&x,
unsigned long arrayLength)
const override;
129 void read(
const IndexedIO::EntryID &name, uint64_t *&x,
unsigned long arrayLength)
const override;
130 void read(
const IndexedIO::EntryID &name,
unsigned int *&x,
unsigned long arrayLength)
const override;
131 void read(
const IndexedIO::EntryID &name,
char *&x,
unsigned long arrayLength)
const override;
132 void read(
const IndexedIO::EntryID &name,
unsigned char *&x,
unsigned long arrayLength)
const override;
133 void read(
const IndexedIO::EntryID &name, std::string *&x,
unsigned long arrayLength)
const override;
134 void read(
const IndexedIO::EntryID &name,
short *&x,
unsigned long arrayLength)
const override;
135 void read(
const IndexedIO::EntryID &name,
unsigned short *&x,
unsigned long arrayLength)
const override;
153 IE_CORE_DECLAREPTR( Index );
156 IE_CORE_DECLAREPTR( Node );
166 void seekg(
size_t pos, std::ios_base::seekdir dir );
167 void seekp(
size_t pos, std::ios_base::seekdir dir );
168 void read(
char *buffer,
size_t size );
169 void write(
const char *buffer,
size_t size );
173 IndexedIO::OpenMode openMode()
const;
176 typedef tbb::recursive_mutex Mutex;
177 typedef Mutex::scoped_lock MutexLock;
181 char *ioBuffer(
unsigned long size );
184 virtual void flush(
size_t endPosition );
186 static bool canRead( std::iostream &stream );
193 void setStream( std::iostream *stream,
bool emptyFile );
195 IndexedIO::OpenMode m_openmode;
196 std::iostream *m_stream;
199 unsigned long m_ioBufferLen;
211 void open( StreamFilePtr file,
const IndexedIO::EntryIDList &root );
251 virtual IndexedIO *duplicate(Node &rootNode)
const = 0;
264 void setRoot(
const IndexedIO::EntryIDList &root );
272 #endif // IE_CORE_STREAMINDEXEDIO_H
Definition: IndexedIO.h:57
Definition: StreamIndexedIO.h:56
MissingBehaviour
Enum used to specify behavior when querying child directories.
Definition: IndexedIO.h:116
Class that provides access to the stream file.
Definition: StreamIndexedIO.h:161
Definition: InternedString.h:55
A representation of a single file/directory.
Definition: IndexedIO.h:492
Definition: RefCounted.h:124
This namespace contains all components of the core library.
Definition: AddSmoothSkinningInfluencesOp.h:43