Click here to Skip to main content
15,886,003 members
Articles / Desktop Programming / MFC

ImageStone - A Powerful C++ Class Library for Image Manipulation

Rate me:
Please Sign up or sign in to vote.
4.81/5 (250 votes)
6 Dec 2011Zlib3 min read 117.8K   51.5K   405  
An article on a library for image manipulation
<!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&lt; T &gt; 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&nbsp;Page</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a></div>
<h1>PCL_Interface_Composite&lt; T &gt; Class Template Reference</h1>composite support.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="_p_c_l__interface__composite_8h-source.html">PCL_interface_composite.h</a>&gt;</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&nbsp;</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">&nbsp;</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&nbsp;</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">&nbsp;</td><td class="mdescRight">Get number of object. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</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">&nbsp;</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 *&nbsp;</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">&nbsp;</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&nbsp;</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">&nbsp;</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&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_p_c_l___interface___composite.html#a5">PCL_ThrowOwnership</a> (std::deque&lt; T * &gt; &amp;listObj)</td></tr>

<tr><td class="mdescLeft">&nbsp;</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&nbsp;</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">&nbsp;</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&nbsp;</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">&nbsp;</td><td class="mdescRight">Remove &amp; 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&nbsp;</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">&nbsp;</td><td class="mdescRight">Delete object in list. <br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
<h3>template&lt;class T&gt;<br>
 class PCL_Interface_Composite&lt; T &gt;</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>&lt;CImage&gt;
{
    <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&lt;class T&gt; </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>&lt; T &gt;::PCL_PushObject           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">T *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>pObj</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [inline]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </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&nbsp;
<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.

License

This article, along with any associated source code and files, is licensed under The zlib/libpng License


Written By
Team Leader PhoXo
China China
graduate from University of Science and Technology of China at 2002.

Now I work at www.phoxo.com.

Comments and Discussions