Rosetta  2020.11
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
ObjexxFCL::Dimension Class Reference

Dimension: Dynamic Dimension. More...

#include <Dimension.hh>

Inheritance diagram for ObjexxFCL::Dimension:
Inheritance graph
[legend]

Public Types

typedef DimensionExpression Expression
 
- Public Types inherited from ObjexxFCL::ObserverMulti
typedef SetWrapper< Observer * > Observers
 

Public Member Functions

 Dimension ()
 Default Constructor. More...
 
 Dimension (Dimension const &dim)
 Copy Constructor. More...
 
 Dimension (int const i)
 int Constructor More...
 
 Dimension (double const d)
 double Constructor More...
 
 Dimension (Expression const &exp)
 Expression Constructor. More...
 
 Dimension (Expression *exp_p_a)
 Expression Pointer Constructor (Ownership Transfer) More...
 
Dimensionclone () const
 Clone. More...
 
Dimensionreference_copy () const
 Reference Copy. More...
 
 ~Dimension () override
 Destructor. More...
 
 operator int () const
 int Conversion More...
 
 operator double () const
 double Conversion More...
 
Dimensionoperator= (Dimension const &dim)
 Copy Assignment: Creates a reference to the passed Dimension. More...
 
Dimensionoperator= (Expression const &exp)
 Expression Assignment. More...
 
Dimensionoperator= (int const i)
 int Assignment More...
 
Dimensionoperator= (double const d)
 double Assignment More...
 
Dimensionoperator+= (Dimension const &dim)
 += Dimension More...
 
Dimensionoperator+= (Expression const &exp)
 += Expression More...
 
Dimensionoperator+= (int const i)
 += int More...
 
Dimensionoperator+= (double const d)
 += double More...
 
Dimensionoperator-= (Dimension const &dim)
 -= Dimension More...
 
Dimensionoperator-= (Expression const &exp)
 -= Expression More...
 
Dimensionoperator-= (int const i)
 -= int More...
 
Dimensionoperator-= (double const d)
 -= double More...
 
Dimensionoperator*= (Dimension const &dim)
 *= Dimension More...
 
Dimensionoperator*= (Expression const &exp)
 *= Expression More...
 
Dimensionoperator*= (int const i)
 *= int More...
 
Dimensionoperator*= (double const d)
 *= double More...
 
Dimensionoperator/= (Dimension const &dim)
 /= Dimension More...
 
Dimensionoperator/= (Expression const &exp)
 /= Expression More...
 
Dimensionoperator/= (int const i)
 /= int More...
 
Dimensionoperator/= (double const d)
 /= double More...
 
Dimensionassign_value_of (Dimension const &dim)
 Dimension Value-Semantics Assignment. More...
 
Dimensionassign_if (int const i, double const m=1.0)
 int Assignment if Bigger than Value or Smaller than Multiplier * Value More...
 
Dimensionassign_if (double const d, double const m=1.0)
 double Assignment if Bigger than Value or Smaller than Multiplier * Value More...
 
Dimensionassign_if_half (int const i)
 int Assignment if Bigger than Value or Smaller than Half Value More...
 
Dimensionassign_if_half (double const d)
 double Assignment if Bigger than Value or Smaller than Half Value More...
 
Dimensionassign_if_bigger (int const i)
 int Assignment if Bigger than Value More...
 
Dimensionassign_if_bigger (double const d)
 double Assignment if Bigger than Value More...
 
Dimensionassign_if_nic (int const i, double const m=1.0)
 int Assignment if Bigger than Value or Smaller than Multiplier * Value: Notify if Changed More...
 
Dimensionassign_if_nic (double const d, double const m=1.0)
 double Assignment if Bigger than Value or Smaller than Multiplier * Value: Notify if Changed More...
 
Dimensionassign_if_half_nic (int const i)
 int Assignment if Bigger than Value or Smaller than Half Value: Notify if Changed More...
 
Dimensionassign_if_half_nic (double const d)
 double Assignment if Bigger than Value or Smaller than Half Value: Notify if Changed More...
 
Dimensionassign_if_bigger_nic (int const i)
 int Assignment if Bigger than Value: Notify if Changed More...
 
Dimensionassign_if_bigger_nic (double const d)
 double Assignment if Bigger than Value: Notify if Changed More...
 
Dimensionoperator++ ()
 ++Dimension More...
 
Dimension const operator++ (int)
 Dimension++. More...
 
Dimensionoperator-- ()
 Dimension More...
 
Dimension const operator-- (int)
 Dimension–. More...
 
bool initialized () const
 Initialized? More...
 
bool constant () const
 Constant? More...
 
bool reference () const
 Reference? More...
 
bool reducible () const
 Reducible? More...
 
int operator() () const
 Value. More...
 
int value () const
 Value. More...
 
