Doxygen
TemplateVariant类 参考

Variant type which can hold one value of a fixed set of types. 更多...

#include <template.h>

+ TemplateVariant 的协作图:

Public 类型

enum  Type : uint8_t {
  Type::Bool = 0, Type::Int = 1, Type::String = 2, Type::Struct = 3,
  Type::List = 4, Type::Function = 5, Type::WeakStruct = 6, Type::None = 255
}
 
using FunctionDelegate = std::function< TemplateVariant(const std::vector< TemplateVariant > &)>
 Type representing a function call in a template 更多...
 
using VariantT = Variant< bool, int, QCString, TemplateStructIntfPtr, TemplateListIntfPtr, FunctionDelegate, TemplateStructIntfWeakPtr >
 Symbolic names for the possible types that this variant can hold. 更多...
 

Public 成员函数

 TemplateVariant ()
 Constructs an invalid variant. 更多...
 
 TemplateVariant (bool b)
 Constructs a new variant with a boolean value b. 更多...
 
 TemplateVariant (int v)
 Constructs a new variant with a integer value v. 更多...
 
 TemplateVariant (const char *s, bool raw=FALSE)
 Constructs a new variant with a string value s. 更多...
 
 TemplateVariant (const QCString &s, bool raw=FALSE)
 Constructs a new variant with a string value s. 更多...
 
 TemplateVariant (const std::string &s, bool raw=FALSE)
 Constructs a new variant with a string value s. 更多...
 
 TemplateVariant (TemplateStructIntfPtr s)
 Constructs a new variant with a struct value s. 更多...
 
 TemplateVariant (TemplateListIntfPtr l)
 Constructs a new variant with a list value l. 更多...
 
 TemplateVariant (TemplateStructIntfWeakPtr s)
 Constructs a new variant with a struct value s. 更多...
 
 TemplateVariant (FunctionDelegate delegate)
 Constructs a new variant which represents a method call 更多...
 
 ~TemplateVariant ()=default
 Destroys the Variant object 更多...
 
 TemplateVariant (const TemplateVariant &v)=default
 Constructs a copy of the variant, v, passed as the argument to this constructor. 更多...
 
 TemplateVariant (TemplateVariant &&v)
 Moves the contents of variant v into this variant. 更多...
 
TemplateVariantoperator= (const TemplateVariant &v)=default
 Assigns the value of the variant v to this variant. 更多...
 
TemplateVariantoperator= (TemplateVariant &&v)
 Move the value of the variant v into this variant. 更多...
 
bool operator== (TemplateVariant &other) const
 Compares this QVariant with v and returns true if they are equal; otherwise returns false. 更多...
 
QCString toString () const
 Returns the variant as a string. 更多...
 
bool toBool () const
 Returns the variant as a boolean. 更多...
 
int toInt () const
 Returns the variant as an integer. 更多...
 
constexpr bool isValid () const
 Returns TRUE if the variant holds a valid value, or FALSE otherwise 更多...
 
constexpr bool isBool () const
 Returns TRUE if the variant holds a boolean value 更多...
 
constexpr bool isInt () const
 Returns TRUE if the variant holds an integer value 更多...
 
constexpr bool isString () const
 Returns TRUE if the variant holds a string value 更多...
 
constexpr bool isStruct () const
 Returns TRUE if the variant holds a struct value 更多...
 
constexpr bool isList () const
 Returns TRUE if the variant holds a list value 更多...
 
constexpr bool isFunction () const
 Returns TRUE if the variant holds a function value 更多...
 
constexpr bool isWeakStruct () const
 Returns TRUE if the variant holds a struct value 更多...
 
TemplateListIntfPtr toList ()
 Returns the pointer to list referenced by this variant or 0 if this variant does not have list type. 更多...
 
const TemplateListIntfPtr toList () const
 
TemplateStructIntfPtr toStruct ()
 Returns the pointer to struct referenced by this variant or 0 if this variant does not have struct type. 更多...
 
const TemplateStructIntfPtr toStruct () const
 
TemplateVariant call (const std::vector< TemplateVariant > &args=std::vector< TemplateVariant >())
 Return the result of apply this function with args. 更多...
 
