• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • TDevelop Interfaces Library
 

TDevelop Interfaces Library

Namespaces | Classes | Functions
CodeModelUtils Namespace Reference

Namespaces

 FunctionDefinitions
 
 Functions
 

Classes

struct  AllFunctionDefinitions
 
struct  AllFunctions
 
class  PredDefinitionMatchesDeclaration
 
struct  Scope
 

Functions

FunctionList allFunctions (const FileDom &dom)
 
AllFunctions allFunctionsDetailed (const FileDom &dom)
 
AllFunctionDefinitions allFunctionDefinitionsDetailed (const FileDom &dom)
 
bool resultTypesFit (const FunctionDom &dec, const FunctionDefinitionDom &def)
 
bool compareDeclarationToDefinition (const FunctionDom &dec, const FunctionDefinitionDom &def)
 
bool compareDeclarationToDefinition (const FunctionDom &dec, const FunctionDefinitionDom &def, const std::set< NamespaceImportModel > &nsImports)
 
FunctionList allFunctionsExhaustive (FileDom &dom)
 
FunctionDefinitionList allFunctionDefinitionsExhaustive (FileDom &dom)
 
ClassDom findClassByPosition (NamespaceModel *nameSpace, int line, int col)
 
ClassDom findClassByPosition (ClassModel *aClass, int line, int col)
 
int findLastMethodLine (ClassDom aClass, CodeModelItem::Access access)
 
int findLastVariableLine (ClassDom aClass, CodeModelItem::Access access)
 
TQString accessSpecifierToString (CodeModelItem::Access access)
 
template<class Pred >
void findFunctionDefinitions (Pred pred, const FileList &fileList, FunctionDefinitionList &lst)
 
template<class Pred >
void findFunctionDefinitions (Pred pred, const NamespaceDom &ns, FunctionDefinitionList &lst)
 
template<class Pred >
void findFunctionDefinitions (Pred pred, const NamespaceList &namespaceList, FunctionDefinitionList &lst)
 
template<class Pred >
void findFunctionDefinitions (Pred pred, const ClassList &classList, FunctionDefinitionList &lst)
 
template<class Pred >
void findFunctionDefinitions (Pred pred, const FunctionDefinitionList &functionDefinitionList, FunctionDefinitionList &lst)
 
template<class Pred >
void findFunctionDefinitions (Pred pred, const ClassDom &klass, FunctionDefinitionList &lst)
 
template<class Pred >
void findFunctionDefinitions (Pred pred, const FunctionDefinitionDom &fun, FunctionDefinitionList &lst)
 
template<class Pred >
void findFunctionDeclarations (Pred pred, const FileList &fileList, FunctionList &lst)
 
template<class Pred >
void findFunctionDeclarations (Pred pred, const NamespaceDom &ns, FunctionList &lst)
 
template<class Pred >
void findFunctionDeclarations (Pred pred, const NamespaceList &namespaceList, FunctionList &lst)
 
template<class Pred >
void findFunctionDeclarations (Pred pred, const ClassList &classList, FunctionList &lst)
 
template<class Pred >
void findFunctionDeclarations (Pred pred, const FunctionList &functionList, FunctionList &lst)
 
template<class Pred >
void findFunctionDeclarations (Pred pred, const ClassDom &klass, FunctionList &lst)
 
template<class Pred >
void findFunctionDeclarations (Pred pred, const FunctionDom &fun, FunctionList &lst)
 

Detailed Description

Namespace which contains utility functions and classes for the CodeModel.

Function Documentation

◆ accessSpecifierToString()

TQString CodeModelUtils::accessSpecifierToString ( CodeModelItem::Access  access)

Get the string representation of an accesss pecifier.

Parameters
accessAn access specifier to get a string representation of.
Returns
string The representation of an access (e.g. "public").
Author
Jonas Jacobi j.jac.nosp@m.obi@.nosp@m.gmx.d.nosp@m.e

Definition at line 489 of file codemodel_utils.cpp.

◆ allFunctionDefinitionsDetailed()

AllFunctionDefinitions CodeModelUtils::allFunctionDefinitionsDetailed ( const FileDom &  dom)
Returns
A detailed list of all function definitions in the file (detailed list contains the information about a scope of each FunctionDefinitionDom found).
Parameters
domFile Dom to look for functions in.

Definition at line 271 of file codemodel_utils.cpp.

◆ allFunctionDefinitionsExhaustive()