int zvalue () const
 Value: Zero if Uninitialized. More...
 
Expression const * exp_p () const
 Expression Pointer. More...
 
Expression const & exp () const
 Expression. More...
 
Expressionexp_clone () const
 Expression Clone. More...
 
Dimensionclear ()
 Clear the Dimension. More...
 
Dimensionclear_no_notify ()
 Clear the Dimension Without Notification. More...
 
Dimensionswap (Dimension &dim)
 Swap. More...
 
Dimensionswap_no_notify (Dimension &dim)
 Swap Without Notification. More...
 
void update () override
 Update. More...
 
void destructed (Subject const &subject) override
 Update for Destruction of a Subject. More...
 
- Public Member Functions inherited from ObjexxFCL::ObserverMulti
 ~ObserverMulti () override
 Destructor. More...
 
void insert_observer (Observer &observer) const override
 Insert an Observer. More...
 
void remove_observer (Observer &observer) const override
 Remove an Observer. More...
 
bool has_observer () const override
 Has At Least One Observer? More...
 
Observers const * observers_p () const
 Observers Pointer. More...
 
Observers const & observers () const
 Observers. More...
 
void notify_destructed () const
 Notify Observers That This Subject is Being Destructed. More...
 
- Public Member Functions inherited from ObjexxFCL::Observer
virtual ~Observer ()
 Destructor. More...
 
void notify () const
 Notify Observers That This Subject Has Changed. More...
 
bool acyclic (Observer &) const
 Acyclic After Adding an Observer of This Subject? More...
 

Private Member Functions

void reduce_expression ()
 Reduce Expression. More...
 
void insert_as_observer_of (Dimension const &dim)
 Insert as Observer of an Expression's Referenced Dimensions. More...
 
void insert_as_observer_of (Expression const &exp)
 Insert as Observer of an Expression's Referenced Dimensions. More...
 
void insert_as_observer ()
 Insert as Observer of the Expression's Referenced Dimensions. More...
 
void remove_as_observer ()
 Remove as Observer of the Expression's Referenced Dimensions. More...
 
void update_notify ()
 Update and Notify. More...
 
void update_notify_if_changed ()
 Update and Notify if External State Changed. More...
 

Private Attributes

Expressionexp_p_
 Expression pointer (owned) More...
 
bool initialized_
 Cached initialization state. More...
 
int value_
 Cached value: Kept in synch with expression value (0 if uninitialized) More...
 

Friends

class DynamicIndexRange
 
void swap (Dimension &a, Dimension &b)
 Swap. More...
 
void swap_no_notify (Dimension &a, Dimension &b)
 Swap. More...
 

Additional Inherited Members

- Protected Member Functions inherited from ObjexxFCL::ObserverMulti
 ObserverMulti ()
 Default Constructor. More...
 
 ObserverMulti (ObserverMulti const &)
 Copy Constructor. More...
 
ObserverMultioperator= (ObserverMulti const &)
 Copy Assignment. More...
 
- Protected Member Functions inherited from ObjexxFCL::Observer
 Observer ()
 Default Constructor. More...
 
 Observer (Observer const &)
 Copy Constructor. More...
 
Observeroperator= (Observer const &)
 Copy Assignment. More...
 

Detailed Description

Dimension: Dynamic Dimension.

Member Typedef Documentation

Constructor & Destructor Documentation

ObjexxFCL::Dimension::Dimension ( )
inline

Default Constructor.

Referenced by clone(), and reference_copy().

ObjexxFCL::Dimension::Dimension ( Dimension const &  dim)
explicit

Copy Constructor.

Note
Copy creates a reference to the passed Dimension: Not intended for pass-by-value

References insert_as_observer_of().

ObjexxFCL::Dimension::Dimension ( int const  i)
explicit

int Constructor

ObjexxFCL::Dimension::Dimension ( double const  d)
explicit

double Constructor

ObjexxFCL::Dimension::Dimension ( Expression const &  exp)
inlineexplicit

Expression Constructor.

References insert_as_observer().

ObjexxFCL::Dimension::Dimension ( Expression exp_p_a)
inlineexplicit

Expression Pointer Constructor (Ownership Transfer)

References insert_as_observer(), and reduce_expression().

ObjexxFCL::Dimension::~Dimension ( )
inlineoverride

Destructor.

References exp_p_, and remove_as_observer().

Member Function Documentation

Dimension & ObjexxFCL::Dimension::assign_if ( int const  i,
double const  m = 1.0 
)

int Assignment if Bigger than Value or Smaller than Multiplier * Value

References exp_p_, initialized_, ObjexxFCL::Observer::notify(), remove_as_observer(), update(), and value_.

Dimension & ObjexxFCL::Dimension::assign_if ( double const  d,
double const  m = 1.0 
)

