Static Public Member Functions | List of all members
FilterList Class Reference

The implementation of the "list" filter. More...

Static Public Member Functions

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

Detailed Description

The implementation of the "list" filter.

Definition at line 662 of file template.cpp.

Member Function Documentation

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

Definition at line 665 of file template.cpp.

666  {
667  if (v.isValid())
668  {
669  if (v.type()==TemplateVariant::List) // input is already a list
670  {
671  return v;
672  }
673  // create a list with v as the only element
675  list->append(v);
676  return list;
677  }
678  else
679  {
680  return v;
681  }
682  }
static TemplateList * alloc()
Definition: template.cpp:420
Default implementation of a context value of type list.
Definition: template.h:376
virtual void append(const TemplateVariant &v)
Definition: template.cpp:343
bool isValid() const
Definition: template.h:161
Type type() const
Definition: template.h:142

The documentation for this class was generated from the following file: