libzypp  17.38.7
zypp::base Namespace Reference

Namespaces

 logger
 
 sysconfig
 

Classes

class  ContainerTransform
 Helper managing a container of raw values with transformed representation. More...
 
class  DrunkenBishop
 Random art fingerprint visualization Visualize fingerprint data on a [17x9] (SSH) or [19x11] (GPG) or custom sized board. More...
 
class  Flags
 A type-safe way of storing OR-combinations of enum values (like QTs QFlags). More...
 
class  LogControl
 Maintain logfile related options. More...
 
struct  ProfilingFormater
 
struct  ProvideNumericId
 Base class for objects providing a numeric Id. More...
 
class  ReferenceCounted
 Base class for reference counted objects. More...
 
class  SetRelationMixin
 Provide set relation methods based on Derived::setRelationMixinCompare A class using this mixin must provide: More...
 
class  SetTracker
 Track added/removed set items based on an initial set. More...
 
class  Unit
 Simple handling of Units. More...
 
class  ValueTransform
 Helper managing raw values with transformed representation. More...
 

Typedefs

using NonCopyable = boost::noncopyable
 Ensure derived classes cannot be copied. More...
 

Functions

int random_int ()
 
std::string random_string (int length)
 
unsigned random ()
 Return a random number from [0,RAND_MAX[. More...
 
unsigned random (unsigned size_r)
 Return a random number from [0,size_r[. More...
 
unsigned random (unsigned min_r, unsigned size_r)
 Return a random number from [min_r,min_r+size_r[. More...
 
template<class Derived >
SetCompare compare (const SetRelationMixin< Derived > &src, const SetRelationMixin< Derived > &trg)
 relates: SetRelationMixin Compare sets More...
 
template<class Derived >
bool compare (const SetRelationMixin< Derived > &src, const SetRelationMixin< Derived > &trg, SetCompare cmp)
 relates: SetRelationMixin Compare sets and match against SetCompare More...
 
template<class Derived >
bool compare (const SetRelationMixin< Derived > &src, const SetRelationMixin< Derived > &trg, SetRelation rel)
 relates: SetRelationMixin Compare sets and match against SetRelation More...
 
template<class Derived >
bool operator== (const SetRelationMixin< Derived > &src, const SetRelationMixin< Derived > &trg)
 relates: SetRelationMixin Equal More...
 
template<class Derived >
bool operator!= (const SetRelationMixin< Derived > &src, const SetRelationMixin< Derived > &trg)
 relates: SetRelationMixin Unequal More...
 
template<class TSet >
std::ostream & operator<< (std::ostream &str, const SetTracker< TSet > &obj)
 relates: SetTracker Stream output More...
 
 ZYPP_DECLARE_OPERATORS_FOR_FLAGS (DrunkenBishop::Options)
 
std::ostream & operator<< (std::ostream &str, const DrunkenBishop &obj)
 relates: DrunkenBishop Stream output More...
 
template<typename Enum >
std::string stringify (const Flags< Enum > &flag_r, const std::initializer_list< std::pair< Flags< Enum >, std::string > > &flaglist_r={}, std::string intro_r="[", std::string sep_r="|", const std::string &extro_r="]")
 relates: Flags Stringify Build a string of OR'ed names of each flag value set in flag_r. More...
 
template<typename TEnum >
std::ostream & operator<< (std::ostream &str, const Flags< TEnum > &obj)
 
template<typename TEnum >
std::ostream & operator<< (std::ostream &str, const typename Flags< TEnum >::Enum &obj)
 
std::ostream & operator<< (std::ostream &str, const LogControl &obj) ZYPP_API
 relates: LogControl Stream output More...
 
void intrusive_ptr_add_ref (const ReferenceCounted *ptr_r)
 relates: ReferenceCounted intrusive_ptr hook to add_ref. More...
 
void intrusive_ptr_release (const ReferenceCounted *ptr_r)
 relates: ReferenceCounted intrusive_ptr hook to release. More...
 
std::ostream & operator<< (std::ostream &str, const ReferenceCounted &obj)
 relates: ReferenceCounted Stream output. More...
 

Typedef Documentation

◆ NonCopyable

using zypp::base::NonCopyable = typedef boost::noncopyable

Ensure derived classes cannot be copied.

Use private inheritance.

Definition at line 26 of file NonCopyable.h.

Function Documentation

◆ random_int()

int zypp::base::random_int ( )

Definition at line 10 of file Random.cc.

◆ random_string()

std::string zypp::base::random_string ( int  length)

Definition at line 31 of file Random.cc.

◆ random() [1/3]

unsigned zypp::base::random ( )
inline

Return a random number from [0,RAND_MAX[.

Definition at line 28 of file Random.h.

◆ random() [2/3]

unsigned zypp::base::random ( unsigned  size_r)
inline

Return a random number from [0,size_r[.

Definition at line 33 of file Random.h.

◆ random() [3/3]

unsigned zypp::base::random ( unsigned  min_r,
unsigned  size_r 
)
inline

Return a random number from [min_r,min_r+size_r[.

Definition at line 38 of file Random.h.

◆ compare() [1/3]

template<class Derived >
SetCompare zypp::base::compare ( const SetRelationMixin< Derived > &  src,
const SetRelationMixin< Derived > &  trg 
)
inline

relates: SetRelationMixin Compare sets

Definition at line 182 of file SetRelationMixin.h.

◆ compare() [2/3]

template<class Derived >
bool zypp::base::compare ( const SetRelationMixin< Derived > &  src,
const SetRelationMixin< Derived > &  trg,
SetCompare  cmp 
)
inline

relates: SetRelationMixin Compare sets and match against SetCompare

Definition at line 187 of file SetRelationMixin.h.

◆ compare() [3/3]

template<class Derived >
bool zypp::base::compare ( const SetRelationMixin< Derived > &  src,
const SetRelationMixin< Derived > &  trg,
SetRelation  rel 
)
inline

relates: SetRelationMixin Compare sets and match against SetRelation

Definition at line 192 of file SetRelationMixin.h.

◆ operator==()

template<class Derived >
bool zypp::base::operator== ( const SetRelationMixin< Derived > &  src,
const SetRelationMixin< Derived > &  trg 
)
inline

relates: SetRelationMixin Equal

Definition at line 197 of file SetRelationMixin.h.

◆ operator!=()

template<class Derived >
bool zypp::base::operator!= ( const SetRelationMixin< Derived > &  src,
const SetRelationMixin< Derived > &  trg 
)
inline

relates: SetRelationMixin Unequal

Definition at line 202 of file SetRelationMixin.h.

◆ operator<<() [1/6]

template<class TSet >
std::ostream& zypp::base::operator<< ( std::ostream &  str,
const SetTracker< TSet > &  obj 
)

relates: SetTracker Stream output

Definition at line 191 of file SetTracker.h.

◆ ZYPP_DECLARE_OPERATORS_FOR_FLAGS()

zypp::base::ZYPP_DECLARE_OPERATORS_FOR_FLAGS ( DrunkenBishop::Options  )

◆ operator<<() [2/6]

std::ostream& zypp::base::operator<< ( std::ostream &  str,
const DrunkenBishop obj 
)
inline

relates: DrunkenBishop Stream output

Definition at line 123 of file DrunkenBishop.h.

◆ stringify()

template<typename Enum >
std::string zypp::base::stringify ( const Flags< Enum > &  flag_r,
const std::initializer_list< std::pair< Flags< Enum >, std::string > > &  flaglist_r = {},
std::string  intro_r = "[",
std::string  sep_r = "|",
const std::string &  extro_r = "]" 
)

relates: Flags Stringify Build a string of OR'ed names of each flag value set in flag_r.

Remaining bits in flag_r are added as hexstring.

enum E { a=1, b=2, c=4 };
ZYPP_DECLARE_FLAGS( E, MyFlags );
MyFlags f = a|b|c;
cout << f << " = " << stringify( f, { {a,"A"}, {b,"B"} } ) << endl;
// prints: 0x0007 = [A|B|0x4]

Definition at line 137 of file Flags.h.

◆ operator<<() [3/6]

template<typename TEnum >
std::ostream& zypp::base::operator<< ( std::ostream &  str,
const Flags< TEnum > &  obj 
)
inline

Definition at line 166 of file Flags.h.

◆ operator<<() [4/6]

template<typename TEnum >
std::ostream& zypp::base::operator<< ( std::ostream &  str,
const typename Flags< TEnum >::Enum &  obj 
)
inline

Definition at line 170 of file Flags.h.

◆ operator<<() [5/6]

std::ostream & zypp::base::operator<< ( std::ostream &  str,
const LogControl  
)

relates: LogControl Stream output

Definition at line 993 of file LogControl.cc.

◆ intrusive_ptr_add_ref()

void zypp::base::intrusive_ptr_add_ref ( const ReferenceCounted ptr_r)
inline

relates: ReferenceCounted intrusive_ptr hook to add_ref.

Definition at line 119 of file ReferenceCounted.h.

◆ intrusive_ptr_release()

void zypp::base::intrusive_ptr_release ( const ReferenceCounted ptr_r)
inline

relates: ReferenceCounted intrusive_ptr hook to release.

Definition at line 123 of file ReferenceCounted.h.

◆ operator<<() [6/6]

std::ostream& zypp::base::operator<< ( std::ostream &  str,
const ReferenceCounted obj 
)
inline

relates: ReferenceCounted Stream output.

Stream output via dumpOn.

Definition at line 127 of file ReferenceCounted.h.