double Assignment if Bigger than Value or Smaller than Multiplier * Value

References exp_p_, initialized_, ObjexxFCL::Observer::notify(), remove_as_observer(), update(), and value_.

Dimension & ObjexxFCL::Dimension::assign_if_bigger ( int const  i)

int Assignment if Bigger than Value

References exp_p_, initialized_, ObjexxFCL::Observer::notify(), remove_as_observer(), update(), and value_.

Dimension & ObjexxFCL::Dimension::assign_if_bigger ( double const  d)

double Assignment if Bigger than Value

References exp_p_, initialized_, ObjexxFCL::Observer::notify(), remove_as_observer(), update(), and value_.

Dimension & ObjexxFCL::Dimension::assign_if_bigger_nic ( int const  i)

int Assignment if Bigger than Value: Notify if Changed

References exp_p_, initialized_, remove_as_observer(), update_notify_if_changed(), and value_.

Dimension & ObjexxFCL::Dimension::assign_if_bigger_nic ( double const  d)

double Assignment if Bigger than Value: Notify if Changed

References exp_p_, initialized_, remove_as_observer(), update_notify_if_changed(), and value_.

Dimension & ObjexxFCL::Dimension::assign_if_half ( int const  i)

int Assignment if Bigger than Value or Smaller than Half Value

References exp_p_, initialized_, ObjexxFCL::Observer::notify(), remove_as_observer(), update(), and value_.

Dimension & ObjexxFCL::Dimension::assign_if_half ( double const  d)

double Assignment if Bigger than Value or Smaller than Half Value

References exp_p_, initialized_, ObjexxFCL::Observer::notify(), remove_as_observer(), update(), and value_.

Dimension & ObjexxFCL::Dimension::assign_if_half_nic ( int const  i)

int Assignment if Bigger than Value or Smaller than Half Value: Notify if Changed

References exp_p_, initialized_, remove_as_observer(), update_notify_if_changed(), and value_.

Dimension & ObjexxFCL::Dimension::assign_if_half_nic ( double const  d)

double Assignment if Bigger than Value or Smaller than Half Value: Notify if Changed

References exp_p_, initialized_, remove_as_observer(), update_notify_if_changed(), and value_.

Dimension & ObjexxFCL::Dimension::assign_if_nic ( int const  i,
double const  m = 1.0 
)

int Assignment if Bigger than Value or Smaller than Multiplier * Value: Notify if Changed

References exp_p_, initialized_, remove_as_observer(), update_notify_if_changed(), and value_.

Dimension & ObjexxFCL::Dimension::assign_if_nic ( double const  d,
double const  m = 1.0 
)

double Assignment if Bigger than Value or Smaller than Multiplier * Value: Notify if Changed

References exp_p_, initialized_, remove_as_observer(), update_notify_if_changed(), and value_.

Dimension& ObjexxFCL::Dimension::assign_value_of ( Dimension const &  dim)
inline
Dimension& ObjexxFCL::Dimension::clear ( )
inline
Dimension& ObjexxFCL::Dimension::clear_no_notify ( )
inline

Clear the Dimension Without Notification.

References exp_p_, initialized_, remove_as_observer(), and value_.

Dimension* ObjexxFCL::Dimension::clone ( ) const
inline
bool ObjexxFCL::Dimension::constant ( ) const
inline
void ObjexxFCL::Dimension::destructed ( Subject const &  subject)
inlineoverridevirtual

Update for Destruction of a Subject.

Implements ObjexxFCL::Observer.

References ObjexxFCL::DimensionExpression::destructed(), and exp_p_.

Expression const& ObjexxFCL::Dimension::exp ( ) const
inline

Expression.

References exp_p_.

Referenced by ObjexxFCL::DimensionExpressionRef::clone().

Expression* ObjexxFCL::Dimension::exp_clone ( ) const
inline

Expression Clone.

References ObjexxFCL::DimensionExpression::clone(), and exp_p_.

Referenced by assign_value_of(), and clone().

Expression const* ObjexxFCL::Dimension::exp_p ( ) const
inline

Expression Pointer.

References exp_p_.

Referenced by ObjexxFCL::DimensionExpressionRef::clone().

bool ObjexxFCL::Dimension::initialized ( ) const
inline
void ObjexxFCL::Dimension::insert_as_observer ( )
inlineprivate

Insert as Observer of the Expression's Referenced Dimensions.

References exp_p_, and ObjexxFCL::DimensionExpression::insert_observer().

Referenced by assign_value_of(), Dimension(), operator=(), swap(), and swap_no_notify().

void ObjexxFCL::Dimension::insert_as_observer_of ( Dimension const &  dim)
inlineprivate

Insert as Observer of an Expression's Referenced Dimensions.

References ObjexxFCL::ObserverMulti::insert_observer().

