CMS 3D CMS Logo

Public Member Functions | Private Attributes

stringUpdate Class Reference

#include <stringTools.h>

List of all members.

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.

: s(is), old(0){}

Member Function Documentation

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

Definition at line 29 of file stringTools.h.

References old, and s.

                         { 
    if (s.size()>old) {
      size_t d = old;
      old = s.size();
      return s.substr(d);
    }
    else return std::string();
  }
void stringUpdate::reset ( void  ) [inline]

Definition at line 38 of file stringTools.h.

References old.

{ old=0;}
bool stringUpdate::updated ( ) const [inline]

Definition at line 39 of file stringTools.h.

References old, and s.

{ return s.size()>old;}

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().