Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
cetlib
cetlib
nybbler.h
Go to the documentation of this file.
1
#ifndef cetlib_nybbler_h
2
#define cetlib_nybbler_h
3
4
// ======================================================================
5
//
6
// nybbler: Half-byte manipulations
7
//
8
// ======================================================================
9
10
#include <string>
11
12
namespace
cet
{
13
class
nybbler;
14
}
15
16
// ======================================================================
17
18
class
cet::nybbler
{
19
typedef
unsigned
char
uchar
;
20
typedef
std::string
string
;
21
22
public
:
23
// use compiler's d'tor, copy c'tor, copy assignment
24
25
nybbler
() :
s_
(
""
) {}
26
explicit
nybbler
(
string
const
&
s
) :
s_
(s) {}
27
28
string
as_hex
()
const
;
29
string
as_char
()
const
;
30
31
nybbler
&
operator<<
(
string
const
&);
32
33
private
:
34
string
s_
;
35
36
static
uchar
msn
(
char
ch);
// most significant nybble
37
static
uchar
lsn
(
char
ch);
// least significant nybble
38
39
static
char
to_hex
(uchar nyb);
40
static
uchar
to_nyb
(
char
hex
);
41
42
};
// nybbler
43
44
// ======================================================================
45
46
#endif
/* cetlib_nybbler_h */
47
48
// Local variables:
49
// mode: c++
50
// End:
cet::nybbler::nybbler
nybbler()
Definition:
nybbler.h:25
cet::nybbler::msn
static uchar msn(char ch)
Definition:
nybbler.cc:45
string
std::string string
Definition:
nybbler.cc:12
cet::nybbler::operator<<
nybbler & operator<<(string const &)
Definition:
nybbler.cc:118
hex
QTextStream & hex(QTextStream &s)
Definition:
qtextstream.cpp:2024
cet::nybbler::to_hex
static char to_hex(uchar nyb)
Definition:
nybbler.cc:57
cet::nybbler::lsn
static uchar lsn(char ch)
Definition:
nybbler.cc:51
cet::nybbler::uchar
unsigned char uchar
Definition:
nybbler.h:19
cet
Definition:
PluginSymbolResolvers.h:8
cet::nybbler::s_
string s_
Definition:
nybbler.h:34
cet::nybbler::to_nyb
static uchar to_nyb(char hex)
Definition:
nybbler.cc:84
cet::nybbler
Definition:
nybbler.h:18
cet::nybbler::nybbler
nybbler(string const &s)
Definition:
nybbler.h:26
cet::nybbler::as_char
string as_char() const
Definition:
nybbler.cc:31
cet::nybbler::string
std::string string
Definition:
nybbler.h:20
cet::nybbler::as_hex
string as_hex() const
Definition:
nybbler.cc:17
s
static QCString * s
Definition:
config.cpp:1042
Generated by
1.8.11