[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnucap-devel] wave copies
From: |
al davis |
Subject: |
Re: [Gnucap-devel] wave copies |
Date: |
Sun, 15 Jun 2014 14:56:58 -0400 |
User-agent: |
KMail/1.13.7 (Linux/3.2.0-4-amd64; KDE/4.8.4; x86_64; ; ) |
On Sunday 15 June 2014, Felix Salfelder wrote:
> On Sun, Jun 15, 2014 at 11:35:12PM +0530, Abhinav singh wrote:
> > I tried to store created graph structure in a map though
> > successful but have to change when Mr. Davis pointed out
> > to use wave directly.Now wave data changes with each
> > simulation and this data is directly used for plotting. So
> > plot will also change with changing data as dynamic
> > plotting is on here.
interesting. Perhaps this is a useful feature.
Hints at how to do iplot?
> maybe "use wave directly" means "use the wave class directly"
> and not "use the instance of the wave (that is subject to
> change) directly". converting wave data into a custom map
> doesn't sound very useful indeed.
could be.
You can't be sure until you try it.
> so how about stashing waves-to-be-plotted within the gtk/gui
> process as i suggested?
Copying a wave:
// get a pointer to the wave, as you do now.
WAVE* w = find_wave();
// returns NULL if it fails, (I need to change this)
if (w) {
// now copy it into a local
WAVE wcopy(*w);
// or copy it to something that remains after the function exits
WAVE* wcopyptr(new WAVE(*w));
// handle when find_wave fails
}else{untested();
}
Oops ... the WAVE copy constructor is not implemented and
blocked.
Need to implement it:
inline WAVE::WAVE(const WAVE& X)
:_w(X._w),
_delay(X._delay)
{untested();
}