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 ()
 
 StringJ (StringJ const &sJ)
 
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() [1/2]

jsoncollector::StringJ::StringJ ( )
inline

Definition at line 144 of file JsonMonitorable.h.

◆ StringJ() [2/2]

jsoncollector::StringJ::StringJ ( StringJ const &  sJ)
inline

Definition at line 145 of file JsonMonitorable.h.

References theVar_, and value().

◆ ~StringJ()

jsoncollector::StringJ::~StringJ ( )
inlineoverride

Definition at line 147 of file JsonMonitorable.h.

147 {}

Member Function Documentation

◆ concatenate()

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

Definition at line 162 of file JsonMonitorable.h.

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

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

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

References theVar_.

149 { 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 175 of file JsonMonitorable.h.

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