|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>ImageStone: PCL_Interface_Composite< T > Class Template Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.1 -->
<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="functions.html">Class Members</a></div>
<h1>PCL_Interface_Composite< T > Class Template Reference</h1>composite support.
<a href="#_details">More...</a>
<p>
<code>#include <<a class="el" href="_p_c_l__interface__composite_8h-source.html">PCL_interface_composite.h</a>></code>
<p>
<a href="class_p_c_l___interface___composite-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a0" doxytag="PCL_Interface_Composite::~PCL_Interface_Composite"></a>
virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="class_p_c_l___interface___composite.html#a0">~PCL_Interface_Composite</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Deconstructor will call all PCL_DeleteAllObjects to delete all objects. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a1" doxytag="PCL_Interface_Composite::PCL_GetObjectCount"></a>
int </td><td class="memItemRight" valign="bottom"><a class="el" href="class_p_c_l___interface___composite.html#a1">PCL_GetObjectCount</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Get number of object. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_p_c_l___interface___composite.html#a2">PCL_PushObject</a> (T *pObj)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Add an object (created by new) into list (add a NULL object is permitted). <a href="#a2"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a3" doxytag="PCL_Interface_Composite::PCL_GetObject"></a>
T * </td><td class="memItemRight" valign="bottom"><a class="el" href="class_p_c_l___interface___composite.html#a3">PCL_GetObject</a> (int nIndex) const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Get object in list, nIndex is a zero-based index. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a4" doxytag="PCL_Interface_Composite::PCL_HasInList"></a>
bool </td><td class="memItemRight" valign="bottom"><a class="el" href="class_p_c_l___interface___composite.html#a4">PCL_HasInList</a> (const T *pObj) const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Whether the object has been added in list. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a5" doxytag="PCL_Interface_Composite::PCL_ThrowOwnership"></a>
void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_p_c_l___interface___composite.html#a5">PCL_ThrowOwnership</a> (std::deque< T * > &listObj)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Throw objects' ownership. you must delete object yourself. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a6" doxytag="PCL_Interface_Composite::PCL_DeleteAllObjects"></a>
void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_p_c_l___interface___composite.html#a6">PCL_DeleteAllObjects</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Delete all objects in list. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a7" doxytag="PCL_Interface_Composite::PCL_DeleteObject"></a>
void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_p_c_l___interface___composite.html#a7">PCL_DeleteObject</a> (int nIndex)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Remove & delete object from list. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a8" doxytag="PCL_Interface_Composite::PCL_DeleteObject"></a>
void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_p_c_l___interface___composite.html#a8">PCL_DeleteObject</a> (T *pObj)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Delete object in list. <br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
<h3>template<class T><br>
class PCL_Interface_Composite< T ></h3>
composite support.
<p>
enable your class contain composite object, for example: <div class="fragment"><pre class="fragment"><span class="keyword">class </span>CMultiImage : <span class="keyword">public</span> CObject,
<span class="keyword">private</span> <a class="code" href="class_p_c_l___interface___composite.html">PCL_Interface_Composite</a><CImage>
{
<span class="keywordtype">int</span> GetImageCount()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="class_p_c_l___interface___composite.html#a1">PCL_GetObjectCount</a>(); }
CImage* GetImage (<span class="keywordtype">int</span> nIndex)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="class_p_c_l___interface___composite.html#a3">PCL_GetObject</a>(nIndex); }
}
</pre></div>
<p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="a2" doxytag="PCL_Interface_Composite::PCL_PushObject"></a><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="mdPrefix" colspan="4">
template<class T> </td>
</tr>
<tr>
<td class="md" nowrap valign="top">void <a class="el" href="class_p_c_l___interface___composite.html">PCL_Interface_Composite</a>< T >::PCL_PushObject </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">T * </td>
<td class="mdname1" valign="top" nowrap> <em>pObj</em> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap><code> [inline]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
</td>
<td>
<p>
Add an object (created by new) into list (add a NULL object is permitted).
<p>
after the object be added, you can't delete it any more. </td>
</tr>
</table>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="_p_c_l__interface__composite_8h-source.html">PCL_interface_composite.h</a></ul>
<hr size="1"><address style="align: right;"><small>Generated on Wed Mar 8 11:12:48 2006 for ImageStone by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.1 </small></address>
</body>
</html>
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
graduate from University of Science and Technology of China at 2002.
Now I work at www.phoxo.com.