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.

◆ ~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.

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

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

◆ operator=()

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

◆ 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.

References theVar_.

148 { return 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().