CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
jsoncollector::StringJ Class Reference

#include <JsonMonitorable.h>

Inheritance diagram for jsoncollector::StringJ:
jsoncollector::JsonMonitorable

Public Member Functions

void concatenate (std::string const &added)
 
void operator= (std::string sth)
 
void resetValue () override
 
 StringJ ()
 
std::string toString () const override
 
void update (std::string const &newStr)
 
std::string & value ()
 
 ~StringJ () override
 
- Public Member Functions inherited from jsoncollector::JsonMonitorable
virtual std::string & getName ()
 
bool getNotSame ()
 
unsigned int getUpdates ()
 
 JsonMonitorable ()
 
virtual void setName (std::string name)
 
virtual ~JsonMonitorable ()
 

Private Attributes

std::string theVar_
 

Additional Inherited Members

- Protected Attributes inherited from jsoncollector::JsonMonitorable
std::string name_
 
bool notSame_
 
unsigned int updates_
 

Detailed Description

Definition at line 140 of file JsonMonitorable.h.

Constructor & Destructor Documentation

◆ StringJ()

jsoncollector::StringJ::StringJ ( )
inline

Definition at line 142 of file JsonMonitorable.h.

142 : JsonMonitorable() {}

◆ ~StringJ()

jsoncollector::StringJ::~StringJ ( )
inlineoverride

Definition at line 144 of file JsonMonitorable.h.

144 {}

Member Function Documentation

◆ concatenate()

void jsoncollector::StringJ::concatenate ( std::string const &  added)
inline

Definition at line 158 of file JsonMonitorable.h.

158  {
159  if (!updates_)
160  theVar_ = added;
161  else
162  theVar_ += "," + added;
163  updates_++;
164  }

References theVar_, and jsoncollector::JsonMonitorable::updates_.

◆ operator=()

void jsoncollector::StringJ::operator= ( std::string  sth)
inline

Definition at line 152 of file JsonMonitorable.h.

152  {
153  theVar_ = sth;
154  updates_ = 1;
155  notSame_ = false;
156  }

References jsoncollector::JsonMonitorable::notSame_, theVar_, and jsoncollector::JsonMonitorable::updates_.

◆ resetValue()

void jsoncollector::StringJ::resetValue ( )
inlineoverridevirtual

◆ toString()

std::string jsoncollector::StringJ::toString ( ) const
inlineoverridevirtual

Implements jsoncollector::JsonMonitorable.

Definition at line 146 of file JsonMonitorable.h.

146 { return theVar_; }

References theVar_.

◆ update()

void jsoncollector::StringJ::update ( std::string const &  newStr)
inline

◆ value()

std::string& jsoncollector::StringJ::value ( )
inline

Member Data Documentation

◆ theVar_

std::string jsoncollector::StringJ::theVar_
private

Definition at line 171 of file JsonMonitorable.h.

Referenced by concatenate(), operator=(), resetValue(), toString(), update(), and value().

jsoncollector::JsonMonitorable::updates_
unsigned int updates_
Definition: JsonMonitorable.h:44
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
jsoncollector::JsonMonitorable::notSame_
bool notSame_
Definition: JsonMonitorable.h:45
jsoncollector::JsonMonitorable::JsonMonitorable
JsonMonitorable()
Definition: JsonMonitorable.h:26
jsoncollector::StringJ::theVar_
std::string theVar_
Definition: JsonMonitorable.h:171