6 #ifndef INCLUDED_IMF_ATTRIBUTE_H
7 #define INCLUDED_IMF_ATTRIBUTE_H
27 # pragma warning(push)
28 # pragma warning(disable : 4251)
29 # pragma warning(disable : 4275)
48 virtual const char* typeName ()
const = 0;
54 virtual Attribute*
copy ()
const = 0;
60 virtual void writeValueTo (
63 virtual void readValueFrom (
66 virtual void copyValueFrom (
const Attribute& other) = 0;
72 IMF_EXPORT static Attribute* newAttribute (
const char typeName[]);
78 IMF_EXPORT static bool knownType (
const char typeName[]);
86 static void registerAttributeType (
87 const char typeName[], Attribute* (*newAttribute) ());
95 static void unRegisterAttributeType (
const char typeName[]);
134 virtual const char*
typeName ()
const;
141 static const char* staticTypeName ();
235 return staticTypeName ();
259 OPENEXR_IMF_INTERNAL_NAMESPACE::Xdr::write<
260 OPENEXR_IMF_INTERNAL_NAMESPACE::StreamIO> (os, _value);
268 OPENEXR_IMF_INTERNAL_NAMESPACE::Xdr::read<
269 OPENEXR_IMF_INTERNAL_NAMESPACE::StreamIO> (is, _value);
276 _value =
cast (other)._value;
285 if (t == 0)
throw IEX_NAMESPACE::TypeExc (
"Unexpected attribute type.");
297 if (t == 0)
throw IEX_NAMESPACE::TypeExc (
"Unexpected attribute type.");
306 return *
cast (&attribute);
313 return *
cast (&attribute);
332 #if defined(_MSC_VER)
333 # pragma warning(pop)
static TypedAttribute * cast(Attribute *attribute)
#define OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT
OIIO_UTIL_API bool copy(string_view from, string_view to, std::string &err)
GLsizei const GLfloat * value
virtual Attribute * copy() const =0
virtual void writeValueTo(OPENEXR_IMF_INTERNAL_NAMESPACE::OStream &os, int version) const =0
static IMF_EXPORT void unRegisterAttributeType(const char typeName[])
static void unRegisterAttributeType()
virtual void writeValueTo(OPENEXR_IMF_INTERNAL_NAMESPACE::OStream &os, int version) const
SYS_FORCE_INLINE const X * cast(const InstancablePtr *o)
#define IMF_EXPORT_TEMPLATE_TYPE
class IMF_EXPORT_TYPE OStream
virtual void readValueFrom(OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &is, int size, int version)
static Attribute * makeNewAttribute()
static IMF_EXPORT void registerAttributeType(const char typeName[], Attribute *(*newAttribute)())
GT_API const UT_StringHolder version
virtual Attribute * copy() const
virtual const char * typeName() const
LeafData & operator=(const LeafData &)=delete
static void registerAttributeType()
OIIO_API bool attribute(string_view name, TypeDesc type, const void *val)
#define OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER
virtual const char * typeName() const =0
virtual void readValueFrom(OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &is, int size, int version)=0
class IMF_EXPORT_TYPE Attribute
virtual ~TypedAttribute()
virtual void copyValueFrom(const Attribute &other)
virtual void copyValueFrom(const Attribute &other)=0
class IMF_EXPORT_TYPE IStream