#include <cerrno>
#include <cctype>
#include <cstdlib>
#include <cstring>
#include <climits>
#include <cassert>
#include "Alignment/Geners/interface/BinaryArchiveBase.hh"
#include "Alignment/Geners/interface/CatalogIO.hh"
#include "Alignment/Geners/interface/binaryIO.hh"
Go to the source code of this file.
|
static bool | parse_int (std::ostringstream &err, const char *c, int *result) |
|
static bool | parse_unsigned (std::ostringstream &err, const char *c, unsigned *result) |
|
#define GENERS_BINARY_ARCHIVE_FORMAT_ID (0x1f2e3d4c) |
static bool parse_int |
( |
std::ostringstream & |
err, |
|
|
const char * |
c, |
|
|
int * |
result |
|
) |
| |
|
static |
Definition at line 38 of file BinaryArchiveBase.cc.
References relativeConstraints::value.
43 const long value = strtol(
c, &endptr, 0);
44 if (errno || *endptr !=
'\0')
46 err <<
"expected an integer, got \"" <<
c <<
'"';
47 if (errno) err <<
", " << strerror(errno);
50 if (value < INT_MIN || value > INT_MAX)
52 err <<
"integer value \"" << c <<
"\" is out of range";
static bool parse_unsigned |
( |
std::ostringstream & |
err, |
|
|
const char * |
c, |
|
|
unsigned * |
result |
|
) |
| |
|
static |
Definition at line 17 of file BinaryArchiveBase.cc.
References relativeConstraints::value.
22 const unsigned long value = strtoul(
c, &endptr, 0);
23 if (errno || *endptr !=
'\0')
25 err <<
"expected an unsigned integer, got \"" <<
c <<
'"';
26 if (errno) err <<
", " << strerror(errno);
31 err <<
"unsigned value \"" << c <<
"\" is out of range";