void setRaw (bool b)
 Sets whether or not the value of the Variant should be escaped or written as-is (raw). 更多...
 
constexpr bool raw () const
 Returns whether or not the value of the Value is raw. 更多...
 
constexpr Type type () const
 Returns the type held by this variant 更多...
 
const char * typeAsString () const
 Returns a string representation of this variant's type 更多...
 

Private 成员函数

QCString listToString () const
 
QCString structToString () const
 

Private 属性

VariantT m_variant
 
bool m_raw = false
 

详细描述

Variant type which can hold one value of a fixed set of types.

在文件 template.h98 行定义.

成员类型定义说明

◆ FunctionDelegate

using TemplateVariant::FunctionDelegate = std::function<TemplateVariant(const std::vector<TemplateVariant>&)>

Type representing a function call in a template

在文件 template.h102 行定义.

◆ VariantT

Symbolic names for the possible types that this variant can hold.

在文件 template.h112 行定义.

成员枚举类型说明

◆ Type

enum TemplateVariant::Type : uint8_t
strong
枚举值
Bool 
Int 
String 
Struct 
List 
Function 
WeakStruct 
None 

在文件 template.h114 行定义.

114  : uint8_t
115  {
116  Bool = 0,
117  Int = 1,
118  String = 2,
119  Struct = 3,
120  List = 4,
121  Function = 5,
122  WeakStruct = 6,
123  None = 255
124  };

构造及析构函数说明

◆ TemplateVariant() [1/12]

TemplateVariant::TemplateVariant ( )
inline

Constructs an invalid variant.

在文件 template.h127 行定义.

127 {}

被这些函数引用 call().

◆ TemplateVariant() [2/12]

TemplateVariant::TemplateVariant ( bool  b)
inlineexplicit

Constructs a new variant with a boolean value b.

在文件 template.h130 行定义.

130 { m_variant.set<static_cast<uint8_t>(Type::Bool)>(b); }

引用了 Bool, m_variant , 以及 Variant< Ts >::set().

◆ TemplateVariant() [3/12]

TemplateVariant::TemplateVariant ( int  v)
inline

Constructs a new variant with a integer value v.

在文件 template.h133 行定义.

133 { m_variant.set<static_cast<uint8_t>(Type::Int)>(v); }

引用了 Int, m_variant , 以及 Variant< Ts >::set().

◆ TemplateVariant() [4/12]

TemplateVariant::TemplateVariant ( const char *  s,
bool  raw = FALSE 
)
inline

Constructs a new variant with a string value s.

在文件 template.h136 行定义.

136 : m_raw(raw) { m_variant.set<static_cast<uint8_t>(Type::String)>(s); }

引用了 m_variant, Variant< Ts >::set() , 以及 String.

◆ TemplateVariant() [5/12]

TemplateVariant::TemplateVariant ( const QCString s,
bool  raw = FALSE 
)
inline

Constructs a new variant with a string value s.

在文件 template.h139 行定义.

139 : m_raw(raw) { m_variant.set<static_cast<uint8_t>(Type::String)>(s.str()); }

引用了 m_variant, Variant< Ts >::set(), QCString::str() , 以及 String.

◆ TemplateVariant() [6/12]

TemplateVariant::TemplateVariant ( const std::string &  s,
bool  raw = FALSE 
)
inline

Constructs a new variant with a string value s.

在文件 template.h142 行定义.

142 : m_raw(raw) { m_variant.set<static_cast<uint8_t>(Type::String)>(s); }

引用了 m_variant, Variant< Ts >::set() , 以及 String.

◆ TemplateVariant() [7/12]

TemplateVariant::TemplateVariant ( TemplateStructIntfPtr  s)
inline

Constructs a new variant with a struct value s.

注解
. The variant will hold a counting reference to the object.

在文件 template.h147 行定义.

147 { m_variant.set<static_cast<uint8_t>(Type::Struct)>(s); }

引用了 m_variant, Variant< Ts >::set() , 以及 Struct.

◆ TemplateVariant() [8/12]

TemplateVariant::TemplateVariant ( TemplateListIntfPtr  l)
inline

Constructs a new variant with a list value l.

注解
. The variant will hold a counting reference to the object.

在文件 template.h152 行定义.

152 { m_variant.set<static_cast<uint8_t>(Type::List)>(l); }

引用了 List, m_variant , 以及 Variant< Ts >::set().

◆ TemplateVariant() [9/12]

TemplateVariant::TemplateVariant ( TemplateStructIntfWeakPtr  s)
inline

Constructs a new variant with a struct value s.

注解
. The variant will hold a non-counting reference to the object.

在文件 template.h157 行定义.

157 { m_variant.set<static_cast<uint8_t>(Type::WeakStruct)>(s); }

引用了 m_variant, Variant< Ts >::set() , 以及 WeakStruct.

◆ TemplateVariant() [10/12]

TemplateVariant::TemplateVariant ( FunctionDelegate  delegate)
inline

Constructs a new variant which represents a method call

参数
[in]delegateFunctionDelegate object to invoke when calling call() on this variant.
注解
Use TemplateVariant::FunctionDelegate::fromMethod() and TemplateVariant::FunctionDelegate::fromFunction() to create FunctionDelegate objects.

在文件 template.h166 行定义.

166 { m_variant.set<static_cast<uint8_t>(Type::Function)>(delegate); }

引用了 Function, m_variant , 以及 Variant< Ts >::set().

◆ ~TemplateVariant()

TemplateVariant::~TemplateVariant ( )
default

Destroys the Variant object

◆ TemplateVariant() [11/12]

TemplateVariant::TemplateVariant ( const TemplateVariant v)
default

Constructs a copy of the variant, v, passed as the argument to this constructor.

◆ TemplateVariant() [12/12]

TemplateVariant::TemplateVariant ( TemplateVariant &&  v)

Moves the contents of variant v into this variant.

variant v will become invalid

在文件 template.cpp327 行定义.

328 {
329  m_raw = std::move(v.m_raw);
330  m_variant = std::move(v.m_variant);
331  v.m_variant.invalidate();
332 }

引用了 m_raw , 以及 m_variant.

成员函数说明

◆ call()

TemplateVariant TemplateVariant::call ( const std::vector< TemplateVariant > &  args = std::vector<TemplateVariant>())

Return the result of apply this function with args.

Returns an empty string if the variant type is not a function.

在文件 template.cpp454 行定义.

455 {
456  return isFunction() ? m_variant.get<static_cast<uint8_t>(Type::Function)>()(args) : TemplateVariant();
457 }

引用了 Function, Variant< Ts >::get(), isFunction(), m_variant , 以及 TemplateVariant().

被这些函数引用 TemplateNodeVariable::render(), TemplateNodeFor::render(), TemplateNodeCycle::render() , 以及 ExprAstFunctionVariable::resolve().

◆ isBool()

constexpr bool TemplateVariant::isBool ( ) const
inlineconstexpr

Returns TRUE if the variant holds a boolean value

在文件 template.h205 行定义.

205 { return m_variant.is<static_cast<uint8_t>(Type::Bool)>(); }

引用了 Bool, Variant< Ts >::is() , 以及 m_variant.

被这些函数引用 operator==().

◆ isFunction()

constexpr bool TemplateVariant::isFunction ( ) const
inlineconstexpr

Returns TRUE if the variant holds a function value

在文件 template.h215 行定义.

215 { return m_variant.is<static_cast<uint8_t>(Type::Function)>(); }

引用了 Function, Variant< Ts >::is() , 以及 m_variant.

被这些函数引用 call(), TemplateNodeVariable::render(), TemplateNodeFor::render(), TemplateNodeCycle::render() , 以及 ExprAstFunctionVariable::resolve().

◆ isInt()

constexpr bool TemplateVariant::isInt ( ) const
inlineconstexpr

Returns TRUE if the variant holds an integer value

在文件 template.h207 行定义.

207 { return m_variant.is<static_cast<uint8_t>(Type::Int)>(); }

引用了 Int, Variant< Ts >::is() , 以及 m_variant.