FunctionDefinitionList CodeModelUtils::allFunctionDefinitionsExhaustive ( FileDom &  dom)
Returns
A list of all function-definitions in the file. This version searches the file's whole group for functions that may have been inserted into the other file's structure. Unlike the methods above, this guarantees that all returned functions physically belong to that file.
Parameters
domFile Dom to look for functions in.

Definition at line 393 of file codemodel_utils.cpp.

◆ allFunctions()

FunctionList CodeModelUtils::allFunctions ( const FileDom &  dom)
Returns
A list of all functions in the file.
Parameters
domFile Dom to look for functions in.

Definition at line 219 of file codemodel_utils.cpp.

◆ allFunctionsDetailed()

AllFunctions CodeModelUtils::allFunctionsDetailed ( const FileDom &  dom)
Returns
A detailed list of all functions in the file (detailed list contains the information about a scope of each FunctionDom found).
Parameters
domFile Dom to look for functions in.

Definition at line 245 of file codemodel_utils.cpp.

◆ allFunctionsExhaustive()

FunctionList CodeModelUtils::allFunctionsExhaustive ( FileDom &  dom)
Returns
A list of all functions in the file. This version searches the file's whole group for functions that may have been inserted into the other file's structure. Unlike the methods above, this guarantees that all returned functions physically belong to that file.
Parameters
domFile Dom to look for functions in.

Definition at line 383 of file codemodel_utils.cpp.

◆ compareDeclarationToDefinition() [1/2]

bool CodeModelUtils::compareDeclarationToDefinition ( const FunctionDom &  dec,
const FunctionDefinitionDom &  def 
)

Compares a declaration and a defintion of a function.

Parameters
decdeclaration
defdefinition
Returns
true, if dec is the declaration of the function definition def, false otherwise
Author
Jonas Jacobi j.jac.nosp@m.obi@.nosp@m.gmx.d.nosp@m.e

Definition at line 320 of file codemodel_utils.cpp.

◆ compareDeclarationToDefinition() [2/2]

bool CodeModelUtils::compareDeclarationToDefinition ( const FunctionDom &  dec,
const FunctionDefinitionDom &  def,
const std::set< NamespaceImportModel > &  nsImports 
)

Compares a declaration and a defintion of a function.

Parameters
decdeclaration
defdefinition
nsImportsnamespace imports for the namespace the definition appears in
Returns
true, if dec is the declaration of the function definition def, false otherwise

Definition at line 339 of file codemodel_utils.cpp.

◆ findClassByPosition() [1/2]

ClassDom CodeModelUtils::findClassByPosition ( NamespaceModel *  nameSpace,
int  line,
int  col 
)

Finds a class by its position in a file(position inside the part of the file, where the class is declared).

In the case of nested classes the innermost class which is declared at/around the provided position.

Parameters
nameSpaceA namespace to search for the class.
lineA linenumber inside the class declaration.
colThe colum of line.
Returns
The innermost class, which is declared at/around position defined with line / col, or 0 if no class is found.
Author
Jonas Jacobi j.jac.nosp@m.obi@.nosp@m.gmx.d.nosp@m.e

Definition at line 404 of file codemodel_utils.cpp.

◆ findClassByPosition() [2/2]

ClassDom CodeModelUtils::findClassByPosition ( ClassModel *  aClass,
int  line,
int  col 
)

Same as above, just searches inside a class instead of a namespace.

Definition at line 428 of file codemodel_utils.cpp.

◆ findFunctionDeclarations() [1/7]

template<class Pred >
void CodeModelUtils::findFunctionDeclarations ( Pred  pred,
const FileList &  fileList,
FunctionList &  lst 
)

Finds function declarations which match given predicate in files.

Predicate can be considered as a condition. If it is true then the function declaration is added to the result list otherwise it is skipped.

See also
Pred class documentation for a detailed description on how to create and use predicates.
Parameters
predPredicate which is applied to a function declaration before it is returned.
fileListThe list of files to find function declarations in.
lstThe reference to a list of function declarations. Will be filled by this function.

Definition at line 276 of file codemodel_utils.h.

◆ findFunctionDeclarations() [2/7]

template<class Pred >
void CodeModelUtils::findFunctionDeclarations ( Pred  pred,
const NamespaceDom &  ns,
FunctionList &  lst 
)

Finds function declarations which match given predicate in the namespace.

Predicate can be considered as a condition. If it is true then the function declaration is added to the result list otherwise it is skipped.

See also
Pred class documentation for a detailed description on how to create and use predicates.
Parameters
predPredicate which is applied to a function declaration before it is returned.
nsThe namespace to find function declarations in.
lstThe reference to a list of function declarations. Will be filled by this function.

Definition at line 283 of file codemodel_utils.h.

