Doxygen
TemplateImmutableList类 参考

Default implementation of a immutable context value of type list. 更多...

#include <template.h>

+ 类 TemplateImmutableList 继承关系图:
+ TemplateImmutableList 的协作图:

class  Private
 Private data of a template immutable list object 更多...
 

Public 成员函数

virtual uint count () const
 Returns the number of elements in the list 更多...
 
virtual TemplateVariant at (uint index) const
 Returns the element at index position index. 更多...
 
virtual TemplateListIntf::ConstIteratorPtr createIterator () const
 Creates a new iterator for this list. 更多...
 
 TemplateImmutableList (std::initializer_list< TemplateVariant > elements)
 Creates a list 更多...
 
 TemplateImmutableList (const std::vector< TemplateVariant > &elements)
 
virtual ~TemplateImmutableList ()
 Destroys the list 更多...
 
- Public 成员函数 继承自 TemplateListIntf
virtual ~TemplateListIntf ()
 Destroys the list 更多...
 

静态 Public 成员函数

static TemplateListIntfPtr alloc (std::initializer_list< TemplateVariant > elements)
 Creates an instance and returns a shared pointer to it 更多...
 
static TemplateListIntfPtr alloc (const std::vector< TemplateVariant > &elements)
 

Private 属性

std::unique_ptr< Privatep
 

额外继承的成员函数

- Public 类型 继承自 TemplateListIntf
using ConstIteratorPtr = std::unique_ptr< ConstIterator >
 

详细描述

Default implementation of a immutable context value of type list.

在文件 template.h311 行定义.

构造及析构函数说明

◆ TemplateImmutableList() [1/2]

TemplateImmutableList::TemplateImmutableList ( std::initializer_list< TemplateVariant elements)

Creates a list

在文件 template.cpp514 行定义.

515  : p(std::make_unique<Private>(elements))
516 {
517 }

◆ TemplateImmutableList() [2/2]

TemplateImmutableList::TemplateImmutableList ( const std::vector< TemplateVariant > &  elements)

◆ ~TemplateImmutableList()

TemplateImmutableList::~TemplateImmutableList ( )
virtual

Destroys the list

在文件 template.cpp524 行定义.

525 {
526 }

成员函数说明

◆ alloc() [1/2]

static TemplateListIntfPtr TemplateImmutableList::alloc ( const std::vector< TemplateVariant > &  elements)
static

◆ alloc() [2/2]

TemplateListIntfPtr TemplateImmutableList::alloc ( std::initializer_list< TemplateVariant elements)
static

Creates an instance and returns a shared pointer to it

在文件 template.cpp543 行定义.

544 {
545  return std::make_shared<TemplateImmutableList>(elements);
546 }

被这些函数引用 ClassContext::Private::createClasses(), NamespaceContext::Private::createClasses(), FileContext::Private::createClasses(), ModuleContext::Private::createClasses(), ClassIndexContext::Private::createClasses(), ConfigContext::Private::createConfigData(), NamespaceContext::Private::createConstantgroups(), FileContext::Private::createConstantgroups(), ModuleContext::Private::createConstantgroups(), ClassHierarchyContext::Private::createDiagrams(), DirContext::Private::createDirs(), ModuleContext::Private::createDirs(), MemberContext::Private::createEventAttrs(), ClassContext::Private::createExamples(), MemberContext::Private::createExamples(), ModuleContext::Private::createExamples(), DirContext::Private::createFiles(), ModuleContext::Private::createFiles(), MemberContext::Private::createImplementedBy(), MemberContext::Private::createImplements(), InheritedMemberInfoContext::Private::createInheritedFrom(), NamespaceContext::Private::createInlineClasses(), FileContext::Private::createInlineClasses(), ModuleContext::Private::createInlineClasses(), ClassContext::Private::createInnerClasses(), MemberContext::Private::createLabels(), GlobalsIndexContext::Private::createMembersFiltered(), ClassMembersIndexContext::Private::createMembersFiltered(), NamespaceMembersIndexContext::Private::createMembersFiltered(), ModuleContext::Private::createModules(), NamespaceContext::Private::createNamespaces(), FileContext::Private::createNamespaces(), ModuleContext::Private::createNamespaces(), DefinitionContext< FileContext::Private >::createNavigationPath(), ModuleContext::Private::createPages(), DefinitionContext< FileContext::Private >::createPartOfGroups(), MemberContext::Private::createPropertyAttrs(), MemberContext::Private::createReimplementedBy(), MemberContext::Private::createReimplements(), ClassContext::Private::createTemplateDecls(), MemberContext::Private::createTemplateDecls(), ConceptContext::Private::createTemplateDecls() , 以及 DefinitionContext< FileContext::Private >::DefinitionContext().

◆ at()

TemplateVariant TemplateImmutableList::at ( uint  index) const
virtual

Returns the element at index position index.

实现了 TemplateListIntf.

在文件 template.cpp538 行定义.

539 {
540  return index<p->elems.size() ? p->elems[index] : TemplateVariant();
541 }

引用了 p.

◆ count()

uint TemplateImmutableList::count ( ) const
virtual

Returns the number of elements in the list

实现了 TemplateListIntf.

在文件 template.cpp528 行定义.

529 {
530  return static_cast<uint>(p->elems.size());
531 }

引用了 p.

◆ createIterator()

TemplateListIntf::ConstIteratorPtr TemplateImmutableList::createIterator ( ) const
virtual

Creates a new iterator for this list.

注解
the user should call delete on the returned pointer.

实现了 TemplateListIntf.

在文件 template.cpp533 行定义.

534  {
535  return std::make_unique< TemplateListGenericConstIterator<TemplateImmutableList> >(*this);
536  }

类成员变量说明

◆ p

std::unique_ptr<Private> TemplateImmutableList::p
private

在文件 template.h330 行定义.

被这些函数引用 at() , 以及 count().


该类的文档由以下文件生成:
TemplateImmutableList::p
std::unique_ptr< Private > p
Definition: template.h:330
uint
unsigned uint
Definition: qcstring.h:40
TemplateVariant
Variant type which can hold one value of a fixed set of types.
Definition: template.h:98