• Skip to content
  • Skip to link menu
KDE 4.4 API Reference
  • KDE API Reference
  • KDevelop Platform Libraries
  • Sitemap
  • Contact Us
 

language/duchain

KDevelop::AppendedListItemRequest

KDevelop::AppendedListItemRequest< Type, averageAppendedBytes > Class Template Reference

This is a class that allows you easily putting instances of your class into an ItemRepository as seen in itemrepository.h. More...

#include <appendedlist.h>

List of all members.

Public Types

enum  { AverageSize = sizeof(Type) + averageAppendedBytes }

Public Member Functions

 AppendedListItemRequest (const Type &item)
void createItem (Type *item) const
bool equals (const Type *item) const
unsigned int hash () const
size_t itemSize () const

Static Public Member Functions

static void destroy (Type *item, KDevelop::AbstractItemRepository &)
static bool persistent (const Type *item)

Public Attributes

const Type & m_item

Detailed Description

template<class Type, uint averageAppendedBytes = 8>
class KDevelop::AppendedListItemRequest< Type, averageAppendedBytes >

This is a class that allows you easily putting instances of your class into an ItemRepository as seen in itemrepository.h.

All your class needs to do is:

  • Be implemented using the APPENDED_LIST macros.
  • Have a real copy-constructor that additionally takes a "bool dynamic = true" parameter, which should be given to initializeAppendedLists
  • Except for these appended lists, only contain directly copyable data like indices(no pointers, no virtual functions)
  • Implement operator==(..) which should compare everything, including the lists.
    Warning:
    The default operator will not work!
  • Implement a hash() function. The hash should equal for two instances when operator==(..) returns true.
  • Should be completely functional without a constructor called, only the data copied
  • Implement a "bool persistent() const" function, that should check the reference-count or other information to decide whether the item should stay in the repository If those conditions are fulfilled, the data can easily be put into a repository using this request class.

Definition at line 319 of file appendedlist.h.


The documentation for this class was generated from the following file:
  • appendedlist.h

language/duchain

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

KDevelop Platform Libraries

Skip menu "KDevelop Platform Libraries"
  • interfaces
  • language
  •   codegen
  •   duchain
  •   editor
  • outputview
  • project
  • shell
  • sublime
  • util
  • vcs
Generated for KDevelop Platform Libraries by doxygen 1.5.9-20090814
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal