KDevSourceFormatter Class Referenceabstract
#include <kdevsourceformatter.h>
Inherits KDevPlugin.
Public Member Functions | |
KDevSourceFormatter (const KDevPluginInfo *info, TQObject *parent, const char *name) | |
virtual TQString | formatSource (const TQString text)=0 |
virtual TQString | indentString () const =0 |
Detailed Description
Source formatter interface.
This interface is responsible for formatting source files and strings of code.
Instances that implement this interface are available through extension architecture:
KDevSourceFormatter *sf = extension<KDevSourceFormatter>("TDevelop/SourceFormatter");
if (sf) {
// do something
} else {
// fail
}
- See also
- KDevPlugin::extension method documentation.
- What is the TDevelop extension and Creating and using an extension sections of Platform API documentation.
Definition at line 45 of file kdevsourceformatter.h.
Constructor & Destructor Documentation
◆ KDevSourceFormatter()
|
inline |
Constructor.
- Parameters
-
info Important information about the plugin - plugin internal and generic (GUI) name, description, a list of authors, etc. That information is used to show plugin information in various places like "about application" dialog, plugin selector dialog, etc. Plugin does not take ownership on info object, also its lifetime should be equal to the lifetime of the plugin. parent The parent object for the plugin. Parent object must implement KDevApi interface. Otherwise the plugin will not be constructed. name The internal name which identifies the plugin.
Definition at line 57 of file kdevsourceformatter.h.
Member Function Documentation
◆ formatSource()
|
pure virtual |
Formats the source.
- Parameters
-
text A string with a code.
- Returns
- The formatted string.
◆ indentString()
|
pure virtual |
- Returns
- The indentation string. For example, tab or four spaces can be returned.
The documentation for this class was generated from the following file: