当前位置: 首页>>代码示例>>C++>>正文


C++ Consumer::TakeElement方法代码示例

本文整理汇总了C++中Consumer::TakeElement方法的典型用法代码示例。如果您正苦于以下问题:C++ Consumer::TakeElement方法的具体用法?C++ Consumer::TakeElement怎么用?C++ Consumer::TakeElement使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Consumer的用法示例。


在下文中一共展示了Consumer::TakeElement方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: GiveElements

inline void Type_::GiveElements(
	TheChooseOperation & theChooseOperation,
	Consumer & theConsumer
) {
	theConsumer.TakeElement(
		GetOperator()
	);
	if (0 < theChooseOperation.thisOperandCount) {
		theConsumer.TakeElement(theChooseOperation.thisEmptyCase);
		if (1 < theChooseOperation.thisOperandCount) {
			theConsumer.TakeElement(theChooseOperation.thisNonEmptyCase);
		}
	}
}
开发者ID:sparist,项目名称:Om,代码行数:14,代码来源:choose_operation.cpp

示例2: GiveElements

inline void Type_::GiveElements(Consumer & theConsumer) const {
	if (
		!this->IsEmpty()
	) {
		typedef TranslatorVector::const_iterator Iterator;
		Iterator const theEnd = this->thisTranslatorVector.end();
		for (
			Iterator theCurrent = this->thisTranslatorVector.begin();
			;
			theConsumer.TakeElement(
				Separator::GetLineSeparator()
			)
		) {
			assert(*theCurrent);
			Translator const & theTranslator = **theCurrent;
			assert(
				!theTranslator.IsEmpty()
			);
			theTranslator.GiveElements(theConsumer);
			if (theEnd == ++theCurrent) {
				return;
			}
		}
	}
}
开发者ID:sparist,项目名称:Om,代码行数:25,代码来源:environment.cpp

示例3: FrontGiveSegment

inline void Type_::FrontGiveSegment(Consumer & theConsumer) {
	if (
		!this->thisString.empty()
	) {
		Operator theOperator;
		{
			std::string & theString = theOperator.thisString;
			{
				typedef boost::locale::boundary::segment_index<std::string::const_iterator> SegmentCollection;

				SegmentCollection const theSegmentCollection(
					static_cast<boost::locale::boundary::boundary_type>(theSegment),
					this->thisString.begin(),
					this->thisString.end()
				);

				SegmentCollection::const_iterator const theSegmentIterator(
					theSegmentCollection.begin()
				);
				assert(
					theSegmentCollection.end() != theSegmentIterator
				);
				theSegmentIterator->str().swap(theString);
			}
			assert(
				!theString.empty()
			);
			this->thisString.erase(
				0,
				theString.size()
			);
		}
		theConsumer.TakeElement(theOperator);
	}
}
开发者ID:sparist,项目名称:Om,代码行数:35,代码来源:operator.cpp

示例4: FrontGiveCodePoint

inline void Type_::FrontGiveCodePoint(Consumer & theConsumer) {
	if (
		!this->thisString.empty()
	) {
		Operator theOperator;
		{
			std::string & theString = theOperator.thisString;
			{
				Om::Source::CodePointStringFrontSource<std::string::const_iterator> theCodePointStringRange(
					this->thisString.begin(),
					this->thisString.end()
				);
				assert(theCodePointStringRange);
				theCodePointStringRange->swap(theString);
			}
			assert(
				!theString.empty()
			);
			this->thisString.erase(
				0,
				theString.size()
			);
		}
		theConsumer.TakeElement(theOperator);
	}
}
开发者ID:sparist,项目名称:Om,代码行数:26,代码来源:operator.cpp

示例5: GiveElements

inline void Type_::GiveElements(
	ThePairOperation & thePairOperation,
	Consumer & theConsumer
) {
	theConsumer.TakeElement(
		GetOperator()
	);
	if (
		!thePairOperation.thisExpression.IsEmpty()
	) {
		theConsumer.TakeQuotedElements(thePairOperation.thisExpression);
	}
}
开发者ID:sparist,项目名称:Om,代码行数:13,代码来源:pair_operation.cpp

示例6: GiveElements

inline void Type_::GiveElements(
	TheFrontPushOperation & theFrontPushOperation,
	Consumer & theConsumer
) {
	theConsumer.TakeElement(
		GetOperator()
	);
	if (
		!theFrontPushOperation.thisProgram.IsEmpty()
	) {
		theConsumer.TakeQuotedElements(theFrontPushOperation.thisProgram);
	}
}
开发者ID:sparist,项目名称:Om,代码行数:13,代码来源:front_push_operation.cpp


注:本文中的Consumer::TakeElement方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。