/[escript]/trunk/escript/src/DataAbstract.cpp
ViewVC logotype

Diff of /trunk/escript/src/DataAbstract.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1871 by ksteube, Thu Sep 25 23:11:13 2008 UTC revision 1872 by jfenwick, Mon Oct 13 00:18:55 2008 UTC
# Line 19  using namespace std; Line 19  using namespace std;
19    
20  namespace escript {  namespace escript {
21    
22    /**
23    \brief Returns smart pointer which is managing this object.
24    If one does not exist yet it creates one.
25    
26    Note: This is _not_ equivalent to weak_ptr::lock.
27    */
28    DataAbstract_ptr DataAbstract::getPtr()
29    {
30      if (_internal_weak_this.expired())
31      {
32        return DataAbstract_ptr(this);  
33      }
34      else
35      {
36        return shared_from_this();
37      }
38    }
39    
40    const_DataAbstract_ptr DataAbstract::getPtr() const
41    {
42      if (_internal_weak_this.expired())
43      {
44        return const_DataAbstract_ptr(this);
45      }
46      else
47      {
48        return shared_from_this();
49      }
50    }
51    
52    
53    
54  DataAbstract::DataAbstract(const FunctionSpace& what, const ShapeType& shape, bool isDataEmpty):  DataAbstract::DataAbstract(const FunctionSpace& what, const ShapeType& shape, bool isDataEmpty):
55      m_noDataPointsPerSample(what.getNumDPPSample()),      m_noDataPointsPerSample(what.getNumDPPSample()),
56      m_noSamples(what.getNumSamples()),      m_noSamples(what.getNumSamples()),

Legend:
Removed from v.1871  
changed lines
  Added in v.1872

  ViewVC Help
Powered by ViewVC 1.1.26