DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
object.cpp File Reference
#include "oks/object.hpp"
#include "oks/xml.hpp"
#include "oks/attribute.hpp"
#include "oks/relationship.hpp"
#include "oks/class.hpp"
#include "oks/kernel.hpp"
#include "oks/index.hpp"
#include "oks/profiler.hpp"
#include "oks/cstring.hpp"
#include "oks_utils.hpp"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <iostream>
#include <sstream>
#include <stdexcept>
#include "ers/ers.hpp"
#include "logging/Logging.hpp"
Include dependency graph for object.cpp:

Go to the source code of this file.

Classes

struct  dunedaq::oks::BindWarning
 
struct  dunedaq::oks::RefData
 

Namespaces

namespace  dunedaq
 Including Qt Headers.
 
namespace  dunedaq::oks
 

Macros

#define _OksBuildDll_
 
#define READ_OBJ_HEADER(F1, S1, F2, S2)
 

Functions

static void dunedaq::oks::__throw_unknown_type (const oks::ReadFileParams &params, const char *atype)
 
std::ostream & dunedaq::oks::operator<< (std::ostream &s, const OksObject *o)
 
std::ostream & dunedaq::oks::operator<< (std::ostream &s, const OksObject &o)
 
static bool dunedaq::oks::trim_dangling (OksData &d, const OksKernel &kernel)
 
static bool dunedaq::oks::cmp_data (OksData *d, OksData *d2)
 
static void dunedaq::oks::test_dangling_references (const OksObject *obj, const OksData &d, const OksRelationship &r, std::string &result)
 
static void dunedaq::oks::_references (const OksObject *obj, unsigned long recursion_depth, RefData &data)
 
static void dunedaq::oks::insert2refs (const OksObject *o, unsigned long recursion_depth, RefData &data)
 

Macro Definition Documentation

◆ _OksBuildDll_

#define _OksBuildDll_

Definition at line 1 of file object.cpp.

◆ READ_OBJ_HEADER

#define READ_OBJ_HEADER ( F1,
S1,
F2,
S2 )
Value:
while(true) { \
OksXmlAttribute attr(read_params.s); \
if(oks::cmp_str1(attr.name(), ">") || oks::cmp_str1(attr.name(), "/")) { break; } \
else if(F1(attr.name(), S1)) { \
std::shared_lock lock(read_params.oks_kernel->p_schema_mutex); \
c = read_params.oks_kernel->find_class(attr.value()); \
if( __builtin_expect((c == nullptr), 0) ) { \
std::ostringstream text; \
text << "cannot find class \"" << attr.value() << "\" (line " \
<< read_params.s.get_line_no() << ", char " \
<< read_params.s.get_line_pos() << ')'; \
throw std::runtime_error( text.str().c_str() ); \
} \
} \
else if(F2(attr.name(), S2)) id.assign(attr.value(), attr.value_len()); \
else { \
read_params.s.throw_unexpected_attribute(attr.name()); \
} \
}

Definition at line 327 of file object.cpp.

327#define READ_OBJ_HEADER(F1, S1, F2, S2) \
328 while(true) { \
329 OksXmlAttribute attr(read_params.s); \
330 if(oks::cmp_str1(attr.name(), ">") || oks::cmp_str1(attr.name(), "/")) { break; } \
331 else if(F1(attr.name(), S1)) { \
332 std::shared_lock lock(read_params.oks_kernel->p_schema_mutex); \
333 c = read_params.oks_kernel->find_class(attr.value()); \
334 if( __builtin_expect((c == nullptr), 0) ) { \
335 std::ostringstream text; \
336 text << "cannot find class \"" << attr.value() << "\" (line " \
337 << read_params.s.get_line_no() << ", char " \
338 << read_params.s.get_line_pos() << ')'; \
339 throw std::runtime_error( text.str().c_str() ); \
340 } \
341 } \
342 else if(F2(attr.name(), S2)) id.assign(attr.value(), attr.value_len()); \
343 else { \
344 read_params.s.throw_unexpected_attribute(attr.name()); \
345 } \
346 }