NetMauMau 0.24.4
Client API
NetMauMau::Common::ICard Interface Referenceabstract

Describes a playing card. More...

#include <icard.h>

Detailed Description

Describes a playing card.

Utilities describes various functions to handle with ICard instances.

Public Types

enum  RANK {
  SEVEN = 7 , EIGHT = 8 , NINE = 9 , TEN = 10 ,
  JACK , QUEEN , KING , ACE ,
  RANK_ILLEGAL
}
 The rank of the card. More...
 
enum  SUIT {
  DIAMONDS , HEARTS , SPADES , CLUBS ,
  SUIT_ILLEGAL
}
 The suit of the card. More...
 

Public Member Functions

virtual const std::string & description (bool ansi=false) const =0
 Returns the textual description of the card.
 
virtual std::size_t getPoints () const =0
 Gets the points of the card.
 
virtual RANK getRank () const =0
 Gets the rank of the card.
 
virtual SUIT getSuit () const =0
 Gets the suit of the card.
 

Related Symbols

(Note that these are not member symbols.)

Global compare and relational operators
bool operator== (const NetMauMau::Common::ICard &card, NetMauMau::Common::ICard::RANK rank)
 Compares a card against a rank.
 
bool operator!= (const NetMauMau::Common::ICard &card, NetMauMau::Common::ICard::RANK rank)
 Compares a card against a rank.
 
bool operator== (const NetMauMau::Common::ICard &card, NetMauMau::Common::ICard::SUIT suit)
 Compares a card against a suit.
 
bool operator!= (const NetMauMau::Common::ICard &card, NetMauMau::Common::ICard::SUIT suit)
 Compares a card against a suit.
 
bool operator== (const NetMauMau::Common::ICard &lhs, const NetMauMau::Common::ICard &rhs)
 Compares cards.
 
bool operator!= (const NetMauMau::Common::ICard &lhs, const NetMauMau::Common::ICard &rhs)
 Compares cards.
 
bool operator< (const NetMauMau::Common::ICard &lhs, const NetMauMau::Common::ICard &rhs)
 Compares cards.
 
bool operator> (const NetMauMau::Common::ICard &lhs, const NetMauMau::Common::ICard &rhs)
 Compares cards.
 
bool operator== (const NetMauMau::Common::ICard *card, NetMauMau::Common::ICard::RANK rank)
 Compares a card against a rank.
 
bool operator!= (const NetMauMau::Common::ICard *card, NetMauMau::Common::ICard::RANK rank)
 Compares a card against a rank.
 
bool operator== (const NetMauMau::Common::ICard *card, NetMauMau::Common::ICard::SUIT suit)
 Compares a card against a suit.
 
bool operator!= (const NetMauMau::Common::ICard *card, NetMauMau::Common::ICard::SUIT suit)
 Compares a card against a suit.
 

Member Enumeration Documentation

◆ RANK

The rank of the card.

Enumerator
SEVEN 

7

EIGHT 

8

NINE 

9

TEN 

10

JACK 

Jack.

QUEEN 

Queen.

KING 

King.

ACE 

Ace.

RANK_ILLEGAL 

used to send a surely not accepted card

◆ SUIT

The suit of the card.

Enumerator
DIAMONDS 

HEARTS 

SPADES 

CLUBS 

SUIT_ILLEGAL 

used to send a surely not accepted card

Member Function Documentation

◆ description()

virtual const std::string & NetMauMau::Common::ICard::description ( bool ansi = false) const
pure virtual

Returns the textual description of the card.

See also
NetMauMau::Common::parseCardDesc
Parameters
ansitrue if ANSI color code should be used, false otherwise
Returns
the textual description of the card

◆ getPoints()

virtual std::size_t NetMauMau::Common::ICard::getPoints ( ) const
pure virtual

Gets the points of the card.

See also
Common::getCardPoints
Returns
the points of the card

◆ getRank()

virtual RANK NetMauMau::Common::ICard::getRank ( ) const
pure virtual

Gets the rank of the card.

Returns
the rank of the card

Referenced by operator!=(), operator<(), operator==(), operator==(), and operator>().

◆ getSuit()

virtual SUIT NetMauMau::Common::ICard::getSuit ( ) const
pure virtual

Gets the suit of the card.

Returns
the suit of the card

Referenced by operator!=(), operator<(), operator==(), operator==(), and operator>().


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