Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Const_circulator_from_container< Ctnr > Class Template Reference

#include <circulator.h>

Public Types

typedef
Const_circulator_from_container
< Ctnr > 
Self
 
typedef
Circulator_from_container
< Ctnr > 
Mutable
 
typedef Ctnr Container
 
typedef Ctnr::const_iterator const_iterator
 
typedef Ctnr::value_type value_type
 
typedef Ctnr::const_reference reference
 
typedef const value_typepointer
 
typedef Ctnr::size_type size_type
 
typedef Ctnr::difference_type difference_type
 
typedef std::iterator_traits
< const_iterator
ITraits
 
typedef ITraits::iterator_category Icategory
 
typedef
I_Circulator_from_iterator_traits
< Icategory
CTraits
 
typedef CTraits::iterator_category iterator_category
 

Public Member Functions

 Const_circulator_from_container ()
 
 Const_circulator_from_container (const Ctnr *c)
 
 Const_circulator_from_container (const Ctnr *c, const_iterator j)
 
 Const_circulator_from_container (const Mutable &c)
 
Selfoperator= (const Self &c)
 
bool operator== (CGAL_NULL_TYPE p) const
 
bool operator!= (CGAL_NULL_TYPE p) const
 
bool operator== (const Self &c) const
 
bool operator!= (const Self &c) const
 
reference operator* () const
 
pointer operator-> () const
 
Selfoperator++ ()
 
Self operator++ (int)
 
Selfoperator-- ()
 
Self operator-- (int)
 
Selfoperator+= (difference_type n)
 
Self operator+ (difference_type n) const
 
Selfoperator-= (difference_type n)
 
Self operator- (difference_type n) const
 
difference_type operator- (const Self &c) const
 
reference operator[] (difference_type n) const
 
const_iterator current_iterator () const
 
Self min_circulator () const
 
const Ctnr * container () const
 

Private Attributes

const Ctnr * ctnr
 
const_iterator i
 

Detailed Description

template<class Ctnr>
class Const_circulator_from_container< Ctnr >

Definition at line 920 of file circulator.h.

Member Typedef Documentation

typedef Ctnr::const_iterator const_iterator

Definition at line 927 of file circulator.h.

typedef Ctnr Container

Definition at line 926 of file circulator.h.

Definition at line 936 of file circulator.h.

typedef Ctnr::difference_type difference_type

Definition at line 932 of file circulator.h.

typedef ITraits::iterator_category Icategory

Definition at line 935 of file circulator.h.

Definition at line 937 of file circulator.h.

typedef std::iterator_traits<const_iterator> ITraits

Definition at line 934 of file circulator.h.

Definition at line 925 of file circulator.h.

typedef const value_type* pointer

Definition at line 930 of file circulator.h.

typedef Ctnr::const_reference reference

Definition at line 929 of file circulator.h.

Definition at line 924 of file circulator.h.

typedef Ctnr::size_type size_type

Definition at line 931 of file circulator.h.

typedef Ctnr::value_type value_type

Definition at line 928 of file circulator.h.

Constructor & Destructor Documentation

Definition at line 946 of file circulator.h.

946 : ctnr(NULL) {}
Const_circulator_from_container ( const Ctnr *  c)
inline

Definition at line 947 of file circulator.h.

948  : ctnr(c), i(c->begin()) {}
Const_circulator_from_container ( const Ctnr *  c,
const_iterator  j 
)
inline

Definition at line 949 of file circulator.h.

950  : ctnr(c), i(j) {}
j indices j
Definition: Indexing.h:6

Definition at line 951 of file circulator.h.

952  : ctnr( c.container()), i( c.current_iterator()) {}

Member Function Documentation

const Ctnr* container ( ) const
inline

Definition at line 1044 of file circulator.h.

References Const_circulator_from_container< Ctnr >::ctnr.

1044 { return ctnr; }
const_iterator current_iterator ( ) const
inline

Definition at line 1042 of file circulator.h.

References Const_circulator_from_container< Ctnr >::i.

1042 { return i;}
Self min_circulator ( ) const
inline

Definition at line 1043 of file circulator.h.

References Const_circulator_from_container< Ctnr >::ctnr.

1043 { return Self(ctnr); }
Const_circulator_from_container< Ctnr > Self
Definition: circulator.h:924
bool operator!= ( CGAL_NULL_TYPE  p) const
inline

Definition at line 967 of file circulator.h.

967 { return !(*this == p); }
bool operator!= ( const Self c) const
inline

Definition at line 969 of file circulator.h.

969 { return !(*this == c); }
reference operator* ( ) const
inline

Definition at line 970 of file circulator.h.

References CGAL_assertion, Const_circulator_from_container< Ctnr >::ctnr, and Const_circulator_from_container< Ctnr >::i.

970  {
971  CGAL_assertion( ctnr != NULL);
972  CGAL_assertion( i != ctnr->end());
973  return *i;
974  }
#define CGAL_assertion(EX)
Definition: assertions.h:87
Self operator+ ( difference_type  n) const
inline

Definition at line 1023 of file circulator.h.

References n.

1023  {
1024  Self tmp = *this;
1025  return tmp += n;
1026  }
Const_circulator_from_container< Ctnr > Self
Definition: circulator.h:924
const NT & n
Self& operator++ ( )
inline

Definition at line 980 of file circulator.h.

