• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdevelop API Reference
  • KDE Home
  • Contact Us
 

kdevplatform/language/duchain

  • KDevelop
  • TypeFactory
Public Member Functions | List of all members
KDevelop::TypeFactory< T, Data > Class Template Reference

#include <typeregister.h>

Inheritance diagram for KDevelop::TypeFactory< T, Data >:
Inheritance graph
[legend]

Public Member Functions

void callDestructor (AbstractTypeData *data) const override
 
void copy (const AbstractTypeData &from, AbstractTypeData &to, bool constant) const override
 
AbstractType * create (AbstractTypeData *data) const override
 
void destroyData (AbstractTypeData *data) const
 
uint dynamicSize (const AbstractTypeData &data) const override
 
- Public Member Functions inherited from KDevelop::AbstractTypeFactory
virtual ~AbstractTypeFactory ()
 

Detailed Description

template<class T, class Data = typename T::Data>
class KDevelop::TypeFactory< T, Data >

Template class to implement factories for each AbstractType subclass you want to instantiate.

Definition at line 80 of file typeregister.h.

Member Function Documentation

◆ callDestructor()

template<class T , class Data = typename T::Data>
void KDevelop::TypeFactory< T, Data >::callDestructor ( AbstractTypeData *  data) const
inlineoverridevirtual

Call the destructor of the data-type.

Implements KDevelop::AbstractTypeFactory.

Definition at line 116 of file typeregister.h.

◆ copy()

template<class T , class Data = typename T::Data>
void KDevelop::TypeFactory< T, Data >::copy ( const AbstractTypeData &  from,
AbstractTypeData &  to,
bool  constant 
) const
inlineoverridevirtual

Copy contents of type-data from one location to another.

Parameters
fromdata to copy from
todata to copy to. This data must not be initialized yet (the constructor must not have been called yet)
constantset to true if to is to be a static unchangeable data type (eg. in the type-repository), or false if to is to be a dynamic changeable type data.

Implements KDevelop::AbstractTypeFactory.

Definition at line 93 of file typeregister.h.

◆ create()

template<class T , class Data = typename T::Data>
AbstractType* KDevelop::TypeFactory< T, Data >::create ( AbstractTypeData *  data) const
inlineoverridevirtual

Create a new type for the given data.

Parameters
dataData to assign to the new type. The data type must match the class type.

Implements KDevelop::AbstractTypeFactory.

Definition at line 84 of file typeregister.h.

◆ destroyData()

template<class T , class Data = typename T::Data>
void KDevelop::TypeFactory< T, Data >::destroyData ( AbstractTypeData *  data) const
inline

Definition at line 110 of file typeregister.h.

◆ dynamicSize()

template<class T , class Data = typename T::Data>
uint KDevelop::TypeFactory< T, Data >::dynamicSize ( const AbstractTypeData &  data) const
inlineoverridevirtual

Return the memory size of the given private data, including dynamic data.

Parameters
datadata structure
Returns
the size in memory of the data.

Implements KDevelop::AbstractTypeFactory.

Definition at line 122 of file typeregister.h.


The documentation for this class was generated from the following file:
  • typeregister.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Thu Mar 4 2021 23:31:18 by doxygen 1.8.16 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kdevplatform/language/duchain

Skip menu "kdevplatform/language/duchain"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdevelop API Reference

Skip menu "kdevelop API Reference"
  • kdevplatform
  •   debugger
  •   documentation
  •   interfaces
  •   language
  •     assistant
  •     backgroundparser
  •     checks
  •     classmodel
  •     codecompletion
  •     codegen
  •     duchain
  •     editor
  •     highlighting
  •     interfaces
  •     util
  •   outputview
  •   project
  •   serialization
  •   shell
  •   sublime
  •   tests
  •   util
  •   vcs

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal