CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes | Friends

edm::service::Fetcher Class Reference

List of all members.

Public Member Functions

 Fetcher (char *buffer)

Private Member Functions

char getChar ()
int getInt ()
char * getItem ()
long getLong ()
std::string getString ()
unsigned int getUInt ()
unsigned long getULong ()

Private Attributes

char * buffer_
char const *const delims_
char * save_

Friends

Fetcheroperator>> (Fetcher &, int &)
Fetcheroperator>> (Fetcher &, std::string &)
Fetcheroperator>> (Fetcher &, char &)
Fetcheroperator>> (Fetcher &, unsigned long &)
Fetcheroperator>> (Fetcher &, unsigned int &)
Fetcheroperator>> (Fetcher &, long &)

Detailed Description

Definition at line 109 of file Memory.cc.


Constructor & Destructor Documentation

edm::service::Fetcher::Fetcher ( char *  buffer) [inline, explicit]

Definition at line 118 of file Memory.cc.

                                     : 
        buffer_(buffer),
        save_(0),
        delims_(" \t\n\f\v\r") {
      }

Member Function Documentation

char edm::service::Fetcher::getChar ( ) [inline, private]

Definition at line 144 of file Memory.cc.

References getItem().

Referenced by edm::service::operator>>().

                     {
        return *getItem();
      }
int edm::service::Fetcher::getInt ( ) [inline, private]

Definition at line 124 of file Memory.cc.

References getItem(), and lumiQTWidget::t.

Referenced by edm::service::operator>>().

                   {
        const char* t = getItem();
        //std::cout <<"int '"<<t <<"'"<<std::endl;
        return boost::lexical_cast<int>(t);
      }
char* edm::service::Fetcher::getItem ( ) [inline, private]

Definition at line 150 of file Memory.cc.

References buffer_, delims_, and save_.

Referenced by getChar(), getInt(), getLong(), getString(), getUInt(), and getULong().

                      {
        char* item = strtok_r(buffer_, delims_, &save_); 
        assert(item);
        buffer_ = 0; // Null for subsequent strtok_r calls.
        return item;
      }
long edm::service::Fetcher::getLong ( ) [inline, private]

Definition at line 129 of file Memory.cc.

References getItem(), and lumiQTWidget::t.

Referenced by edm::service::operator>>().

                     {
        const char* t = getItem();
        //std::cout <<"long '"<<t <<"'"<<std::endl;
        return boost::lexical_cast<long>(t);
      }
std::string edm::service::Fetcher::getString ( void  ) [inline, private]

Definition at line 147 of file Memory.cc.

References getItem().

Referenced by edm::service::operator>>().

                            {
        return std::string(getItem());
      }
unsigned int edm::service::Fetcher::getUInt ( ) [inline, private]

Definition at line 134 of file Memory.cc.

References getItem(), and lumiQTWidget::t.

Referenced by edm::service::operator>>().

                             {
        const char* t = getItem();
        //std::cout <<"uint '"<<t <<"'"<<std::endl;
        return boost::lexical_cast<unsigned int>(t);
      }
unsigned long edm::service::Fetcher::getULong ( ) [inline, private]

Definition at line 139 of file Memory.cc.

References getItem(), and lumiQTWidget::t.

Referenced by edm::service::operator>>().

                               {
        const char* t = getItem();
        //std::cout <<"ulong '"<<t <<"'"<<std::endl;
        return boost::lexical_cast<unsigned long>(t);
      }

Friends And Related Function Documentation

Fetcher& operator>> ( Fetcher iFetch,
int &  oValue 
) [friend]

Definition at line 161 of file Memory.cc.

                                                      {
      oValue = iFetch.getInt();
      return iFetch;
    }
Fetcher& operator>> ( Fetcher iFetch,
std::string &  oValue 
) [friend]

Definition at line 181 of file Memory.cc.

                                                            {
      oValue = iFetch.getString();
      return iFetch;
    }
Fetcher& operator>> ( Fetcher iFetch,
char &  oValue 
) [friend]

Definition at line 177 of file Memory.cc.

                                                       {
      oValue = iFetch.getChar();
      return iFetch;
    }
Fetcher& operator>> ( Fetcher iFetch,
unsigned long &  oValue 
) [friend]

Definition at line 173 of file Memory.cc.

                                                                {
      oValue = iFetch.getULong();
      return iFetch;      
    }
Fetcher& operator>> ( Fetcher iFetch,
unsigned int &  oValue 
) [friend]

Definition at line 169 of file Memory.cc.

                                                               {
      oValue = iFetch.getUInt();
      return iFetch;      
    }
Fetcher& operator>> ( Fetcher iFetch,
long &  oValue 
) [friend]

Definition at line 165 of file Memory.cc.

                                                       {
      oValue = iFetch.getLong();
      return iFetch;
    }

Member Data Documentation

Definition at line 156 of file Memory.cc.

Referenced by getItem().

char const* const edm::service::Fetcher::delims_ [private]

Definition at line 158 of file Memory.cc.

Referenced by getItem().

Definition at line 157 of file Memory.cc.

Referenced by getItem().