Rosetta 3.3
Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | Friends
ObjexxFCL::IndexRange Class Reference

IndexRange: Index Range Abstract Base Class. More...

#include <IndexRange.hh>

Inheritance diagram for ObjexxFCL::IndexRange:
Inheritance graph
[legend]
Collaboration diagram for ObjexxFCL::IndexRange:
Collaboration graph
[legend]

List of all members.

Public Types

typedef std::size_t size_type
typedef std::size_t Size

Public Member Functions

virtual ~IndexRange ()
 Destructor.
virtual IndexRangeoperator= (int const u_a)
 Upper Index Assignment.
virtual IndexRangeoperator= (Star const &)
 Unbounded Upper Index Assignment.
virtual IndexRangeassign (int const u_a)
 Upper Index Assignment.
virtual IndexRangeassign (Star const &)
 Unbounded Upper Index Assignment.
virtual IndexRangeassign (int const l_a, int const u_a)
 Index Range Assignment.
virtual IndexRangeassign (int const l_a, Star const &)
 Index and Unbounded Upper Index Assignment.
virtual bool initialized () const
 Initialized?
virtual bool l_initialized () const
 Lower Initialized?
virtual bool u_initialized () const
 Upper Initialized?
virtual bool legal () const
 Legal?
virtual bool bounded () const
 Bounded?
bool bounded_value () const
 Bounded?
virtual bool unbounded () const
 Unbounded?
bool unbounded_value () const
 Unbounded?
virtual bool not_unbounded () const
 Not Unbounded?
virtual bool positive () const
 Bounded with Positive Size?
bool positive_value () const
 Bounded with Positive Size?
virtual bool contains (int const i) const
 Contains an Index?
virtual bool contains (IndexRange const &I) const
 Contains Another IndexRange?
virtual bool intersects (IndexRange const &I) const
 Intersects Another IndexRange?
int l () const
 Lower Index.
int lz () const
 Lower Index (Zero if Uninitialized)
int u () const
 Upper Index.
int uz () const
 Upper Index (Zero if Uninitialized)
size_type size () const
 Size.
int offset (int const i) const
 Offset of an Index.
virtual IndexRangel (int const l_a)
 Lower Index Set.
virtual IndexRangeu (int const u_a)
 Upper Index Set.
virtual IndexRangeu (Star const &)
 Unbounded Upper Index Set.
virtual IndexRangecontain (int const i)
 Expand to Contain an Index.
virtual IndexRangecontain (IndexRange const &I)
 Expand to Contain Another IndexRange.
virtual IndexRangeintersect (IndexRange const &I)
 Intersect With Another IndexRange.
virtual IndexRangeclear ()
 Clear.

Static Public Attributes

static size_type const npos = static_cast< size_type >( -1 )
static int const l_min = -( static_cast< int >( ( static_cast< unsigned int >( -1 ) / 2u ) ) - 1 )
static int const u_max = static_cast< int >( ( static_cast< unsigned int >( -1 ) / 2u ) )

Protected Member Functions

 IndexRange ()
 Default Constructor.
 IndexRange (IndexRange const &I)
 Copy Constructor.
 IndexRange (int const u_a)
 Upper Index Constructor.
 IndexRange (Star const &)
 Unbounded Upper Index Constructor.
 IndexRange (int const l_a, int const u_a)
 Index Range Constructor.
 IndexRange (int const l_a, Star const &)
 Index and Unbounded Upper Index Constructor.
void operator= (IndexRange const &I)
 Copy Assignment.
bool legal_static () const
 Legal Static Range?
virtual Dimensionl_dim_clone () const
 Lower Dimension Clone.
virtual Dimensionu_dim_clone () const
 Upper Dimension Clone.
void swap (IndexRange &I)
 Swap.

Friends

class StaticIndexRange
class DynamicIndexRange
bool operator== (IndexRange const &I, IndexRange const &J)
 IndexRange == IndexRange.
bool operator!= (IndexRange const &I, IndexRange const &J)
 IndexRange != IndexRange.
bool operator< (IndexRange const &I, IndexRange const &J)
 IndexRange < IndexRange.
bool operator<= (IndexRange const &I, IndexRange const &J)
 IndexRange <= IndexRange.
bool operator> (IndexRange const &I, IndexRange const &J)
 IndexRange > IndexRange.
bool operator>= (IndexRange const &I, IndexRange const &J)
 IndexRange >= IndexRange.
std::istream & operator>> (std::istream &stream, IndexRange &I)
 Stream Input.
std::ostream & operator<< (std::ostream &stream, IndexRange const &I)
 Stream Output.

