#include <filetemplate.h>
Public Types | |
enum | Policy { Default, Custom } |
Static Public Member Functions | |
static bool | exists (KDevPlugin *part, const TQString &name, Policy p=Default) |
static TQString | read (KDevPlugin *part, const TQString &name, Policy p=Default) |
static TQString | readFile (KDevPlugin *part, const TQString &fileName) |
static TQString | makeSubstitutions (TQDomDocument &dom, const TQString &text) |
static bool | copy (KDevPlugin *part, const TQString &name, const TQString &dest, Policy p=Default) |
static TQString | fullPathForName (KDevPlugin *part, const TQString &name, Policy p=Default) |
Detailed Description
Utilities to work with file templates in the current project.
Definition at line 36 of file filetemplate.h.
Member Enumeration Documentation
◆ Policy
enum FileTemplate::Policy |
Policy of finding file templates.
Enumerator | |
---|---|
Default | Checks for templates in project and also for global filecreate templates. |
Custom | Checks for templates in custom directories. This usually means that full paths are given for FileTemplate methods. |
Definition at line 41 of file filetemplate.h.
Member Function Documentation
◆ copy()
|
static |
Copies a file template with the given name to the file with the name dest and - while copying - performs variable substitutions.
Definition at line 90 of file filetemplate.cpp.
◆ exists()
- Returns
- Whether a template with the given name exists in the current project. File templates are stored in the "templates" subdirectory of a project or in application shared dirs.
Definition at line 35 of file filetemplate.cpp.
◆ fullPathForName()
|
static |
Translates a template name into a full path, or suggests a full path for the template in the project directory if it doesn't exist.
Definition at line 112 of file filetemplate.cpp.
◆ makeSubstitutions()
|
static |
Makes variable substitutions on a text, based on a specified TQDomDocument describing a KDevelop project file.
The resulting string is returned.
Definition at line 66 of file filetemplate.cpp.
◆ read()
Reads a template with the given name (e.g.
"cpp") and makes variable substitutions (like $AUTHOR$ etc.) in it. The resulting string is returned.
Definition at line 43 of file filetemplate.cpp.
◆ readFile()
|
static |
Reads a template with the given URL and makes variable substitutions (like $AUTHOR$ etc.) in it.
The resulting string is returned.
Definition at line 53 of file filetemplate.cpp.
The documentation for this class was generated from the following files: