FONTAINE
1.0
Main Page
Namespaces
Classes
Files
File List
File Members
src
Message.h
Go to the documentation of this file.
1
//
2
// The Fontaine Font Analysis Project
3
//
4
// Copyright (c) 2009 by Edward H. Trager
5
// All Rights Reserved
6
//
7
// Released under the GNU GPL version 2.0 or later.
8
//
9
11
//
12
// A version of this file was originally written as part of
13
// the MADELINE 2 program
14
// written by Edward H. Trager and Ritu Khanna
15
// Copyright (c) 2005 by the Regents of the University of Michigan.
16
// and released under the GNU GPL v. 2.0 or later.
17
//
19
//
20
// 2005.03.14.ET -- Originally written as Warning class
21
// 2006.12.18.ET -- Reimplemented as Message base class
22
23
//
24
// Message.h
25
//
26
27
28
#ifndef MESSAGE_INCLUDED
29
#define MESSAGE_INCLUDED
30
31
#include <iostream>
32
#include <libintl.h>
33
#include <locale.h>
34
#include <stdarg.h>
35
#include "
BufferSizes.h
"
36
#include <string>
37
#include <stdio.h>
38
39
// Loader class:
40
class
MessageInitializer
;
41
42
class
Message
{
43
44
friend
class
MessageInitializer
;
45
46
private
:
47
48
static
const
char
*
_defaultSalutation
;
49
50
// initialize:
51
static
void
_initialize
(
void
);
52
53
protected
:
54
55
const
char
*
_salutation
;
56
const
char
*
_methodName
;
57
char
_message
[
GENERAL_STRING_BUFFER_SIZE
];
58
bool
_truncated
;
59
60
public
:
61
62
// Constructors:
63
Message
(){};
64
Message
(
const
char
*
const
methodName,
const
char
*format,...);
65
66
// print:
67
void
print
(
void
);
68
69
// get:
70
std::string
get
(void)
const
;
71
};
72
73
//
74
// MessageInitializer loader class:
75
//
76
class
MessageInitializer
{
77
78
static
MessageInitializer
messageInitializer
;
79
MessageInitializer
(){
80
Message::_initialize
();
81
}
82
83
};
84
85
//
86
// Independent utility method for localization:
87
//
88
std::string
L
(
const
char
*format,...);
89
90
#endif
91
Generated by
1.8.3.1