Ejemplo n.º 1
0
	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())
			)
		);
	}
Ejemplo n.º 2
0
	/**
	 *  @post Finished()
	 *  @see Get()
	 *  @see Finished()
	 */
	AttributeList& Finish(void)
	{
		if(!Finished()) _attribs.push_back(_traits.ListEnd());
		return *this;
	}
Ejemplo n.º 3
0
	/**
	 *  @see Finish()
	 */
	bool Finished(void) const
	{
		return _attribs.back() == _traits.ListEnd();
	}