diff options
Diffstat (limited to 'ACE/contrib/utility/Documentation/ReferenceCounting/Interface.hpp.html')
-rw-r--r-- | ACE/contrib/utility/Documentation/ReferenceCounting/Interface.hpp.html | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/ACE/contrib/utility/Documentation/ReferenceCounting/Interface.hpp.html b/ACE/contrib/utility/Documentation/ReferenceCounting/Interface.hpp.html new file mode 100644 index 00000000000..f81c1dc737c --- /dev/null +++ b/ACE/contrib/utility/Documentation/ReferenceCounting/Interface.hpp.html @@ -0,0 +1,82 @@ +<html> +<head> +<!-- Generated by the Spirit (http://spirit.sf.net) C++ to HTML Converter --> +<title> +Interface.hpp</title> +<link rel="stylesheet" href="../../Documentation/Style/CXX.css" type="text/css"></head> +<body> +<pre> +<span class=comment>// file : Utility/ReferenceCounting/Interface.hpp +// author : Boris Kolpackov <boris@kolpackov.net> +// copyright : Copyright (c) 2002-2003 Boris Kolpackov +// license : http://kolpackov.net/license.html + +</span><span class=keyword>namespace </span><span class=identifier>Utility +</span><span class=special>{ + </span><span class=keyword>namespace </span><span class=identifier>ReferenceCounting + </span><span class=special>{ + </span><span class=comment>// Interface to a reference-countable object. Note that _remove_ref () + // member function has a no-throw semantic. Even though it can lead to + // a diagnostic loss it was made no-throw because it has a destructor + // semantic. + + </span><span class=keyword>class </span><span class=identifier>Interface + </span><span class=special>{ + </span><span class=keyword>public</span><span class=special>: + </span><span class=keyword>typedef + </span><span class=keyword>unsigned </span><span class=keyword>long + </span><span class=identifier>count_t</span><span class=special>; + + </span><span class=keyword>typedef + </span><span class=identifier>ExH</span><span class=special>::</span><span class=identifier>System</span><span class=special>::</span><span class=identifier>Exception + </span><span class=identifier>SystemException</span><span class=special>; + + </span><span class=keyword>class </span><span class=identifier>Exception_ </span><span class=special>{}; + </span><span class=keyword>typedef + </span><span class=identifier>ExH</span><span class=special>::</span><span class=identifier>Compound</span><span class=special><</span><span class=identifier>Exception_</span><span class=special>, </span><span class=identifier>ExH</span><span class=special>::</span><span class=identifier>Logic</span><span class=special>::</span><span class=identifier>DescriptiveException</span><span class=special>> + </span><span class=identifier>Exception</span><span class=special>; + + </span><span class=keyword>public</span><span class=special>: + </span><span class=keyword>virtual </span><span class=keyword>void + </span><span class=identifier>add_ref </span><span class=special>() </span><span class=keyword>const </span><span class=keyword>throw </span><span class=special>(</span><span class=identifier>Exception</span><span class=special>, </span><span class=identifier>SystemException</span><span class=special>) </span><span class=special>= </span><span class=number>0</span><span class=special>; + + </span><span class=keyword>virtual </span><span class=keyword>void + </span><span class=identifier>remove_ref </span><span class=special>() </span><span class=keyword>const </span><span class=keyword>throw </span><span class=special>() </span><span class=special>= </span><span class=number>0</span><span class=special>; + + </span><span class=keyword>virtual </span><span class=identifier>count_t + </span><span class=identifier>refcount_value </span><span class=special>() </span><span class=keyword>const </span><span class=keyword>throw </span><span class=special>(</span><span class=identifier>Exception</span><span class=special>, </span><span class=identifier>SystemException</span><span class=special>) </span><span class=special>= </span><span class=number>0</span><span class=special>; + + </span><span class=keyword>protected</span><span class=special>: + </span><span class=identifier>Interface </span><span class=special>() </span><span class=keyword>throw </span><span class=special>(); + + </span><span class=keyword>virtual + </span><span class=special>~</span><span class=identifier>Interface </span><span class=special>() </span><span class=keyword>throw </span><span class=special>(); + + </span><span class=keyword>protected</span><span class=special>: + </span><span class=keyword>virtual </span><span class=keyword>void + </span><span class=identifier>add_ref_i </span><span class=special>() </span><span class=keyword>const </span><span class=keyword>throw </span><span class=special>(</span><span class=identifier>Exception</span><span class=special>, </span><span class=identifier>SystemException</span><span class=special>) </span><span class=special>= </span><span class=number>0</span><span class=special>; + + </span><span class=keyword>virtual </span><span class=keyword>bool + </span><span class=identifier>remove_ref_i </span><span class=special>() </span><span class=keyword>const </span><span class=keyword>throw </span><span class=special>(</span><span class=identifier>Exception</span><span class=special>, </span><span class=identifier>SystemException</span><span class=special>) </span><span class=special>= </span><span class=number>0</span><span class=special>; + + </span><span class=keyword>virtual </span><span class=identifier>count_t + </span><span class=identifier>refcount_value_i </span><span class=special>() </span><span class=keyword>const </span><span class=keyword>throw </span><span class=special>(</span><span class=identifier>Exception</span><span class=special>, </span><span class=identifier>SystemException</span><span class=special>) </span><span class=special>= </span><span class=number>0</span><span class=special>; + + </span><span class=keyword>private</span><span class=special>: + </span><span class=comment>// Copy semanic is not supported. + </span><span class=identifier>Interface </span><span class=special>(</span><span class=identifier>Interface </span><span class=keyword>const</span><span class=special>&) </span><span class=keyword>throw </span><span class=special>(); + </span><span class=identifier>Interface</span><span class=special>& + </span><span class=keyword>operator</span><span class=special>= </span><span class=special>(</span><span class=identifier>Interface </span><span class=keyword>const</span><span class=special>&) </span><span class=keyword>throw </span><span class=special>(); + </span><span class=special>}; + + </span><span class=keyword>template </span><span class=special><</span><span class=keyword>typename </span><span class=identifier>Type</span><span class=special>> + </span><span class=identifier>Type</span><span class=special>* + </span><span class=identifier>add_ref </span><span class=special>(</span><span class=identifier>Type</span><span class=special>* </span><span class=identifier>ptr</span><span class=special>) + </span><span class=keyword>throw </span><span class=special>(</span><span class=identifier>Interface</span><span class=special>::</span><span class=identifier>Exception</span><span class=special>, </span><span class=identifier>Interface</span><span class=special>::</span><span class=identifier>SystemException</span><span class=special>); + </span><span class=special>} +</span><span class=special>} + +</span></pre> +</body> +</html> +<!-- $Id$ --> |