被这些函数引用 FilterRaw::apply(), FilterAppend::apply(), FilterPrepend::apply(), FilterPaginate::apply(), FilterDivisibleBy::apply(), operator==(), TemplateNodeRange::render() , 以及 FilterAdd::variantIntValue().

◆ isList()

constexpr bool TemplateVariant::isList ( ) const
inlineconstexpr

◆ isString()

◆ isStruct()

constexpr bool TemplateVariant::isStruct ( ) const
inlineconstexpr

Returns TRUE if the variant holds a struct value

在文件 template.h211 行定义.

211 { return m_variant.is<static_cast<uint8_t>(Type::Struct)>(); }

引用了 Variant< Ts >::is(), m_variant , 以及 Struct.

被这些函数引用 FilterGet::apply(), TemplateContextImpl::get(), getPathListFunc(), operator==(), TemplateNodeFor::render() , 以及 toStruct().

◆ isValid()

◆ isWeakStruct()

constexpr bool TemplateVariant::isWeakStruct ( ) const
inlineconstexpr

Returns TRUE if the variant holds a struct value

在文件 template.h217 行定义.

217 { return m_variant.is<static_cast<uint8_t>(Type::WeakStruct)>(); }

引用了 Variant< Ts >::is(), m_variant , 以及 WeakStruct.

被这些函数引用 FilterGet::apply(), TemplateContextImpl::get(), getPathListFunc(), operator==(), TemplateNodeFor::render(), structToString() , 以及 toStruct().

◆ listToString()

QCString TemplateVariant::listToString ( ) const
private

在文件 template.cpp5423 行定义.

5424 {
5425  QCString result="[";
5426  const TemplateListIntfPtr list = toList();
5427  if (list)
5428  {
5429  bool first=true;
5430  TemplateVariant ve;
5431  TemplateListIntf::ConstIteratorPtr it = list->createIterator();
5432  for (it->toFirst();it->current(ve);it->toNext())
5433  {
5434  if (!first) result+=",\n";
5435  result+="'"+ve.toString()+"'";
5436  first=false;
5437  }
5438  }
5439  result+="]";
5440  return result;
5441 }

引用了 toList() , 以及 toString().

被这些函数引用 toString().

◆ operator=() [1/2]

TemplateVariant& TemplateVariant::operator= ( const TemplateVariant v)
default

Assigns the value of the variant v to this variant.

◆ operator=() [2/2]

TemplateVariant & TemplateVariant::operator= ( TemplateVariant &&  v)

Move the value of the variant v into this variant.

Variant v will become invalid

在文件 template.cpp334 行定义.

335 {
336  m_raw = std::move(v.m_raw);
337  m_variant = std::move(v.m_variant);
338  v.m_variant.invalidate();
339  return *this;
340 }

引用了 m_raw , 以及 m_variant.

◆ operator==()

bool TemplateVariant::operator== ( TemplateVariant other) const

Compares this QVariant with v and returns true if they are equal; otherwise returns false.

在文件 template.cpp342 行定义.

343 {
344  if (!m_variant.valid())
345  {
346  return FALSE;
347  }
348  if (isBool() && other.isBool())
349  {
350  return m_variant.get<static_cast<uint8_t>(Type::Bool)>() == other.m_variant.get<static_cast<uint8_t>(Type::Bool)>();
351  }
352  else if (isInt() && other.isInt())
353  {
354  return m_variant.get<static_cast<uint8_t>(Type::Int)>() == other.m_variant.get<static_cast<uint8_t>(Type::Int)>();
355  }
356  else if (isList() && other.isList())
357  {
358  return toList() == other.toList();
359  }
360  else if ((isStruct() || isWeakStruct()) && (other.isStruct() || other.isWeakStruct()))
361  {
362  return toStruct() == other.toStruct();
363  }
364  return toString()==other.toString();
365 }

引用了 Bool, FALSE, Variant< Ts >::get(), Int, isBool(), isInt(), isList(), isStruct(), isWeakStruct(), m_variant, toList(), toString(), toStruct() , 以及 Variant< Ts >::valid().

◆ raw()

constexpr bool TemplateVariant::raw ( ) const
inlineconstexpr

Returns whether or not the value of the Value is raw.

