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

TDevelop Interfaces Library

Public Types | Public Member Functions | Protected Member Functions | Friends | List of all members
EnumModel Class Reference

#include <codemodel.h>

Inheritance diagram for EnumModel:
CodeModelItem

Public Types

typedef EnumDom Ptr
Public Types inherited from CodeModelItem
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 isEnum () const
int access () const
void setAccess (int access)
EnumeratorList enumeratorList ()
const EnumeratorList enumeratorList () const
void addEnumerator (EnumeratorDom e)
void removeEnumerator (EnumeratorDom e)
virtual void read (TQDataStream &stream)
virtual void write (TQDataStream &stream) const
virtual void dump (std::ostream &file, bool recurse=false, TQString Info="")
void update (const EnumModel *i)
bool canUpdate (const EnumModel *i) const
Public Member Functions inherited from CodeModelItem
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 isFile () const
virtual bool isNamespace () const
virtual bool isClass () const
virtual bool isFunction () const
virtual bool isFunctionDefinition () const
virtual bool isVariable () const
virtual bool isArgument () 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

 EnumModel (CodeModel *model)
Protected Member Functions inherited from CodeModelItem
 CodeModelItem (int kind, CodeModel *model)

Friends

class CodeModel

Detailed Description

Enum model.

Represents enums.

Instances of this class should be created using CodeModel::create method.

Definition at line 1474 of file codemodel.h.

Member Typedef Documentation

◆ Ptr

typedef EnumDom EnumModel::Ptr

A definition of safe pointer to the enum model.

Definition at line 1483 of file codemodel.h.

Constructor & Destructor Documentation

◆ EnumModel()

EnumModel::EnumModel ( CodeModel * model)
protected

Constructor.

Parameters
modelCode model which stores this item.

Definition at line 1661 of file codemodel.cpp.

Member Function Documentation

◆ access()

int EnumModel::access ( ) const
Returns
The access level of the enum. Can return either values of type CodeModelItem::Access or other integers if the enum has other access level.

Definition at line 1666 of file codemodel.cpp.

◆ addEnumerator()

void EnumModel::addEnumerator ( EnumeratorDom e)

Adds an enumerator to the model.

Parameters
eThe enumerator model to add.

Definition at line 1686 of file codemodel.cpp.

◆ canUpdate()

bool EnumModel::canUpdate ( const EnumModel * i) const
Todo
check not complete

Definition at line 1753 of file codemodel.cpp.

◆ dump()

void EnumModel::dump ( std::ostream & file,
bool recurse = false,
TQString Info = "" )
virtual

The dump-function is not ready yet.

Reimplemented from CodeModelItem.

Definition at line 322 of file codemodel.cpp.

◆ enumeratorList() [1/2]

EnumeratorList EnumModel::enumeratorList ( )
Returns
The list of enumerators in this enum.

Definition at line 1676 of file codemodel.cpp.

◆ enumeratorList() [2/2]

const EnumeratorList EnumModel::enumeratorList ( ) const
Returns
The list of enumerators in this enum.
Note
This is a const version provided for convenience.

Definition at line 1681 of file codemodel.cpp.

◆ isEnum()

virtual bool EnumModel::isEnum ( ) const
inlinevirtual
Returns
true if an item is a EnumModel.

Reimplemented from CodeModelItem.

Definition at line 1485 of file codemodel.h.

◆ read()

void EnumModel::read ( TQDataStream & stream)
virtual

Reads an item from the stream.

Parameters
streamThe stream to read from.

Reimplemented from CodeModelItem.

Definition at line 1691 of file codemodel.cpp.

◆ removeEnumerator()

void EnumModel::removeEnumerator ( EnumeratorDom e)

Removes an enumerator from the model.

Parameters
eThe enumerator model to remove.

Definition at line 1743 of file codemodel.cpp.

◆ setAccess()

void EnumModel::setAccess ( int access)

Sets the access level of the enum.

Parameters
accessThe access level.

Definition at line 1671 of file codemodel.cpp.

◆ update()

void EnumModel::update ( const EnumModel * i)

Definition at line 1748 of file codemodel.cpp.

◆ write()

void EnumModel::write ( TQDataStream & stream) const
virtual

Writes an item to the stream.

Parameters
streamThe stream to write to.

Reimplemented from CodeModelItem.

Definition at line 1705 of file codemodel.cpp.

Friends And Related Symbol Documentation

◆ CodeModel

friend class CodeModel
friend

Definition at line 1522 of file codemodel.h.


The documentation for this class was generated from the following files:
  • codemodel.h
  • codemodel.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.15.0
This website is maintained by Timothy Pearson.