list< C > Class Template Reference

#include <list.hpp>

Inheritance diagram for list< C >:
format< C > empty_format

List of all members.

Public Types

Public Member Functions

Protected Attributes

Friends


Detailed Description

template<typename C>
class mmx::list< C >

Definition at line 61 of file list.hpp.


Member Typedef Documentation

typedef empty_format FT [inherited]

Definition at line 196 of file type_props.hpp.

typedef C value_type

Definition at line 62 of file list.hpp.


Constructor & Destructor Documentation

list ( list_rep< C > *  rep2  )  [inline]

Definition at line 104 of file list.hpp.

00104                                      :
00105   Format (no_format ()), rep(rep2) {}
TMPL inline List::list (const List_rep* rep2, bool with_inc):

list ( const list_rep< C > *  rep2,
bool  with_inc 
) [inline]

Definition at line 106 of file list.hpp.

References INC_NULL_COUNT, and list< C >::rep.

00106                                                           :
00107   Format (no_format ()), rep((List_rep*) (void*) rep2) {
00108   (void) with_inc; INC_NULL_COUNT (rep); }
TMPL inline List::list (const List& x):

list ( const list< C > &  x  )  [inline]

Definition at line 109 of file list.hpp.

References INC_NULL_COUNT, and list< C >::rep.

00109                                     :
00110   Format (CF(x)), rep(x.rep) {
00111   INC_NULL_COUNT (rep); }
TMPL inline List::~list () {

~list (  )  [inline]

Definition at line 112 of file list.hpp.

References DEC_NULL_COUNT, and list< C >::rep.

00112                          {
00113   DEC_NULL_COUNT (rep); }

list (  )  [inline]

Definition at line 67 of file list.hpp.

00067                 :
00068     Format (no_format ()), rep (NULL) {}
  inline list (const Format& fm):

list ( const format< C > &  fm  )  [inline]

Definition at line 69 of file list.hpp.

00069                                 :
00070     Format (fm), rep (NULL) {}
  inline list (const C& c1):

list ( const C c1  )  [inline]

Definition at line 71 of file list.hpp.

00071                            :
00072     Format (get_format (c1)), rep (new List_rep (c1, List ())) {}
  inline list (const C& c1, const C& c2):

list ( const C c1,
const C c2 
) [inline]

Definition at line 73 of file list.hpp.

00073                                         :
00074     Format (get_format (c1)), rep (new List_rep (c1, List (c2))) {}
  inline list (const C& c1, const C& c2, const C& c3):

list ( const C c1,
const C c2,
const C c3 
) [inline]

Definition at line 75 of file list.hpp.

00075                                                      :
00076     Format (get_format (c1)), rep (new List_rep (c1, List (c2, c3))) {}
  inline list (const C& c1, const C& c2, const C& c3, const C& c4):

list ( const C c1,
const C c2,
const C c3,
const C c4 
) [inline]

Definition at line 77 of file list.hpp.

00077                                                                   :
00078     Format (get_format (c1)), rep (new List_rep (c1, List (c2, c3, c4))) {}
  list (const vector<C>& v):

list ( const vector< C > &  v  )  [inline]

Definition at line 79 of file list.hpp.

00079                            :
00080     Format (CF(v)), rep (NULL) {
00081     for (nat i=N(v)-1; i!=((nat) -1); i--) rep= new List_rep (v[i], *this); }
  list (const iterator<C>& it):

list ( const iterator< C > &  it  )  [inline]

Definition at line 82 of file list.hpp.

00082                               :
00083     Format (CF(it)) {
00084     if (busy (it)) { C c= *it; ++it; rep= new List_rep (c, it); }
00085     else rep= NULL; }
  const C& operator [] (nat i) const {


Member Function Documentation

empty_format format1 (  )  const [inline, inherited]

Definition at line 189 of file type_props.hpp.

Referenced by mmx::get_format1().

00189 { return empty_format (); }

empty_format format2 (  )  const [inline, inherited]

Definition at line 190 of file type_props.hpp.

Referenced by mmx::get_format2().

00190 { return empty_format (); }

empty_format format3 (  )  const [inline, inherited]

Definition at line 191 of file type_props.hpp.

00191 { return empty_format (); }

void operator delete ( void *  ptr,
size_t  sz 
) [inline]

Definition at line 62 of file list.hpp.

00063 :
  inline list (const C& item, const List& next):

void operator delete[] ( void *  ptr,
size_t  sz 
) [inline]

Definition at line 62 of file list.hpp.

00063 :
  inline list (const C& item, const List& next):

void* operator new ( size_t  sz,
void *  where 
) [inline]

Definition at line 62 of file list.hpp.

00063 :
  inline list (const C& item, const List& next):

void* operator new ( size_t  sz  )  [inline]

Definition at line 62 of file list.hpp.

00063 :
  inline list (const C& item, const List& next):

void* operator new[] ( size_t  sz,
void *  where 
) [inline]

Definition at line 62 of file list.hpp.

00063 :
  inline list (const C& item, const List& next):

void* operator new[] ( size_t  sz  )  [inline]

Definition at line 62 of file list.hpp.

00063 :
  inline list (const C& item, const List& next):

list_rep< C > * operator-> (  )  [inline]

Definition at line 116 of file list.hpp.

References list< C >::rep.

00116                                          {
00117   return rep; }

const list_rep< C > * operator-> (  )  const [inline]

Definition at line 114 of file list.hpp.

References list< C >::rep.

00114                                                      {
00115   return rep; }

list< C > & operator= ( const list< C > &  x  )  [inline]

Definition at line 118 of file list.hpp.

References DEC_NULL_COUNT, INC_NULL_COUNT, and list< C >::rep.

00118                                                  {
00119   INC_NULL_COUNT (x.rep); DEC_NULL_COUNT (rep);
00120   rep=x.rep; return *this; }

C& operator[] ( nat  i  )  [inline]

Definition at line 89 of file list.hpp.

00089                          {
00090     ASSERT (rep != NULL, "non-empty list expected");
00091     secure ();
00092     return i==0? rep->item: rep->next[i-1]; }

const C& operator[] ( nat  i  )  const [inline]

Definition at line 86 of file list.hpp.

00086                                      {
00087     ASSERT (rep != NULL, "non-empty list expected");
00088     return i==0? rep->item: read_only (rep->next) [i-1]; }

empty_format rfm (  )  const [inline, inherited]

Definition at line 188 of file type_props.hpp.

00188 { return *this; }

C sample (  )  const [inline, inherited]

Definition at line 202 of file type_props.hpp.

Referenced by mmx::get_sample().

00202 { return C(); }

void secure (  )  [inline]

Definition at line 121 of file list.hpp.

References mmx::copy(), and list< C >::rep.

Referenced by list< cleaner >::operator[]().

00121                                {
00122   if (rep->ref_count>1) *this= copy (*this); }

format<C> tfm (  )  const [inline, inherited]

Definition at line 201 of file type_props.hpp.

00201 { return *this; }


Friends And Related Function Documentation

C& car ( list< C > &  l  )  [friend]
const C& car ( const list< C > &  l  )  [friend]
list<C>& cdr ( list< C > &  l  )  [friend]
const list<C>& cdr ( const list< C > &  l  )  [friend]
list<C> cons ( const C c,
const list< C > &  l 
) [friend]
bool is_nil ( const list< C > &  l  )  [friend]

Member Data Documentation

list_rep< C >* rep [protected]

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

Generated on 6 Dec 2012 for basix by  doxygen 1.6.1