◆ findFunctionDeclarations() [3/7]

template<class Pred >
void CodeModelUtils::findFunctionDeclarations ( Pred  pred,
const NamespaceList &  namespaceList,
FunctionList &  lst 
)

Finds function declarations which match given predicate in namespaces.

Predicate can be considered as a condition. If it is true then the function declaration is added to the result list otherwise it is skipped.

See also
Pred class documentation for a detailed description on how to create and use predicates.
Parameters
predPredicate which is applied to a function declaration before it is returned.
namespaceListThe list of namespaces to find function declarations in.
lstThe reference to a list of function declarations. Will be filled by this function.

Definition at line 291 of file codemodel_utils.h.

◆ findFunctionDeclarations() [4/7]

template<class Pred >
void CodeModelUtils::findFunctionDeclarations ( Pred  pred,
const ClassList &  classList,
FunctionList &  lst 
)

Finds function declarations which match given predicate in classes.

Predicate can be considered as a condition. If it is true then the function declaration is added to the result list otherwise it is skipped.

See also
Pred class documentation for a detailed description on how to create and use predicates.
Parameters
predPredicate which is applied to a function declaration before it is returned.
classListThe list of classes to find function declarations in.
lstThe reference to a list of function declarations. Will be filled by this function.

Definition at line 298 of file codemodel_utils.h.

◆ findFunctionDeclarations() [5/7]

template<class Pred >
void CodeModelUtils::findFunctionDeclarations ( Pred  pred,
const FunctionList &  functionList,
FunctionList &  lst 
)

Finds function declarations which match given predicate in the list of function declarations.

Predicate can be considered as a condition. If it is true then the function declaration is added to the result list otherwise it is skipped.

See also
Pred class documentation for a detailed description on how to create and use predicates.
Parameters
predPredicate which is applied to a function declaration before it is returned.
functionListThe list of function declarations to find function declarations in.
lstThe reference to a list of function declarations. Will be filled by this function.

Definition at line 305 of file codemodel_utils.h.

◆ findFunctionDeclarations() [6/7]

template<class Pred >
void CodeModelUtils::findFunctionDeclarations ( Pred  pred,
const ClassDom &  klass,
FunctionList &  lst 
)

Finds function declarations which match given predicate in the class.

Predicate can be considered as a condition. If it is true then the function declaration is added to the result list otherwise it is skipped.

See also
Pred class documentation for a detailed description on how to create and use predicates.
Parameters
predPredicate which is applied to a function declaration before it is returned.
klassThe class to find function declarations in.
lstThe reference to a list of function declarations. Will be filled by this function.

Definition at line 312 of file codemodel_utils.h.

◆ findFunctionDeclarations() [7/7]

template<class Pred >
void CodeModelUtils::findFunctionDeclarations ( Pred  pred,
const FunctionDom &  fun,
FunctionList &  lst 
)

Applies a predicate to a function declaration.

Predicate can be considered as a condition. If it is true then the function declaration is added to the result list otherwise it is skipped.

See also
Pred class documentation for a detailed description on how to create and use predicates.
Parameters
predPredicate which is applied to a function declaration before it is returned.
funThe function declaration.
lstThe reference to a list of function declarations. Will be filled by this function.

Definition at line 319 of file codemodel_utils.h.

◆ findFunctionDefinitions() [1/7]

template<class Pred >
void CodeModelUtils::findFunctionDefinitions ( Pred  pred,
const FileList &  fileList,
FunctionDefinitionList &  lst 
)

Finds function definitions which match given predicate in files.

Predicate can be considered as a condition. If it is true then the function definition is added to the result list otherwise it is skipped.

See also
Pred class documentation for a detailed description on how to create and use predicates.
Parameters
predPredicate which is applied to a function definition before it is returned.
fileListThe list of files to find function definitions in.
lstThe reference to a list of function definitions. Will be filled by this function.

Definition at line 224 of file codemodel_utils.h.

◆ findFunctionDefinitions() [2/7]

template<class Pred >
void CodeModelUtils::findFunctionDefinitions ( Pred  pred,
const NamespaceDom &  ns,
FunctionDefinitionList &  lst 
)

Finds function definitions which match given predicate in the namespace.

Predicate can be considered as a condition. If it is true then the function definition is added to the result list otherwise it is skipped.

See also
Pred class documentation for a detailed description on how to create and use predicates.
Parameters
predPredicate which is applied to a function definition before it is returned.
nsThe namespace to find function definitions in.
lstThe reference to a list of function definitions. Will be filled by this function.

