CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
stringUpdate Class Reference

#include <stringTools.h>

Public Member Functions

std::string operator() ()
 
void reset ()
 
 stringUpdate (const std::string &is)
 
bool updated () const
 

Private Attributes

size_t old
 
const std::string & s
 

Detailed Description

return the new substring...

Definition at line 25 of file stringTools.h.

Constructor & Destructor Documentation

stringUpdate::stringUpdate ( const std::string &  is)
inline

Definition at line 27 of file stringTools.h.

27 : s(is), old(0){}
size_t old
Definition: stringTools.h:44
const std::string & s
Definition: stringTools.h:43

Member Function Documentation

std::string stringUpdate::operator() ( )
inline

Definition at line 29 of file stringTools.h.

References old, and s.

29  {
30  if (s.size()>old) {
31  size_t d = old;
32  old = s.size();
33  return s.substr(d);
34  }
35  else return std::string();
36  }
size_t old
Definition: stringTools.h:44
const std::string & s
Definition: stringTools.h:43
void stringUpdate::reset ( void  )
inline

Definition at line 38 of file stringTools.h.

References old.

38 { old=0;}
size_t old
Definition: stringTools.h:44
bool stringUpdate::updated ( ) const
inline

Definition at line 39 of file stringTools.h.

References old, and s.

39 { return s.size()>old;}
size_t old
Definition: stringTools.h:44
const std::string & s
Definition: stringTools.h:43

Member Data Documentation

size_t stringUpdate::old
private

Definition at line 44 of file stringTools.h.

Referenced by operator()(), reset(), and updated().

const std::string& stringUpdate::s
private

Definition at line 43 of file stringTools.h.

Referenced by operator()(), and updated().