Commit 50a08c5d authored by Andreas Pakulat's avatar Andreas Pakulat

Unify, fix and provide api dox for enums

parent 7d77d1ae
......@@ -44,8 +44,8 @@ public:
~DocumentCursor();
enum Position {
Start,
End
Start /**< cursor is at the start of the range */ ,
End /**< cursor is at the end of the range */
};
/// Constructor for information extraction only, does not take ownership of the cursor.
......
......@@ -50,7 +50,10 @@ public:
DocumentRangeObject(const HashedString& document, const SimpleRange& range);
virtual ~DocumentRangeObject();
enum RangeOwning{ Own, DontOwn };
enum RangeOwning{
Own /**< this object owns the range */,
DontOwn /**< this object does not own the range */
};
Q_DECLARE_FLAGS( RangeOwnings, RangeOwning )
/**
......
......@@ -125,10 +125,9 @@ public:
KTextEditor::SmartInterface* smart() const;
enum TopRangeType {
Highlighting,
DefinitionUseChain,
TopRangeCount
Highlighting /**< top range type for highlighting */,
DefinitionUseChain /**< top range type for duchain */,
TopRangeCount /**< top range type for counting */
};
/**
......@@ -153,8 +152,8 @@ public:
static void releaseRange(KTextEditor::SmartRange* range);
enum Edge {
FrontEdge,
BackEdge
FrontEdge /**< the front edge of a token */,
BackEdge /**< the back edge of a token */
};
/**
......@@ -217,8 +216,8 @@ public:
KTextEditor::SmartRange* createRange();
enum RangeEdge {
InnerEdge,
OuterEdge
InnerEdge /**< the inner edge of a range */,
OuterEdge /**< the outer edge of a range */
};
/**
......
......@@ -60,8 +60,8 @@ public:
enum DocumentSaveMode
{
Default = 0,
Silent = 1
Default = 0 /**< standard save mode, gives a warning message if the file was modified outside the editor */,
Silent = 1 /**< silent save mode, doesn't warn the user if the file was modified outside the editor */
};
/**
......
......@@ -159,16 +159,18 @@ public:
*/
virtual IRun defaultRun() const = 0;
/// An enumeration of the possible states for the run controller.
/**
* An enumeration of the possible states for the run controller.
*/
enum State {
/// No processes are currently running.
Idle,
/// Processes are currently running.
Running
Idle /**< No processes are currently running */,
Running /**< processes are currently running */
};
Q_SIGNALS:
/// Notify that the state of the run controller has changed to \a {state}.
/**
* Notify that the state of the run controller has changed to \a {state}.
*/
void runStateChanged(State state);
};
......
......@@ -36,9 +36,9 @@ public:
virtual ~IRunProvider();
enum OutputTypes {
StandardOutput,
StandardError,
RunProvider
StandardOutput /**< indicates the process wrote to standard output */,
StandardError /**< indicates the process wrote to standard error */,
RunProvider /**< indicates the run provider produced output */
};
/**
......@@ -63,7 +63,7 @@ Q_SIGNALS:
void finished(int serial);
/**
* Notify that the process with given \a serial has produced the given \a output in the given \a channel.
* Notify that the process with given \a serial has produced the given \a output in the given \a type.
*/
void output(int serial, const QString& line, KDevelop::IRunProvider::OutputTypes type);
};
......
......@@ -48,7 +48,10 @@ class KDEVPLATFORMINTERFACES_EXPORT IUiController {
public:
virtual ~IUiController();
enum SwitchMode { ThisWindow, NewWindow };
enum SwitchMode {
ThisWindow /**< indicates that the area switch should be in the this window */,
NewWindow /**< indicates that the area switch should be using a new window */
};
virtual void switchToArea(const QString &areaName, SwitchMode switchMode) = 0;
......
......@@ -38,9 +38,9 @@ public:
virtual ~AbstractFunctionDeclaration();
enum FunctionSpecifier {
VirtualSpecifier = 0x1,
InlineSpecifier = 0x2,
ExplicitSpecifier = 0x4
VirtualSpecifier = 0x1 /**< indicates a virtual function */,
InlineSpecifier = 0x2 /**< indicates a inline function */,
ExplicitSpecifier = 0x4 /**< indicates a explicit function */
};
Q_DECLARE_FLAGS(FunctionSpecifiers, FunctionSpecifier)
......
......@@ -39,9 +39,9 @@ public:
enum QtFunctionType
{
Normal,
Signal,
Slot
Normal /**< Indicates a normal function */,
Signal /**< indicates a Qt slot */,
Slot /**< indicates a Qt signal */
};
QtFunctionType functionType() const;
......
......@@ -41,12 +41,12 @@ public:
void setAccessPolicy(AccessPolicy accessPolicy);
enum StorageSpecifier {
StaticSpecifier = 0x1,
AutoSpecifier = 0x2,
FriendSpecifier = 0x4,
ExternSpecifier = 0x8,
RegisterSpecifier = 0x10,
MutableSpecifier = 0x20
StaticSpecifier = 0x1 /**< indicates static member */,
AutoSpecifier = 0x2 /**< indicates automatic determination of member access */,
FriendSpecifier = 0x4 /**< indicates friend member */,
ExternSpecifier = 0x8 /**< indicates external declaration */,
RegisterSpecifier = 0x10 /**< indicates register */,
MutableSpecifier = 0x20 /**< indicates a mutable member */
};
Q_DECLARE_FLAGS(StorageSpecifiers, StorageSpecifier)
......
......@@ -60,26 +60,26 @@ class KDEVPLATFORMLANGUAGE_EXPORT Declaration : public DUChainBase
public:
enum Scope {
GlobalScope,
NamespaceScope,
ClassScope,
FunctionScope,
LocalScope
GlobalScope /**< a global declaration */,
NamespaceScope /**< a namespace declaration */,
ClassScope /**< a class declaration */,
FunctionScope /**< a function declaration */,
LocalScope /**< a local declaration */
};
enum AccessPolicy {
Public,
Protected,
Private
Public /**< a public declaration */,
Protected /**< a protected declaration */,
Private /**< a private declaration */
};
enum CVSpec {
CVNone = 0,
Const = 0x1,
Volatile = 0x2
CVNone = 0 /**< no CV given */,
Const = 0x1 /**< a const declaration */,
Volatile = 0x2 /**< a volatile declaration */
};
enum Kind {
Type, //A type is declared, like a class-declaration or function-declaration, or a typedef("class MyClass {};")
Instance //An instance of a type is declared("MyClass m;")
Type /**< A type is declared, like a class-declaration or function-declaration, or a typedef("class MyClass {};") */,
Instance /**< An instance of a type is declared("MyClass m;") */
};
Q_DECLARE_FLAGS(CVSpecs, CVSpec)
......
......@@ -52,42 +52,42 @@ public:
virtual ~DUChainObserver();
enum Modification {
Addition,
Removal,
Change,
Deletion
Addition /**< Something was added to the duchain */,
Removal /**< Something was removed to the duchain */,
Change /**< Something was changed in the duchain */,
Deletion /**< Something was deleted in the duchain */
};
enum Relationship {
// Context
ParentContext,
ChildContexts,
ImportedParentContexts,
ImportedChildContexts,
LocalDeclarations,
LocalDefinitions,
UsingNamespaces,
ContextType,
ParentContext /**< related object is the parent context */,
ChildContexts /**< related object is a child context */,
ImportedParentContexts /**< related object is an imported parent context */,
ImportedChildContexts /**< related object is an imported child context */,
LocalDeclarations /**< related object is a local declaration */,
LocalDefinitions /**< related object is a local definition */,
UsingNamespaces /**< related object uses namespaces */,
ContextType /**< related object is a context type */,
// Context + Declaration
Uses,
Identifier,
Uses /**< related object is a use */,
Identifier /**< related object is an identifier */,
// Declaration
DataType,
ForwardDeclarations,
DataType /**< the related object is a datatype */,
ForwardDeclarations /**< the related object is a forward declaration */,
// Declaration + Definition + Use
Context,
Context /**< the related object is context */,
// Declaration + Definition
DefinitionRelationship,
DefinitionRelationship /**< the related object definition */,
// Use
DeclarationRelationship,
DeclarationRelationship /**< the related object is a declaration */,
// All
NotApplicable
NotApplicable /**< the related object is no applicable */
};
Q_SIGNALS:
......
......@@ -98,24 +98,24 @@ public:
virtual ~DUContext();
enum ContextType {
Global,
Namespace,
Class,
Function, //A context that declares function-arguments
Template, //A context that declares template-parameters
Other //Represents executable code, like for example within a compound-statement
Global /**< A context that declares functions, namespaces or classes */,
Namespace /**< A context that declares namespace members */,
Class /**< A context that declares class members */,
Function /**< A context that declares function-arguments */,
Template /**< A context that declares template-parameters */,
Other /**< Represents executable code, like for example within a compound-statement */
};
enum SearchFlag {
NoSearchFlags = 0,
InImportedParentContext = 1, //Internal, do not use from outside
OnlyContainerTypes = 2, //Not implemented yet
DontSearchInParent = 4, //IF this flag is set, findDeclarations(..) will not search for the identifier in parent-contexts(which does not include imported parent-contexts)
NoUndefinedTemplateParams = 8, //For languages that support templates(like C++). If this is set, the search should fail as soon as undefined template-parameters are involved.
DirectQualifiedLookup = 16, //When this flag is used, the searched qualified identifier should NOT be split up into it's components and looked up one by one. Currently only plays a role in C++ specific parts.
NoFiltering = 32, //Should be set when no filtering at all is wished, not even filtering that is natural for the underlying language(For example in C++, constructors are filtered out be default)
OnlyFunctions = 64, //When this is given, only function-declarations are returned. In case of C++, this also means that constructors can be retrieved, while normally they are filtered out.
NoImportsCheck = 128 //With this parameter, a global search will return all matching items, from all contexts, not only from imported ones.
NoSearchFlags = 0 /**< Searching for everything */,
InImportedParentContext = 1 /**< Internal, do not use from outside */,
OnlyContainerTypes = 2 /**< Not implemented yet */,
DontSearchInParent = 4 /**< IF this flag is set, findDeclarations(..) will not search for the identifier in parent-contexts(which does not include imported parent-contexts) */,
NoUndefinedTemplateParams = 8 /**< For languages that support templates(like C++). If this is set, the search should fail as soon as undefined template-parameters are involved. */,
DirectQualifiedLookup = 16 /**< When this flag is used, the searched qualified identifier should NOT be split up into it's components and looked up one by one. Currently only plays a role in C++ specific parts. */,
NoFiltering = 32 /**< Should be set when no filtering at all is wished, not even filtering that is natural for the underlying language(For example in C++, constructors are filtered out be default) */,
OnlyFunctions = 64 /**< When this is given, only function-declarations are returned. In case of C++, this also means that constructors can be retrieved, while normally they are filtered out. */,
NoImportsCheck = 128 /**< With this parameter, a global search will return all matching items, from all contexts, not only from imported ones. */
};
Q_DECLARE_FLAGS(SearchFlags, SearchFlag)
......
......@@ -180,10 +180,10 @@ public:
QualifiedIdentifier& operator=(const QualifiedIdentifier& rhs);
enum MatchTypes {
NoMatch,
EndsWith, //The current identifier ends with the one given to the match function
TargetEndsWith, //The identifier given to the match function ends with the current identifier
ExactMatch
NoMatch /**< matches no identifier */,
EndsWith /**< The current identifier ends with the one given to the match function */,
TargetEndsWith /**< The identifier given to the match function ends with the current identifier */,
ExactMatch /**< matches if the identifiers match exactly */
};
MatchTypes match(const Identifier& other) const;
......
......@@ -85,14 +85,14 @@ private:
* */
enum ParsingEnvironmentType
{
StandardParsingEnvironment,
CppParsingEnvironment,
PythonParsingEnvironment,
CMakeParsingEnvironment,
CSharpParsingEnvironment,
JavaParsingEnvironment,
RubyParsingEnvironment,
PhpParsingEnvironment
StandardParsingEnvironment /**< a basic standard parsing environment */,
CppParsingEnvironment /**< a C++ parsing environment */,
PythonParsingEnvironment /**< a python parsing environment */,
CMakeParsingEnvironment /**< a CMake parsing environment */,
CSharpParsingEnvironment /**< a CSharp parsing environment */,
JavaParsingEnvironment /**< a JAva parsing environment */,
RubyParsingEnvironment /**< a Ruby parsing environment */,
PhpParsingEnvironment /**< a PHP parsing environment */
};
///@WARNING: Access to all the following classes must be serialized through du-chain locking
......
......@@ -108,7 +108,7 @@ public:
* any count of imported proxy-contexts imported behind the content-context(This can be used for tracking problems)
*
* Note: This flag does not directly change the behavior of the language-independent du-chain.
* */
*/
ProxyContextFlag = 1,
/**
* Placeholder used in searching-functions, when the flag should simply be ignored.
......
......@@ -158,14 +158,14 @@ public:
virtual uint hash() const;
enum WhichType {
TypeAbstract,
TypeIntegral,
TypePointer,
TypeReference,
TypeFunction,
TypeStructure,
TypeArray,
TypeDelayed
TypeAbstract /**< an abstract type */,
TypeIntegral /**< an integral */,
TypePointer /**< a pointer*/,
TypeReference /**< a reference */,
TypeFunction /**< a function */,
TypeStructure /**< a structure */,
TypeArray /**< an array */,
TypeDelayed /**< a delayed type */
};
virtual WhichType whichType() const;
......@@ -293,9 +293,9 @@ public:
typedef KSharedPtr<FunctionType> Ptr;
enum SignaturePart {
SignatureWhole, //When this is given to toString(..), a string link "RETURNTYPE (ARGTYPE1, ARGTYPE1, ..)" is returned
SignatureReturn, //When this is given, only a string that represents the return-type is returned
SignatureArguments //When this is given, a string that represents the arguments like "(ARGTYPE1, ARGTYPE1, ..)" is returend
SignatureWhole /**< When this is given to toString(..), a string link "RETURNTYPE (ARGTYPE1, ARGTYPE1, ..)" is returned */,
SignatureReturn /**< When this is given, only a string that represents the return-type is returned */,
SignatureArguments /**< When this is given, a string that represents the arguments like "(ARGTYPE1, ARGTYPE1, ..)" is returend */
};
FunctionType();
......@@ -425,8 +425,8 @@ public:
typedef KSharedPtr<DelayedType> Ptr;
enum Kind {
Delayed, //The type should be resolved later. This is the default.
Unresolved //The type could not be resolved
Delayed /**< The type should be resolved later. This is the default. */,
Unresolved /**< The type could not be resolved */
};
DelayedType();
......
......@@ -48,12 +48,12 @@ public:
virtual ~Problem();
enum Source {
Unknown,
Disk,
Preprocessor,
Lexer,
Parser,
DUChainBuilder
Unknown /**< Unknown problem */,
Disk /**< problem reading from disk */,
Preprocessor /**< problem during pre-processing */,
Lexer /**< problem while lexing the file */,
Parser /**< problem while parsing the file */,
DUChainBuilder /**< problem while building the duchain */
};
Source source() const;
......
......@@ -40,9 +40,9 @@ class IOutputView
public:
enum Behaviour {
AllowUserClose = 0x1,
AlwaysShowView = 0x2,
AutoScroll = 0x4
AllowUserClose = 0x1 /**< allow the user to close the view */,
AlwaysShowView = 0x2 /**< always show the view */,
AutoScroll = 0x4 /**< automatically scroll the view */
};
Q_DECLARE_FLAGS(Behaviours, Behaviour)
......
......@@ -43,10 +43,8 @@ public:
enum BuildFeature
{
Includes, ///< This project supports passing include directives to
///< the compiler
Defines ///< This project supports passing preprocessor defines to
///< compiler
Includes /**< This project supports passing include directives to the compiler */,
Defines /**< This project supports passing preprocessor defines to compiler */
};
Q_DECLARE_FLAGS( BuildFeatures, BuildFeature )
......
......@@ -62,10 +62,10 @@ class KDEVPLATFORMPROJECT_EXPORT ProjectBaseItem: public QStandardItem
enum ProjectItemType
{
Folder = QStandardItem::UserType,
File,
Target,
BuildFolder
Folder = QStandardItem::UserType /** item is a folder */,
File /** item is a file */,
Target /** item is a target */,
BuildFolder /** item is a buildable folder */
};
/** @returns Returns the project that the item belongs to. */
......
......@@ -68,7 +68,12 @@ public:
// has finished loading the plugins, after which it is set to Running.
// ShuttingDown and DoneShutdown are used during shutdown by the
// async unloading of plugins.
enum CleanupMode { Running, CleaningUp, CleanupDone };
enum CleanupMode
{
Running /**< the plugin manager is running */,
CleaningUp /**< the plugin manager is cleaning up for shutdown */,
CleanupDone /**< the plugin manager has finished cleaning up */
};
CleanupMode cleanupMode;
QString profile;
......
......@@ -45,9 +45,9 @@ public:
/**Lists which are held by a profile.*/
enum List {
Properties /**<X-KDevelop-Properties defined for this profile.*/,
ExplicitEnable /**<A list of explicitly enabled plugins (names).*/,
ExplicitDisable /**<A list of explicitly disabled plugins (names).*/
Properties /**< X-KDevelop-Properties defined for this profile. */,
ExplicitEnable /**< A list of explicitly enabled plugins (names). */,
ExplicitDisable /**< A list of explicitly disabled plugins (names). */
};
Profile(Profile *parent, const QString &name);
......
......@@ -113,8 +113,8 @@ public:
/**Walker mode to determine the behavior of area walkers.*/
enum WalkerMode {
StopWalker, ///Stop after processing this area index or toolview
ContinueWalker ///Continue walking
StopWalker, /**< Stop after processing this area index or toolview */
ContinueWalker /**< Continue walking */
};
/**Walks the tree of area indices and executes the operator. It will always walk the
......
......@@ -40,7 +40,10 @@ class IdealToolButton: public QToolButton
{
Q_OBJECT
enum { DefaultButtonSize = 20 };
enum
{
DefaultButtonSize = 20 /**< the default size of a toolbutton */
};
public:
IdealToolButton(Qt::DockWidgetArea area, QWidget *parent = 0);
......
......@@ -89,11 +89,11 @@ class IdealMainLayout : public QLayout
public:
enum Role {
Left,
Right,
Bottom,
Top,
Central
Left /**< aligning left */,
Right /**< aligning right */,
Bottom /**< aligning bottom */,
Top /**< aligning top */,
Central /**< aligning central */
};
IdealMainLayout(QWidget *parent = 0);
......
......@@ -33,7 +33,14 @@ namespace Sublime {
/**Positions for toolviews in Sublime UI. To combine them, use
Positions class (QFlags based).*/
enum Position { Left = 1, Right = 2, Top = 4, Bottom = 8, AllPositions = Left|Right|Top|Bottom };
enum Position
{
Left = 1 /**< left toolview position */,
Right = 2 /**< right toolview position */,
Top = 4 /**< top toolview position */,
Bottom = 8 /**< bottom toolview position */,
AllPositions = Left|Right|Top|Bottom /**< all toolview positions */
};
Q_DECLARE_FLAGS(Positions, Position)
SUBLIME_EXPORT Position dockAreaToPosition(Qt::DockWidgetArea dockArea);
......
......@@ -52,8 +52,8 @@ public:
enum RecursionMode
{
Recursive,
NonRecursive
Recursive /**< run recursively through subdirectories */,
NonRecursive /**< don't run recursively through subdirectories */
};
virtual ~IBasicVersionControl(){}
......
......@@ -42,15 +42,15 @@ public:
*/
enum Type
{
DiffRaw /**<Request complete copies of both items.*/,
DiffUnified /**<Request copy of first item with diff.*/,
DiffDontCare /**<Don't care; plugin will return whichever is easiest.*/
DiffRaw /**< Request complete copies of both items. */,
DiffUnified /**< Request copy of first item with diff. */,
DiffDontCare /**< Don't care; plugin will return whichever is easiest. */
};
enum Content
{
Binary /** Binary diff, using the full content of both files.*/,
Text /** Textual diff.*/
Binary /**< Binary diff, using the full content of both files.*/,
Text /**< Textual diff.*/
};
VcsDiff();
......
......@@ -50,13 +50,13 @@ public:
*/