本文整理汇总了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);
}
}
}
示例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;
}
}
}
}
示例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);
}
}
示例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);
}
}
示例5: GiveElements
inline void Type_::GiveElements(
ThePairOperation & thePairOperation,
Consumer & theConsumer
) {
theConsumer.TakeElement(
GetOperator()
);
if (
!thePairOperation.thisExpression.IsEmpty()
) {
theConsumer.TakeQuotedElements(thePairOperation.thisExpression);
}
}
示例6: GiveElements
inline void Type_::GiveElements(
TheFrontPushOperation & theFrontPushOperation,
Consumer & theConsumer
) {
theConsumer.TakeElement(
GetOperator()
);
if (
!theFrontPushOperation.thisProgram.IsEmpty()
) {
theConsumer.TakeQuotedElements(theFrontPushOperation.thisProgram);
}
}