References CGAL_assertion, Const_circulator_from_container< Ctnr >::ctnr, and Const_circulator_from_container< Ctnr >::i.

980  {
981  CGAL_assertion( ctnr != NULL);
982  CGAL_assertion( i != ctnr->end());
983  ++i;
984  if ( i == ctnr->end())
985  i = ctnr->begin();
986  return *this;
987  }
#define CGAL_assertion(EX)
Definition: assertions.h:87
Self operator++ ( int  )
inline

Definition at line 988 of file circulator.h.

988  {
989  Self tmp= *this;
990  ++*this;
991  return tmp;
992  }
Const_circulator_from_container< Ctnr > Self
Definition: circulator.h:924
Const_circulator_from_container< Ctnr > & operator+= ( typename Ctnr::difference_type  n)

Definition at line 1061 of file circulator.h.

References CGAL_assertion, j, and non_negative_mod().

Referenced by Const_circulator_from_container< Ctnr >::operator-=().

1061  {
1062  CGAL_assertion( ctnr != NULL);
1063  CGAL_assertion( i != ctnr->end());
1064  typename Ctnr::difference_type j = i - ctnr->begin();
1065  typename Ctnr::difference_type size = ctnr->size();
1066  CGAL_assertion( j >= 0);
1067  CGAL_assertion( size >= 0);
1068  j = non_negative_mod( j + n, size);
1069  CGAL_assertion( j >= 0);
1070  CGAL_assertion( j < size);
1071  i = ctnr->begin() + j;
1072  return *this;
1073 }
#define CGAL_assertion(EX)
Definition: assertions.h:87
const NT & n
I non_negative_mod(I n, U m)
Definition: circulator.h:523
j indices j
Definition: Indexing.h:6

Here is the call graph for this function:

Here is the caller graph for this function:

Self operator- ( difference_type  n) const
inline

Definition at line 1028 of file circulator.h.

References n.

1028  {
1029  Self tmp = *this;
1030  return tmp += -n;
1031  }
Const_circulator_from_container< Ctnr > Self
Definition: circulator.h:924
const NT & n
difference_type operator- ( const Self c) const
inline

Definition at line 1032 of file circulator.h.

References CGAL_assertion, Const_circulator_from_container< Ctnr >::ctnr, and Const_circulator_from_container< Ctnr >::i.

1032  {
1033  CGAL_assertion( ctnr != NULL);
1034  CGAL_assertion( c.ctnr != NULL);
1035  return i - c.i;
1036  }
#define CGAL_assertion(EX)
Definition: assertions.h:87
Self& operator-- ( )
inline

Definition at line 993 of file circulator.h.

References CGAL_assertion, Const_circulator_from_container< Ctnr >::ctnr, and Const_circulator_from_container< Ctnr >::i.

993  {
994  CGAL_assertion( ctnr != NULL);
995  CGAL_assertion( i != ctnr->end());
996  if ( i == ctnr->begin())
997  i = ctnr->end();
998  --i;
999  return *this;
1000  }
#define CGAL_assertion(EX)
Definition: assertions.h:87
Self operator-- ( int  )
inline

Definition at line 1001 of file circulator.h.

1001  {
1002  Self tmp = *this;
1003  --*this;
1004  return tmp;
1005  }
Const_circulator_from_container< Ctnr > Self
Definition: circulator.h:924
Self& operator-= ( difference_type  n)
inline

Definition at line 1027 of file circulator.h.

References Const_circulator_from_container< Ctnr >::operator+=().

1027 { return operator+=( -n); }
const NT & n
Self & operator+=(difference_type n)
Definition: circulator.h:1061

Here is the call graph for this function:

pointer operator-> ( ) const
inline

Definition at line 975 of file circulator.h.

References CGAL_assertion, and Const_circulator_from_container< Ctnr >::ctnr.

975  {
976  CGAL_assertion( ctnr != NULL);
977  CGAL_assertion( i != ctnr->end());
978  return i.operator->();
979  }
#define CGAL_assertion(EX)
Definition: assertions.h:87
Self& operator= ( const Self c)
inline

Definition at line 955 of file circulator.h.

References Const_circulator_from_container< Ctnr >::ctnr, and Const_circulator_from_container< Ctnr >::i.

955  {
956  ctnr = c.ctnr;
957  i = c.i;
958  return *this;
959  }
bool operator== ( CGAL_NULL_TYPE  p) const
inline

Definition at line 963 of file circulator.h.

References CGAL_assertion, CGAL_CIRC_NULL, and Const_circulator_from_container< Ctnr >::ctnr.

963  {
965  return (ctnr == NULL) || (ctnr->begin() == ctnr->end());
966  }
#define CGAL_assertion(EX)
Definition: assertions.h:87
#define CGAL_CIRC_NULL
Definition: circulator.h:81
bool operator== ( const Self c) const
inline

Definition at line 968 of file circulator.h.

References Const_circulator_from_container< Ctnr >::i.

968 { return i == c.i; }
reference operator[] ( difference_type  n) const
inline

Definition at line 1037 of file circulator.h.

References n.

1037  {
1038  Self tmp = *this;
1039  tmp += n;
1040  return *tmp;
1041  }
Const_circulator_from_container< Ctnr > Self
Definition: circulator.h:924
const NT & n

Member Data Documentation


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