Click here to Skip to main content
15,896,330 members
Articles / Programming Languages / C++

An STL-compliant mathematical vector class

Rate me:
Please Sign up or sign in to vote.
3.78/5 (8 votes)
12 May 20056 min read 51.6K   1.1K   25  
A portable implementation of a templated, STL-compliant math vector class.
<!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>Math: Patterns</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.2 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="modules.html">Modules</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> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>
<h1>Patterns<br>
<small>
[<a class="el" href="group___patterns.html">Patterns</a>]</small>
</h1><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Modules</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___patterns.html">Patterns</a></td></tr>

</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
class <a class="el" href="class_e_abstract_factory.html">EAbstractFactory</a> represents an abstract factory for <em>T-dervied</em> classes. The user never creates this class explicitly. It is created using the macro E_DECLARE_ABSTRACT_FACTORY inside the class <em>T</em>. Every <em>T-derived</em> class that wants to be created dynamically, should use the macro E_IMPLEMENT_DYNAMIC(<em>D</em>, "id for D") where <em>D</em> is a <em>T-derived</em> class and "id for D" is a unique string identifying <em>D</em>. To create an instance of <em>D</em>, the user should call T::createDynamic("id for D"), which returns a <em>T*</em>.<p>
Using E_DECLARE_ABSTRACT_FACTORY has several implications for class <em>T:</em> <ul>
<li>A typedef <em>abstract_factory_base_type</em> is defined to be the type <em>T</em>.</li><li>A static member function createDynamic() is defined.</li><li>A static member function getAbstractFactory() is defined. </li></ul>
<hr size="1"><address style="align: right;"><small>Generated on Thu May 12 20:32:59 2005 for Math by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.2 </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 has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Web Developer
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions