![]() |
CernVM-FS
2.12.0
|
#include <shortstring.h>
Public Member Functions | |
ShortString () | |
ShortString (const ShortString &other) | |
ShortString (const char *chars, const unsigned length) | |
ShortString (const std::string &std_string) | |
ShortString & | operator= (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 | Truncate (unsigned new_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 |
Definition at line 27 of file shortstring.h.
|
inline |
Definition at line 29 of file shortstring.h.
|
inline |
Definition at line 34 of file shortstring.h.
|
inline |
Definition at line 40 of file shortstring.h.
|
inlineexplicit |
Definition at line 46 of file shortstring.h.
|
inline |
Definition at line 59 of file shortstring.h.
|
inline |
Definition at line 80 of file shortstring.h.
Referenced by catalog::WritableCatalogManager::CloneTreeImpl(), compat::inode_tracker::InodeContainer::ConstructPath(), cvmfs::cvmfs_lookup(), cvmfs::cvmfs_opendir(), CatalogDiffTool< RoCatalogMgr >::DiffRec(), catalog::SqlDirent::ExpandSymlink(), swissknife::CommandCheck::Find(), catalog::Catalog::FindSubtree(), GetFileName(), catalog::AbstractCatalogManager< CatalogT >::ListCatalogSkein(), glue::PathStore::Lookup(), compat::inode_tracker_v3::PathStore::Lookup(), catalog::AbstractCatalogManager< CatalogT >::LookupCounters(), catalog::AbstractCatalogManager< CatalogT >::LookupNested(), catalog::Catalog::NormalizePath2(), and catalog::Catalog::PlantPath().
|
inline |
Definition at line 61 of file shortstring.h.
Referenced by catalog::WritableCatalogManager::Clone(), publish::SyncItemTar::CreateBasicCatalogDirent(), publish::SyncItemDummyCatalog::CreateBasicCatalogDirent(), publish::SyncItemDummyDir::CreateBasicCatalogDirent(), publish::SyncItemNative::CreateBasicCatalogDirent(), swissknife::CommandMigrate::CreateNestedCatalogMarkerDirent(), cvmfs::cvmfs_lookup(), cvmfs::cvmfs_opendir(), catalog::SqlDirent::ExpandSymlink(), LibContext::GetAttr(), catalog::SqlLookup::GetDirent(), LibContext::GetExtAttr(), LibContext::GetNestedCatalogAttr(), NfsMapsSqlite::GetPath(), NfsMapsLeveldb::GetPath(), LibContext::ListDirectory(), LibContext::ListDirectoryStat(), catalog::AbstractCatalogManager< Catalog >::Listing(), LibContext::ListNestedCatalogs(), catalog::AbstractCatalogManager< CatalogT >::LookupNested(), catalog::AbstractCatalogManager< Catalog >::LookupPath(), compat::inode_tracker_v2::PathMap::LookupPath(), catalog::Catalog::LookupRawSymlink(), glue::InodeTracker::NextEntry(), LibContext::Open(), catalog::Catalog::OpenDatabase(), and LibContext::Readlink().
|
inline |
Definition at line 76 of file shortstring.h.
|
inline |
Definition at line 145 of file shortstring.h.
Referenced by AbortIfHardlinked(), swissknife::CommandListReflog::CatalogCallback(), catalog::WritableCatalogManager::CloneTreeImpl(), swissknife::CommandCheck::CompareEntries(), cvmfs::cvmfs_getxattr(), cvmfs::cvmfs_open(), cvmfs::cvmfs_opendir(), cvmfs::cvmfs_readlink(), LibContext::CvmfsAttrFromDirent(), CatalogDiffTool< RoCatalogMgr >::DiffRec(), catalog::WritableCatalogManager::FinalizeCatalog(), ExternalURLMagicXattr::FinalizeValue(), swissknife::CommandCheck::Find(), NfsMapsSqlite::FindInode(), catalog::WritableCatalogManager::FixWeight(), cvmfs::GetDirentForInode(), cvmfs::GetDirentForPath(), NfsMapsLeveldb::GetPath(), cvmfs::GetPathForInode(), lru::InodeCache::Insert(), lru::PathCache::Insert(), lru::Md5PathCache::Insert(), NfsMapsSqlite::IssueInode(), catalog::AbstractCatalogManager< CatalogT >::LookupPath(), FuseInvalidator::MainInvalidator(), MakeShortSocketLink(), catalog::AbstractCatalogManager< CatalogT >::MountCatalog(), LibContext::Open(), catalog::Catalog::OpenDatabase(), ChunkListMagicXattr::PrepareValueFenced(), ChunksMagicXattr::PrepareValueFenced(), NfsMapsLeveldb::PutInode2Path(), LibContext::Readlink(), cvmfs::ReplyNegative(), receiver::CatalogMergeTool< RwCatalogMgr, RoCatalogMgr >::ReportAddition(), receiver::CatalogMergeTool< RwCatalogMgr, RoCatalogMgr >::ReportModification(), receiver::CatalogMergeTool< RwCatalogMgr, RoCatalogMgr >::ReportRemoval(), NfsMapsSqlite::RetryGetInode(), SplitHardlink(), catalog::ClientCatalogManager::UnloadCatalog(), and catalog::WritableCatalog::VacuumDatabaseIfNecessary().
|
inline |
Definition at line 117 of file shortstring.h.
|
inline |
Definition at line 123 of file shortstring.h.
Referenced by catalog::WritableCatalogManager::AddDirectory(), ShortString< kDefaultMaxName, 1 >::Assign(), catalog::SqlDirentTouch::BindDirentBase(), catalog::SqlDirentWrite::BindDirentFields(), catalog::SqlNestedCatalogLookup::BindSearchPath(), CatalogDiffTool< RoCatalogMgr >::DiffRec(), catalog::SqlDirent::ExpandSymlink(), NfsMapsSqlite::FindInode(), catalog::Catalog::FindSubtree(), catalog::ClientCatalogManager::GetCatalogDescription(), LibContext::GetDirentForPath(), cvmfs::GetDirentForPath(), GetFileName(), NfsMapsLeveldb::GetInode(), GetParentPath(), glue::PathStore::Insert(), glue::PathMap::Insert(), receiver::IsSubPath(), NfsMapsSqlite::IssueInode(), compat::inode_tracker_v2::PathMap::LookupInode(), glue::PathMap::LookupInodeByPath(), FuseInvalidator::MainInvalidator(), catalog::AbstractCatalogManager< CatalogT >::MountSubtree(), catalog::Catalog::NormalizePath(), catalog::Catalog::NormalizePath2(), LibContext::Open(), ShortString< kDefaultMaxName, 1 >::operator<(), ShortString< kDefaultMaxName, 1 >::operator==(), catalog::Catalog::PlantPath(), LibContext::Pread(), NfsMapsLeveldb::PutInode2Path(), swissknife::CommandMigrate::MigrationWorker_20x::RemoveDanglingNestedMountpoints(), catalog::AbstractCatalogManager< CatalogT >::StageNestedCatalogAndUnlock(), and ShortString< kDefaultMaxName, 1 >::StartsWith().
|
inline |
Definition at line 131 of file shortstring.h.
Referenced by catalog::WritableCatalogManager::AddDirectory(), ShortString< kDefaultMaxName, 1 >::Assign(), catalog::SqlDirentTouch::BindDirentBase(), catalog::SqlDirentWrite::BindDirentFields(), catalog::SqlNestedCatalogLookup::BindSearchPath(), CatalogDiffTool< RoCatalogMgr >::DiffRec(), catalog::SqlDirent::ExpandSymlink(), NfsMapsSqlite::FindInode(), catalog::Catalog::FindSubtree(), catalog::ClientCatalogManager::GetCatalogDescription(), LibContext::GetDirentForPath(), cvmfs::GetDirentForPath(), GetFileName(), NfsMapsLeveldb::GetInode(), GetParentPath(), glue::PathStore::Insert(), glue::PathMap::Insert(), receiver::IsSubPath(), NfsMapsSqlite::IssueInode(), compat::inode_tracker_v2::PathMap::LookupInode(), glue::PathMap::LookupInodeByPath(), FuseInvalidator::MainInvalidator(), catalog::AbstractCatalogManager< CatalogT >::MountSubtree(), catalog::Catalog::NormalizePath(), catalog::Catalog::NormalizePath2(), LibContext::Open(), ShortString< kDefaultMaxName, 1 >::operator<(), ShortString< kDefaultMaxName, 1 >::operator==(), catalog::Catalog::PlantPath(), LibContext::Pread(), NfsMapsLeveldb::PutInode2Path(), LibContext::Readlink(), swissknife::CommandMigrate::MigrationWorker_20x::RemoveDanglingNestedMountpoints(), catalog::DirectoryEntryBase::size(), catalog::AbstractCatalogManager< CatalogT >::StageNestedCatalogAndUnlock(), and ShortString< kDefaultMaxName, 1 >::StartsWith().
|
inline |
Definition at line 137 of file shortstring.h.
Referenced by swissknife::CommandEditTag::AddNewTag(), catalog::WritableCatalogManager::CloneTreeImpl(), swissknife::CommandCheck::Find(), catalog::ClientCatalogManager::GetCatalogDescription(), MagicXattrManager::GetListString(), catalog::AbstractCatalogManager< CatalogT >::GetNestedCatalogHash(), glue::PathStore::Insert(), and catalog::CatalogContext::IsRootCatalog().
|
inlinestatic |
Definition at line 206 of file shortstring.h.
Referenced by TalkManager::MainResponder().
|
inlinestatic |
Definition at line 207 of file shortstring.h.
Referenced by TalkManager::MainResponder().
|
inline |
Definition at line 165 of file shortstring.h.
|
inline |
Definition at line 169 of file shortstring.h.
|
inline |
Definition at line 53 of file shortstring.h.
|
inline |
Definition at line 154 of file shortstring.h.
|
inline |
Definition at line 189 of file shortstring.h.
Referenced by catalog::Catalog::FindSubtree(), receiver::IsSubPath(), catalog::AbstractCatalogManager< CatalogT >::MountSubtree(), and catalog::AbstractCatalogManager< CatalogT >::StageNestedCatalogAndUnlock().
|
inline |
Definition at line 198 of file shortstring.h.
Referenced by catalog::Catalog::FindSubtree(), catalog::Catalog::NormalizePath2(), catalog::Catalog::PlantPath(), and anonymous_namespace{commit_processor.cc}::RemoveRepoName().
|
inline |
Definition at line 141 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_open(), cvmfs::cvmfs_read(), catalog::AbstractCatalogManager< CatalogT >::DetachSiblings(), LHashMagicXattr::FinalizeValue(), RawlinkMagicXattr::FinalizeValue(), swissknife::CommandCheck::Find(), catalog::WritableCatalogManager::FixWeight(), LibContext::GetNestedCatalogAttr(), swissknife::CommandMigrate::GetNestedCatalogMarkerDirent(), catalog::Catalog::IsAutogenerated(), catalog::AbstractCatalogManager< CatalogT >::LoadFreeCatalog(), Tracer::MainFlush(), FuseInvalidator::MainInvalidator(), 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().
|
inline |
Truncates the current string to be of size smaller or equal to current size
Note: Can lead to a heap allocated string that is shorter than the reserved stack space.
Definition at line 108 of file shortstring.h.
Referenced by CatalogDiffTool< RoCatalogMgr >::DiffRec().
|
private |
Definition at line 212 of file shortstring.h.
|
private |
Definition at line 210 of file shortstring.h.
|
staticprivate |
Definition at line 214 of file shortstring.h.
|
staticprivate |
Definition at line 213 of file shortstring.h.
|
private |
Definition at line 211 of file shortstring.h.