#include <codemodel.h>
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()
|
protected |
Constructor.
- Parameters
-
model Code 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
-
e The 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()
|
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()
|
inlinevirtual |
- Returns
- true if an item is a EnumModel.
Reimplemented from CodeModelItem.
Definition at line 1485 of file codemodel.h.
◆ read()
|
virtual |
Reads an item from the stream.
- Parameters
-
stream The 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
-
e The 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
-
access The 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()
|
virtual |
Writes an item to the stream.
- Parameters
-
stream The stream to write to.
Reimplemented from CodeModelItem.
Definition at line 1705 of file codemodel.cpp.
Friends And Related Symbol Documentation
◆ CodeModel
|
friend |
Definition at line 1522 of file codemodel.h.
The documentation for this class was generated from the following files:
Trinity API Reference