#include <xml.hpp>
Definition at line 110 of file xml.hpp.
◆ OksXmlOutputStream()
dunedaq::oks::OksXmlOutputStream::OksXmlOutputStream |
( |
std::ostream & | p | ) |
|
|
inline |
◆ __throw_write_failed()
void dunedaq::oks::OksXmlOutputStream::__throw_write_failed |
( |
| ) |
|
|
staticprivate |
Definition at line 112 of file xml.cpp.
113{
114 throw std::runtime_error("write to file failed");
115}
◆ get_stream()
std::ostream & dunedaq::oks::OksXmlOutputStream::get_stream |
( |
| ) |
const |
|
inline |
◆ put() [1/2]
void dunedaq::oks::OksXmlOutputStream::put |
( |
char | c | ) |
|
Write char to xml output stream. Convert special symbols.
- Exceptions
-
Definition at line 124 of file xml.cpp.
125{
135
136}
const char left_angle_bracket[]
const char single_quote[]
const char right_angle_bracket[]
const char carriage_return[]
const char double_quote[]
◆ put() [2/2]
void dunedaq::oks::OksXmlOutputStream::put |
( |
const char * | s | ) |
|
Write string to xml output stream. Convert special symbols.
- Exceptions
-
Definition at line 145 of file xml.cpp.
146{
147 while(*str)
put(*str++);
148}
◆ put_attribute() [1/3]
void dunedaq::oks::OksXmlOutputStream::put_attribute |
( |
const char * | name, |
|
|
size_t | len, |
|
|
const char * | value ) |
◆ put_attribute() [2/3]
void dunedaq::oks::OksXmlOutputStream::put_attribute |
( |
const char * | name, |
|
|
size_t | len, |
|
|
const OksData & | value ) |
Definition at line 250 of file xml.cpp.
251{
256 value.WriteTo(*this);
258}
◆ put_attribute() [3/3]
void dunedaq::oks::OksXmlOutputStream::put_attribute |
( |
const char * | name, |
|
|
size_t | len, |
|
|
uint32_t | value ) |
Definition at line 231 of file xml.cpp.
232{
237 if(value == 0) {
239 }
240 else {
241 char buf[12];
242 char * ptr = buf;
243 boost::spirit::karma::generate(ptr, boost::spirit::uint_, (unsigned int)value);
245 }
247}
◆ put_end_tag()
void dunedaq::oks::OksXmlOutputStream::put_end_tag |
( |
| ) |
|
Definition at line 185 of file xml.cpp.
186{
187 static const char __end_tag[] = "/>\n";
188 put_raw(__end_tag,
sizeof(__end_tag)-1);
189}
◆ put_eol()
void dunedaq::oks::OksXmlOutputStream::put_eol |
( |
| ) |
|
Definition at line 192 of file xml.cpp.
193{
194 static const char __eol_tag[] = ">\n";
195 put_raw(__eol_tag,
sizeof(__eol_tag)-1);
196}
◆ put_last_tag()
void dunedaq::oks::OksXmlOutputStream::put_last_tag |
( |
const char * | name, |
|
|
size_t | len ) |
◆ put_quoted()
void dunedaq::oks::OksXmlOutputStream::put_quoted |
( |
const char * | str | ) |
|
◆ put_raw() [1/2]
void dunedaq::oks::OksXmlOutputStream::put_raw |
( |
char | c | ) |
|
|
inline |
Write char to xml output stream without check for special symbols.
- Exceptions
-
Definition at line 145 of file xml.hpp.
146 {
147 if (__builtin_expect((
f.rdbuf()->sputc(c) != c), 0))
149 }
static void __throw_write_failed()
◆ put_raw() [2/2]
void dunedaq::oks::OksXmlOutputStream::put_raw |
( |
const char * | s, |
|
|
long | len ) |
|
inline |
Definition at line 152 of file xml.hpp.
153 {
154 if (__builtin_expect((
f.rdbuf()->sputn(s, len) != len), 0))
156 }
◆ put_start_tag()
void dunedaq::oks::OksXmlOutputStream::put_start_tag |
( |
const char * | name, |
|
|
size_t | len ) |
◆ put_value()
template<class T >
void dunedaq::oks::OksXmlOutputStream::put_value |
( |
T | value | ) |
|
|
inline |
std::ostream& dunedaq::oks::OksXmlOutputStream::f |
|
private |
The documentation for this class was generated from the following files:
- /github/workspace/dunedaq/sourcecode/oks/include/oks/xml.hpp
- /github/workspace/dunedaq/sourcecode/oks/src/xml.cpp