/[ghosts]/ghosts/gedcomparser/doc/reference/SmartPtr.html
ViewVC logotype

Diff of /ghosts/gedcomparser/doc/reference/SmartPtr.html

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

revision 1.2.2.1 by cpcp, Sun Aug 18 19:49:20 2002 UTC revision 1.2.2.2 by cpcp, Wed Oct 16 17:56:19 2002 UTC
# Line 13  Line 13 
13  <DL>  <DL>
14  <P><DL>  <P><DL>
15  <DT><H3>Public Fields</H3><DD><DT>  <DT><H3>Public Fields</H3><DD><DT>
16  <IMG ALT="[more]" BORDER=0 SRC=icon1.png>bool <B><A HREF="#DOC.2.2.9">res</A></B>  <IMG ALT="[more]" BORDER=0 SRC=icon1.gif>bool <B><A HREF="#DOC.2.2.9">res</A></B>
17  </DL></P>  </DL></P>
18    
19  <P><DL>  <P><DL>
20  <DT><H3>Public Methods</H3><DD><DT>  <DT><H3>Public Methods</H3><DD><DT>
21  <IMG ALT="[more]" BORDER=0 SRC=icon1.png> <B><A HREF="#DOC.2.2.1">SmartPtr</A></B>(void)  <IMG ALT="[more]" BORDER=0 SRC=icon1.gif> <B><A HREF="#DOC.2.2.1">SmartPtr</A></B>(void)
22  <DD><I>Default constructor</I>  <DD><I>Default constructor</I>
23  <DT>  <DT>
24  <IMG ALT="[more]" BORDER=0 SRC=icon1.png> <B><A HREF="#DOC.2.2.2">SmartPtr</A></B>(T*  ptr)  <IMG ALT="[more]" BORDER=0 SRC=icon1.gif> <B><A HREF="#DOC.2.2.2">SmartPtr</A></B>(T*  ptr)
25  <DD><I>Constructor based on a pointer to the desired object After this call, the pointer is under control !</I>  <DD><I>Constructor based on a pointer to the desired object After this call, the pointer is under control !</I>
26  <DT>  <DT>
27  <IMG ALT="[more]" BORDER=0 SRC=icon1.png> <B><A HREF="#DOC.2.2.3">~SmartPtr</A></B>(void)  <IMG ALT="[more]" BORDER=0 SRC=icon1.gif> <B><A HREF="#DOC.2.2.3">~SmartPtr</A></B>(void)
28  <DD><I>Destructor : free a reference of the counted object If the references counter == 0, free the object</I>  <DD><I>Destructor : free a reference of the counted object If the references counter == 0, free the object</I>
29  <DT>  <DT>
30  <IMG ALT="[more]" BORDER=0 SRC=icon1.png> <B><A HREF="#DOC.2.2.4">SmartPtr</A></B>(<!1><A HREF="SmartPtr.html#DOC.2.2.4">SmartPtr</A>&lt;T&gt; const &amp; ref)  <IMG ALT="[more]" BORDER=0 SRC=icon1.gif> <B><A HREF="#DOC.2.2.4">SmartPtr</A></B>(<!1><A HREF="SmartPtr.html#DOC.2.2.4">SmartPtr</A>&lt;T&gt; const &amp; ref)
31  <DD><I>Copy-constructor : get a new reference to the counted object</I>  <DD><I>Copy-constructor : get a new reference to the counted object</I>
32  <DT>  <DT>
33  <IMG ALT="[more]" BORDER=0 SRC=icon1.png><!1><A HREF="SmartPtr.html">SmartPtr</A>&lt;T&gt; &amp; <B><A HREF="#DOC.2.2.5">operator=</A></B>(<!1><A HREF="SmartPtr.html">SmartPtr</A>&lt;T&gt; const &amp;ref)  <IMG ALT="[more]" BORDER=0 SRC=icon1.gif><!1><A HREF="SmartPtr.html">SmartPtr</A>&lt;T&gt; &amp; <B><A HREF="#DOC.2.2.5">operator=</A></B>(<!1><A HREF="SmartPtr.html">SmartPtr</A>&lt;T&gt; const &amp;ref)
34  <DD><I>Assignment operator : release the current counted object  and get a new reference to the counted object</I>  <DD><I>Assignment operator : release the current counted object  and get a new reference to the counted object</I>
35  <DT>  <DT>
36  <IMG ALT="[more]" BORDER=0 SRC=icon1.png>T* <B><A HREF="#DOC.2.2.6">operator-&gt;</A></B>()  <IMG ALT="[more]" BORDER=0 SRC=icon1.gif>T* <B><A HREF="#DOC.2.2.6">operator-&gt;</A></B>()
37  <DD><I>Dereferencement operator : provide consistent use of counted objects obj-&gt;member_of_class_T even if obj is in fact SmartPtr&lt;T&gt; obj;</I>  <DD><I>Dereferencement operator : provide consistent use of counted objects obj-&gt;member_of_class_T even if obj is in fact SmartPtr&lt;T&gt; obj;</I>
38  <DT>  <DT>
39  <IMG ALT="[more]" BORDER=0 SRC=icon1.png>T const* <B><A HREF="#DOC.2.2.7">operator-&gt;</A></B>() const  <IMG ALT="[more]" BORDER=0 SRC=icon1.gif>T const* <B><A HREF="#DOC.2.2.7">operator-&gt;</A></B>() const
40  <DD><I>Const dereferencement operator</I>  <DD><I>Const dereferencement operator</I>
41  <DT>  <DT>
42  <IMG ALT="[more]" BORDER=0 SRC=icon1.png>T* <B><A HREF="#DOC.2.2.8">getPtr</A></B>(void) const  <IMG ALT="[more]" BORDER=0 SRC=icon1.gif>T* <B><A HREF="#DOC.2.2.8">getPtr</A></B>(void) const
43  <DD><I>Returns the pointer, without any control </I>  <DD><I>Returns the pointer, without any control </I>
44  <DT>  <DT>
45  <IMG ALT="[more]" BORDER=0 SRC=icon1.png> <B><A HREF="#DOC.2.2.10">return</A></B>(lhs==rhs)  <IMG ALT="[more]" BORDER=0 SRC=icon1.gif> <B><A HREF="#DOC.2.2.10">return</A></B>(lhs==rhs)
46  <DT>  <DT>
47  <IMG ALT="[more]" BORDER=0 SRC=icon1.png>bool <B><A HREF="#DOC.2.2.11">Null</A></B>(void) const  <IMG ALT="[more]" BORDER=0 SRC=icon1.gif>bool <B><A HREF="#DOC.2.2.11">Null</A></B>(void) const
48  <DD><I>true if the SmartPtr object does not reference any pointer</I>  <DD><I>true if the SmartPtr object does not reference any pointer</I>
49  <DT>  <DT>
50  <IMG ALT="[more]" BORDER=0 SRC=icon1.png>void <B><A HREF="#DOC.2.2.12">setNull</A></B>(void)  <IMG ALT="[more]" BORDER=0 SRC=icon1.gif>void <B><A HREF="#DOC.2.2.12">setNull</A></B>(void)
51  <DD><I>frees the referenced pointer</I>  <DD><I>frees the referenced pointer</I>
52  </DL></P>  </DL></P>
53    
# Line 61  Line 61 
61    
62  <A NAME="SmartPtr"></A>  <A NAME="SmartPtr"></A>
63  <A NAME="DOC.2.2.1"></A>  <A NAME="DOC.2.2.1"></A>
64  <DT><IMG ALT="o" BORDER=0 SRC=icon2.png><TT><B> SmartPtr(void)</B></TT>  <DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> SmartPtr(void)</B></TT>
65  <DD>Default constructor  <DD>Default constructor
66  <DL><DT><DD></DL><P>  <DL><DT><DD></DL><P>
67  <A NAME="SmartPtr"></A>  <A NAME="SmartPtr"></A>
68  <A NAME="DOC.2.2.2"></A>  <A NAME="DOC.2.2.2"></A>
69  <DT><IMG ALT="o" BORDER=0 SRC=icon2.png><TT><B> SmartPtr(T*  ptr)</B></TT>  <DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> SmartPtr(T*  ptr)</B></TT>
70  <DD>Constructor based on a pointer to the desired object  <DD>Constructor based on a pointer to the desired object
71  After this call, the pointer is under control !  After this call, the pointer is under control !
72  <DL><DT><DD></DL><P>  <DL><DT><DD></DL><P>
73  <A NAME="~SmartPtr"></A>  <A NAME="~SmartPtr"></A>
74  <A NAME="DOC.2.2.3"></A>  <A NAME="DOC.2.2.3"></A>
75  <DT><IMG ALT="o" BORDER=0 SRC=icon2.png><TT><B> ~SmartPtr(void)</B></TT>  <DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> ~SmartPtr(void)</B></TT>
76  <DD>Destructor : free a reference of the counted object  <DD>Destructor : free a reference of the counted object
77  If the references counter == 0, free the object  If the references counter == 0, free the object
78  <DL><DT><DD></DL><P>  <DL><DT><DD></DL><P>
79  <A NAME="SmartPtr"></A>  <A NAME="SmartPtr"></A>
80  <A NAME="DOC.2.2.4"></A>  <A NAME="DOC.2.2.4"></A>
81  <DT><IMG ALT="o" BORDER=0 SRC=icon2.png><TT><B> SmartPtr(<!1><A HREF="SmartPtr.html#DOC.2.2.4">SmartPtr</A>&lt;T&gt; const &amp; ref)</B></TT>  <DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> SmartPtr(<!1><A HREF="SmartPtr.html#DOC.2.2.4">SmartPtr</A>&lt;T&gt; const &amp; ref)</B></TT>
82  <DD>Copy-constructor : get a new reference to the counted object  <DD>Copy-constructor : get a new reference to the counted object
83  <DL><DT><DD></DL><P>  <DL><DT><DD></DL><P>
84  <A NAME="operator="></A>  <A NAME="operator="></A>
85  <A NAME="DOC.2.2.5"></A>  <A NAME="DOC.2.2.5"></A>
86  <DT><IMG ALT="o" BORDER=0 SRC=icon2.png><TT><B><!1><A HREF="SmartPtr.html">SmartPtr</A>&lt;T&gt; &amp; operator=(<!1><A HREF="SmartPtr.html">SmartPtr</A>&lt;T&gt; const &amp;ref)</B></TT>  <DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B><!1><A HREF="SmartPtr.html">SmartPtr</A>&lt;T&gt; &amp; operator=(<!1><A HREF="SmartPtr.html">SmartPtr</A>&lt;T&gt; const &amp;ref)</B></TT>
87  <DD>Assignment operator : release the current counted object  <DD>Assignment operator : release the current counted object
88  and get a new reference to the counted object  and get a new reference to the counted object
89  <DL><DT><DD></DL><P>  <DL><DT><DD></DL><P>
90  <A NAME="operator->"></A>  <A NAME="operator->"></A>
91  <A NAME="DOC.2.2.6"></A>  <A NAME="DOC.2.2.6"></A>
92  <DT><IMG ALT="o" BORDER=0 SRC=icon2.png><TT><B>T* operator-&gt;()</B></TT>  <DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>T* operator-&gt;()</B></TT>
93  <DD>Dereferencement operator : provide consistent use of counted objects  <DD>Dereferencement operator : provide consistent use of counted objects
94  obj-&gt;member_of_class_T even if obj is in fact SmartPtr&lt;T&gt; obj;  obj-&gt;member_of_class_T even if obj is in fact SmartPtr&lt;T&gt; obj;
95  <DL><DT><DD></DL><P>  <DL><DT><DD></DL><P>
96  <A NAME="operator->"></A>  <A NAME="operator->"></A>
97  <A NAME="DOC.2.2.7"></A>  <A NAME="DOC.2.2.7"></A>
98  <DT><IMG ALT="o" BORDER=0 SRC=icon2.png><TT><B>T const* operator-&gt;() const </B></TT>  <DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>T const* operator-&gt;() const </B></TT>
99  <DD>Const dereferencement operator  <DD>Const dereferencement operator
100  <DL><DT><DD></DL><P>  <DL><DT><DD></DL><P>
101  <A NAME="getPtr"></A>  <A NAME="getPtr"></A>
102  <A NAME="DOC.2.2.8"></A>  <A NAME="DOC.2.2.8"></A>
103  <DT><IMG ALT="o" BORDER=0 SRC=icon2.png><TT><B>T* getPtr(void) const </B></TT>  <DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>T* getPtr(void) const </B></TT>
104  <DD>Returns the pointer, without any control  <DD>Returns the pointer, without any control
105  Returns the pointer, without any control.  Returns the pointer, without any control.
106  Warning : the following sequence may lead to segfault !  Warning : the following sequence may lead to segfault !
# Line 114  Warning : the following sequence may lea Line 114  Warning : the following sequence may lea
114  <DL><DT><DD></DL><P>  <DL><DT><DD></DL><P>
115  <A NAME="res"></A>  <A NAME="res"></A>
116  <A NAME="DOC.2.2.9"></A>  <A NAME="DOC.2.2.9"></A>
117  <DT><IMG ALT="o" BORDER=0 SRC=icon2.png><TT><B>bool res</B></TT>  <DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>bool res</B></TT>
118  <DL><DT><DD></DL><P>  <DL><DT><DD></DL><P>
119  <A NAME="return"></A>  <A NAME="return"></A>
120  <A NAME="DOC.2.2.10"></A>  <A NAME="DOC.2.2.10"></A>
121  <DT><IMG ALT="o" BORDER=0 SRC=icon2.png><TT><B> return(lhs==rhs)</B></TT>  <DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> return(lhs==rhs)</B></TT>
122  <DL><DT><DD></DL><P>  <DL><DT><DD></DL><P>
123  <A NAME="Null"></A>  <A NAME="Null"></A>
124  <A NAME="DOC.2.2.11"></A>  <A NAME="DOC.2.2.11"></A>
125  <DT><IMG ALT="o" BORDER=0 SRC=icon2.png><TT><B>bool Null(void) const </B></TT>  <DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>bool Null(void) const </B></TT>
126  <DD>true if the SmartPtr object does not reference any pointer  <DD>true if the SmartPtr object does not reference any pointer
127  <DL><DT><DD></DL><P>  <DL><DT><DD></DL><P>
128  <A NAME="setNull"></A>  <A NAME="setNull"></A>
129  <A NAME="DOC.2.2.12"></A>  <A NAME="DOC.2.2.12"></A>
130  <DT><IMG ALT="o" BORDER=0 SRC=icon2.png><TT><B>void setNull(void)</B></TT>  <DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void setNull(void)</B></TT>
131  <DD>frees the referenced pointer  <DD>frees the referenced pointer
132  <DL><DT><DD></DL><P></DL>  <DL><DT><DD></DL><P></DL>
133    

Legend:
Removed from v.1.2.2.1  
changed lines
  Added in v.1.2.2.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26