1 #ifndef CORELIB___NCBIMISC__HPP
2 #define CORELIB___NCBIMISC__HPP
40 #ifdef HAVE_SYS_TYPES_H
41 # include <sys/types.h>
44 #if __has_include(<format>)
48 #if !defined(HAVE_NULLPTR) && !defined(nullptr)
59 #ifndef NCBI_ESWITCH_DEFINED
60 #define NCBI_ESWITCH_DEFINED
85 #ifndef NCBI_EOWNERSHIP_DEFINED
86 #define NCBI_EOWNERSHIP_DEFINED
184 #define DECLARE_SAFE_BOOL_METHOD(Expr) \
185 struct SSafeBoolTag { \
186 void SafeBoolTrue(SSafeBoolTag*) {} \
188 typedef void (SSafeBoolTag::*TBoolType)(SSafeBoolTag*); \
189 operator TBoolType() const { \
190 return (Expr)? &SSafeBoolTag::SafeBoolTrue: 0; \
193 bool operator==(TBoolType) const; \
194 bool operator!=(TBoolType) const; \
196 friend struct SSafeBoolTag
203 #define DECLARE_OPERATOR_BOOL(Expr) \
204 DECLARE_SAFE_BOOL_METHOD(Expr)
210 #define DECLARE_OPERATOR_BOOL_PTR(Ptr) \
211 DECLARE_OPERATOR_BOOL((Ptr) != 0)
217 #define DECLARE_OPERATOR_BOOL_REF(Ref) \
218 DECLARE_OPERATOR_BOOL((Ref).NotNull())
224 #define OVERRIDE_OPERATOR_BOOL(TAncestorClass, NewBoolExpr) \
225 using TAncestorClass::TBoolType; \
226 using TAncestorClass::SSafeBoolTag; \
227 operator TBoolType() const { \
228 return (NewBoolExpr)? & SSafeBoolTag::SafeBoolTrue : 0; \
248 template<
class Base,
class Member>
298 if (
static_cast<void*
>(&
first()) !=
static_cast<void*
>(&
second())){
317 template <
class TEnum>
328 operator TEnum ()
const {
return TEnum(
m_Value); }
341 operator unsigned int()
const;
408 #define DEPRECATE_AUTO_PTR 1
410 template<
class X,
class Del = Deleter<X> >
442 #if DEPRECATE_AUTO_PTR
456 m_Ptr = p.x_Release();
465 #if DEPRECATE_AUTO_PTR
470 auto data = p.m_Data;
483 auto data = p.m_Data;
484 reset(p.x_Release());
516 #if DEPRECATE_AUTO_PTR > 1
579 template<
class X,
class Del = ArrayDeleter<X> >
606 #if DEPRECATE_AUTO_PTR
620 m_Ptr = p.x_Release();
628 #if DEPRECATE_AUTO_PTR
633 auto data = p.m_Data;
646 auto data = p.m_Data;
647 reset(p.x_Release());
671 #if DEPRECATE_AUTO_PTR > 1
737 #ifdef __cpp_using_enum
754 template <
class TValue>
770 template <
class TValue,
class TNullToValue = SThrowOnNull<TValue> >
794 operator TValue(
void)
const
805 const_cast<TValue&
>(
m_Value) = TNullToValue()();
815 *
this = TNullToValue()();
839 template <
class TValue,
class TNullToValue = SThrowOnNull<TValue> >
842 return (
l.IsNull() &&
r.IsNull()) ||
843 (!
l.IsNull() && !
r.IsNull() &&
l.GetValue() ==
r.GetValue());
845 template <
class TValue,
class TNullToValue = SThrowOnNull<TValue> >
885 template<
typename Type>
890 #define ITERATE_CONST(Cont) ncbi::s_ITERATE_ConstRef(Cont)
894 template<
typename Type>
897 return &obj1 == &obj2;
899 # define ITERATE_BEGIN(Cont, Begin) \
900 (NCBI_ASSERT_EXPR(ncbi::s_ITERATE_SameObject(Cont, Cont), \
901 "rvalue container in *ITERATE"), (Cont).Begin())
903 # define ITERATE_BEGIN(Cont, Begin) ((Cont).Begin())
907 #if 0 && defined(NCBI_HAVE_CXX11)
908 # define ITERATE_VAR(Type) auto
910 # define ITERATE_VAR(Type) Type
914 #define ITERATE(Type, Var, Cont) \
915 for ( ITERATE_VAR(Type::const_iterator) \
916 Var = ITERATE_BEGIN(ITERATE_CONST(Cont), begin), \
917 NCBI_NAME2(Var,_end) = ITERATE_CONST(Cont).end(); \
918 Var != NCBI_NAME2(Var,_end); ++Var )
921 #define NON_CONST_ITERATE(Type, Var, Cont) \
922 for ( ITERATE_VAR(Type::iterator) Var = ITERATE_BEGIN(Cont, begin); \
923 Var != (Cont).end(); ++Var )
926 #define REVERSE_ITERATE(Type, Var, Cont) \
927 for ( ITERATE_VAR(Type::const_reverse_iterator) \
928 Var = ITERATE_BEGIN(ITERATE_CONST(Cont), rbegin), \
929 NCBI_NAME2(Var,_end) = ITERATE_CONST(Cont).rend(); \
930 Var != NCBI_NAME2(Var,_end); ++Var )
933 #define NON_CONST_REVERSE_ITERATE(Type, Var, Cont) \
934 for ( ITERATE_VAR(Type::reverse_iterator) \
935 Var = ITERATE_BEGIN(Cont, rbegin); \
936 Var != (Cont).rend(); ++Var )
942 #define ERASE_ITERATE(Type, Var, Cont) \
943 for ( ITERATE_VAR(Type::iterator) Var = ITERATE_BEGIN(Cont, begin), \
944 NCBI_NAME2(Var,_next) = Var; \
945 (Var = NCBI_NAME2(Var,_next)) != (Cont).end() && \
946 (++NCBI_NAME2(Var,_next), true); )
951 #define VECTOR_ERASE(Var, Cont) (NCBI_NAME2(Var,_next) = (Cont).erase(Var))
960 #define ITERATE_BOTH_BOOL_VALUES(BoolVar) \
961 for( bool BoolVar##BOTH_BOOL_VALUES_DONE##__LINE__ = false, BoolVar = false; ! BoolVar##BOTH_BOOL_VALUES_DONE##__LINE__ ; BoolVar##BOTH_BOOL_VALUES_DONE##__LINE__ = BoolVar, BoolVar = true )
964 #define ITERATE_0_IDX(idx, up_to) \
965 for( TSeqPos idx = 0; idx < up_to; ++idx )
968 #define ITERATE_SIMPLE(num_iters) \
969 ITERATE_0_IDX( _dummy_idx_94768308_##__LINE__, num_iters )
990 template<
class TKey,
class TStorage>
1024 #if !defined(NCBI_TEST_APPLICATION)
1025 template<
typename T>
1029 template<
typename T>
1031 template<
typename T>
1033 template<
typename T>
1036 operator T(
void)
const {
return static_cast<T>(
m_Id); }
1043 template<
class TKey,
class TStorage>
1047 return out <<
id.Get();
1050 template<
class TKey,
class TStorage>
1069 #if defined(NCBI_INT4_GI)
1070 # ifdef NCBI_INT8_GI
1071 # error "Both NCBI_INT4_GI and NCBI_INT8_GI must not be defined!"
1073 # ifdef NCBI_STRICT_GI
1074 # error "Both NCBI_INT4_GI and NCBI_STRICT_GI must not be defined!"
1076 #elif !defined(NCBI_INT8_GI)
1077 # define NCBI_INT8_GI
1080 #ifdef NCBI_TEST_STRICT_ENTREZ_ID
1082 #define NCBI_STRICT_ENTREZ_ID
1085 # ifdef NCBI_STRICT_ENTREZ_ID
1086 # undef NCBI_STRICT_ENTREZ_ID
1090 #ifndef NCBI_STRICT_GI
1091 # undef NCBI_STRICT_ENTREZ_ID
1092 # undef NCBI_STRICT_TAX_ID
1122 #ifdef NCBI_STRICT_GI
1137 #ifdef NCBI_STRICT_ENTREZ_ID
1144 #ifdef NCBI_STRICT_TAX_ID
1152 template<
class TId, TId
id>
1155 #ifndef NCBI_COMPILER_MSVC
1160 static const TId
value = id;
1164 #ifdef NCBI_STRICT_GI
1167 #define STRICT_ID_TO(TId, TInt, id) (static_cast<TInt>((id).Get()))
1168 #define STRICT_ID_FROM(TIdType, TIntType, id) (TIdType(static_cast<TIdType::TId>(id)))
1169 #define STRICT_ID_CONST(type, id) \
1170 (type(static_cast<type::TId>(ncbi::CConstIdChecker<type::TId, id>::value)))
1171 #define STRICT_ID_ZERO(type) STRICT_ID_CONST(type, 0)
1172 #define STRICT_ID_INVALID(type) STRICT_ID_CONST(type, -1)
1176 #define STRICT_ID_TO(TId, TInt, id) (static_cast<TInt>(id))
1177 #define STRICT_ID_FROM(TIdType, TIntType, id) (static_cast<TIdType>(id))
1178 #define STRICT_ID_CONST(type, id) (ncbi::CConstIdChecker<type, id>::value)
1179 #define STRICT_ID_ZERO(type) type(0)
1180 #define STRICT_ID_INVALID(type) type(-1)
1184 #define GI_TO(T, gi) STRICT_ID_TO(ncbi::TGi, T, gi)
1185 #define GI_FROM(T, value) STRICT_ID_FROM(ncbi::TGi, T, value)
1186 #define GI_CONST(gi) STRICT_ID_CONST(ncbi::TGi, gi)
1187 #define ZERO_GI STRICT_ID_ZERO(ncbi::TGi)
1188 #define INVALID_GI STRICT_ID_INVALID(ncbi::TGi)
1191 #ifdef NCBI_STRICT_ENTREZ_ID
1192 # define ENTREZ_ID_TO(T, entrez_id) STRICT_ID_TO(ncbi::TEntrezId, T, entrez_id)
1193 # define ENTREZ_ID_FROM(T, value) STRICT_ID_FROM(ncbi::TEntrezId, T, value)
1194 # define ENTREZ_ID_CONST(id) STRICT_ID_CONST(ncbi::TEntrezId, id)
1196 # define ENTREZ_ID_TO(T, entrez_id) (static_cast<T>(entrez_id))
1197 # define ENTREZ_ID_FROM(T, value) (static_cast<ncbi::TEntrezId>(value))
1198 # define ENTREZ_ID_CONST(id) id
1201 #define ZERO_ENTREZ_ID ENTREZ_ID_CONST(0)
1202 #define INVALID_ENTREZ_ID ENTREZ_ID_CONST(-1)
1204 #ifdef NCBI_STRICT_TAX_ID
1205 # define TAX_ID_TO(T, tax_id) STRICT_ID_TO(ncbi::TTaxId, T, tax_id)
1206 # define TAX_ID_FROM(T, value) STRICT_ID_FROM(ncbi::TTaxId, T, value)
1207 # define TAX_ID_CONST(id) STRICT_ID_CONST(ncbi::TTaxId, id)
1209 # define TAX_ID_TO(T, tax_id) (static_cast<T>(tax_id))
1210 # define TAX_ID_FROM(T, value) (static_cast<ncbi::TTaxId>(value))
1211 # define TAX_ID_CONST(id) id
1214 #define ZERO_TAX_ID TAX_ID_CONST(0)
1215 #define INVALID_TAX_ID TAX_ID_CONST(-1)
1219 #define INT_ID_TO(T, id) (static_cast<T>(id))
1220 #define INT_ID_FROM(T, value) (static_cast<ncbi::TIntId>(value))
1238 return static_cast<char*
> (object) +
offset;
1244 return static_cast<const char*
> (object) +
offset;
1251 (
static_cast<const char*
> (
first) -
static_cast<const char*
> (second));
1263 template <
size_t KEmbeddedSize,
class TType =
char>
1305 #if defined(NCBI_COMPILER_MSVC)
1306 # define NCBI_DEPRECATED_CTOR(decl) NCBI_DEPRECATED decl
1308 # define NCBI_DEPRECATED_CTOR(decl) decl NCBI_DEPRECATED
1314 #define NCBI_DEPRECATED_CLASS NCBI_DEPRECATED_CTOR(class)
1319 # undef NCBI_DEPRECATED_CTOR
1320 # undef NCBI_DEPRECATED_CLASS
1321 # define NCBI_DEPRECATED_CTOR(decl) decl __attribute__((deprecated))
1322 # define NCBI_DEPRECATED_CLASS class __attribute__((deprecated))
1326 #ifdef NCBI_ENABLE_SAFE_FLAGS
1357 template<
class Enum>
1386 return get() ==
b.get();
1390 return get() !=
b.get();
1446 #define DECLARE_SAFE_FLAGS_TYPE(E, T) \
1447 typedef ncbi::CSafeFlags<E> T
1454 #define DECLARE_SAFE_FLAGS(E) \
1455 inline ncbi::CSafeFlags<E> operator|(E a, E b) \
1456 { return ncbi::CSafeFlags<E>(a) | b; } \
1457 inline ncbi::CSafeFlags<E> operator&(E a, E b) \
1458 { return ncbi::CSafeFlags<E>(a) & b; } \
1459 inline ncbi::CSafeFlags<E> operator^(E a, E b) \
1460 { return ncbi::CSafeFlags<E>(a) ^ b; } \
1461 inline ncbi::CSafeFlags<E> operator~(E a) \
1462 { return ~ncbi::CSafeFlags<E>(a); }
1479 template<
class E>
inline
1487 # define DECLARE_SAFE_FLAGS_TYPE(Enum,Typedef) typedef underlying_type<Enum>::type Typedef
1488 # define DECLARE_SAFE_FLAGS(Enum)
1511 catch (exception& e) {
1512 ERR_POST(
"Error executing action: " << e.what());
1551 template <
class T,
class U = conditional_t<is_po
inter_v<T>, remove_po
inter_t<T>, T>>
1555 template <
class T,
typename TDeleter>
1577 #define NCBI_EXPORT_FUNC_DECLARE(lib, func) \
1578 namespace NCBI_ ## lib \
1580 namespace S ## func \
1582 using T = decltype(func); \
1584 NCBI_ ## lib ## _EXPORT T* F(); \
1586 template <class T> \
1589 template <class TR, class... TArgs> \
1590 struct S<TR (TArgs...)> \
1592 static TR Call(TArgs... args) { return F()(args...); } \
1596 constexpr auto func = S ## func::S<S ## func::T>::Call; \
1599 #define NCBI_EXPORT_FUNC_DEFINE(lib, func) \
1600 namespace NCBI_ ## lib \
1602 namespace S ## func \
1604 T* F() { return ::func; } \
1614 template<
class T1,
class T2>
1616 void swap(ncbi::pair_base_member<T1,T2>& pair1,
1617 ncbi::pair_base_member<T1,T2>& pair2) noexcept
1623 template<
class P,
class D>
1625 void swap(ncbi::AutoPtr<P,D>& ptr1,
1626 ncbi::AutoPtr<P,D>& ptr2) noexcept
1632 template<
class Element,
size_t Size>
1639 #ifdef NCBI_STRICT_GI
1642 size_t operator()(
const ncbi::CStrictId<TKey, TStorage> & x)
const
1648 # if __has_include(<format>)
1649 template <
class TKey,
class TStorage,
class TChar>
1651 :
public formatter<TStorage, TChar>
1653 typedef ncbi::CStrictId<TKey, TStorage>
TId;
1655 template<
class TFmtContext>
1656 TFmtContext::iterator
format(
const TId&
id, TFmtContext&
ctx)
const {
Template used to replace bool type arguments with some strict equivalent.
a helper template to enforce constness of argument to GI_CONST macro
CNcbiActionGuard class Executes registered callbacks on request or on destruction.
Template class allowing to store a value or null (unassigned) state.
Support for safe enum flags.
Template class for strict ID types.
definition of a Culling tree
Template used for empty base class optimization.
std::ofstream out("events_result.xml")
main entry point for tests
static DLIST_TYPE *DLIST_NAME() first(DLIST_LIST_TYPE *list)
static const char * str(char *buf, int n)
AutoPtr(element_type *p, EOwnership ownership) noexcept
Constructor, own the pointed object if ownership == eTakeOwnership.
element_type & operator*(void) const noexcept
Dereference operator.
void reset() noexcept
Reset will delete the old pointer (if owned)
element_type * m_Ptr
Internal pointer representation.
TValue operator()(void) const
virtual ~CNcbiActionGuard(void)
SStrictId_Entrez::TId TEntrezId
TEntrezId type for entrez ids which require the same strictness as TGi.
const Type & s_ITERATE_ConstRef(const Type &obj)
NCBI_XNCBI_EXPORT void g_ThrowOnNull(void)
Del deleter_type
Alias for template argument.
#define DECLARE_OPERATOR_BOOL(Expr)
Declaration of safe bool operator from boolean expression.
~AutoPtr(void)
Destructor.
CNcbiActionGuard & operator=(const CNcbiActionGuard &)
ETriState
Enumeration to represent a tristate value.
CSafeFlags operator~() const
CNcbiOstream & operator<<(CNcbiOstream &out, const CStrictId< TKey, TStorage > &id)
void AddAction(TFunc func)
CAction_Base & operator=(const CAction_Base &)
X element_type
Define element type.
CSafeFlags & operator|=(const CSafeFlags &b)
enum ENcbiSwitch ESwitch
Aux.
AutoArray< X, Del > & operator=(const AutoArray< X, Del > &p) noexcept
Assignment operator.
const element_type & operator[](size_t pos) const noexcept
Array style dereference (returns value)
CStrictId(T id, typename enable_if< is_same< T, TId >::value, T >::type=0)
AutoPtr(element_type *p) noexcept
Constructor.
void ExecuteActions(void)
bool operator!=(const CNullable< TValue, TNullToValue > &l, const CNullable< TValue, TNullToValue > &r)
constexpr CSafeFlags(storage_type flags)
void swap(ncbi::pair_base_member< T1, T2 > &pair1, ncbi::pair_base_member< T1, T2 > &pair2) noexcept
char * strdup(const char *str)
Supply string duplicate function, if one is not defined.
AutoArray< X, Del > & operator=(AutoArray< X, Del > &&p) noexcept
Move assignment operator.
AutoArray(element_type *p, const deleter_type &deleter) noexcept
AutoPtr() noexcept
Constructor.
unique_ptr< U, void(*)(U *)> c_unique_ptr
Template helpers for unique_ptr to work with resource allocating/deallocating C functions.
bool operator==(const CSafeFlags &b) const
CSafeFlags operator&(const CSafeFlags &b) const
pair_base_member(const first_type &first_value, const second_type &second_value)
ERetriable
Can the action be retried?
CAction_Base(const CAction_Base &)
pair_base_member< deleter_type, bool > m_Data
State info.
CSafeFlags< E > operator|(E a, CSafeFlags< E > b)
Helper operators for safe-flags enums.
bool operator!=(const CSafeFlags &b) const
bool operator<(const TThis &id) const
CSafeFlags operator|(const CSafeFlags &b) const
element_type & operator[](size_t pos) noexcept
Array style dereference (returns reference)
AutoPtr< X, Del > & operator=(element_type *p) noexcept
Assignment operator.
TThis operator-(const TThis &id) const
static ssize_t Sub(const void *first, const void *second)
calculate offset inside object
void Swap(AutoPtr< X, Del > &a) noexcept
bool IsNull(void) const
Check if the object is unassigned.
CFastBuffer(size_t buf_size)
CNcbiActionGuard(const CNcbiActionGuard &)
second_type & second() noexcept
void Execute(void) const override
AutoPtr< X, Del > & operator=(AutoPtr< X, Del > &&p) noexcept
Move assignment operator.
AutoPtr(element_type *p, const deleter_type &deleter) noexcept
Constructor.
void Swap(pair_base_member< first_type, second_type > &p) noexcept
X element_type
Define element type.
ERound
Whether to truncate/round a value.
AutoArray(const AutoArray< X, Del > &p) noexcept
Copy constructor.
TThis & operator=(const TThis &other)
static void * Add(void *object, ssize_t offset)
add offset to object reference (to get object's member)
element_type * x_Release(void) const noexcept
Release for const object, used in deprecated methods.
bool IsOwned(void) const noexcept
unsigned int TSeqPos
Type for sequence locations and lengths.
element_type * operator->(void) const noexcept
Reference operator.
bool operator==(const TThis &id) const
bool operator<=(const TThis &id) const
CSafeFlags operator^(const CSafeFlags &b) const
constexpr size_t ArraySize(const Element(&)[Size])
CNullable(TValue value)
Initialize nullable with a specific value.
first_type & first() noexcept
CStrictId< TKey, TStorage > TThis
size_t operator()(const ncbi::CStrictId< TKey, TStorage > &x) const
TType m_EmbeddedBuffer[KEmbeddedSize]
AutoPtr< X, Del > & operator=(const AutoPtr< X, Del > &p) noexcept
Assignment operator.
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
ENormalizePath
Whether to normalize a path.
pair_base_member< deleter_type, bool > m_Data
State info.
bool s_ITERATE_SameObject(const Type &obj1, const Type &obj2)
CSafeFlags & operator^=(const CSafeFlags &b)
CNullable(ENull=null)
Create an empty nullable.
underlying_type< enum_type >::type storage_type
bool operator>=(const TThis &id) const
AutoArray(element_type *p) noexcept
int TSignedSeqPos
Type for signed sequence position.
bool IsOwned(void) const noexcept
AutoArray< X, Del > & operator=(element_type *p) noexcept
Assignment operator.
static X * Create(void)
Default create function.
bool operator==(const CNullable< TValue, TNullToValue > &l, const CNullable< TValue, TNullToValue > &r)
element_type * get(void) const noexcept
Get pointer.
enum ENcbiOwnership EOwnership
Ownership relations between objects.
const TType * begin(void) const
TValue & SetValue(void)
Get a non-const reference to the value.
static void Delete(X *object)
Array delete function.
pair_base_member(member_type &&member_value) noexcept
element_type * x_Release(void) const noexcept
Release for const object, used in deprecated methods.
AutoArray(AutoArray< X, Del > &&p) noexcept
Move constructor.
void reset(element_type *p, EOwnership ownership=eTakeOwnership) noexcept
Reset will delete the old pointer (if owned), set content to the new value, and assume the ownership ...
EFollowLinks
Whether to follow symbolic links (also known as shortcuts or aliases)
void reset(element_type *p) noexcept
Reset will delete the old pointer, set content to the new value, and assume the ownership upon the ne...
TType operator[](size_t pos) const
const second_type & second() const noexcept
CStrictId< SStrictId_Gi, SStrictId_Gi::TId > TGi
static void Delete(X *object)
Default delete function.
TType * operator+(size_t offset)
element_type * release(void) noexcept
Release will release ownership of pointer to caller.
unique_ptr< T, TDeleter > make_c_unique(T *p, TDeleter d)
Eliminates the necessity for specifying types of both allocated resource and deallocating C function.
CStrictId(const TThis &other)
element_type * release(void) noexcept
Release will release ownership of pointer to caller.
TThis operator+(const TThis &id) const
SStrictId_Tax::TId TTaxId
Taxon id type.
Del deleter_type
Alias for template argument.
EInterruptOnSignal
Interrupt on signal mode.
CSafeFlags & operator&=(const CSafeFlags &b)
CNcbiIstream & operator>>(CNcbiIstream &in, CStrictId< TKey, TStorage > &id)
static void Delete(X *object)
C Language deallocation function.
bool operator==(int v) const
BEGIN_NCBI_NAMESPACE
NCBI_EOWNERSHIP_DEFINED.
AutoPtr(element_type *p, const deleter_type &deleter, EOwnership ownership) noexcept
Constructor, own the pointed object if ownership == eTakeOwnership.
#define DECLARE_OPERATOR_BOOL_PTR(Ptr)
Declaration of safe bool operator from pointer expression.
void Swap(AutoPtr< X, Del > &a) noexcept
CSafeFlags< E > operator&(E a, CSafeFlags< E > b)
void reset() noexcept
Reset will delete the old pointer.
CSafeFlags< E > operator^(E a, CSafeFlags< E > b)
const TSeqPos kInvalidSeqPos
Define special value for invalid sequence position.
CNullable & operator=(TValue value)
Assign a value to the nullable.
ENullable
Whether a value is nullable.
const first_type & first() const noexcept
TThis operator-(void) const
list< unique_ptr< CAction_Base > > TActions
AutoPtr(const AutoPtr< X, Del > &p) noexcept
Copy constructor.
bool operator!=(int v) const
constexpr CSafeFlags(enum_type flags)
AutoArray(size_t size) noexcept
Construct the array using C++ new[] operator.
virtual void Execute(void) const =0
ESign
Signedness of a value.
bool operator!=(const TThis &id) const
AutoPtr(AutoPtr< X, Del > &&p) noexcept
Move constructor.
element_type * get(void) const noexcept
Get pointer.
bool operator>(const TThis &id) const
pair_base_member(const member_type &member_value)
const TValue & GetValue(void) const
Get a const reference to the current value.
const TType * end(void) const
@ eTriState_False
The value is equivalent to false/no.
@ eTriState_True
The value is equivalent to true/yes.
@ eTriState_Unknown
The value is indeterminate.
@ eRetriable_Unknown
It is unknown if the action can succeed if retried.
@ eRetriable_No
It makes no sense to retry the action.
@ eRetriable_Yes
It makes sense to try again.
@ eTrunc
Value must be truncated.
@ eRound
Value must be rounded.
@ eNormalizePath
Normalize a path.
@ eNotNormalizePath
Do not normalize a path.
@ eIgnoreLinks
Do not follow symbolic links.
@ eFollowLinks
Follow symbolic links.
@ eRestartOnSignal
Restart operation if interrupted by a signal.
@ eInterruptOnSignal
Cancel operation if interrupted by a signal.
@ eNotNullable
Value cannot be null.
@ eNullable
Value can be null.
@ eNegative
Value is negative.
@ ePositive
Value is positive.
@ eTakeOwnership
No ownership assumed.
#define ERR_POST(message)
Error posting with file, line number information but without error codes.
int32_t Int4
4-byte (32-bit) signed integer
uint32_t Uint4
4-byte (32-bit) unsigned integer
int64_t Int8
8-byte (64-bit) signed integer
uint64_t Uint8
8-byte (64-bit) unsigned integer
IO_PREFIX::ostream CNcbiOstream
Portable alias for ostream.
IO_PREFIX::istream CNcbiIstream
Portable alias for istream.
enum ENcbiOwnership EOwnership
Ownership relations between objects.
ENcbiOwnership
Ownership relations between objects.
#define NCBI_XNCBI_EXPORT
unsigned int
A callback function used to compare two keys in a database.
The blob sat and sat key Both must be positive integers</td > n< td > Non empty string The interpretation of the blob id depends on a processor Cassandra n processor expects the following format
const struct ncbi::grid::netcache::search::fields::SIZE size
const GenericPointer< typename T::ValueType > T2 value
NCBI C++ auxiliary debug macros.
std::istream & in(std::istream &in_, double &x_)
double r(size_t dimension_, const Int4 *score_, const double *prob_, double theta_)
static SLJIT_INLINE sljit_ins l(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)
Functor template for deleting array of objects.
Functor template for the C language deallocation function, free().
Functor template for allocating object.
Functor template for deleting object.
Key structs must always be defined - they are used in aliasinfo.cpp.