CernVM-FS  2.9.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ShortString< StackSize, Type > Class Template Reference

#include <shortstring.h>

Inheritance diagram for ShortString< StackSize, Type >:

Public Member Functions

 ShortString ()
 
 ShortString (const ShortString &other)
 
 ShortString (const char *chars, const unsigned length)
 
 ShortString (const std::string &std_string)
 
ShortStringoperator= (const ShortString &other)
 
 ~ShortString ()
 
void Assign (const char *chars, const unsigned length)
 
void Assign (const ShortString &other)
 
void Append (const char *chars, const unsigned length)
 
void Clear ()
 
const char * GetChars () const
 
unsigned GetLength () const
 
bool IsEmpty () const
 
std::string ToString () const
 
const char * c_str () const
 
bool operator== (const ShortString &other) const
 
bool operator!= (const ShortString &other) const
 
bool operator< (const ShortString &other) const
 
bool StartsWith (const ShortString &other) const
 
ShortString Suffix (const unsigned start_at) const
 

Static Public Member Functions

static uint64_t num_instances ()
 
static uint64_t num_overflows ()
 

Private Attributes

std::string * long_string_
 
char stack_ [StackSize+1]
 
unsigned char length_
 

Static Private Attributes

static atomic_int64 num_overflows_ = 0
 
static atomic_int64 num_instances_ = 0
 

Detailed Description

template<unsigned char StackSize, char Type>
class ShortString< StackSize, Type >

Definition at line 27 of file shortstring.h.

Constructor & Destructor Documentation

template<unsigned char StackSize, char Type>
ShortString< StackSize, Type >::ShortString ( )
inline

Definition at line 29 of file shortstring.h.

template<unsigned char StackSize, char Type>
ShortString< StackSize, Type >::ShortString ( const ShortString< StackSize, Type > &  other)
inline

Definition at line 32 of file shortstring.h.

template<unsigned char StackSize, char Type>
ShortString< StackSize, Type >::ShortString ( const char *  chars,
const unsigned  length 
)
inline

Definition at line 36 of file shortstring.h.

template<unsigned char StackSize, char Type>
ShortString< StackSize, Type >::ShortString ( const std::string &  std_string)
inlineexplicit

Definition at line 40 of file shortstring.h.

template<unsigned char StackSize, char Type>
ShortString< StackSize, Type >::~ShortString ( )
inline

Definition at line 51 of file shortstring.h.

Member Function Documentation

template<unsigned char StackSize, char Type>
void ShortString< StackSize, Type >::Assign ( const ShortString< StackSize, Type > &  other)
inline

Definition at line 66 of file shortstring.h.

template<unsigned char StackSize, char Type>
const char* ShortString< StackSize, Type >::c_str ( ) const
inline
template<unsigned char StackSize, char Type>
void ShortString< StackSize, Type >::Clear ( )
inline

Definition at line 90 of file shortstring.h.

template<unsigned char StackSize, char Type>
bool ShortString< StackSize, Type >::IsEmpty ( ) const
inline
template<unsigned char StackSize, char Type>
static uint64_t ShortString< StackSize, Type >::num_instances ( )
inlinestatic

Definition at line 178 of file shortstring.h.

Referenced by TalkManager::MainResponder().

Here is the caller graph for this function:

template<unsigned char StackSize, char Type>
static uint64_t ShortString< StackSize, Type >::num_overflows ( )
inlinestatic

Definition at line 179 of file shortstring.h.

Referenced by TalkManager::MainResponder().

Here is the caller graph for this function:

template<unsigned char StackSize, char Type>
bool ShortString< StackSize, Type >::operator!= ( const ShortString< StackSize, Type > &  other) const
inline

Definition at line 137 of file shortstring.h.

template<unsigned char StackSize, char Type>
bool ShortString< StackSize, Type >::operator< ( const ShortString< StackSize, Type > &  other) const
inline