Detailed Description

IndexRange: Index Range Abstract Base Class.

Remarks:
  • Zero-size range is indicated by ( l - 1 == u ) and ( size == 0 )
  • Upper-unbounded range is indicated by ( l - 2 == u ) and ( size == npos )
  • Legal ranges have ( l - 2 <= u ) with l and u in their allowed ranges

Member Typedef Documentation


Constructor & Destructor Documentation

ObjexxFCL::IndexRange::IndexRange ( ) [inline, protected]

Default Constructor.

ObjexxFCL::IndexRange::IndexRange ( IndexRange const &  I) [inline, protected]

Copy Constructor.

ObjexxFCL::IndexRange::IndexRange ( int const  u_a) [inline, protected]

Upper Index Constructor.

ObjexxFCL::IndexRange::IndexRange ( Star const &  ) [inline, protected]

Unbounded Upper Index Constructor.

ObjexxFCL::IndexRange::IndexRange ( int const  l_a,
int const  u_a 
) [inline, protected]

Index Range Constructor.

ObjexxFCL::IndexRange::IndexRange ( int const  l_a,
Star const &   
) [inline, protected]

Index and Unbounded Upper Index Constructor.

virtual ObjexxFCL::IndexRange::~IndexRange ( ) [inline, virtual]

Destructor.


Member Function Documentation

virtual IndexRange& ObjexxFCL::IndexRange::assign ( int const  u_a) [inline, virtual]
virtual IndexRange& ObjexxFCL::IndexRange::assign ( Star const &  ) [inline, virtual]

Unbounded Upper Index Assignment.

Reimplemented in ObjexxFCL::DynamicIndexRange, and ObjexxFCL::StaticIndexRange.

References npos.

virtual IndexRange& ObjexxFCL::IndexRange::assign ( int const  l_a,
int const  u_a 
) [inline, virtual]

Index Range Assignment.

Reimplemented in ObjexxFCL::DynamicIndexRange, and ObjexxFCL::StaticIndexRange.

virtual IndexRange& ObjexxFCL::IndexRange::assign ( int const  l_a,
Star const &   
) [inline, virtual]

Index and Unbounded Upper Index Assignment.

Reimplemented in ObjexxFCL::DynamicIndexRange, and ObjexxFCL::StaticIndexRange.

References npos.

virtual bool ObjexxFCL::IndexRange::bounded ( ) const [inline, virtual]
bool ObjexxFCL::IndexRange::bounded_value ( ) const [inline]

Bounded?

virtual IndexRange& ObjexxFCL::IndexRange::clear ( ) [inline, virtual]
IndexRange & ObjexxFCL::IndexRange::contain ( IndexRange const &  I) [virtual]

Expand to Contain Another IndexRange.

Reimplemented in ObjexxFCL::DynamicIndexRange, and ObjexxFCL::StaticIndexRange.

References bounded(), initialized(), npos, and positive().

virtual IndexRange& ObjexxFCL::IndexRange::contain ( int const  i) [inline, virtual]

Expand to Contain an Index.

Reimplemented in ObjexxFCL::DynamicIndexRange, and ObjexxFCL::StaticIndexRange.

References color_pdb::i.

Referenced by ObjexxFCL::StaticIndexRange::contain().

virtual bool ObjexxFCL::IndexRange::contains ( int const  i) const [inline, virtual]
bool ObjexxFCL::IndexRange::contains ( IndexRange const &  I) const [virtual]

Contains Another IndexRange?

Reimplemented in ObjexxFCL::DynamicIndexRange.

References initialized().

virtual bool ObjexxFCL::IndexRange::initialized ( ) const [inline, virtual]
IndexRange & ObjexxFCL::IndexRange::intersect ( IndexRange const &  I) [virtual]
bool ObjexxFCL::IndexRange::intersects ( IndexRange const &  I) const [virtual]
int ObjexxFCL::IndexRange::l ( ) const [inline]
virtual IndexRange& ObjexxFCL::IndexRange::l ( int const  l_a) [inline, virtual]

Lower Index Set.

Reimplemented in ObjexxFCL::DynamicIndexRange, and ObjexxFCL::StaticIndexRange.

virtual Dimension* ObjexxFCL::IndexRange::l_dim_clone ( ) const [inline, protected, virtual]
virtual bool ObjexxFCL::IndexRange::l_initialized ( ) const [inline, virtual]

Lower Initialized?

Reimplemented in ObjexxFCL::DynamicIndexRange.

Referenced by l(), and offset().

