BOSS 6.6.4.p01
BESIII Offline Software System
Loading...
Searching...
No Matches
Tagged Class Reference

#include <dmplib.hh>

+ Inheritance diagram for Tagged:

Public Member Functions

 Tagged ()
 
bool initialized () const
 
void set_initialized ()
 
void unset_initalized ()
 
 Tagged ()
 
bool initialized () const
 
void set_initialized ()
 
void unset_initalized ()
 

Protected Member Functions

void check_start_tag (std::istream &is, const char *tag)
 
void check_end_tag (std::istream &is, const char *tag)
 
void check_start_tag (std::istream &is, const char *tag)
 
void check_end_tag (std::istream &is, const char *tag)
 

Detailed Description

Definition at line 45 of file dmplib.hh.

Constructor & Destructor Documentation

◆ Tagged() [1/2]

Tagged::Tagged ( )
inline

Definition at line 47 of file dmplib.hh.

48 : m_initialized(false)
49 {};

◆ Tagged() [2/2]

Tagged::Tagged ( )
inline

Definition at line 47 of file dmplib.h.

48 : m_initialized(false)
49 {};

Member Function Documentation

◆ check_end_tag() [1/2]

void Tagged::check_end_tag ( std::istream &  is,
const char *  tag 
)
inlineprotected

Definition at line 108 of file dmplib.hh.

109{
110 char c;
111 is >> c;
112 if(c != '}')
113 throw AsciiNoEndChar();
114
115 std::string in_tag;
116 is >> in_tag;
117 if(in_tag != tag)
118 throw AsciiWrongEndTag(tag, in_tag);
119}

◆ check_end_tag() [2/2]

void Tagged::check_end_tag ( std::istream &  is,
const char *  tag 
)
protected

◆ check_start_tag() [1/2]

void Tagged::check_start_tag ( std::istream &  is,
const char *  tag 
)
inlineprotected

Definition at line 81 of file dmplib.hh.

82{
83 // read input, check for '{' character
84 char c;
85 if(!(is >> c) || (c != '{')) {
86 throw AsciiNoStartChar();
87 }
88
89 // compare tags
90 std::string in_tag;
91 is >> in_tag;
92 if(in_tag != tag)
93 throw AsciiWrongStartTag(tag, in_tag);
94
95 // check for empty block
96 is >> c;
97 if(c == '}') {
98 is >> in_tag;
99 if(in_tag != tag)
100 throw AsciiWrongEndTag(tag, in_tag);
101 } else {
102 is.putback(c);
104 }
105}
void set_initialized()
Definition: dmplib.hh:69

◆ check_start_tag() [2/2]

void Tagged::check_start_tag ( std::istream &  is,
const char *  tag 
)
protected

◆ initialized() [1/2]

bool Tagged::initialized ( ) const
inline

Definition at line 63 of file dmplib.hh.

64{
65 return m_initialized;
66}

◆ initialized() [2/2]

bool Tagged::initialized ( ) const

◆ set_initialized() [1/2]

void Tagged::set_initialized ( )
inline

Definition at line 69 of file dmplib.hh.

70{
71 m_initialized = true;
72}

Referenced by check_start_tag(), main(), BesAsciiIO::SaveAsciiEvents(), and BesAsciiIO::SaveHitAsciiEvents().

◆ set_initialized() [2/2]

void Tagged::set_initialized ( )

◆ unset_initalized() [1/2]

void Tagged::unset_initalized ( )
inline

Definition at line 75 of file dmplib.hh.

76{
77 m_initialized = false;
78}

◆ unset_initalized() [2/2]

void Tagged::unset_initalized ( )

The documentation for this class was generated from the following files: