79struct PropertyHeaderAndFriends
81 PropertyHeaderAndFriends()
86 firstChangedIndex = 0;
88 timeSamplingIndex = 0;
92 PropertyHeaderAndFriends(
const std::string &iName,
93 const AbcA::MetaData &iMetaData ) :
94 header( iName, iMetaData )
99 firstChangedIndex = 0;
100 lastChangedIndex = 0;
101 timeSamplingIndex = 0;
105 PropertyHeaderAndFriends(
const std::string &iName,
106 AbcA::PropertyType iPropType,
107 const AbcA::MetaData &iMetaData,
108 const AbcA::DataType &iDataType,
109 const AbcA::TimeSamplingPtr & iTsamp,
110 Util::uint32_t iTimeSamplingIndex ) :
111 header( iName, iPropType, iMetaData, iDataType, iTsamp ),
112 timeSamplingIndex( iTimeSamplingIndex )
117 firstChangedIndex = 0;
118 lastChangedIndex = 0;
123 size_t verifyIndex( index_t iIndex )
126 ABCA_ASSERT( iIndex >= 0 &&
127 iIndex < nextSampleIndex,
128 "Invalid sample index: " << iIndex
129 <<
", should be between 0 and " << nextSampleIndex - 1 );
131 Util::uint32_t index = ( Util::uint32_t ) iIndex;
132 if ( index < firstChangedIndex )
137 else if ( firstChangedIndex == lastChangedIndex &&
138 firstChangedIndex == 0 )
142 else if ( index >= lastChangedIndex )
144 return (
size_t ) ( lastChangedIndex - firstChangedIndex + 1 );
147 return (
size_t ) ( index - firstChangedIndex + 1 );
151 AbcA::PropertyHeader header;
158 Util::uint32_t nextSampleIndex;
161 Util::uint32_t firstChangedIndex;
166 Util::uint32_t lastChangedIndex;
169 Util::uint32_t timeSamplingIndex;