EpetraExt::Transform< T, U > Class Template Reference

#include <EpetraExt_Transform.h>

Inheritance diagram for EpetraExt::Transform< T, U >:

[legend]
List of all members.

Public Types

Typedefs for templated classes
typedef T OriginalType
typedef T * OriginalTypePtr
typedef T & OriginalTypeRef
typedef U NewType
typedef U * NewTypePtr
typedef U & NewTypeRef

Public Member Functions

Pure Virtual Methods which must be implemented by subclasses
virtual NewTypeRef operator() (OriginalTypeRef orig)=0
virtual bool fwd ()=0
virtual bool rvs ()=0
Virtual functions with default implements allowing for optional
implementation by the Transform developer

virtual bool analyze (OriginalTypeRef orig)
virtual NewTypeRef construct ()
virtual bool isConstructed ()

Protected Member Functions

 Transform ()

Protected Attributes

OriginalTypePtr origObj_
NewTypePtr newObj_

Detailed Description

template<typename T, typename U>
class EpetraExt::Transform< T, U >

Base Class for all Epetra Transform Operators.

This is the abstract definition for all Epetra Transform Operators. Depending on the type of Transform, several specializations are available: Structural, SameType, InPlace, View.


Constructor & Destructor Documentation

template<typename T, typename U>
EpetraExt::Transform< T, U >::Transform  )  [inline, protected]
 

Default constructor, protected to allow only derived classes to use.

Initializes attributes origObj_ and newObj_ to 0.


Member Function Documentation

template<typename T, typename U>
bool EpetraExt::Transform< T, U >::analyze OriginalTypeRef  orig  )  [virtual]
 

Initial analysis phase of transform. Returns true if the transform is possible allowing methods construct(), fwd() and rvs() to be successfully utilized.

Preconditions:

Invariants:

Postconditions:

The default implementation calls method operator() and stores the resulting object in an internal attribute newObj_.

template<typename T, typename U>
Transform< T, U >::NewTypeRef EpetraExt::Transform< T, U >::construct  )  [virtual]
 

Construction of new object as a result of the transform.

Preconditions:

Invariants:

Postconditions:

The default implementation returns internal attribute newObj_.

template<typename T, typename U>
virtual bool EpetraExt::Transform< T, U >::fwd  )  [pure virtual]
 

Forward transfer of data from orig object input in the operator() method call to the new object created in this same call. Returns true is operation is successful.

Preconditions:

Invariants:

Postconditions:

template<typename T, typename U>
bool EpetraExt::Transform< T, U >::isConstructed  )  [virtual]
 

Check for whether transformed object has been constructed

Preconditions:

Invariants:

Postconditions:

The default implementation returns true if newObj_ != 0.

template<typename T, typename U>
virtual NewTypeRef EpetraExt::Transform< T, U >::operator() OriginalTypeRef  orig  )  [pure virtual]
 

Analysis of transform operation on original object and construction of new object.

Preconditions:

Invariants:

Postconditions:

Returns:
Returns a pointer to the newly created object of type NewTypeRef. The Transform object maintains ownership of this new object and deletes as a part of it's destruction.

template<typename T, typename U>
virtual bool EpetraExt::Transform< T, U >::rvs  )  [pure virtual]
 

Reverse transfer of data from new object created in the operator() method call to the orig object input to this same method. Returns true if operation is successful.

Preconditions:

Invariants:

Postconditions:


The documentation for this class was generated from the following file:
Generated on Thu Sep 18 12:43:01 2008 for EpetraExt by doxygen 1.3.9.1