DUNE-DAQ
DUNE Trigger and Data Acquisition software
Toggle main menu visibility
Loading...
Searching...
No Matches
dunedaq
sourcecode
okssystem
include
okssystem
StringMemoryArea.hpp
Go to the documentation of this file.
1
// DUNE DAQ modification notice:
2
// This file has been modified from the original ATLAS system source for the DUNE DAQ project.
3
// Fork baseline commit: system-00-00-20 (2020-09-25).
4
// Renamed since fork: yes (from system/StringMemoryArea.h to include/okssystem/StringMemoryArea.hpp).
5
6
/*
7
* StringMemoryArea.h
8
* OksSystem
9
*
10
* Created by Matthias Wiesmann on 17.02.05.
11
* Copyright 2005 CERN. All rights reserved.
12
*
13
*/
14
15
#ifndef OKSSYSTEM_STRING_MEMORY_AREA
16
#define OKSSYSTEM_STRING_MEMORY_AREA
17
18
#include <map>
19
#include <vector>
20
21
namespace
OksSystem
{
22
34
35
class
StringMemoryArea
{
36
public
:
37
typedef
unsigned
int
offset_t
;
38
typedef
std::vector<std::string>
str_vector
;
39
typedef
std::map<std::string, std::string>
str_map
;
40
protected
:
41
static
const
char
STRING_SEPARATOR
;
42
static
const
char
MAP_ENTRY_SEPARATOR
;
43
virtual
const
char
*
string_area_read
()
const
= 0 ;
44
virtual
char
*
string_area_write
() = 0 ;
45
virtual
offset_t
last_string
()
const
= 0 ;
46
virtual
void
last_string
(
offset_t
offset
) = 0 ;
47
virtual
size_t
string_area_size
()
const
= 0 ;
48
public
:
49
offset_t
add
(
const
char
*str) ;
50
size_t
clear
(
offset_t
offset
) ;
51
const
char
*
get_string
(
offset_t
offset
)
const
;
52
offset_t
insert
(
offset_t
offset
,
const
char
* str) ;
53
void
insert
(
offset_t
*
offset
,
const
char
* str) ;
54
offset_t
insert
(
offset_t
offset
,
const
str_vector
&vect) ;
55
void
insert
(
offset_t
*
offset
,
const
str_vector
&vect) ;
56
str_vector
get_vector
(
offset_t
offset
)
const
;
57
offset_t
insert
(
offset_t
offset
,
const
str_map
&map) ;
58
void
insert
(
offset_t
*
offset
,
const
str_map
&map) ;
59
str_map
get_map
(
offset_t
offset
)
const
;
60
} ;
// StringMemoryArea
61
62
}
// okssystem
63
64
#endif
OksSystem::StringMemoryArea
String memory storage facility.
Definition
StringMemoryArea.hpp:35
OksSystem::StringMemoryArea::string_area_write
virtual char * string_area_write()=0
write pointer for the string area
OksSystem::StringMemoryArea::str_map
std::map< std::string, std::string > str_map
Definition
StringMemoryArea.hpp:39
OksSystem::StringMemoryArea::string_area_size
virtual size_t string_area_size() const =0
size of the string area
OksSystem::StringMemoryArea::clear
size_t clear(offset_t offset)
Definition
StringMemoryArea.cpp:48
OksSystem::StringMemoryArea::get_string
const char * get_string(offset_t offset) const
Definition
StringMemoryArea.cpp:64
OksSystem::StringMemoryArea::last_string
virtual offset_t last_string() const =0
offset of the end of the last string
OksSystem::StringMemoryArea::last_string
virtual void last_string(offset_t offset)=0
sets the offset of the end of last string
OksSystem::StringMemoryArea::STRING_SEPARATOR
static const char STRING_SEPARATOR
character used to separate strings (i.e., to tokenize strings in vectors)
Definition
StringMemoryArea.hpp:41
OksSystem::StringMemoryArea::offset_t
unsigned int offset_t
Definition
StringMemoryArea.hpp:37
OksSystem::StringMemoryArea::MAP_ENTRY_SEPARATOR
static const char MAP_ENTRY_SEPARATOR
character used to separate map entries
Definition
StringMemoryArea.hpp:42
OksSystem::StringMemoryArea::get_vector
str_vector get_vector(offset_t offset) const
Definition
StringMemoryArea.cpp:114
OksSystem::StringMemoryArea::insert
offset_t insert(offset_t offset, const char *str)
Definition
StringMemoryArea.cpp:83
OksSystem::StringMemoryArea::get_map
str_map get_map(offset_t offset) const
Definition
StringMemoryArea.cpp:181
OksSystem::StringMemoryArea::add
offset_t add(const char *str)
Definition
StringMemoryArea.cpp:28
OksSystem::StringMemoryArea::str_vector
std::vector< std::string > str_vector
Definition
StringMemoryArea.hpp:38
OksSystem::StringMemoryArea::string_area_read
virtual const char * string_area_read() const =0
read pointer for the string area
offset
double offset
Definition
conversions-impl.hh:28
OksSystem
Definition
Descriptor.hpp:22
Generated on
for DUNE-DAQ by
1.17.0