diff options
Diffstat (limited to 'src/template.h')
-rw-r--r-- | src/template.h | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/src/template.h b/src/template.h index 4602c53..c9e9041 100644 --- a/src/template.h +++ b/src/template.h @@ -17,7 +17,7 @@ #define TEMPLATE_H #include <qcstring.h> -#include <qvaluelist.h> +#include <vector> class FTextStream; @@ -95,12 +95,12 @@ class TemplateVariant { public: /** Callback type to use when creating a delegate from a function. */ - typedef TemplateVariant (*StubType)(const void *obj, const QValueList<TemplateVariant> &args); + typedef TemplateVariant (*StubType)(const void *obj, const std::vector<TemplateVariant> &args); Delegate() : m_objectPtr(0) , m_stubPtr(0) {} /** Creates a delegate given an object. The method to call is passed as a template parameter */ - template <class T, TemplateVariant (T::*TMethod)(const QValueList<TemplateVariant> &) const> + template <class T, TemplateVariant (T::*TMethod)(const std::vector<TemplateVariant> &) const> static Delegate fromMethod(const T* objectPtr) { Delegate d; @@ -118,7 +118,7 @@ class TemplateVariant } /** Invokes the function/method stored in the delegate */ - TemplateVariant operator()(const QValueList<TemplateVariant> &args) const + TemplateVariant operator()(const std::vector<TemplateVariant> &args) const { return (*m_stubPtr)(m_objectPtr, args); } @@ -127,8 +127,8 @@ class TemplateVariant const void* m_objectPtr; StubType m_stubPtr; - template <class T, TemplateVariant (T::*TMethod)(const QValueList<TemplateVariant> &) const> - static TemplateVariant methodStub(const void* objectPtr, const QValueList<TemplateVariant> &args) + template <class T, TemplateVariant (T::*TMethod)(const std::vector<TemplateVariant> &) const> + static TemplateVariant methodStub(const void* objectPtr, const std::vector<TemplateVariant> &args) { T* p = (T*)(objectPtr); return (p->*TMethod)(args); @@ -269,7 +269,7 @@ class TemplateVariant /** Return the result of apply this function with \a args. * Returns an empty string if the variant type is not a function. */ - TemplateVariant call(const QValueList<TemplateVariant> &args) + TemplateVariant call(const std::vector<TemplateVariant> &args) { if (m_type==Function) return m_delegate(args); return TemplateVariant(); @@ -355,10 +355,10 @@ class TemplateListIntf virtual ~TemplateListIntf() {} /** Returns the number of elements in the list */ - virtual int count() const = 0; + virtual uint count() const = 0; /** Returns the element at index position \a index. */ - virtual TemplateVariant at(int index) const = 0; + virtual TemplateVariant at(uint index) const = 0; /** Creates a new iterator for this list. * @note the user should call delete on the returned pointer. @@ -377,8 +377,8 @@ class TemplateList : public TemplateListIntf { public: // TemplateListIntf methods - virtual int count() const; - virtual TemplateVariant at(int index) const; + virtual uint count() const; + virtual TemplateVariant at(uint index) const; virtual TemplateListIntf::ConstIterator *createIterator() const; virtual int addRef(); virtual int release(); @@ -457,6 +457,7 @@ class TemplateStruct : public TemplateStructIntf class TemplateEscapeIntf { public: + virtual ~TemplateEscapeIntf() {} /** Returns the \a input after escaping certain characters */ virtual QCString escape(const QCString &input) = 0; /** Setting tabbing mode on or off (for LaTeX) */ @@ -469,6 +470,7 @@ class TemplateEscapeIntf class TemplateSpacelessIntf { public: + virtual ~TemplateSpacelessIntf() {} /** Returns the \a input after removing redundant whitespace */ virtual QCString remove(const QCString &input) = 0; /** Reset filter state */ |