37 #ifndef Alembic_Abc_Argument_h
38 #define Alembic_Abc_Argument_h
55 uint32_t iTimeIndex = 0,
58 : m_errorHandlerPolicy( iPolicy ),
59 m_metaData( iMetaData ),
60 m_timeSampling( iTimeSampling ),
61 m_timeSamplingIndex( iTimeIndex ),
63 m_sparse( iSparse ) {}
66 { m_timeSamplingIndex = iTimeSamplingIndex; }
69 { m_errorHandlerPolicy = iPolicy; }
72 { m_metaData = iMetaData; }
75 { m_timeSampling = iTimeSampling; }
78 { m_matching = iMatching; }
81 { m_sparse = iSparse; }
84 {
return m_errorHandlerPolicy; }
87 {
return m_metaData; }
90 {
return m_timeSampling; }
93 {
return m_timeSamplingIndex; }
96 {
return m_matching; }
105 uint32_t m_timeSamplingIndex;
123 m_whichVariant( kArgumentNone ) {}
126 m_whichVariant( kArgumentErrorHandlerPolicy ),
127 m_variant( iPolicy ) {}
130 m_whichVariant( kArgumentTimeSamplingIndex ),
131 m_variant( iTsIndex ) {}
134 m_whichVariant( kArgumentMetaData ),
135 m_variant( &iMetaData ) {}
138 m_whichVariant( kArgumentTimeSamplingPtr ),
139 m_variant( &iTsPtr ) {}
142 m_whichVariant( kArgumentSchemaInterpMatching ),
143 m_variant( iMatch ) {}
146 m_whichVariant( kArgumentSparse ),
147 m_variant( iSparse ) {}
151 switch ( m_whichVariant )
153 case kArgumentErrorHandlerPolicy:
154 iArgs( m_variant.policy );
157 case kArgumentTimeSamplingIndex:
158 iArgs( m_variant.timeSamplingIndex );
161 case kArgumentMetaData:
162 iArgs( *m_variant.metaData );
165 case kArgumentTimeSamplingPtr:
166 iArgs( *m_variant.timeSamplingPtr );
169 case kArgumentSchemaInterpMatching:
170 iArgs( m_variant.schemaInterpMatching );
173 case kArgumentSparse:
174 iArgs( m_variant.sparseFlag );
194 enum ArgumentWhichFlag
197 kArgumentErrorHandlerPolicy,
198 kArgumentTimeSamplingIndex,
200 kArgumentTimeSamplingPtr,
201 kArgumentSchemaInterpMatching,
203 }
const m_whichVariant;
205 union ArgumentVariant
207 ArgumentVariant() : timeSamplingIndex( 0 ) {}
212 explicit ArgumentVariant( Alembic::Util::uint32_t iTsIndex ) :
213 timeSamplingIndex( iTsIndex ) {}
216 metaData( iMetaData ) {}
219 timeSamplingPtr( iTsPtr ) {}
222 schemaInterpMatching( iMatch ) {}
224 explicit ArgumentVariant(
SparseFlag iSparse ) :
225 sparseFlag( iSparse ) {}
228 Alembic::Util::uint32_t timeSamplingIndex;
240 template <
class SOMETHING>
242 ( SOMETHING iSomething,
250 iArg1.setInto( args );
251 iArg2.setInto( args );
252 iArg3.setInto( args );
265 iArg1.setInto( args );
266 iArg2.setInto( args );
267 iArg3.setInto( args );
280 iArg1.setInto( args );
281 iArg2.setInto( args );
282 iArg3.setInto( args );
295 iArg1.setInto( args );
296 iArg2.setInto( args );
297 iArg3.setInto( args );
310 iArg1.setInto( args );
311 iArg2.setInto( args );
312 iArg3.setInto( args );
325 iArg1.setInto( args );
326 iArg2.setInto( args );
327 iArg3.setInto( args );
340 iArg1.setInto( args );
341 iArg2.setInto( args );
342 iArg3.setInto( args );
Argument(SparseFlag iSparse)
Arguments(ErrorHandler::Policy iPolicy=ErrorHandler::kThrowPolicy, const AbcA::MetaData &iMetaData=AbcA::MetaData(), AbcA::TimeSamplingPtr iTimeSampling=AbcA::TimeSamplingPtr(), uint32_t iTimeIndex=0, SchemaInterpMatching iMatch=kNoMatching, SparseFlag iSparse=kFull)
void operator()(const uint32_t &iTimeSamplingIndex)
hboost::math::policies::policy< hboost::math::policies::domain_error< hboost::math::policies::ignore_error >, hboost::math::policies::pole_error< hboost::math::policies::ignore_error >, hboost::math::policies::overflow_error< hboost::math::policies::ignore_error >, hboost::math::policies::underflow_error< hboost::math::policies::ignore_error >, hboost::math::policies::denorm_error< hboost::math::policies::ignore_error >, hboost::math::policies::rounding_error< hboost::math::policies::ignore_error >, hboost::math::policies::evaluation_error< hboost::math::policies::ignore_error >, hboost::math::policies::indeterminate_result_error< hboost::math::policies::ignore_error > > policy
void operator()(const SchemaInterpMatching &iMatching)
SchemaInterpMatching getSchemaInterpMatching() const
void setInto(Arguments &iArgs) const
AbcA::MetaData GetMetaData(const Argument &iArg0, const Argument &iArg1=Argument(), const Argument &iArg2=Argument(), const Argument &iArg3=Argument())
ErrorHandler::Policy GetErrorHandlerPolicyFromArgs(const Argument &iArg0, const Argument &iArg1=Argument(), const Argument &iArg2=Argument(), const Argument &iArg3=Argument())
uint32_t getTimeSamplingIndex() const
AbcA::TimeSamplingPtr getTimeSampling() const
void operator()(const ErrorHandler::Policy &iPolicy)
Argument(ErrorHandler::Policy iPolicy)
Argument(const AbcA::MetaData &iMetaData)
Alembic::Util::shared_ptr< TimeSampling > TimeSamplingPtr
ErrorHandler::Policy getErrorHandlerPolicy() const
ErrorHandler::Policy GetErrorHandlerPolicy(SOMETHING iSomething, const Argument &iArg0, const Argument &iArg1=Argument(), const Argument &iArg2=Argument(), const Argument &iArg3=Argument())
SchemaInterpMatching GetSchemaInterpMatching(const Argument &iArg0, const Argument &iArg1=Argument(), const Argument &iArg2=Argument(), const Argument &iArg3=Argument())
bool IsSparse(const Argument &iArg0, const Argument &iArg1=Argument(), const Argument &iArg2=Argument(), const Argument &iArg3=Argument())
void operator()(const SparseFlag &iSparse)
AbcA::TimeSamplingPtr GetTimeSampling(const Argument &iArg0, const Argument &iArg1=Argument(), const Argument &iArg2=Argument(), const Argument &iArg3=Argument())
void operator()(const AbcA::TimeSamplingPtr &iTimeSampling)
Argument(SchemaInterpMatching iMatch)
**If you just want to fire and args
uint32_t GetTimeSamplingIndex(const Argument &iArg0, const Argument &iArg1=Argument(), const Argument &iArg2=Argument(), const Argument &iArg3=Argument())
const AbcA::MetaData & getMetaData() const
Argument(Alembic::Util::uint32_t iTsIndex)
Argument(const AbcA::TimeSamplingPtr &iTsPtr)
#define ALEMBIC_VERSION_NS
void operator()(const AbcA::MetaData &iMetaData)