#include <codemodel.h>

Public Types | |
typedef FileDom | Ptr |
![]() | |
typedef std::set< NamespaceAliasModel > | NamespaceAliasModelList |
typedef std::set< NamespaceImportModel > | NamespaceImportModelList |
typedef NamespaceDom | Ptr |
![]() | |
typedef ClassDom | Ptr |
![]() | |
enum | Kind { File, Namespace, Class, Function, Variable, Argument, FunctionDefinition, Enum, Enumerator, TypeAlias, Custom = 1000 } |
enum | Access { Public, Protected, Private } |
typedef ItemDom | Ptr |
Public Member Functions | |
virtual bool | isFile () const |
virtual int | groupId () const |
virtual void | setGroupId (int newId) |
virtual void | write (TQDataStream &stream) const |
FileList | wholeGroup () |
TQStringList | wholeGroupStrings () const |
virtual void | read (TQDataStream &stream) |
ParseResultPointer | parseResult () const |
void | setParseResult (const ParseResultPointer &result) |
void | update (const FileModel *i) |
![]() | |
virtual bool | isClass () const |
virtual bool | isNamespace () const |
NamespaceList | namespaceList () |
const NamespaceList | namespaceList () const |
bool | hasNamespace (const TQString &name) const |
NamespaceDom | namespaceByName (const TQString &name) |
const NamespaceDom | namespaceByName (const TQString &name) const |
bool | addNamespace (NamespaceDom ns) |
void | removeNamespace (NamespaceDom ns) |
void | update (const NamespaceModel *ns) |
bool | canUpdate (const NamespaceModel *ns) const |
virtual void | dump (std::ostream &file, bool recurse=false, TQString Info="") |
void | addNamespaceImport (const NamespaceImportModel &import) |
void | addNamespaceAlias (const NamespaceAliasModel &alias) |
void | removeNamespaceImport (const NamespaceImportModel &import) |
void | removeNamespaceAlias (const NamespaceAliasModel &alias) |
const NamespaceAliasModelList & | namespaceAliases () const |
const NamespaceImportModelList & | namespaceImports () const |
![]() | |
TQStringList | scope () const |
void | setScope (const TQStringList &scope) |
TQStringList | baseClassList () const |
bool | addBaseClass (const TQString &baseClass) |
void | removeBaseClass (const TQString &baseClass) |
ClassList | classList () |
const ClassList | classList () const |
bool | hasClass (const TQString &name) const |
ClassList | classByName (const TQString &name) |
const ClassList | classByName (const TQString &name) const |
bool | addClass (ClassDom klass) |
void | removeClass (ClassDom klass) |
FunctionList | functionList () |
const FunctionList | functionList () const |
bool | hasFunction (const TQString &name) const |
FunctionList | functionByName (const TQString &name) |
const FunctionList | functionByName (const TQString &name) const |
bool | addFunction (FunctionDom fun) |
void | removeFunction (FunctionDom fun) |
FunctionDefinitionList | functionDefinitionList () |
const FunctionDefinitionList | functionDefinitionList () const |
bool | hasFunctionDefinition (const TQString &name) const |
FunctionDefinitionList | functionDefinitionByName (const TQString &name) |
const FunctionDefinitionList | functionDefinitionByName (const TQString &name) const |
bool | addFunctionDefinition (FunctionDefinitionDom fun) |
void | removeFunctionDefinition (FunctionDefinitionDom fun) |
VariableList | variableList () |
const VariableList | variableList () const |
bool | hasVariable (const TQString &name) const |
VariableDom | variableByName (const TQString &name) |
const VariableDom | variableByName (const TQString &name) const |
bool | addVariable (VariableDom var) |
void | removeVariable (VariableDom var) |
TypeAliasList | typeAliasList () |
const TypeAliasList | typeAliasList () const |
bool | hasTypeAlias (const TQString &name) const |
TypeAliasList | typeAliasByName (const TQString &name) |
const TypeAliasList | typeAliasByName (const TQString &name) const |
bool | addTypeAlias (TypeAliasDom typeAlias) |
void | removeTypeAlias (TypeAliasDom typeAlias) |
EnumList | enumList () |
const EnumList | enumList () const |
bool | hasEnum (const TQString &name) const |
EnumDom | enumByName (const TQString &name) |
const EnumDom | enumByName (const TQString &name) const |
bool | addEnum (EnumDom e) |
void | removeEnum (EnumDom e) |
void | update (const ClassModel *i) |
bool | canUpdate (const ClassModel *i) const |
![]() | |
void | update (const CodeModelItem *i) |
bool | canUpdate (const CodeModelItem *i) const |
virtual | ~CodeModelItem () |
int | kind () const |
void | setKind (int kind) |
TQString | name () const |
TQString | comment () const |
void | setComment (TQString comment) |
void | setName (const TQString &name) |
FileDom | file () |
const FileDom | file () const |
TQString | fileName () const |
void | setFileName (const TQString &fileName) |
void | getStartPosition (int *line, int *col) const |
void | setStartPosition (int line, int col) |
void | getEndPosition (int *line, int *col) const |
void | setEndPosition (int line, int col) |
virtual bool | isFunction () const |
virtual bool | isFunctionDefinition () const |
virtual bool | isVariable () const |
virtual bool | isArgument () const |
virtual bool | isEnum () const |
virtual bool | isEnumerator () const |
virtual bool | isTypeAlias () const |
virtual bool | isCustom () const |
virtual bool | isTemplateable () const |
CodeModel * | codeModel () |
const CodeModel * | codeModel () const |
Protected Member Functions | |
FileModel (CodeModel *model) | |
![]() | |
NamespaceModel (CodeModel *model) | |
![]() | |
ClassModel (CodeModel *model) | |
![]() | |
CodeModelItem (int kind, CodeModel *model) | |
Friends | |
class | CodeModel |
Detailed Description
File model.
Represents a file in the code model. Files in general contain classes, namespaces, functions, types, etc. Therefore FileModel is derived from NamespaceModel.
Instances of this class should be created using CodeModel::create method.
Definition at line 1138 of file codemodel.h.
Member Typedef Documentation
◆ Ptr
typedef FileDom FileModel::Ptr |
A definition of safe pointer to the file model.
Definition at line 1147 of file codemodel.h.
Constructor & Destructor Documentation
◆ FileModel()
|
protected |
Constructor.
- Parameters
-
model Code model which stores this item.
Definition at line 710 of file codemodel.cpp.
Member Function Documentation
◆ isFile()
|
inlinevirtual |
- Returns
- true if an item is a FileModel.
Reimplemented from CodeModelItem.
Definition at line 1149 of file codemodel.h.
◆ read()
|
virtual |
Reads an item from the stream.
- Parameters
-
stream The stream to read from.
Reimplemented from NamespaceModel.
Definition at line 1526 of file codemodel.cpp.
◆ write()
|
virtual |
This function additionally does version-checking and should be used instead of read when read should be called from outside.
- Returns
- whether the read was successful
Reimplemented from NamespaceModel.
Definition at line 1545 of file codemodel.cpp.
The documentation for this class was generated from the following files: