• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • KDevelop QMake parser
 

KDevelop QMake parser

  • TQMake
  • AST
Public Types | Public Member Functions | Public Attributes | Protected Attributes | List of all members
TQMake::AST Class Reference

#include <qmakeast.h>

Inheritance diagram for TQMake::AST:
TQMake::AssignmentAST TQMake::CommentAST TQMake::IncludeAST TQMake::NewLineAST TQMake::ProjectAST

Public Types

enum  NodeType {
  ProjectAST, AssignmentAST, NewLineAST, CommentAST,
  IncludeAST, OrOperatorAST
}
 

Public Member Functions

 AST (NodeType nodeType)
 
virtual void addChildAST (AST *node)
 
virtual void removeChildAST (AST *node)
 
virtual void writeBack (TQString &buffer)
 
virtual NodeType nodeType () const
 
void setDepth (int depth)
 
int depth () const
 
virtual TQString indentation ()
 

Public Attributes

TQValueList< AST * > m_children
 

Protected Attributes

NodeType m_nodeType
 

Detailed Description

AST node.

This is the base class. Objects of this type are not created by the parser.

Each AST node holds the list of its children which are always deleted in the destructor. This way, it's possible call delete for only root AST node and others will be deleted automatically.

Each AST node also knows how to write the information back into .pro file.

Definition at line 42 of file qmakeast.h.

Member Enumeration Documentation

◆ NodeType

enum TQMake::AST::NodeType

Type of AST node.

Enumerator
ProjectAST 

Project, scope or function scope.

AssignmentAST 

Variable assignment.

NewLineAST 

Line feed.

CommentAST 

Comment.

IncludeAST 

.pri include.

Definition at line 45 of file qmakeast.h.

Constructor & Destructor Documentation

◆ AST()

TQMake::AST::AST ( NodeType  nodeType)
inline

Constructs AST with given node type.

Definition at line 55 of file qmakeast.h.

Member Function Documentation

◆ addChildAST()

void TQMake::AST::addChildAST ( AST *  node)
virtual

Adds child AST node to this node.

Despite this function is virtual, reimplementations should call it to make automatic destruction of AST tree possible.

Definition at line 38 of file qmakeast.cpp.

◆ depth()

int TQMake::AST::depth ( ) const
inline
Returns
The depth of the node in AST.

Definition at line 77 of file qmakeast.h.

◆ indentation()

TQString TQMake::AST::indentation ( )
virtual
Returns
The indentation string based on node depth.

Definition at line 60 of file qmakeast.cpp.

◆ nodeType()

virtual NodeType TQMake::AST::nodeType ( ) const
inlinevirtual
Returns
The type of the node.

Definition at line 72 of file qmakeast.h.

◆ removeChildAST()

void TQMake::AST::removeChildAST ( AST *  node)
virtual

Removes child AST node from this node.

Despite this function is virtual, reimplementations should call it to make automatic destruction of AST tree possible.

Definition at line 43 of file qmakeast.cpp.

◆ setDepth()

void TQMake::AST::setDepth ( int  depth)
inline

Sets the depth of the node in AST.

Definition at line 75 of file qmakeast.h.

◆ writeBack()

void TQMake::AST::writeBack ( TQString &  buffer)
virtual

Writes information stored in the AST into the buffer.

This is a default implementation which iterates over child nodes and calls writeBack for each child node.

Reimplemented in TQMake::IncludeAST, TQMake::CommentAST, TQMake::NewLineAST, TQMake::AssignmentAST, and TQMake::ProjectAST.

Definition at line 48 of file qmakeast.cpp.

Member Data Documentation

◆ m_children

TQValueList<AST*> TQMake::AST::m_children

The list of child AST nodes.

Definition at line 82 of file qmakeast.h.


The documentation for this class was generated from the following files:
  • qmakeast.h
  • qmakeast.cpp

KDevelop QMake parser

Skip menu "KDevelop QMake parser"
  • Main Page
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members

KDevelop QMake parser

Skip menu "KDevelop QMake parser"
  • buildtools
  •   lib
  •     base
  •     parsers
  •       autotools
  •       qmake
  •     widgets
  •   api
  • languages
  •   lib
  •     debugger
  •     designer_integration
  •     interfaces
  • lib
  •   catalog
  •   interfaces
  •     extensions
  •     external
  •     extras
  •   util
  •   widgets
  •     propeditor
  • parts
  •   documentation
  •     interfaces
  • src
  •   profileengine
  •     lib
Generated for KDevelop QMake parser by doxygen 1.8.13
This website is maintained by Timothy Pearson.