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 ()
 
std::string const & value () const
 
 ~StringJ () override
 
- Public Member Functions inherited from jsoncollector::JsonMonitorable
virtual std::string const & getName () const
 
bool getNotSame () const
 
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 142 of file JsonMonitorable.h.

Constructor & Destructor Documentation

◆ StringJ()

jsoncollector::StringJ::StringJ ( )
inline

Definition at line 144 of file JsonMonitorable.h.

144 : JsonMonitorable() {}

◆ ~StringJ()

jsoncollector::StringJ::~StringJ ( )
inlineoverride

Definition at line 146 of file JsonMonitorable.h.

146 {}

Member Function Documentation

◆ concatenate()

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

Definition at line 161 of file JsonMonitorable.h.

161  {
162  if (!updates_)
163  theVar_ = added;
164  else
165  theVar_ += "," + added;
166  updates_++;
167  }

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

◆ operator=()

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

Definition at line 154 of file JsonMonitorable.h.

154  {
155  theVar_ = sth;
156  updates_ = 1;
157  notSame_ = false;
158  }

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 148 of file JsonMonitorable.h.

148 { return theVar_; }

References theVar_.

◆ update()

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

◆ value() [1/2]

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

◆ value() [2/2]

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

Member Data Documentation

◆ theVar_

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

Definition at line 174 of file JsonMonitorable.h.

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

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