37#ifndef Alembic_Abc_ISchema_h
38#define Alembic_Abc_ISchema_h
40#include <Alembic/Abc/Foundation.h>
41#include <Alembic/Abc/OSchema.h>
42#include <Alembic/Abc/ICompoundProperty.h>
46namespace ALEMBIC_VERSION_NS {
63 typedef INFO info_type;
77 return INFO::defaultName();
83 static bool matches(
const AbcA::MetaData &iMetaData,
84 SchemaInterpMatching iMatching = kStrictMatching )
86 if ( std::string() ==
getSchemaTitle() || iMatching == kNoMatching )
89 if ( iMatching == kStrictMatching || iMatching == kSchemaTitleMatching )
100 static bool matches(
const AbcA::PropertyHeader &iHeader,
101 SchemaInterpMatching iMatching = kStrictMatching )
103 return matches( iHeader.getMetaData(), iMatching );
118 const std::string &iName,
122 init( iParent, iName, iArg0, iArg1 );
132 GetErrorHandlerPolicy( iProperty, iArg0, iArg1 ) )
134 ALEMBIC_ABC_SAFE_CALL_BEGIN(
"ISchema::ISchema( wrap )" );
136 const AbcA::PropertyHeader &pheader = this->
getHeader();
139 GetSchemaInterpMatching( iArg0, iArg1 ) ),
140 "Incorrect match of schema: "
141 << pheader.getMetaData().get(
"schema" )
152 ALEMBIC_ABC_SAFE_CALL_END_RESET();
157 WrapExistingFlag iFlag,
161 *
this =
ISchema( iProperty, iArg0, iArg1 );
171 const std::string &iName,
181 const std::string &iName,
186 iArg0.setInto( args );
187 iArg1.setInto( args );
189 getErrorHandler().setPolicy( args.getErrorHandlerPolicy() );
191 ALEMBIC_ABC_SAFE_CALL_BEGIN(
"ISchema::ISchema::init()" );
194 ABCA_ASSERT( iParent,
195 "NULL parent passed into ISchema ctor" );
196 AbcA::CompoundPropertyReaderPtr parent = iParent.
getPtr();
197 ABCA_ASSERT( parent,
"NULL CompoundPropertyReaderPtr" );
199 const AbcA::PropertyHeader *pheader = parent->getPropertyHeader( iName );
201 ABCA_ASSERT( pheader != NULL,
202 "Nonexistent compound property: " << iName );
205 ABCA_ASSERT( matches( *pheader, args.getSchemaInterpMatching() ),
207 "Incorrect match of schema: "
208 << pheader->getMetaData().get(
"schema" )
213 m_property = parent->getCompoundProperty( iName );
215 ALEMBIC_ABC_SAFE_CALL_END_RESET();
220using namespace ALEMBIC_VERSION_NS;
Definition Argument.h:120
const AbcA::PropertyHeader & getHeader() const
Definition IBaseProperty.h:192
bool valid() const
Definition IBaseProperty.h:164
AbcA::CompoundPropertyReaderPtr getPtr() const
Definition IBaseProperty.h:156
Definition ICompoundProperty.h:53
ICompoundProperty()
Definition ICompoundProperty.h:65
ICompoundProperty getParent() const
Definition ICompoundProperty.cpp:139
static bool matches(const AbcA::PropertyHeader &iHeader, SchemaInterpMatching iMatching=kStrictMatching)
Definition ISchema.h:100
virtual ~ISchema()
Definition ISchema.h:167
static const char * getDefaultSchemaName()
Definition ISchema.h:75
static bool matches(const AbcA::MetaData &iMetaData, SchemaInterpMatching iMatching=kStrictMatching)
Definition ISchema.h:83
ISchema(const ICompoundProperty &iProperty, const Argument &iArg0=Argument(), const Argument &iArg1=Argument())
Definition ISchema.h:128
static const char * getSchemaTitle()
Definition ISchema.h:68
ISchema(const ICompoundProperty &iParent, const std::string &iName, const Argument &iArg0=Argument(), const Argument &iArg1=Argument())
Definition ISchema.h:117
ISchema()
Definition ISchema.h:112
Alembic namespace ...
Definition ArchiveInfo.cpp:39