Chombo + EB
3.2
|
#include <GenericArithmetic.H>
Public Types | |
typedef ScalarT | scalar_type |
typedef SelfT | self_type |
Public Member Functions | |
virtual | ~GenericArithmeticable () |
GenericArithmeticable (SelfT *s) | |
bool | operator< (const SelfT &) const |
bool | operator> (const SelfT &) const |
bool | operator<= (const SelfT &) const |
bool | operator>= (const SelfT &) const |
SelfT & | operator+= (const SelfT &) |
SelfT & | operator+= (const ScalarT &) |
SelfT & | operator-= (const SelfT &) |
SelfT & | operator-= (const ScalarT &) |
SelfT & | operator*= (const SelfT &) |
SelfT & | operator*= (const ScalarT &) |
SelfT & | operator/= (const SelfT &) |
SelfT & | operator/= (const ScalarT &) |
Private Attributes | |
SelfT * | m_child |
Class that you need to derive from, if you want the global operators below to be available for your class. For example: class Foo : public GenericArithmeticable<double,Foo> { public: Foo() : GenericArithmeticable<double,Foo>(this) { } Foo& operator+=( const Foo& ); Foo& operator+=( const double& ); [etc] };
If, in addition, you want the member-function operators, you'll need to implement some generic operator-appliers in your derived class: see, in GenericArithmeticI.H, operatorCompare() and operatorOpEquals(). If you implement operator<, operator+= etc in your derived class, then that'll override the ones here (regardless of whether you've defined operatorCompare() and operatorOpEquals() in your derived class, though it would then be weird if you did).
typedef ScalarT GenericArithmeticable< ScalarT, SelfT >::scalar_type |
typedef SelfT GenericArithmeticable< ScalarT, SelfT >::self_type |
|
inlinevirtual |
|
inline |
bool GenericArithmeticable< ScalarT, SelfT >::operator< | ( | const SelfT & | rhs | ) | const |
bool GenericArithmeticable< ScalarT, SelfT >::operator> | ( | const SelfT & | rhs | ) | const |
bool GenericArithmeticable< ScalarT, SelfT >::operator<= | ( | const SelfT & | rhs | ) | const |
bool GenericArithmeticable< ScalarT, SelfT >::operator>= | ( | const SelfT & | rhs | ) | const |
SelfT & GenericArithmeticable< ScalarT, SelfT >::operator+= | ( | const SelfT & | rhs | ) |
SelfT & GenericArithmeticable< ScalarT, SelfT >::operator+= | ( | const ScalarT & | a | ) |
SelfT & GenericArithmeticable< ScalarT, SelfT >::operator-= | ( | const SelfT & | rhs | ) |
SelfT & GenericArithmeticable< ScalarT, SelfT >::operator-= | ( | const ScalarT & | a | ) |
SelfT & GenericArithmeticable< ScalarT, SelfT >::operator*= | ( | const SelfT & | rhs | ) |
SelfT & GenericArithmeticable< ScalarT, SelfT >::operator*= | ( | const ScalarT & | a | ) |
SelfT & GenericArithmeticable< ScalarT, SelfT >::operator/= | ( | const SelfT & | rhs | ) |
SelfT & GenericArithmeticable< ScalarT, SelfT >::operator/= | ( | const ScalarT & | a | ) |
|
private |