basix_doc 0.1
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

Friends


Detailed Description

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

Examples:

list_test.cpp.

Definition at line 61 of file list.hpp.


Member Typedef Documentation

typedef empty_format FT [inherited]

Definition at line 170 of file type_props.hpp.


Constructor & Destructor Documentation

list ( ) [inline]

Definition at line 67 of file list.hpp.

                :
    Format (no_format ()), rep (NULL) {}
list ( const format< C > &  fm) [inline]

Definition at line 69 of file list.hpp.

                                :
    Format (fm), rep (NULL) {}
list ( const C c1) [inline]

Definition at line 71 of file list.hpp.

                           :
    Format (get_format (c1)), rep (new List_rep (c1, List ())) {}
list ( const C c1,
const C c2 
) [inline]

Definition at line 73 of file list.hpp.

                                        :
    Format (get_format (c1)), rep (new List_rep (c1, List (c2))) {}
list ( const C c1,
const C c2,
const C c3 
) [inline]

Definition at line 75 of file list.hpp.

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

Definition at line 77 of file list.hpp.

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

Definition at line 79 of file list.hpp.

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

Definition at line 82 of file list.hpp.

                              :
    Format (CF(it)) {
    if (busy (it)) { C c= *it; ++it; rep= new List_rep (c, it); }
    else rep= NULL; }

Member Function Documentation

empty_format format1 ( ) const [inline, inherited]

Definition at line 163 of file type_props.hpp.

Referenced by mmx::get_format1().

{ return empty_format (); }
empty_format format2 ( ) const [inline, inherited]

Definition at line 164 of file type_props.hpp.

Referenced by mmx::get_format2().

{ return empty_format (); }
empty_format format3 ( ) const [inline, inherited]

Definition at line 165 of file type_props.hpp.

{ return empty_format (); }
C& operator[] ( nat  i) [inline]

Definition at line 89 of file list.hpp.

                         {
    ASSERT (rep != NULL, "non-empty list expected");
    secure ();
    return i==0? rep->item: rep->next[i-1]; }
const C& operator[] ( nat  i) const [inline]

Definition at line 86 of file list.hpp.

                                     {
    ASSERT (rep != NULL, "non-empty list expected");
    return i==0? rep->item: read_only (rep->next) [i-1]; }
empty_format rfm ( ) const [inline, inherited]

Definition at line 162 of file type_props.hpp.

{ return *this; }
C sample ( ) const [inline, inherited]

Definition at line 176 of file type_props.hpp.

Referenced by mmx::get_sample().

{ return C(); }
format<C> tfm ( ) const [inline, inherited]

Definition at line 175 of file type_props.hpp.

{ return *this; }

Friends And Related Function Documentation

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

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