69 switch ( oid2.
Which() ) {
79 if (
id > 0 &&
str[0] !=
'0' &&
str[0] !=
'+' ) {
111 if (
str.size() != 1 ) {
120 if (
str[0] ==
'0' ||
str[0] ==
'+' ) {
128 if (
str[1] ==
'0' ) {
150 if (
int diff =
type - type2 ) {
169 "CObject_id doesn't have Int8 value");
189 if ( !
str.empty() &&
str[0] >=
'1' &&
str[0] <=
'9' ) {
236 shared_id->
SetId(
id);
DEFINE_STATIC_FAST_MUTEX(s_SharedIdMutex)
E_Choice GetIdType(TId8 &value) const
void SetStrOrId(CTempString str)
bool SetAsMatchingTo(const CObject_id &oid2)
ostream & AsString(ostream &s) const
int Compare(const CObject_id &oid2) const
bool Match(const CObject_id &oid2) const
CObject_id & ReadSharedObject_id(CObjectIStream &in)
Reads Object-id and returns reference to its shared version.
CObject_id & GetSharedObject_id(const string &id)
Returns shared version of Object-id with specified 'str' field value.
Root class for all serialization exceptions.
CTempString implements a light-weight string on top of a storage buffer whose lifetime management is ...
Include a standard set of the NCBI C++ Toolkit most basic headers.
static const char * str(char *buf, int n)
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
int Compare(const T &s1, const T &s2) const
Return difference between "s1" and "s2".
static int StringToNonNegativeInt(const CTempString str, TStringToNumFlags flags=0)
Convert string to non-negative integer value.
static Int8 StringToInt8(const CTempString str, TStringToNumFlags flags=0, int base=10)
Convert string to Int8.
PNocase_Generic< string > PNocase
static enable_if< is_arithmetic< TNumeric >::value||is_convertible< TNumeric, Int8 >::value, string >::type NumericToString(TNumeric value, TNumToStringFlags flags=0, int base=10)
Convert numeric value to string.
@ fConvErr_NoErrMessage
Set errno, but do not set CNcbiError message on error.
@ fConvErr_NoThrow
Do not throw an exception on error.
E_Choice Which(void) const
Which variant is currently selected.
const TStr & GetStr(void) const
Get the variant data.
TStr & SetStr(void)
Select the variant.
TId & SetId(void)
Select the variant.
TId GetId(void) const
Get the variant data.
@ e_not_set
No variant selected.
const GenericPointer< typename T::ValueType > T2 value
Multi-threading – mutexes; rw-locks; semaphore.
std::istream & in(std::istream &in_, double &x_)