Definition at line 141 of file shortstring.h.

template<unsigned char StackSize, char Type>
ShortString& ShortString< StackSize, Type >::operator= ( const ShortString< StackSize, Type > &  other)
inline

Definition at line 45 of file shortstring.h.

template<unsigned char StackSize, char Type>
bool ShortString< StackSize, Type >::operator== ( const ShortString< StackSize, Type > &  other) const
inline

Definition at line 126 of file shortstring.h.

template<unsigned char StackSize, char Type>
bool ShortString< StackSize, Type >::StartsWith ( const ShortString< StackSize, Type > &  other) const
inline

Definition at line 161 of file shortstring.h.

Referenced by catalog::Catalog::FindSubtree(), receiver::IsSubPath(), and catalog::AbstractCatalogManager< CatalogT >::MountSubtree().

Here is the caller graph for this function:

template<unsigned char StackSize, char Type>
ShortString ShortString< StackSize, Type >::Suffix ( const unsigned  start_at) const
inline
template<unsigned char StackSize, char Type>
std::string ShortString< StackSize, Type >::ToString ( ) const
inline

Definition at line 113 of file shortstring.h.

Referenced by swissknife::CommandListCatalogs::CatalogCallback(), swissknife::CommandMigrate::CatalogCallback(), catalog::WritableCatalogManager::CatalogUploadCallback(), catalog::WritableCatalogManager::CloneTreeImpl(), catalog::WritableCatalogManager::CreateCatalog(), catalog::WritableCatalogManager::CreateNestedCatalog(), swissknife::CommandMigrate::CreateNestedCatalogMarkerDirent(), cvmfs::cvmfs_read(), catalog::AbstractCatalogManager< CatalogT >::DetachSiblings(), swissknife::CommandCheck::Find(), catalog::WritableCatalogManager::FixWeight(), LibContext::GetNestedCatalogAttr(), swissknife::CommandMigrate::GetNestedCatalogMarkerDirent(), LHashMagicXattr::GetValue(), RawlinkMagicXattr::GetValue(), catalog::Catalog::IsAutogenerated(), catalog::AbstractCatalogManager< CatalogT >::LoadFreeCatalog(), Tracer::MainFlush(), TalkManager::MainResponder(), MakeRelative(), swissknife::CommandMigrate::MigrationWorker_20x::MigrateFileMetadata(), catalog::WritableCatalog::Partition(), LibContext::Pread(), catalog::WritableCatalogManager::RemoveNestedCatalog(), anonymous_namespace{commit_processor.cc}::RemoveRepoName(), anonymous_namespace{repository_diff.cc}::DiffForwarder::ReportAddition(), anonymous_namespace{repository_diff.cc}::DiffForwarder::ReportModification(), receiver::CatalogMergeTool< RwCatalogMgr, RoCatalogMgr >::ReportModification(), anonymous_namespace{repository_diff.cc}::DiffForwarder::ReportRemoval(), and swissknife::CommandMigrate::PendingCatalog::root_path().

Here is the caller graph for this function:

Member Data Documentation

template<unsigned char StackSize, char Type>
unsigned char ShortString< StackSize, Type >::length_
private

Definition at line 184 of file shortstring.h.

template<unsigned char StackSize, char Type>
std::string* ShortString< StackSize, Type >::long_string_
private

Definition at line 182 of file shortstring.h.

template<unsigned char StackSize, char Type>
atomic_int64 ShortString< StackSize, Type >::num_instances_ = 0
staticprivate

Definition at line 186 of file shortstring.h.

template<unsigned char StackSize, char Type>
atomic_int64 ShortString< StackSize, Type >::num_overflows_ = 0
staticprivate

Definition at line 185 of file shortstring.h.

template<unsigned char StackSize, char Type>
char ShortString< StackSize, Type >::stack_[StackSize+1]
private

Definition at line 183 of file shortstring.h.


The documentation for this class was generated from the following file: