feisty meow concerns codebase
2.140
eol_aware.h
Go to the documentation of this file.
1
#ifndef EOL_AWARE_CLASS
2
#define EOL_AWARE_CLASS
3
4
/*****************************************************************************\
5
* *
6
* Name : eol_aware
7
* Author : Chris Koeritz
8
* *
9
*******************************************************************************
10
* Copyright (c) 1996-$now By Author. This program is free software; you can *
11
* redistribute it and/or modify it under the terms of the GNU General Public *
12
* License as published by the Free Software Foundation; either version 2 of *
13
* the License or (at your option) any later version. This is online at: *
14
* http://www.fsf.org/copyleft/gpl.html *
15
* Please send any updates to: fred@gruntose.com *
16
\*****************************************************************************/
17
18
#include <
basis/definitions.h
>
19
#include <
textual/parser_bits.h
>
20
21
namespace
loggers
{
22
24
31
class
eol_aware
:
public
virtual
basis::root_object
32
{
33
public
:
34
virtual
textual::parser_bits::line_ending
eol
() {
return
c_ending; }
36
37
virtual
void
eol
(
textual::parser_bits::line_ending
to_set) { c_ending = to_set; }
39
40
virtual
basis::astring
get_ending
() {
return
textual::parser_bits::eol_to_chars
(c_ending); }
42
43
virtual
void
get_ending
(
basis::astring
&to_end) { to_end =
textual::parser_bits::eol_to_chars
(c_ending); }
45
46
private
:
47
textual::parser_bits::line_ending
c_ending;
48
};
49
50
}
//namespace.
51
52
#endif
53
basis::astring
Provides a dynamically resizable ASCII character string.
Definition:
astring.h:35
loggers::eol_aware
Provides an abstract base for logging mechanisms.
Definition:
eol_aware.h:32
loggers::eol_aware::eol
virtual void eol(textual::parser_bits::line_ending to_set)
modifies how line endings are to be printed.
Definition:
eol_aware.h:37
loggers::eol_aware::get_ending
virtual void get_ending(basis::astring &to_end)
appends a string for the current ending to "to_end".
Definition:
eol_aware.h:43
loggers::eol_aware::eol
virtual textual::parser_bits::line_ending eol()
observes how line endings are to be printed.
Definition:
eol_aware.h:34
loggers::eol_aware::get_ending
virtual basis::astring get_ending()
returns a string for the current ending.
Definition:
eol_aware.h:40
textual::parser_bits::line_ending
line_ending
Line endings is an enumeration of the separator character(s) used for text files.
Definition:
parser_bits.h:31
textual::parser_bits::eol_to_chars
static const char * eol_to_chars(line_ending ending)
returns the C string form for the "ending" value.
Definition:
parser_bits.cpp:45
definitions.h
Constants and objects used throughout HOOPLE.
loggers
A logger that sends to the console screen using the standard output device.
Definition:
combo_logger.cpp:36
parser_bits.h
nucleus
library
loggers
eol_aware.h
Generated by
1.9.1