19 #ifndef _KATEINDENTSCRIPTABSTRACTS_H_
20 #define _KATEINDENTSCRIPTABSTRACTS_H_
32 class KateIndentScriptImplAbstract {
34 friend class KateIndentScript;
35 KateIndentScriptImplAbstract(
const TQString& internalName,
36 const TQString &filePath,
const TQString &niceName,
37 const TQString ©right,
double version);
38 virtual ~KateIndentScriptImplAbstract();
40 virtual bool processChar(
class Kate::View *view, TQChar c, TQString &errorMsg )=0;
42 virtual bool processNewline(
class Kate::View *view,
const KateDocCursor &begin,
bool needcontinue, TQString &errorMsg )=0;
44 virtual void decRef();
45 long refCount() {
return m_refcount;}
46 TQString filePath()
const {
return m_filePath;}
50 TQString m_internalName;
58 class KateIndentScript {
60 KateIndentScript(KateIndentScriptImplAbstract *scr):m_scr(scr) {
if (scr) scr->incRef(); }
61 ~KateIndentScript() {
if (m_scr) m_scr->decRef();}
62 KateIndentScript():m_scr(0) {}
63 KateIndentScript(
const KateIndentScript &p):m_scr(p.m_scr){
if (m_scr) m_scr->incRef();}
64 KateIndentScript &operator=(
const KateIndentScript &p) {
65 if (m_scr==p.m_scr)
return *
this;
66 if (m_scr) m_scr->decRef();
68 if (m_scr) m_scr->incRef();
72 bool processChar(
class Kate::View *view, TQChar c, TQString &errorMsg ) {
73 kdDebug(13050)<<
"KateIndentScript::processChar: m_scr:"<<m_scr<<
endl;
74 if (m_scr)
return m_scr->processChar(view,c,errorMsg);
else return true;
77 kdDebug(13050)<<
"KateIndentScript::processLine: m_scr:"<<m_scr<<
endl;
78 if (m_scr)
return m_scr->processLine(view,line,errorMsg);
else return true;
80 bool processNewline(
class Kate::View *view,
const KateDocCursor& begin,
bool needcontinue, TQString &errorMsg ) {
81 kdDebug(13050)<<
"KateIndentScript::processNewLine: m_scr:"<<m_scr<<
endl;
82 if (m_scr)
return m_scr->processNewline(view,begin,needcontinue,errorMsg);
else return true;
85 bool isNull ()
const {
return (m_scr==0);}
87 KateIndentScriptImplAbstract *m_scr;
90 class KateIndentScriptManagerAbstract
94 KateIndentScriptManagerAbstract () {};
95 virtual ~KateIndentScriptManagerAbstract () {};
96 virtual KateIndentScript script(
const TQString &scriptname)=0;
Cursor class with a pointer to its document.
The Kate::View text editor interface.
kndbgstream & endl(kndbgstream &s)
kdbgstream kdDebug(int area=0)
Kate namespace All classes in this namespace must stay BC during one major release series (e....