26 #ifdef __CCORE_INTERNAL__ 27 # include "hurricane/CConfig.h" 29 #include "crlcore/Utilities.h" 38 using std::ostringstream;
52 BigChar (
char c,
int height,
const char* lines[],
const BannerFont* font );
55 inline int getHeight ()
const;
56 inline const BannerFont* getFont ()
const;
57 string _getPrint ()
const;
58 const char* operator[] (
int line )
const;
65 const BannerFont* _font;
68 BigChar& operator= (
const BigChar& );
69 BigChar (
const BigChar& );
73 static const BannerFont* getBannerFont (
const string& name );
75 inline BannerFont (
const string& name );
77 inline void addChar (
char character,
int height,
const char *lines[] );
78 inline int getHeight ()
const;
79 inline const BigChar& operator[] (
char character )
const;
83 class FontMap :
public map<const string,const BannerFont*> {
87 const BannerFont* operator[] (
const string& name )
const;
91 typedef map<char,BigChar*> CharMap;
94 static FontMap _fontMap;
101 BannerFont (
const BannerFont& );
103 inline BannerFont& operator= (
const BannerFont& );
122 ,
string contributors=
"" );
125 inline const BannerFont* getFont ()
const;
126 inline const string&
getName ()
const;
129 inline const string&
getDate ()
const;
134 void setFont ( BannerFont* font );
143 virtual const string _getPrint ()
const {
return ( _banner.str() ); };
152 string _contributors;
153 unsigned int _screenWidth;
154 size_t _cartoucheWidth;
155 const BannerFont* _font;
157 ostringstream _banner;
168 inline int BannerFont::BigChar::getHeight ()
const {
return _height; }
169 inline const BannerFont* BannerFont::BigChar::getFont ()
const {
return _font; }
170 inline BannerFont::BannerFont (
const string& name ): _table(), _name(name) {}
171 inline int BannerFont::getHeight ()
const {
return _height; }
172 inline const BannerFont* Banner::getFont ()
const {
return _font; }
187 inline std::string getPrint (
const CRL::BannerFont::BigChar& c ) {
return c._getPrint(); }
188 inline std::string getPrint (
const CRL::Banner& b ) {
return b._getPrint(); }
189 inline std::ostream& operator<< ( std::ostream& o,
const CRL::BannerFont::BigChar& c ) {
return o << getPrint(c); }
190 inline std::ostream& operator<< ( std::ostream& o,
const CRL::Banner& b ) {
return o << getPrint(b); }
195 #endif // CRL_BANNER_H unsigned int getScreenWidth() const
Definition: Banner.h:179
void setScreenWidth(unsigned screenWidth)
const string & getDate() const
Definition: Banner.h:176
void setVersion(string version)
void setAuthors(string authors)
void setDate(string date)
const string & getPurpose() const
Definition: Banner.h:175
Banner(string name="", string version="", string purpose="", string date="", string authors="", string contributors="")
void setContributors(string contributors)
void setName(string name)
const string & getVersion() const
Definition: Banner.h:174
const string & getContributors() const
Definition: Banner.h:178
const string & getAuthors() const
Definition: Banner.h:177
Print Formatted Banners (on ttys).
Definition: Banner.h:114
const string & getName() const
Definition: Banner.h:173
The namespace of Coriolis Core.
Definition: Environment.h:24
void setPurpose(string purpose)