参见
setRaw()

在文件 template.h245 行定义.

245 { return m_raw; }

引用了 m_raw.

被这些函数引用 TemplateNodeVariable::render() , 以及 TemplateNodeCycle::render().

◆ setRaw()

void TemplateVariant::setRaw ( bool  b)
inline

Sets whether or not the value of the Variant should be escaped or written as-is (raw).

参数
[in]bTRUE means write as-is, FALSE means apply escaping.

在文件 template.h240 行定义.

240 { m_raw = b; }

引用了 m_raw.

被这些函数引用 TemplateNodeTree::renderChildren().

◆ structToString()

QCString TemplateVariant::structToString ( ) const
private

在文件 template.cpp5443 行定义.

5444 {
5445  QCString result="{";
5446  const TemplateStructIntfPtr strukt = toStruct();
5447  if (strukt)
5448  {
5449  bool first=true;
5450  for (const auto &s : strukt->fields())
5451  {
5452  if (!first) result+=",";
5453  result+=s;
5454  if (!isWeakStruct()) // avoid endless recursion
5455  {
5456  result+=":'";
5457  result+=strukt->get(QCString(s)).toString();
5458  result+="'";
5459  }
5460  first=false;
5461  }
5462  }
5463  result+="}";
5464  return result;
5465 }

引用了 isWeakStruct() , 以及 toStruct().

被这些函数引用 toString().

◆ toBool()

bool TemplateVariant::toBool ( ) const

Returns the variant as a boolean.

在文件 template.cpp367 行定义.

368 {
369  switch (type())
370  {
371  case Type::None: return false;
372  case Type::Bool: return m_variant.get<static_cast<uint8_t>(Type::Bool)>();
373  case Type::Int: return m_variant.get<static_cast<uint8_t>(Type::Int)>()!=0;
374  case Type::String: return !m_variant.get<static_cast<uint8_t>(Type::String)>().isEmpty();
375  case Type::Struct: return true;
376  case Type::List: return m_variant.get<static_cast<uint8_t>(Type::List)>()->count()!=0;
377  case Type::Function: return false;
378  case Type::WeakStruct: return true;
379  }
380  return FALSE;
381 }

引用了 Bool, FALSE, Function, Variant< Ts >::get(), Int, List, m_variant, None, String, Struct, type() , 以及 WeakStruct.

被这些函数引用 FilterKeep::apply(), TemplateNodeIf::render() , 以及 ExprAstBinary::resolve().

◆ toInt()

int TemplateVariant::toInt ( ) const

Returns the variant as an integer.

在文件 template.cpp383 行定义.

384 {
385  switch (type())
386  {
387  case Type::None: return 0;
388  case Type::Bool: return m_variant.get<static_cast<uint8_t>(Type::Bool)>() ? 1 : 0;
389  case Type::Int: return m_variant.get<static_cast<uint8_t>(Type::Int)>();
390  case Type::String: return !m_variant.get<static_cast<uint8_t>(Type::String)>().toInt();
391  case Type::Struct: return 0;
392  case Type::List: return m_variant.get<static_cast<uint8_t>(Type::List)>()->count();
393  case Type::Function: return 0;
394  case Type::WeakStruct: return 0;
395  }
396  return 0;
397 }

引用了 Bool, Function, Variant< Ts >::get(), Int, List, m_variant, None, String, Struct, type() , 以及 WeakStruct.

被这些函数引用 FilterPaginate::apply(), FilterDivisibleBy::apply(), FilterHex::apply(), TemplateNodeRepeat::render(), TemplateNodeRange::render(), ExprAstUnary::resolve(), ExprAstBinary::resolve() , 以及 FilterAdd::variantIntValue().

◆ toList() [1/2]

◆ toList() [2/2]

const TemplateListIntfPtr TemplateVariant::toList ( ) const

◆ toString()

QCString TemplateVariant::toString ( ) const

Returns the variant as a string.

在文件 template.cpp399 行定义.

