35 #ifndef IE_CORE_READER_H
36 #define IE_CORE_READER_H
41 #include "boost/function.hpp"
43 #include "IECore/Export.h"
44 #include "IECore/Op.h"
45 #include "IECore/CompoundObject.h"
50 IE_CORE_FORWARDDECLARE( Reader );
51 IE_CORE_FORWARDDECLARE( FileNameParameter );
61 IE_CORE_DECLARERUNTIMETYPED(
Reader,
Op );
66 const std::string &fileName()
const;
73 virtual CompoundObjectPtr readHeader();
84 static ReaderPtr create(
const std::string &fileName );
90 static void supportedExtensions( std::vector<std::string> &extensions );
94 static void supportedExtensions(
TypeId typeId, std::vector<std::string> &extensions );
98 typedef boost::function<ReaderPtr ( const std::string &fileName )>
CreatorFn;
101 typedef boost::function<bool ( const std::string &fileName )>
CanReadFn;
110 static void registerReader(
const std::string &extensions, CanReadFn canRead, CreatorFn creator,
TypeId typeId );
119 Reader(
const std::string &description, ParameterPtr resultParameter =
nullptr );
133 static ReaderPtr creator(
const std::string &fileName );
136 FileNameParameterPtr m_fileNameParameter;
146 typedef std::multimap<std::string, ReaderFns> ExtensionsToFnsMap;
147 static ExtensionsToFnsMap *extensionsToFns();
153 #include "IECore/Reader.inl"
155 #endif // IE_CORE_READER_H
boost::function< ReaderPtr(const std::string &fileName)> CreatorFn
Definition: Reader.h:98
TypeId
Definition: TypeIds.h:46
boost::function< bool(const std::string &fileName)> CanReadFn
Definition: Reader.h:101
This namespace contains all components of the core library.
Definition: AddSmoothSkinningInfluencesOp.h:43