37#ifndef Alembic_Abc_OSchema_h
38#define Alembic_Abc_OSchema_h
105#define ALEMBIC_ABC_DECLARE_SCHEMA_INFO( STITLE, SBTYP, SDFLT, SPREP, STDEF ) \
108 static const char * title() { return ( STITLE ) ; } \
109 static const char * defaultName() { return ( SDFLT ); } \
110 static const char * schemaBaseType() { return ( SBTYP ); } \
111 static bool replaceOnSparse() { return SPREP; } \
132 return INFO::title();
139 return INFO::schemaBaseType();
146 return INFO::defaultName();
156 return INFO::replaceOnSparse();
162 static bool matches(
const AbcA::MetaData &iMetaData,
179 static bool matches(
const AbcA::PropertyHeader &iHeader,
182 return matches( iHeader.getMetaData(), iMatching );
195 OSchema( AbcA::CompoundPropertyWriterPtr iParent,
196 const std::string &iName,
203 this_type::init( iParent, iName, iArg0, iArg1, iArg2, iArg3 );
209 const std::string &iName,
225 void init( AbcA::CompoundPropertyWriterPtr iParent,
226 const std::string &iName,
237void OSchema<INFO>::init( AbcA::CompoundPropertyWriterPtr iParent,
238 const std::string &iName,
257 "NULL parent passed into OSchema ctor" );
261 std::string emptyStr;
262 if ( emptyStr != getSchemaTitle() && !args.
isSparse() )
264 mdata.set(
"schema", getSchemaTitle() );
266 if ( emptyStr != getSchemaBaseType() && !args.
isSparse() )
268 mdata.set(
"schemaBaseType", getSchemaBaseType() );
272 m_property = iParent->createCompoundProperty( iName, mdata );
#define ABCA_ASSERT(COND, TEXT)
#define ALEMBIC_ABC_SAFE_CALL_BEGIN(CONTEXT)
#define ALEMBIC_ABC_SAFE_CALL_END_RESET()
void setInto(Arguments &iArgs) const
const AbcA::MetaData & getMetaData() const
ErrorHandler::Policy getErrorHandlerPolicy() const
OSchema(AbcA::CompoundPropertyWriterPtr iParent, const std::string &iName, const Argument &iArg0=Argument(), const Argument &iArg1=Argument(), const Argument &iArg2=Argument(), const Argument &iArg3=Argument())
static const char * getDefaultSchemaName()
OSchema(OCompoundProperty iParent, const std::string &iName, const Argument &iArg0=Argument(), const Argument &iArg1=Argument(), const Argument &iArg2=Argument())
static bool matches(const AbcA::MetaData &iMetaData, SchemaInterpMatching iMatching=kStrictMatching)
static bool matches(const AbcA::PropertyHeader &iHeader, SchemaInterpMatching iMatching=kStrictMatching)
OSchema< INFO > this_type
static const char * getSchemaTitle()
static const char * getSchemaBaseType()
static bool replaceOnSparse()
ErrorHandler::Policy GetErrorHandlerPolicy(SOMETHING iSomething, const Argument &iArg0, const Argument &iArg1=Argument(), const Argument &iArg2=Argument(), const Argument &iArg3=Argument())