Тема: Допоможіть розібрати код
celframe.cpp
#include "celframe.h"
namespace Cel
{
    const Colour& get(size_t x, size_t y, const CelFrame& frame)
    {
        return frame.mRawImage[x + (frame.mHeight-1-y)*frame.mWidth];
    }
     
    Misc::Helper2D<const CelFrame, const Colour&> CelFrame::operator[] (size_t x) const
    {
        return Misc::Helper2D<const CelFrame, const Colour&>(*this, x, get);
    }
}celframe.h
namespace Cel
{
    struct Colour;
    class CelFile;
    class CelFrame
    {
        public:
            size_t mWidth;
            size_t mHeight;
            
            Misc::Helper2D<const CelFrame, const Colour&> operator[] (size_t x) const;
            
        private:
            friend class CelFile;
            friend class CelDecoder;
            friend const Colour& get(size_t x, size_t y, const CelFrame& frame);
            
            std::vector<Colour> mRawImage;
    };
}helper2d.h
namespace Misc
{
    ///
    /// Class to help turn one dimensional storage into 2D, intended to be used as the
    /// return value of an operator[] method, to allow object.[x][y] style addressing
    ///
    template <class From, class Retval> class Helper2D
    {
        private:
            From& parent;
            size_t x;
            Retval (*func)(size_t, size_t, From&); 
        public:    
            Helper2D(From& _p, size_t _x, Retval (*_func)(size_t, size_t, From&)) : parent(_p), x(_x), func(_func) {}
            
            Retval operator[](size_t y){ return func(x, y, parent); }
    };
}А саме не зрозуміло цей рядок:
return Misc::Helper2D<const CelFrame, const Colour&>(*this, x, get);Що за x? Звідки він береться і для чого потрібний? Як переписати на C/D/Java щоб простіше виглядало?