00001
00005 class ArrayGen(Type) : public Vec(Type), public ArrayGenSimple(Type)
00006
00007 {
00008
00009 friend class ArrayGenSel(Type);
00010
00011
00012
00013 public:
00014
00015
00016
00017 ArrayGen(Type) ();
00018 ArrayGen(Type) (int n1);
00019 ArrayGen(Type) (int n1, int n2);
00020 ArrayGen(Type) (int n1, int n2, int n3);
00021 ArrayGen(Type) (const Ptv(int)& n);
00022 ArrayGen(Type) (const ArrayGen(Type)& X);
00023 ArrayGen(Type) (const Vector(prm_Type)& pm);
00024
00025 virtual ~ArrayGen(Type) ();
00026
00027
00028
00029
00030 bool compatible (const Vec(Type)& a);
00031 bool compatible (const ArrayGen(Type)& a);
00032
00033
00034
00035 virtual bool makeItSimilar (Handle(Vector(Type))& v) const;
00036
00037 virtual bool redim (const Vector(prm_Type)& pm)
00038 { return Vec(Type) ::redim (pm);}
00039
00040 bool redim (int n1)
00041 { return ArrayGenSimplest(Type) ::redim(n1); }
00042
00043 bool redim (int n1, int n2)
00044 { return ArrayGenSimplest(Type) ::redim(n1,n2); }
00045
00046 bool redim (int n1, int n2, int n3)
00047 { return ArrayGenSimplest(Type) ::redim(n1,n2,n3); }
00048
00049 bool redim (const Ptv(int)& n)
00050 { return ArrayGenSimplest(Type) ::redim(n); }
00051
00052
00053
00054
00055 virtual void fill (const Vector(Type)& X);
00056 virtual void fill (const Type& a);
00057
00058 ArrayGen(Type)& operator = (const ArrayGen(Type)& X)
00059 { ArrayGenSimple(Type) ::operator=(X); return *this; }
00060
00061 ArrayGen(Type)& operator = (const Type& a)
00062 { VecSimple(Type) ::fill(a); return *this; }
00063
00064 ArrayGen(Type)& operator = (const ArrayGenSel(Type)& X);
00065
00066 void fill (Type start, Type stop) { Vec(Type) ::fill(start,stop); }
00067
00068
00069 Type& operator () (int i)
00070 { return ArrayGenSimplest(Type) ::operator( (i);) }
00071
00072 Type& operator () (int i, int j)
00073 { return ArrayGenSimplest(Type) ::operator( (i,j);) }
00074
00075 Type& operator () (int i, int j, int k)
00076 { return ArrayGenSimplest(Type) ::operator( (i,j,k);) }
00077
00078 Type& operator () (const Ptv(int)& index)
00079 { return ArrayGenSimplest(Type) ::operator( (index);) }
00080
00081 const Type& operator () (int i) const
00082 { return ArrayGenSimplest(Type) ::operator( (i);) }
00083
00084 const Type& operator () (int i, int j) const
00085 { return ArrayGenSimplest(Type) ::operator( (i,j);) }
00086
00087 const Type& operator () (int i, int j, int k) const
00088 { return ArrayGenSimplest(Type) ::operator( (i,j,k);) }
00089
00090 const Type& operator () (const Ptv(int)& index) const
00091 { return ArrayGenSimplest(Type) ::operator( (index);) }
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101 virtual void print (Os os, const char* header = NULL,
00102 int nentries_per_line = 3) const;
00103 virtual void printAscii (Os os, const char* header = NULL) const;
00104
00105 virtual void scan (Is is);
00106
00107 friend Os& operator << (Os& os, const ArrayGen(Type)& x);
00108 friend Is& operator >> (Is& is, ArrayGen(Type)& x);
00109
00110
00111
00112 CLASS_INFO
00113
00114 VIRTUAL_CAST(ArrayGen(Type))
00115
00116 private:
00117
00118
00119 bool compatible (const ArrayGenSimplest(Type)& a,
00120 bool error_message = true)
00121 { return ArrayGenSimplest(Type) ::compatible(a,error_message); }
00122 bool compatible (const VecSimplest(Type)& X) const
00123 { return VecSimplest(Type) ::compatible(X); }
00124 void printAscii (Os os, const char* ,
00125 int ) const { printAscii(os,NULL); }
00126 bool redim (Type* a, int n, int base = 0)
00127 { return ArrayGenSimplest(Type) ::redim(a,n,base); }
00128
00129 };
00130
00131