400 {
401  switch (type())
402  {
403  case Type::None: return QCString();
404  case Type::Bool: return m_variant.get<static_cast<uint8_t>(Type::Bool)>() ? "true" : "false";
405  case Type::Int: return QCString().setNum(m_variant.get<static_cast<uint8_t>(Type::Int)>());
406  case Type::String: return m_variant.get<static_cast<uint8_t>(Type::String)>();
407  case Type::Struct: return structToString();
408  case Type::List: return listToString();
409  case Type::Function: return "[function]";
410  case Type::WeakStruct: return structToString();
411  }
412  return QCString();
413 }

引用了 Bool, Function, Variant< Ts >::get(), Int, List, listToString(), m_variant, None, QCString::setNum(), String, Struct, structToString(), type() , 以及 WeakStruct.

被这些函数引用 FilterAdd::apply(), FilterGet::apply(), FilterRaw::apply(), FilterKeep::apply(), FilterTexLabel::apply(), FilterTexIndex::apply(), FilterAppend::apply(), FilterPrepend::apply(), FilterLength::apply(), FilterDefault::apply(), FilterListSort::apply(), FilterGroupBy::apply(), FilterRelative::apply(), FilterAlphaIndex::apply(), FilterStripPath::apply(), FilterNoWrap::apply(), FilterIsRelativeURL::apply(), FilterIsAbsoluteURL::apply(), FilterLower::apply(), FilterUpper::apply(), FilterEscape::apply(), FilterDecodeURL::apply(), ExprAstFilter::apply(), FilterListSort::determineSortKey(), FilterGroupBy::determineSortKey(), FilterAlphaIndex::determineSortKey(), listToString(), operator==(), TemplateNodeVariable::render(), TemplateNodeCycle::render(), TemplateNodeMarkers::render(), ExprAstBinary::resolve() , 以及 FilterAdd::variantIntValue().

◆ toStruct() [1/2]

const TemplateStructIntfPtr TemplateVariant::toStruct ( )

Returns the pointer to struct referenced by this variant or 0 if this variant does not have struct type.

在文件 template.cpp441 行定义.

442 {
443  return isStruct() ? m_variant.get<static_cast<uint8_t>(Type::Struct)>() :
444  isWeakStruct() ? m_variant.get<static_cast<uint8_t>(Type::WeakStruct)>().lock() :
445  nullptr;
446 }

引用了 Variant< Ts >::get(), isStruct(), isWeakStruct(), m_variant, Struct , 以及 WeakStruct.

被这些函数引用 FilterGet::apply(), FilterKeep::apply(), FilterListSort::apply(), FilterGroupBy::apply(), FilterAlphaIndex::apply(), computeMaxDepth(), computeNumNodesAtLevel(), computePreferredDepth(), FilterFlatten::flatten(), TemplateContextImpl::get(), getPathListFunc(), operator==(), TemplateNodeFor::render(), TemplateNodeTree::renderChildren() , 以及 structToString().

◆ toStruct() [2/2]

const TemplateStructIntfPtr TemplateVariant::toStruct ( ) const

◆ type()

constexpr Type TemplateVariant::type ( ) const
inlineconstexpr

Returns the type held by this variant

在文件 template.h248 行定义.

248 { return static_cast<Type>(m_variant.index()); }

引用了 Variant< Ts >::index() , 以及 m_variant.

被这些函数引用 ExprAstFilter::apply(), toBool(), toInt(), toString() , 以及 typeAsString().

◆ typeAsString()

const char * TemplateVariant::typeAsString ( ) const

Returns a string representation of this variant's type

Return a string representation of the type of the value stored in the variant

在文件 template.cpp416 行定义.

417 {
418  switch (type())
419  {
420  case Type::None: return "invalid";
421  case Type::Bool: return "bool";
422  case Type::Int: return "integer";
423  case Type::String: return "string";
424  case Type::Struct: return "struct";
425  case Type::List: return "list";
426  case Type::Function: return "function";
427  case Type::WeakStruct: return "struct";
428  }
429  return "invalid";
430 }

引用了 Bool, Function, Int, List, None, String, Struct, type() , 以及 WeakStruct.

被这些函数引用 TemplateNodeFor::render() , 以及 TemplateNodeTree::renderChildren().

类成员变量说明

◆ m_raw

