#include <archetype.h>
In particular, the copy constructor is used to allow elements to be passed by value to a function.
Note that the documentation below of the specific methods, describes them as implemented in the archetypic element class.
Public Methods | |
Common Object Interface for LinBox Field elements. | |
ElementArchetype (void) | |
ElementArchetype (const ElementArchetype &a) | |
~ElementArchetype () | |
ElementArchetype & | operator= (const ElementArchetype &a) |
Implementation-Specific Methods. | |
These methods are not required of all LinBox field elements and are included only for this implementation of the archetype. | |
Common Object Interface | ElementArchetype (ElementAbstract *elem_ptr) |
Friends | |
class | RingArchetype |
class | FieldArchetype |
class | RandIterArchetype |
|
Default constructor. This constructor is required to allow field elements to be primitive C++ types. Because constructor does not know what field the element belongs to, it cannot actually construct the element. In this implementation, the constructor it sets {\tt \_elem\_ptr} to the null pointer. Initialization of the element is done through the field function init where the field is known. |
|
Copy constructor. This constructor is required to allow field elements to be primitive C++ types, and to allow field elements to be passed by value into functions. Constructs field element by copying the field element. In this implementation, this means copying the element to which {\tt a.\_elem\_ptr} points.
|
|
Destructor. In this implementation, this destroys element by deleting field element to which {\tt \_elem\_ptr} points. |
|
Constructor. Constructs field element from pointer to \Ref{ElementAbstract} Not part of the interface. Creates new copy of element object in dynamic memory.
|
|
Assignment operator. Assigns element a to element. In this implementation, this is done by copying field element to which {\tt \_elem\_ptr} points.
|
|
|
|
|
|
|