Class xlifepp::Messages#

class Messages#

Collaboration diagram for xlifepp::Messages:

digraph { graph [bgcolor="#00000000"] node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2] edge [color="#1414CE"] "7" [label="std::basic_ios< char >" tooltip="std::basic_ios< char >"] "5" [label="std::basic_ofstream< char >" tooltip="std::basic_ofstream< char >"] "6" [label="std::basic_ostream< char >" tooltip="std::basic_ostream< char >"] "2" [label="std::map< string_t, xlifepp::MsgFormat * >" tooltip="std::map< string_t, xlifepp::MsgFormat * >"] "9" [label="std::basic_ios< Char >" tooltip="std::basic_ios< Char >"] "11" [label="std::basic_ios< Char >" tooltip="std::basic_ios< Char >"] "12" [label="std::basic_ofstream< Char >" tooltip="std::basic_ofstream< Char >"] "10" [label="std::basic_ostream< Char >" tooltip="std::basic_ostream< Char >"] "13" [label="std::basic_ostream< Char >" tooltip="std::basic_ostream< Char >"] "8" [label="std::ios_base" tooltip="std::ios_base"] "3" [label="std::map< K, T >" tooltip="std::map< K, T >"] "4" [label="std::ofstream" tooltip="std::ofstream"] "1" [label="xlifepp::Messages" tooltip="xlifepp::Messages" fillcolor="#BFBFBF"] "7" -> "8" [dir=forward tooltip="public-inheritance"] "7" -> "9" [dir=forward tooltip="template-instance"] "5" -> "6" [dir=forward tooltip="public-inheritance"] "5" -> "12" [dir=forward tooltip="template-instance"] "6" -> "7" [dir=forward tooltip="public-inheritance"] "6" -> "10" [dir=forward tooltip="template-instance"] "2" -> "3" [dir=forward tooltip="template-instance"] "9" -> "8" [dir=forward tooltip="public-inheritance"] "11" -> "8" [dir=forward tooltip="public-inheritance"] "12" -> "13" [dir=forward tooltip="public-inheritance"] "10" -> "11" [dir=forward tooltip="public-inheritance"] "13" -> "11" [dir=forward tooltip="public-inheritance"] "4" -> "5" [dir=forward tooltip="public-inheritance"] "1" -> "2" [dir=forward tooltip="usage"] "1" -> "4" [dir=forward tooltip="usage"] }

store the list of message formats by type as a std::map is indexed by the message format

Public Functions

Messages()#

Default constructor.

default constructor

Messages(const string_t &file, std::ofstream &out, const string_t &msgFile, const string_t &msgType = string_t("XLiFE++"))#

Constructor from file.

~Messages()#

Destructor.

destructor

void append(MsgFormat&)#

append a new message format in list

void appendFromFile(const string_t&)#

append a new message format in list

append new message formats in list from file

MsgFormat *find(const string_t&)#

find an error format by its stringId (log complexity)

find format by stringId (log complexity)

void loadFormat(const string_t&)#

load format from a file

reads message formats from file format: # int_id string_id string x string x y … create an MsgFormat object for each item read

inline string_t msgFile() const#

returns message file

inline std::ofstream *msgStream() const#

returns message stream

inline string_t msgType() const#

returns type of message

inline number_t numberOfMessages() const#

returns number of messages

void printList(std::ofstream&)#

print the list of all messages

print on the ofstream out the list of all formats of message

Public Members

bool traceWhere#

internal flag for printing trace