Class UList Declaration:
te
Class UList Declaration:
template<class> class UList { // Private data //- Number of elements in UList. label size_; //- Vector of values of type T. T* restrict v_; ... ; and the Clss List is derived from class UList,like this: template<class> class List : public UList<t> its constructor: // * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * * // // Construct with length specified template<class> List<t>::List(const label s) : UList<t>(NULL, s) { if (this->size_ < 0) { FatalErrorIn("List<t>::List(const label size)") <<>size_ << abort(FatalError); if (this->size_) { this->v_ = new T[this->size_]; else { this->v_ = 0; } } } size_ and v_ is from class UList as private data, why can they be used in derived class UList? would somebody give me some help! |
The class List is the friend c
The class List is the friend class of UList.
I just find the statement in code. sigh. |
All times are GMT -4. The time now is 17:07. |