DGtal  0.6.devel
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
CowPtr.ih
1 
30 
31 #include <cstdlib>
33 
35 // IMPLEMENTATION of inline methods.
37 
39 // ----------------------- Standard services ------------------------------
40 
41 
43 // Interface - public :
44 
49 template <typename T>
50 inline
51 void
52 DGtal::CowPtr<T>::selfDisplay ( std::ostream & out ) const
53 {
54  out << "[CowPtr " << myPtr << " ]";
55 }
56 
61 template <typename T>
62 inline
63 bool
65 {
66  return myPtr->isValid();
67 }
68 
69 
70 
72 // Implementation of inline functions //
73 
74 template <typename T>
75 inline
76 std::ostream&
77 DGtal::operator<< ( std::ostream & out,
78  const CowPtr<T> & object )
79 {
80  object.selfDisplay( out );
81  return out;
82 }
83 
84 // //
86 
87