本文整理汇总了C++中Column::setReport方法的典型用法代码示例。如果您正苦于以下问题:C++ Column::setReport方法的具体用法?C++ Column::setReport怎么用?C++ Column::setReport使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Column
的用法示例。
在下文中一共展示了Column::setReport方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: factory
////////////////////////////////////////////////////////////////////////////////
// Supports the complete column definition:
//
// <type>[.<format>]
//
Column* Column::factory (const std::string& name, const std::string& report)
{
// Decompose name into type and style.
std::string::size_type dot = name.find ('.');
std::string column_name;
std::string column_style;
if (dot != std::string::npos)
{
column_name = name.substr (0, dot);
column_style = name.substr (dot + 1);
}
else
{
column_name = name;
column_style = "default";
}
Column* c;
if (column_name == "depends") c = new ColumnDepends ();
else if (column_name == "description") c = new ColumnDescription ();
else if (column_name == "due") c = new ColumnDue ();
else if (column_name == "end") c = new ColumnEnd ();
else if (column_name == "entry") c = new ColumnEntry ();
else if (column_name == "id") c = new ColumnID ();
else if (column_name == "imask") c = new ColumnIMask ();
else if (column_name == "mask") c = new ColumnMask ();
else if (column_name == "modified") c = new ColumnModified ();
else if (column_name == "parent") c = new ColumnParent ();
else if (column_name == "priority") c = new ColumnPriority ();
else if (column_name == "project") c = new ColumnProject ();
else if (column_name == "recur") c = new ColumnRecur ();
else if (column_name == "scheduled") c = new ColumnScheduled ();
else if (column_name == "start") c = new ColumnStart ();
else if (column_name == "status") c = new ColumnStatus ();
else if (column_name == "tags") c = new ColumnTags ();
else if (column_name == "until") c = new ColumnUntil ();
else if (column_name == "urgency") c = new ColumnUrgency ();
else if (column_name == "uuid") c = new ColumnUUID ();
else if (column_name == "wait") c = new ColumnWait ();
// Special non-task column.
else if (column_name == "string") c = new ColumnString ();
// UDA.
else if (context.config.get ("uda." + column_name + ".type") != "")
c = Column::uda (column_name);
else
throw format (STRING_COLUMN_BAD_NAME, column_name);
c->setReport (report);
c->setStyle (column_style);
return c;
}