41 initialized_( exp_p_->initialized() ),
60 value_( static_cast<
int >( d ) )
106 if (
this != &dim ) {
166 if (
this != &dim ) {
226 if (
this != &dim ) {
286 if (
this != &dim ) {
538 std::string input_string;
539 stream >> input_string;
540 std::istringstream num_stream( input_string );
543 if ( ( num_stream ) && ( num_stream.eof() ) ) {
547 num_stream.seekg( std::ios_base::beg );
550 if ( ( num_stream ) && ( num_stream.eof() ) ) {
553 std::cerr <<
"\n*** ObjexxFCL Error: " <<
554 "Invalid stream input to Dimension: " << input_string << std::endl;
566 stream << dim.
value();
std::istream & operator>>(std::istream &stream, byte &b)
Stream Input.
ocstream cerr(std::cerr)
Wrapper around std::cerr.
virtual DimensionExpression * clone() const =0
Clone.
DimensionExpressionSum: DimensionExpression Binary Sum.
Dimension & assign_if_bigger_nic(int const i)
int Assignment if Bigger than Value: Notify if Changed
void reduce_expression()
Reduce Expression.
void update_notify_if_changed()
Update and Notify if External State Changed.
DimensionExpressionCon: Constant-Valued DimensionExpression.
Dimension & operator-=(Dimension const &dim)
-= Dimension
Dimension & operator*=(Dimension const &dim)
*= Dimension
Dimension & assign_if_half_nic(int const i)
int Assignment if Bigger than Value or Smaller than Half Value: Notify if Changed ...
void remove_as_observer()
Remove as Observer of the Expression's Referenced Dimensions.
Expression * exp_p_
Expression pointer (owned)
Dimension & operator++()
++Dimension
Dimension & assign_if(int const i, double const m=1.0)
int Assignment if Bigger than Value or Smaller than Multiplier * Value
DimensionExpressionDiv: DimensionExpression Binary Division.
Dimension & operator/=(Dimension const &dim)
/= Dimension
Dimension & assign_if_bigger(int const i)
int Assignment if Bigger than Value
DimensionExpressionRef: Dimension Reference DimensionExpression.
Dimension & operator=(Dimension const &dim)
Copy Assignment: Creates a reference to the passed Dimension.
int value_
Cached value: Kept in synch with expression value (0 if uninitialized)
ObserverMulti: Combined Subject + Multi Observer Abstract Base Class.
void insert_as_observer_of(Dimension const &dim)
Insert as Observer of an Expression's Referenced Dimensions.
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 ...
void notify() const
Notify Observers That This Subject Has Changed.
Dimension & operator--()
–Dimension
DimensionExpression: DimensionExpression Interface Class.
BooleanOptionKey const exit("options:exit")
Dimension & clear()
Clear the Dimension.
DimensionExpressionMul: DimensionExpression Binary Product.
Dimension & operator+=(Dimension const &dim)
+= Dimension
Dimension: Dynamic Dimension.
DimensionExpressionSub: DimensionExpression Binary Subtraction.
std::ostream & operator<<(std::ostream &stream, CArray< T > const &a)
stream << CArray
Dimension & assign_if_half(int const i)
int Assignment if Bigger than Value or Smaller than Half Value
bool initialized_
Cached initialization state.
Dimension()
Default Constructor.
void update_notify()
Update and Notify.