libpgplotxx.a (C++ interface to PGPLOT)

◆ operator=()

Ttiledpanels & pgplot::Ttiledpanels::operator= ( const Ttiledpanels panels)

copy operator

Since we use a heap allocation for Mpanels we must provide a copy constructor allocating heap for the copy - or - we must forbid copy operations.

Definition at line 168 of file xpgplotxx.cc.

References Mnx, Mny, Mpanels, and Mvp.

169  {
170  Mvp=panels.Mvp;
171  Mnx=panels.Mnx;
172  Mny=panels.Mny;
173  delete[] Mpanels;
174  Mpanels=new Tpanel[Mny*Mnx];
175  for (int i=0; i<Mnx; i++)
176  {
177  for (int j=0; j<Mny; j++)
178  { Mpanels[i+j*Mnx]=panels.Mpanels[i+j*Mnx]; }
179  }
180  return(*this);
181  }
int Mnx
number of subpanels
Definition: xpgplotxx.h:293
Tpanel * Mpanels
array of subpanels
Definition: xpgplotxx.h:295
Trect Mvp
the total view surface area
Definition: xpgplotxx.h:291