本文整理汇总了C++中util::_Fmt方法的典型用法代码示例。如果您正苦于以下问题:C++ util::_Fmt方法的具体用法?C++ util::_Fmt怎么用?C++ util::_Fmt使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类util
的用法示例。
在下文中一共展示了util::_Fmt方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: State
void
__expect_in_target (E const& elm, Literal oper)
{
if (end_of_target())
throw error::State(_Fmt("Unable to %s element %s from target as demanded; "
"no (further) elements in target sequence") % oper % elm
, LUMIERA_ERROR_DIFF_CONFLICT);
if (*pos_ != elm)
throw error::State(_Fmt("Unable to %s element %s from target as demanded; "
"found element %s on current target position instead")
% oper % elm % *pos_
, LUMIERA_ERROR_DIFF_CONFLICT);
}
示例2: State
void
TreeDiffMutatorBinding::__failMismatch (Literal oper, GenNode const& spec)
{
throw error::State(_Fmt("Unable to %s element %s. Current shape of target "
"data does not match expectations") % oper % spec
, LUMIERA_ERROR_DIFF_CONFLICT);
}
示例3: cat
const Asset::Ident
createIdent (Query<STRU> const& query)
{
// does the query somehow specify the desired name-ID?
string nameID = query.extractID (genericIdSymbol);
if (isnil (nameID))
nameID = query.extractID (StructTraits<STRU>::idSymbol());
if (isnil (nameID))
{
// no name-ID contained in the query...
// so we'll create a new one
static int i=0;
nameID = _Fmt("%s.%d")
% StructTraits<STRU>::namePrefix()
% (++i);
}
ENSURE (!isnil (nameID));
// does the query actually demand the Nth instance/element?
string seqID = query.extractID (seqNrPredicate);
if (!isnil (seqID) && 1 < uNum(seqID))
nameID += "."+seqID;
Category cat (STRUCT, StructTraits<STRU>::catFolder());
return Asset::Ident (nameID, cat );
}
示例4: Fatal
void
TreeDiffMutatorBinding::__expect_valid_parent_scope (GenNode::ID const& idi)
{
if (0 == scopeManger_->depth())
throw error::Fatal(_Fmt("Diff application floundered after leaving scope %s; "
"unbalanced nested scopes, diff attempts to pop root.") % idi.getSym()
, LUMIERA_ERROR_DIFF_CONFLICT);
}
示例5: buildSyntacticRepresentation
/** supplement a syntactic representation (as generic query in predicate form).
* Building this representation is done on demand for performance reasons;
* typically a ScopeQuery is issued immediately into a known sub scope
* of the Session/Model and resolved by the PlacementIndex
* @todo we need a readable and sensible representation as generic query ///////////////////TICKET #901
*/
lib::QueryText
buildSyntacticRepresentation() const
{
using util::_Fmt;
TODO ("valid syntactic representation of scope queries");
return lib::QueryText (_Fmt ("scope(X, %08X), scopeRelation(X, %d)")
% hash_value(searchScope()) ////////TODO how to represent a placement in queries
% uint(searchDirection())); ////////TODO how to translate that in textual terms
}
示例6: Logic
CommandQueue&
feed (Command&& cmd)
{
if (not cmd.canExec())
throw error::Logic(_Fmt("Reject '%s'. Not suitably prepared for invocation: %s")
% cmd.getID() % cmd
, LERR_(UNBOUND_ARGUMENTS));
lib::IterQueue<Command>::feed (move(cmd));
return *this;
}