Cbc  2.9.9
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | List of all members
CoinMessages Class Reference

Class to hold and manipulate an array of massaged messages. More...

#include <CoinMessageHandler.hpp>

+ Inheritance diagram for CoinMessages:
+ Collaboration diagram for CoinMessages:

Public Types

enum  Language { us_en = 0, uk_en, it }
 Supported languages. More...
 

Public Member Functions

Constructors etc
 CoinMessages (int numberMessages=0)
 Constructor with number of messages. More...
 
 ~CoinMessages ()
 Destructor. More...
 
 CoinMessages (const CoinMessages &)
 The copy constructor. More...
 
CoinMessagesoperator= (const CoinMessages &)
 assignment operator. More...
 
Useful stuff
void addMessage (int messageNumber, const CoinOneMessage &message)
 Installs a new message in the specified index position. More...
 
void replaceMessage (int messageNumber, const char *message)
 Replaces the text of the specified message. More...
 
Language language () const
 Language. More...
 
void setLanguage (Language newlanguage)
 Set language. More...
 
void setDetailMessage (int newLevel, int messageNumber)
 Change detail level for one message. More...
 
void setDetailMessages (int newLevel, int numberMessages, int *messageNumbers)
 Change detail level for several messages. More...
 
void setDetailMessages (int newLevel, int low, int high)
 Change detail level for all messages with low <= ID number < high. More...
 
int getClass () const
 Returns class. More...
 
void toCompact ()
 Moves to compact format. More...
 
void fromCompact ()
 Moves from compact format. More...
 

Public Attributes

member data
int numberMessages_
 Number of messages. More...
 
Language language_
 Language. More...
 
char source_ [5]
 Source (null-terminated string, maximum 4 characters). More...
 
int class_
 Class - see later on before CoinMessageHandler. More...
 
int lengthMessages_
 Length of fake CoinOneMessage array. More...
 
CoinOneMessage ** message_
 Messages. More...
 

Detailed Description

Class to hold and manipulate an array of massaged messages.

Note that the message index used to reference a message in the array of messages is completely distinct from the external ID number stored with the message.

Definition at line 128 of file CoinMessageHandler.hpp.

Member Enumeration Documentation

Supported languages.

These are the languages that are supported. At present only us_en is serious and the rest are for testing.

Enumerator
us_en 
uk_en 
it 

Definition at line 136 of file CoinMessageHandler.hpp.

Constructor & Destructor Documentation

CoinMessages::CoinMessages ( int  numberMessages = 0)

Constructor with number of messages.

CoinMessages::~CoinMessages ( )

Destructor.

CoinMessages::CoinMessages ( const CoinMessages )

The copy constructor.

Member Function Documentation

CoinMessages& CoinMessages::operator= ( const CoinMessages )

assignment operator.

void CoinMessages::addMessage ( int  messageNumber,
const CoinOneMessage message 
)

Installs a new message in the specified index position.

Any existing message is replaced, and a copy of the specified message is installed.

void CoinMessages::replaceMessage ( int  messageNumber,
const char *  message 
)

Replaces the text of the specified message.

Any existing text is deleted and the specified text is copied into the specified message.

Language CoinMessages::language ( ) const
inline

Language.

Need to think about iso codes

Definition at line 169 of file CoinMessageHandler.hpp.

void CoinMessages::setLanguage ( Language  newlanguage)
inline

Set language.

Definition at line 172 of file CoinMessageHandler.hpp.

void CoinMessages::setDetailMessage ( int  newLevel,
int  messageNumber 
)

Change detail level for one message.

void CoinMessages::setDetailMessages ( int  newLevel,
int  numberMessages,
int *  messageNumbers 
)

Change detail level for several messages.

messageNumbers is expected to contain the indices of the messages to be changed. If numberMessages >= 10000 or messageNumbers is NULL, the detail level is changed on all messages.

void CoinMessages::setDetailMessages ( int  newLevel,
int  low,
int  high 
)

Change detail level for all messages with low <= ID number < high.

int CoinMessages::getClass ( ) const
inline

Returns class.

Definition at line 189 of file CoinMessageHandler.hpp.

void CoinMessages::toCompact ( )

Moves to compact format.

void CoinMessages::fromCompact ( )

Moves from compact format.

Member Data Documentation

int CoinMessages::numberMessages_

Number of messages.

Definition at line 200 of file CoinMessageHandler.hpp.

Language CoinMessages::language_

Language.

Definition at line 202 of file CoinMessageHandler.hpp.

char CoinMessages::source_[5]

Source (null-terminated string, maximum 4 characters).

Definition at line 204 of file CoinMessageHandler.hpp.

int CoinMessages::class_

Class - see later on before CoinMessageHandler.

Definition at line 206 of file CoinMessageHandler.hpp.

int CoinMessages::lengthMessages_

Length of fake CoinOneMessage array.

First you get numberMessages_ pointers which point to stuff

Definition at line 210 of file CoinMessageHandler.hpp.

CoinOneMessage** CoinMessages::message_

Messages.

Definition at line 212 of file CoinMessageHandler.hpp.


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