Doxygen
FilterGet类 参考

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

静态 Public 成员函数

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

详细描述

The implementation of the "get" filter

在文件 template.cpp769 行定义.

成员函数说明

◆ apply()

static TemplateVariant FilterGet::apply ( const TemplateVariant v,
const TemplateVariant arg 
)
inlinestatic

在文件 template.cpp772 行定义.

773  {
774  if (v.isValid() && (v.isStruct() || v.isWeakStruct()) && arg.isString())
775  {
777  if (s)
778  {
779  TemplateVariant result = v.toStruct()->get(arg.toString());
780  //printf("\nok[%s]=%d\n",qPrint(arg.toString()),result.type());
781  return result;
782  }
783  else
784  {
785  return false;
786  }
787  }
788  else
789  {
790  //printf("\nnok[%s]\n",qPrint(arg.toString()));
791  return false;
792  }
793  }

引用了 TemplateVariant::isString(), TemplateVariant::isStruct(), TemplateVariant::isValid(), TemplateVariant::isWeakStruct(), TemplateVariant::toString() , 以及 TemplateVariant::toStruct().


该类的文档由以下文件生成:
TemplateVariant::toStruct
TemplateStructIntfPtr toStruct()
Returns the pointer to struct referenced by this variant or 0 if this variant does not have struct ty...
Definition: template.cpp:441
TemplateVariant::isWeakStruct
constexpr bool isWeakStruct() const
Returns TRUE if the variant holds a struct value
Definition: template.h:217
TemplateStructIntfPtr
std::shared_ptr< TemplateStructIntf > TemplateStructIntfPtr
Definition: template.h:33
TemplateVariant
Variant type which can hold one value of a fixed set of types.
Definition: template.h:98
TemplateVariant::isStruct
constexpr bool isStruct() const
Returns TRUE if the variant holds a struct value
Definition: template.h:211
TemplateVariant::toString
QCString toString() const
Returns the variant as a string.
Definition: template.cpp:399
TemplateVariant::isValid
constexpr bool isValid() const
Returns TRUE if the variant holds a valid value, or FALSE otherwise
Definition: template.h:203
TemplateVariant::isString
constexpr bool isString() const
Returns TRUE if the variant holds a string value
Definition: template.h:209