CMS 3D CMS Logo

Functions
types.cc File Reference
#include "FWCore/ParameterSet/interface/types.h"
#include "boost/lexical_cast.hpp"
#include "FWCore/ParameterSet/interface/split.h"
#include "FWCore/Utilities/interface/Parse.h"
#include <cctype>
#include <cstdlib>
#include <limits>
#include <sstream>
#include <stdexcept>
#include <cassert>

Go to the source code of this file.

Functions

static void append_hex_rep (std::string &s, unsigned int c)
 
static unsigned int from_hex (char c)
 
static char to_hex (unsigned int i)
 

Function Documentation

static void append_hex_rep ( std::string &  s,
unsigned int  c 
)
static

Definition at line 63 of file types.cc.

References to_hex().

Referenced by edm::encode().

63  {
64  s += to_hex(c / 16u);
65  s += to_hex(c % 16u);
66 } // append_hex_rep()
static char to_hex(unsigned int i)
Definition: types.cc:27
static unsigned int from_hex ( char  c)
static

Definition at line 31 of file types.cc.

Referenced by edm::decode(), and edm::encode().

31  {
32  switch (c) {
33  case '0':
34  case '1':
35  case '2':
36  case '3':
37  case '4':
38  case '5':
39  case '6':
40  case '7':
41  case '8':
42  case '9':
43  return c - '0';
44  case 'a':
45  case 'b':
46  case 'c':
47  case 'd':
48  case 'e':
49  case 'f':
50  return 10 + c - 'a';
51  case 'A':
52  case 'B':
53  case 'C':
54  case 'D':
55  case 'E':
56  case 'F':
57  return 10 + c - 'A';
58  default:
59  return 0;
60  }
61 } // from_hex()
static char to_hex ( unsigned int  i)
static