bool TemplateVariant::m_raw = false
private

在文件 template.h258 行定义.

被这些函数引用 operator=(), raw(), setRaw() , 以及 TemplateVariant().

◆ m_variant

VariantT TemplateVariant::m_variant
private

该类的文档由以下文件生成:
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::Type::String
@ String
TemplateVariant::isList
constexpr bool isList() const
Returns TRUE if the variant holds a list value
Definition: template.h:213
TemplateVariant::Type::List
@ List
TemplateVariant::isFunction
constexpr bool isFunction() const
Returns TRUE if the variant holds a function value
Definition: template.h:215
TemplateVariant::structToString
QCString structToString() const
Definition: template.cpp:5443
TemplateVariant::isBool
constexpr bool isBool() const
Returns TRUE if the variant holds a boolean value
Definition: template.h:205
TemplateVariant::listToString
QCString listToString() const
Definition: template.cpp:5423
QCString::str
std::string str() const
Definition: qcstring.h:442
TemplateVariant::m_raw
bool m_raw
Definition: template.h:258
TemplateVariant::isWeakStruct
constexpr bool isWeakStruct() const
Returns TRUE if the variant holds a struct value
Definition: template.h:217
TemplateVariant::Type::Struct
@ Struct
Variant::invalidate
void invalidate()
Invalidate the variant. Will destroy any object that is held.
Definition: variant.h:258
TemplateStructIntfPtr
std::shared_ptr< TemplateStructIntf > TemplateStructIntfPtr
Definition: template.h:33
TemplateListIntf::ConstIteratorPtr
std::unique_ptr< ConstIterator > ConstIteratorPtr
Definition: template.h:292
Variant::index
constexpr uint8_t index() const
Returns the index of the type held by this variant, or invalid_id() if the variant does not hold any ...
Definition: variant.h:266
TemplateVariant::Type::Int
@ Int
Variant::get
Type< index > & get()
Return a non-constant reference to the value held by the variant container.
Definition: variant.h:285
Variant::valid
constexpr bool valid() const
Returns true iff the Variant holds a valid type.
Definition: variant.h:255
TemplateVariant
Variant type which can hold one value of a fixed set of types.
Definition: template.h:98
TemplateVariant::isInt
constexpr bool isInt() const
Returns TRUE if the variant holds an integer value
Definition: template.h:207
Variant::set
void set(Args &&... args)
Replaces the contents of the variant container by constructing a type T calling the constructor with ...
Definition: variant.h:274
TemplateVariant::TemplateVariant
TemplateVariant()
Constructs an invalid variant.
Definition: template.h:127
TemplateVariant::isStruct
constexpr bool isStruct() const
Returns TRUE if the variant holds a struct value
Definition: template.h:211
Variant::is
constexpr bool is() const
Returns true iff the variant container holds a specific type.
Definition: variant.h:252
TemplateVariant::Type::WeakStruct
@ WeakStruct
TemplateVariant::raw
constexpr bool raw() const
Returns whether or not the value of the Value is raw.
Definition: template.h:245
QCString::setNum
QCString & setNum(short n)
Definition: qcstring.h:372
TemplateListIntfPtr
std::shared_ptr< TemplateListIntf > TemplateListIntfPtr
Definition: template.h:32
TemplateVariant::toString
QCString toString() const
Returns the variant as a string.
Definition: template.cpp:399
CodeSymbolType::Struct
@ Struct
TemplateVariant::Type::Bool
@ Bool
TemplateVariant::Type::Function
@ Function
TemplateVariant::Type
Type
Definition: template.h:114
TemplateVariant::Type::None
@ None
TemplateVariant::toList
TemplateListIntfPtr toList()
Returns the pointer to list referenced by this variant or 0 if this variant does not have list type.
Definition: template.cpp:432
CodeSymbolType::Function
@ Function
TemplateVariant::m_variant
VariantT m_variant
Definition: template.h:257
TemplateVariant::type
constexpr Type type() const
Returns the type held by this variant
Definition: template.h:248
FALSE
#define FALSE
Definition: qcstring.h:33
QCString
This is an alternative implementation of QCString.
Definition: qcstring.h:108