virtual bool ObjexxFCL::IndexRange::legal ( ) const [inline, virtual]

Legal?

Reimplemented in ObjexxFCL::DynamicIndexRange.

References l_min, and u_max.

bool ObjexxFCL::IndexRange::legal_static ( ) const [inline, protected]
int ObjexxFCL::IndexRange::lz ( ) const [inline]

Lower Index (Zero if Uninitialized)

virtual bool ObjexxFCL::IndexRange::not_unbounded ( ) const [inline, virtual]

Not Unbounded?

Reimplemented in ObjexxFCL::DynamicIndexRange.

Referenced by ObjexxFCL::DynamicIndexRange::not_unbounded().

int ObjexxFCL::IndexRange::offset ( int const  i) const [inline]

Offset of an Index.

Reimplemented in ObjexxFCL::StaticIndexRange.

References l_initialized().

virtual IndexRange& ObjexxFCL::IndexRange::operator= ( int const  u_a) [inline, virtual]

Upper Index Assignment.

Reimplemented in ObjexxFCL::DynamicIndexRange, and ObjexxFCL::StaticIndexRange.

void ObjexxFCL::IndexRange::operator= ( IndexRange const &  I) [inline, protected]
virtual IndexRange& ObjexxFCL::IndexRange::operator= ( Star const &  ) [inline, virtual]

Unbounded Upper Index Assignment.

Reimplemented in ObjexxFCL::DynamicIndexRange, and ObjexxFCL::StaticIndexRange.

References npos.

virtual bool ObjexxFCL::IndexRange::positive ( ) const [inline, virtual]
bool ObjexxFCL::IndexRange::positive_value ( ) const [inline]

Bounded with Positive Size?

size_type ObjexxFCL::IndexRange::size ( ) const [inline]
void ObjexxFCL::IndexRange::swap ( IndexRange I) [inline, protected]
virtual IndexRange& ObjexxFCL::IndexRange::u ( Star const &  ) [inline, virtual]

Unbounded Upper Index Set.

Reimplemented in ObjexxFCL::DynamicIndexRange, and ObjexxFCL::StaticIndexRange.

References npos.

int ObjexxFCL::IndexRange::u ( ) const [inline]
virtual IndexRange& ObjexxFCL::IndexRange::u ( int const  u_a) [inline, virtual]

Upper Index Set.

Reimplemented in ObjexxFCL::DynamicIndexRange, and ObjexxFCL::StaticIndexRange.

virtual Dimension* ObjexxFCL::IndexRange::u_dim_clone ( ) const [inline, protected, virtual]
virtual bool ObjexxFCL::IndexRange::u_initialized ( ) const [inline, virtual]

Upper Initialized?

Reimplemented in ObjexxFCL::DynamicIndexRange.

Referenced by u().

virtual bool ObjexxFCL::IndexRange::unbounded ( ) const [inline, virtual]

Unbounded?

Reimplemented in ObjexxFCL::DynamicIndexRange.

Referenced by ObjexxFCL::DynamicIndexRange::unbounded().

bool ObjexxFCL::IndexRange::unbounded_value ( ) const [inline]

Unbounded?

int ObjexxFCL::IndexRange::uz ( ) const [inline]

Upper Index (Zero if Uninitialized)


Friends And Related Function Documentation

friend class DynamicIndexRange [friend]
bool operator!= ( IndexRange const &  I,
IndexRange const &  J 
) [friend]
bool operator< ( IndexRange const &  I,
IndexRange const &  J 
) [friend]
std::ostream& operator<< ( std::ostream &  stream,
IndexRange const &  I 
) [friend]

Stream Output.

bool operator<= ( IndexRange const &  I,
IndexRange const &  J 
) [friend]
bool operator== ( IndexRange const &  I,
IndexRange const &  J 
) [friend]
bool operator> ( IndexRange const &  I,
IndexRange const &  J 
) [friend]
bool operator>= ( IndexRange const &  I,
IndexRange const &  J 
) [friend]
std::istream& operator>> ( std::istream &  stream,
IndexRange I 
) [friend]

Stream Input.

friend class StaticIndexRange [friend]

Member Data Documentation

int const ObjexxFCL::IndexRange::l_min = -( static_cast< int >( ( static_cast< unsigned int >( -1 ) / 2u ) ) - 1 ) [static]
IndexRange::size_type const ObjexxFCL::IndexRange::npos = static_cast< size_type >( -1 ) [static]
int const ObjexxFCL::IndexRange::u_max = static_cast< int >( ( static_cast< unsigned int >( -1 ) / 2u ) ) [static]

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines