Prev Next

@(@\newcommand{\B}[1]{ {\bf #1} } \newcommand{\R}[1]{ {\rm #1} }@)@
Swig Example: C++ Template Class

Prototypes

template <class Type> class template_class
{    private:
          Type value_;
     public:
          // ctor
          template_class(const Type& value);
          // value
          Type value(void) const;
          // addition
          template_class operator+(const template_class& right) const;
          // equality
          bool operator==(const template_class& right) const;
};

Type
Is the type of the value in each object.

template_class(value)
This creates a template_class object that has the specified value .

value()
Returns the value corresponding to this object.

addition
The return value is the sum of the this object and the object to its right.

equality
True is returned, if the value for this object is equal to the value for the object to its right. Otherwise false is returned.

Contents
swig_xam_template_class.hppSwig Example: C++ Template Class Implementation

Input File: swig_xam/swig_xam.hpp