Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

dmn::Dominoes Class Reference

Dominoes list. More...

#include <dominoes.h>

List of all members.

Public Member Functions

unsigned long size () const
 Number of dominoes in the list.

bool search (const Domino &domino) const
 Search a domino in the list.

bool insert (const Domino &domino)
 Insert a domino in the list.

bool insert_in_order (const Domino &domino, const HalfDomino &half)
 Insert a domino in the list.

bool erase (const Domino &domino)
 Remove a domino from the list.

bool is_ordered ()
 Check if the dominoes are ordered.

Domino operator[] (unsigned long position)
 Access to a random position.


Friends

bool operator== (const Dominoes &dominoes1, const Dominoes &dominoes2)
 Comparision between 2 dominoes list.

bool operator!= (const Dominoes &dominoes1, const Dominoes &dominoes2)
 Comparision between 2 dominoes list.


Detailed Description

Dominoes list.


Member Function Documentation

bool dmn::Dominoes::erase const Domino domino  ) 
 

Remove a domino from the list.

Returns:
true if the domino was in the list, or false if not

bool dmn::Dominoes::insert const Domino domino  ) 
 

Insert a domino in the list.

Inserts the domino without order

Returns:
true if the domino can be inserted (no duplicates), or false if not

bool dmn::Dominoes::insert_in_order const Domino domino,
const HalfDomino half
 

Insert a domino in the list.

Inserts the domino at the beginning or at the end of the list, depends of the half

Returns:
true if the domino can be inserted ordered, or false if not

bool dmn::Dominoes::is_ordered  ) 
 

Check if the dominoes are ordered.

Returns:
true if the dominoes are ordered, or false if not

Domino dmn::Dominoes::operator[] unsigned long  position  ) 
 

Access to a random position.

Be sure that position < size()

Parameters:
position domino position in the list
Returns:
the domino in the position passed

bool dmn::Dominoes::search const Domino domino  )  const
 

Search a domino in the list.

Returns:
true if the domino is in the list, false if not

unsigned long dmn::Dominoes::size  )  const
 

Number of dominoes in the list.

Returns:
the number of dominoes


Friends And Related Function Documentation

bool operator!= const Dominoes dominoes1,
const Dominoes dominoes2
[friend]
 

Comparision between 2 dominoes list.

Parameters:
dominoes1 first list
dominoes2 second list
Returns:
true if the dominoes are different, false if not

bool operator== const Dominoes dominoes1,
const Dominoes dominoes2
[friend]
 

Comparision between 2 dominoes list.

Parameters:
dominoes1 first list
dominoes2 second list
Returns:
true if the dominoes are equals, false if not


The documentation for this class was generated from the following file:
Generated on Fri Dec 26 22:55:10 2003 for dmn by doxygen 1.3.4