class vdoub{ protected: unsigned signature;// garbage flag; hdr *hdr; // virtual memory handle double *cur_ele; // current element long cur_index; // current index //static int nobj; friend double val( vdoub &v); public: int Garbage( void ){ return !( signature == SIGNATURE ); } vdoub ( long array_size ); vdoub ( void ); vdoub ( vdoub &src ); ~vdoub( void ); double v( long index ); // get value vdoub& operator[]( long index ); // store value double operator = ( double d ); double operator = ( vdoub &v ); };
Note that the access to the vmm is in a protected section of the definition. The matrix class needs access to some of these elements.