KDevelop API Documentation

Context Class Reference

Base class for every context. More...

#include <kdevcore.h>

Inheritance diagram for Context:

CodeModelItemContext DocumentationContext EditorContext FileContext List of all members.

Public Types

enum  { EditorContext, DocumentationContext, FileContext, CodeModelItemContext }
 Pre-defined context. More...


Public Member Functions

virtual int type () const =0
 Implements this in the context so we can provide rtti.

bool hasType (int type) const
 Returns the type of this Context, so clients can discriminate between different file contexts.


Protected Member Functions

 Context ()
 Constructor.

virtual ~Context ()
 Destructor.


Detailed Description

Base class for every context.

Think of a Context-based class as "useful info associated to a context menu". Several context menu can be defined, each defining different information: because of these context menus being used in many modules, they are defined here.

Definition at line 57 of file kdevcore.h.


Member Enumeration Documentation

anonymous enum
 

Pre-defined context.

More may be added so it is possible to add custom contexts. We reserve enum values until 1000 (yeah, it is one thousand ) for kdevelop official context types.

Enumeration values:
EditorContext 
DocumentationContext 
FileContext 
CodeModelItemContext 

Definition at line 66 of file kdevcore.h.


Constructor & Destructor Documentation

Context::Context  )  [protected]
 

Constructor.

Definition at line 37 of file kdevcore.cpp.

Context::~Context  )  [protected, virtual]
 

Destructor.

Definition at line 43 of file kdevcore.cpp.

References endl(), and kdDebug().


Member Function Documentation

bool Context::hasType int  type  )  const
 

Returns the type of this Context, so clients can discriminate between different file contexts.

Definition at line 50 of file kdevcore.cpp.

References hasType(), and type().

Referenced by subversionPart::contextMenu(), PerforcePart::contextMenu(), CvsServicePart::contextMenu(), ClearcasePart::contextMenu(), ToolsPart::contextMenu(), GrepViewPart::contextMenu(), DocTreeViewPart::contextMenu(), DiffPart::contextMenu(), CTagsPart::contextMenu(), JavaSupportPart::contextMenu(), GDBDebugger::DebuggerPart::contextMenu(), CppSupportPart::contextMenu(), CustomProjectPart::contextMenu(), AntProjectPart::contextMenu(), OpenWithPart::fillContextMenu(), and hasType().

virtual int Context::type  )  const [pure virtual]
 

Implements this in the context so we can provide rtti.

Implemented in EditorContext, DocumentationContext, FileContext, and CodeModelItemContext.

Referenced by hasType().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for KDevelop Version 3.0.4.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Oct 6 17:39:21 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003