I have the following code, which is vital to understand a class I'm working on translating from visual c++ to c#
typedef Rect<double, 2> Rect2;
I simply can't understand what does it mean. I have come to understand that vc++ uses 'stl' or 'std' and a 'vector' class, which is similar to c# list or arraylist, but the syntax up completely eludes me.
By the way, Rect definition is written like this
template<class Real, int Dim>
class Rect {
Rect is a class in one of the vc++ project files, but I can't understand what's the point of this typedef. It's 200+ lines so here's the declaration start
template<class Real, int Dim>
class Rect {
public:
typedef Vector<Real, Dim> Vec;
typedef Rect<Real, Dim> Self;
typedef _RectPrivate::RectOp<Dim> RO;
Rect() : empty(true) {}
Rect(const Vec &vec) : empty(false), lo(vec), hi(vec) {}
Rect(const Vec &inLo, const Vec &inHi) : lo(inLo), hi(inHi) { markEmpty(); }
Rect(const Rect &inRect) : empty(inRect.empty), lo(inRect.lo), hi(inRect.hi) {}
template<class R> Rect(const Rect<R, Dim> &inRect) : empty(inRect.empty), lo(inRect.lo), hi(inRect.hi) {}
Any help appreciated.