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

language/codegen

KDevelop::AstChangeSet

KDevelop::AstChangeSet< AstNode > Class Template Reference

A set of changes to an AST. More...

#include <astchangeset.h>

List of all members.

Public Member Functions

 AstChangeSet (const AstNode *topNode=0)
virtual ~AstChangeSet ()
AstNodeRef< AstNode > * copyNode (AstNode *source)
AstNodeRef< AstNode > * registerNewNode (AstNode *node)
AstNodeRef< AstNode > * registerNewRef (AstNodeRef< AstNode > *ref)

Detailed Description

template<typename AstNode>
class KDevelop::AstChangeSet< AstNode >

A set of changes to an AST.

This class holds a set of all changes to an AST.

Author:
Hamish Rodda <rodda@kde.org>

Definition at line 178 of file astchangeset.h.


Constructor & Destructor Documentation

template<typename AstNode >
KDevelop::AstChangeSet< AstNode >::AstChangeSet ( const AstNode *  topNode = 0  )  [inline]

Constructor.

Parameters:
topNode the top node of the read-only Ast to modify, or set to null if creating a new Ast from scratch.

Definition at line 187 of file astchangeset.h.

template<typename AstNode >
virtual KDevelop::AstChangeSet< AstNode >::~AstChangeSet (  )  [inline, virtual]

Destructor, deletes all nodes owned by this change set.

Definition at line 195 of file astchangeset.h.


Member Function Documentation

template<typename AstNode >
AstNodeRef<AstNode>* KDevelop::AstChangeSet< AstNode >::copyNode ( AstNode *  source  )  [inline]

Copy an existing node (whether from the Ast or from the change set).

You may then modify this reference, and the modifications will be applied to the node when the change set is finalised.

Returns:
a copy of source, which you may modify directly.

Definition at line 235 of file astchangeset.h.

template<typename AstNode >
AstNodeRef<AstNode>* KDevelop::AstChangeSet< AstNode >::registerNewNode ( AstNode *  node  )  [inline]

Register a new node that you have created to insert at some point in this Ast.

You may modify this node directly. The change set takes ownership, so that the new node will be deleted when the change set is no longer needed.

Returns:
the new node that has been registered.

Definition at line 207 of file astchangeset.h.

template<typename AstNode >
AstNodeRef<AstNode>* KDevelop::AstChangeSet< AstNode >::registerNewRef ( AstNodeRef< AstNode > *  ref  )  [inline]

Create a blank reference to a node.

The change set takes ownership, so that the new node will be deleted when the change set is no longer needed.

Returns:
the new node reference

Definition at line 222 of file astchangeset.h.


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

language/codegen

Skip menu "language/codegen"
  • Main Page
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • 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