FinishedAttributeList(const std::vector<Int>& attribs) : _attribs(attribs) { if(!_attribs.empty() && (_attribs.back() != _traits.ListEnd())) { _attribs.push_back(_traits.ListEnd()); } assert( (_attribs.empty()) || ( (_attribs.size() % 2 == 1) && (_attribs.back() == _traits.ListEnd()) ) ); }
/** * @post Finished() * @see Get() * @see Finished() */ AttributeList& Finish(void) { if(!Finished()) _attribs.push_back(_traits.ListEnd()); return *this; }
/** * @see Finish() */ bool Finished(void) const { return _attribs.back() == _traits.ListEnd(); }