35 #ifndef IE_CORE_WRITER_H
36 #define IE_CORE_WRITER_H
38 #include "IECore/Export.h"
39 #include "IECore/Op.h"
40 #include "IECore/ObjectParameter.h"
41 #include "IECore/FileNameParameter.h"
49 IE_CORE_FORWARDDECLARE( Writer );
50 IE_CORE_FORWARDDECLARE( FileNameParameter );
60 IE_CORE_DECLARERUNTIMETYPED(
Writer,
Op )
63 static WriterPtr create( ObjectPtr
object,
const std::string &fileName );
72 static WriterPtr create(
const std::string &fileName );
77 const std::string &fileName()
const;
81 const Object *object()
const;
89 static void supportedExtensions( std::vector<std::string> &extensions );
93 static void supportedExtensions(
TypeId typeId, std::vector<std::string> &extensions );
97 Writer(
const std::string &description,
TypeId writableType );
98 Writer(
const std::string &description,
const ObjectParameter::TypeIdSet &writableTypes );
101 ObjectPtr doOperation(
const CompoundObject * operands )
override;
108 typedef WriterPtr (*CreatorFn)();
111 typedef bool (*CanWriteFn)( ConstObjectPtr object,
const std::string &fileName );
119 static void registerWriter(
const std::string &extensions, CanWriteFn canWrite, CreatorFn creator,
TypeId typeId );
131 static WriterPtr creator();
134 ParameterPtr m_objectParameter;
135 FileNameParameterPtr m_fileNameParameter;
145 typedef std::multimap<std::string, WriterFns> ExtensionsToFnsMap;
146 static ExtensionsToFnsMap *extensionsToFns();
148 void constructParameters(
void );
153 #include "IECore/Writer.inl"
155 #endif // IE_CORE_WRITER_H
TypeId
Definition: TypeIds.h:46
Definition: CompoundObject.h:46
This namespace contains all components of the core library.
Definition: AddSmoothSkinningInfluencesOp.h:43