Referenced by Dimension(), operator*=(), operator+=(), operator-=(), operator/=(), and operator=().

void ObjexxFCL::Dimension::insert_as_observer_of ( Expression const &  exp)
inlineprivate

Insert as Observer of an Expression's Referenced Dimensions.

References ObjexxFCL::DimensionExpression::insert_observer().

ObjexxFCL::Dimension::operator double ( ) const
inline

double Conversion

References initialized_, and value_.

ObjexxFCL::Dimension::operator int ( ) const
inline

int Conversion

References initialized_, and value_.

int ObjexxFCL::Dimension::operator() ( ) const
inline

Value.

References initialized_, and value_.

Dimension & ObjexxFCL::Dimension::operator*= ( Dimension const &  dim)
Dimension & ObjexxFCL::Dimension::operator*= ( Expression const &  exp)
Dimension & ObjexxFCL::Dimension::operator*= ( int const  i)
Dimension & ObjexxFCL::Dimension::operator*= ( double const  d)
Dimension & ObjexxFCL::Dimension::operator++ ( )
Dimension const ObjexxFCL::Dimension::operator++ ( int  )

Dimension++.

Dimension & ObjexxFCL::Dimension::operator+= ( Dimension const &  dim)
Dimension & ObjexxFCL::Dimension::operator+= ( Expression const &  exp)
Dimension & ObjexxFCL::Dimension::operator+= ( int const  i)
Dimension & ObjexxFCL::Dimension::operator+= ( double const  d)
Dimension & ObjexxFCL::Dimension::operator-- ( )
Dimension const ObjexxFCL::Dimension::operator-- ( int  )

Dimension–.

Dimension & ObjexxFCL::Dimension::operator-= ( Dimension const &  dim)
Dimension & ObjexxFCL::Dimension::operator-= ( Expression const &  exp)
Dimension & ObjexxFCL::Dimension::operator-= ( int const  i)
Dimension & ObjexxFCL::Dimension::operator-= ( double const  d)
Dimension & ObjexxFCL::Dimension::operator/= ( Dimension const &  dim)
Dimension & ObjexxFCL::Dimension::operator/= ( Expression const &  exp)
Dimension & ObjexxFCL::Dimension::operator/= ( int const  i)
Dimension & ObjexxFCL::Dimension::operator/= ( double const  d)
Dimension & ObjexxFCL::Dimension::operator= ( Dimension const &  dim)

Copy Assignment: Creates a reference to the passed Dimension.

Copy Assignment.

References exp_p_, insert_as_observer_of(), ObjexxFCL::Observer::notify(), remove_as_observer(), and update().

Dimension& ObjexxFCL::Dimension::operator= ( Expression const &  exp)
inline
Dimension & ObjexxFCL::Dimension::operator= ( int const  i)

int Assignment

References exp_p_, remove_as_observer(), and update_notify().

Dimension & ObjexxFCL::Dimension::operator= ( double const  d)

double Assignment

References exp_p_, remove_as_observer(), and update_notify().

void ObjexxFCL::Dimension::reduce_expression ( )
inlineprivate
bool ObjexxFCL::Dimension::reducible ( ) const
inline

Reducible?

References exp_p_, and ObjexxFCL::DimensionExpression::reducible().

Referenced by reduce_expression().

bool ObjexxFCL::Dimension::reference ( ) const
inline
Dimension* ObjexxFCL::Dimension::reference_copy ( ) const
inline
void ObjexxFCL::Dimension::remove_as_observer ( )
inlineprivate
Dimension& ObjexxFCL::Dimension::swap ( Dimension dim)
inline
Dimension& ObjexxFCL::Dimension::swap_no_notify ( Dimension dim)
inline

Swap Without Notification.

References exp_p_, initialized_, insert_as_observer(), remove_as_observer(), swap(), and value_.

Referenced by ObjexxFCL::swap_no_notify().

void ObjexxFCL::Dimension::update ( )
inlineoverridevirtual
void ObjexxFCL::Dimension::update_notify ( )
inlineprivate
void ObjexxFCL::Dimension::update_notify_if_changed ( )
inlineprivate
int ObjexxFCL::Dimension::value ( ) const
inline
int ObjexxFCL::Dimension::zvalue ( ) const
inline

Friends And Related Function Documentation

friend class DynamicIndexRange
friend
void swap ( ObjexxFCL::Dimension a,
ObjexxFCL::Dimension b 
)
friend

Swap.

void swap_no_notify ( Dimension a,
Dimension b 
)
friend

Swap.

Member Data Documentation

Expression* ObjexxFCL::Dimension::exp_p_
private
bool ObjexxFCL::Dimension::initialized_
private
int ObjexxFCL::Dimension::value_
private

The documentation for this class was generated from the following files: