chain< C > Class Template Reference

#include <chain.hpp>

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

List of all members.

Public Types

Public Member Functions

Protected Attributes

Friends


Detailed Description

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

Definition at line 58 of file chain.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 59 of file chain.hpp.


Constructor & Destructor Documentation

chain ( chain_rep< C > *  rep2  )  [inline]

Definition at line 95 of file chain.hpp.

00095                                         :
00096   Format (no_format ()), rep(rep2) {}
TMPL inline Chain::chain (const Chain_rep* rep2, bool with_inc):

chain ( const chain_rep< C > *  rep2,
bool  with_inc 
) [inline]

Definition at line 97 of file chain.hpp.

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

00097                                                              :
00098   Format (no_format ()), rep((Chain_rep*) (void*) rep2) {
00099   (void) with_inc; INC_NULL_COUNT (rep); }
TMPL inline Chain::chain (const Chain& x):

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

Definition at line 100 of file chain.hpp.

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

00100                                        :
00101   Format (CF(x)), rep(x.rep) {
00102   INC_NULL_COUNT (rep); }
TMPL inline Chain::~chain () {

~chain (  )  [inline]

Definition at line 103 of file chain.hpp.

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

00103                            {
00104   DEC_NULL_COUNT (rep); }

chain (  )  [inline]

Definition at line 61 of file chain.hpp.

00061                  :
00062     Format (no_format ()),
00063     rep (NULL) {}
  inline chain (const C& c1):

chain ( const C c1  )  [inline]

Definition at line 64 of file chain.hpp.

00064                             :
00065     Format (get_format (c1)),
00066     rep (new Chain_rep (Chain (), c1, Chain ())) {}
  inline chain (const C& c1, const C& c2):

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

Definition at line 67 of file chain.hpp.

00067                                          :
00068     Format (get_format (c1)),
00069     rep (new Chain_rep (Chain (c1), c2, Chain ())) {}
  inline chain (const C& c1, const C& c2, const C& c3):

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

Definition at line 70 of file chain.hpp.

00070                                                       :
00071     Format (get_format (c1)),
00072     rep (new Chain_rep (Chain (c1), c2, Chain (c3))) {}
  inline chain (const Chain& l, const C& m, const Chain& r):

chain ( const chain< C > &  l,
const C m,
const chain< C > &  r 
) [inline]

Definition at line 73 of file chain.hpp.

00073                                                            :
00074     Format (get_format (m)),
00075     rep (new Chain_rep (l, m, r)) {}
  chain (const iterator<C>& it):

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

Definition at line 76 of file chain.hpp.

References mmx::busy(), Chain, and chain< C >::rep.

00076                                :
00077     Format (CF(it)) {
00078     rep= NULL;
00079     for (; busy (it); ++it) *this= (*this) * Chain (*it); }
  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 (); }

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

Definition at line 107 of file chain.hpp.

References chain< C >::rep.

00107                                            {
00108   return rep; }

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

Definition at line 105 of file chain.hpp.

References chain< C >::rep.

00105                                                        {
00106   return rep; }

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

Definition at line 109 of file chain.hpp.

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

00109                                                     {
00110   INC_NULL_COUNT (x.rep); DEC_NULL_COUNT (rep);
00111   rep=x.rep; return *this; }

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

Definition at line 80 of file chain.hpp.

References ASSERT, chain< C >::N, and chain< C >::rep.

00080                               {
00081     ASSERT (rep != NULL, "non-empty chain expected");
00082     if (i < N (rep->l)) return rep->l[i];
00083     if (i > N (rep->l)) return rep->r[i-N(rep->l)];
00084     return rep->m; }

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 112 of file chain.hpp.

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

00112                                 {
00113   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

bool is_nil ( const chain< C > &  c  )  [friend]
chain<C> left ( const chain< C > &  c  )  [friend]
C middle ( const chain< C > &  c  )  [friend]
nat N ( const chain< C > &  c  )  [friend]

Referenced by chain< C >::operator[]().

chain<C> right ( const chain< C > &  c  )  [friend]

Member Data Documentation

chain_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