Doxygen
FilterList类 参考

The implementation of the "list" filter 更多...

静态 Public 成员函数

static TemplateVariant apply (const TemplateVariant &v, const TemplateVariant &)
 

详细描述

The implementation of the "list" filter

在文件 template.cpp862 行定义.

成员函数说明

◆ apply()

static TemplateVariant FilterList::apply ( const TemplateVariant v,
const TemplateVariant  
)
inlinestatic

在文件 template.cpp865 行定义.

866  {
867  if (v.isValid())
868  {
869  if (v.isList()) // input is already a list
870  {
871  return v;
872  }
873  // create a list with v as the only element
875  list->append(v);
876  return TemplateVariant(std::static_pointer_cast<TemplateListIntf>(list));
877  }
878  else
879  {
880  return v;
881  }
882  }

引用了 TemplateList::alloc(), TemplateVariant::isList() , 以及 TemplateVariant::isValid().


该类的文档由以下文件生成:
TemplateVariant::isList
constexpr bool isList() const
Returns TRUE if the variant holds a list value
Definition: template.h:213
TemplateListPtr
std::shared_ptr< TemplateList > TemplateListPtr
Definition: template.cpp:224
TemplateVariant
Variant type which can hold one value of a fixed set of types.
Definition: template.h:98
TemplateList::alloc
static TemplateListPtr alloc()
Creates an instance and returns a shared pointer to it
Definition: template.cpp:291
TemplateVariant::isValid
constexpr bool isValid() const
Returns TRUE if the variant holds a valid value, or FALSE otherwise
Definition: template.h:203