0.9.8.10
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
home
doug
src
hypertable
src
cc
Tools
Lib
CommandInterpreter.cc
Go to the documentation of this file.
1
22
#include "
Common/Compat.h
"
23
24
#include "
CommandInterpreter.h
"
25
26
#include <cassert>
27
28
using namespace
Hypertable
;
29
using namespace
std
;
30
31
CommandInterpreter::CommandInterpreter
()
32
: m_timestamp_output_format(TIMESTAMP_FORMAT_DEFAULT), m_silent(false),
33
m_test_mode(false) {
34
}
35
36
37
void
38
CommandInterpreter::set_timestamp_output_format
(
const
String
&
format
) {
39
if
(format ==
"default"
)
40
m_timestamp_output_format
=
TIMESTAMP_FORMAT_DEFAULT
;
41
else
if
(format ==
"nanos"
)
42
m_timestamp_output_format
=
TIMESTAMP_FORMAT_NANOS
;
43
else
if
(format ==
"nanoseconds"
)
44
m_timestamp_output_format
=
TIMESTAMP_FORMAT_NANOS
;
45
else
if
(format ==
"usecs"
)
// backward compatibilty
46
m_timestamp_output_format
=
TIMESTAMP_FORMAT_NANOS
;
47
else
{
48
assert(!
"invalid timestamp format"
);
49
}
50
}
51
Hypertable::String
std::string String
A String is simply a typedef to std::string.
Definition:
String.h:44
Hypertable::format
String format(const char *fmt,...)
Returns a String using printf like format facilities Vanilla snprintf is about 1.5x faster than this...
Definition:
String.cc:37
Hypertable::CommandInterpreter::TIMESTAMP_FORMAT_DEFAULT
Definition:
CommandInterpreter.h:33
std
STL namespace.
Hypertable::CommandInterpreter::CommandInterpreter
CommandInterpreter()
Definition:
CommandInterpreter.cc:31
Hypertable::CommandInterpreter::set_timestamp_output_format
void set_timestamp_output_format(const String &format)
Definition:
CommandInterpreter.cc:38
Compat.h
Compatibility Macros for C/C++.
Hypertable
Hypertable definitions
Definition:
ApplicationHandler.h:36
Hypertable::CommandInterpreter::m_timestamp_output_format
int m_timestamp_output_format
Definition:
CommandInterpreter.h:48
CommandInterpreter.h
Hypertable::CommandInterpreter::TIMESTAMP_FORMAT_NANOS
Definition:
CommandInterpreter.h:33
Generated on Tue Dec 22 2015 18:43:18 for Hypertable by
1.8.8