Definition at line 231 of file codemodel_utils.h.

◆ findFunctionDefinitions() [3/7]

template<class Pred >
void CodeModelUtils::findFunctionDefinitions ( Pred  pred,
const NamespaceList &  namespaceList,
FunctionDefinitionList &  lst 
)

Finds function definitions which match given predicate in namespaces.

Predicate can be considered as a condition. If it is true then the function definition is added to the result list otherwise it is skipped.

See also
Pred class documentation for a detailed description on how to create and use predicates.
Parameters
predPredicate which is applied to a function definition before it is returned.
namespaceListThe list of namespaces to find function definitions in.
lstThe reference to a list of function definitions. Will be filled by this function.

Definition at line 239 of file codemodel_utils.h.

◆ findFunctionDefinitions() [4/7]

template<class Pred >
void CodeModelUtils::findFunctionDefinitions ( Pred  pred,
const ClassList &  classList,
FunctionDefinitionList &  lst 
)

Finds function definitions which match given predicate in classes.

Predicate can be considered as a condition. If it is true then the function definition is added to the result list otherwise it is skipped.

See also
Pred class documentation for a detailed description on how to create and use predicates.
Parameters
predPredicate which is applied to a function definition before it is returned.
classListThe list of classes to find function definitions in.
lstThe reference to a list of function definitions. Will be filled by this function.

Definition at line 246 of file codemodel_utils.h.

◆ findFunctionDefinitions() [5/7]

template<class Pred >
void CodeModelUtils::findFunctionDefinitions ( Pred  pred,
const FunctionDefinitionList &  functionDefinitionList,
FunctionDefinitionList &  lst 
)

Finds function definitions which match given predicate in the list of function definitions.

Predicate can be considered as a condition. If it is true then the function definition is added to the result list otherwise it is skipped.

See also
Pred class documentation for a detailed description on how to create and use predicates.
Parameters
predPredicate which is applied to a function definition before it is returned.
functionDefinitionListThe list of function definitions to find function definitions in.
lstThe reference to a list of function definitions. Will be filled by this function.

Definition at line 253 of file codemodel_utils.h.

◆ findFunctionDefinitions() [6/7]

template<class Pred >
void CodeModelUtils::findFunctionDefinitions ( Pred  pred,
const ClassDom &  klass,
FunctionDefinitionList &  lst 
)

Finds function definitions which match given predicate in the class.

Predicate can be considered as a condition. If it is true then the function definition is added to the result list otherwise it is skipped.

See also
Pred class documentation for a detailed description on how to create and use predicates.
Parameters
predPredicate which is applied to a function definition before it is returned.
klassThe class to find function definitions in.
lstThe reference to a list of function definitions. Will be filled by this function.

Definition at line 260 of file codemodel_utils.h.

◆ findFunctionDefinitions() [7/7]

template<class Pred >
void CodeModelUtils::findFunctionDefinitions ( Pred  pred,
const FunctionDefinitionDom &  fun,
FunctionDefinitionList &  lst 
)

Applies a predicate to a function definition.

Predicate can be considered as a condition. If it is true then the function definition is added to the result list otherwise it is skipped.

See also
Pred class documentation for a detailed description on how to create and use predicates.
Parameters
predPredicate which is applied to a function definition before it is returned.
funThe function definition.
lstThe reference to a list of function definitions. Will be filled by this function.

Definition at line 267 of file codemodel_utils.h.

◆ findLastMethodLine()

int CodeModelUtils::findLastMethodLine ( ClassDom  aClass,
CodeModelItem::Access  access 
)

Finds the last occurrence (line of file wise) of a method inside a class declaration with specific access specificer.

This can be used e.g. to find a position to new methods to the class.

Parameters
aClassclass to search for method.
accessthe access specifier with which methods are searched for.
Returns
The last line a Method with access specifier access is found, or -1 if no method with that access specifier was found.
Author
Jonas Jacobi j.jac.nosp@m.obi@.nosp@m.gmx.d.nosp@m.e

Definition at line 455 of file codemodel_utils.cpp.

◆ findLastVariableLine()

int CodeModelUtils::findLastVariableLine ( ClassDom  aClass,
CodeModelItem::Access  access 
)

Same as above, but finds a membervariable instead of a method.

Definition at line 472 of file codemodel_utils.cpp.

TDevelop Interfaces Library

Skip menu "TDevelop Interfaces Library"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

TDevelop Interfaces Library

Skip menu "TDevelop Interfaces Library"
  • 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 TDevelop Interfaces Library by doxygen 1.8.13
This website is maintained by Timothy Pearson.