WPILibC++ 2023.4.3-108-ge5452e3
wpi::StringMapEntry< ValueTy > Class Template Referencefinal

StringMapEntry - This is used to represent one value that is inserted into a StringMap. More...

#include </home/runner/work/allwpilib/allwpilib/wpiutil/src/main/native/thirdparty/llvm/include/wpi/StringMapEntry.h>

Inheritance diagram for wpi::StringMapEntry< ValueTy >:
wpi::StringMapEntryStorage< ValueTy > wpi::StringMapEntryBase

Public Member Functions

std::string_view getKey () const
 
const char * getKeyData () const
 getKeyData - Return the start of the string data that is the key for this value. More...
 
std::string_view first () const
 
template<typename AllocatorTy >
void Destroy (AllocatorTy &allocator)
 Destroy - Destroy this StringMapEntry, releasing memory back to the specified allocator. More...
 
- Public Member Functions inherited from wpi::StringMapEntryStorage< ValueTy >
 StringMapEntryStorage (size_t keyLength)
 
template<typename... InitTy>
 StringMapEntryStorage (size_t keyLength, InitTy &&... initVals)
 
 StringMapEntryStorage (StringMapEntryStorage &e)=delete
 
const ValueTy & getValue () const
 
ValueTy & getValue ()
 
void setValue (const ValueTy &V)
 
- Public Member Functions inherited from wpi::StringMapEntryBase
 StringMapEntryBase (size_t keyLength)
 
size_t getKeyLength () const
 

Static Public Member Functions

template<typename AllocatorTy , typename... InitTy>
static StringMapEntryCreate (std::string_view key, AllocatorTy &allocator, InitTy &&... initVals)
 Create a StringMapEntry for the specified key construct the value using InitiVals. More...
 
static StringMapEntryGetStringMapEntryFromKeyData (const char *keyData)
 GetStringMapEntryFromKeyData - Given key data that is known to be embedded into a StringMapEntry, return the StringMapEntry itself. More...
 

Additional Inherited Members

- Public Attributes inherited from wpi::StringMapEntryStorage< ValueTy >
ValueTy second
 
- Static Protected Member Functions inherited from wpi::StringMapEntryBase
template<typename AllocatorTy >
static void * allocateWithKey (size_t EntrySize, size_t EntryAlign, std::string_view Key, AllocatorTy &Allocator)
 Helper to tail-allocate Key. More...
 

Detailed Description

template<typename ValueTy>
class wpi::StringMapEntry< ValueTy >

StringMapEntry - This is used to represent one value that is inserted into a StringMap.

It contains the Value itself and the key: the string length and data.

Member Function Documentation

◆ Create()

template<typename ValueTy >
template<typename AllocatorTy , typename... InitTy>
static StringMapEntry * wpi::StringMapEntry< ValueTy >::Create ( std::string_view  key,
AllocatorTy &  allocator,
InitTy &&...  initVals 
)
inlinestatic

Create a StringMapEntry for the specified key construct the value using InitiVals.

◆ Destroy()

template<typename ValueTy >
template<typename AllocatorTy >
void wpi::StringMapEntry< ValueTy >::Destroy ( AllocatorTy &  allocator)
inline

Destroy - Destroy this StringMapEntry, releasing memory back to the specified allocator.

◆ first()

template<typename ValueTy >
std::string_view wpi::StringMapEntry< ValueTy >::first ( ) const
inline

◆ getKey()

template<typename ValueTy >
std::string_view wpi::StringMapEntry< ValueTy >::getKey ( ) const
inline

◆ getKeyData()

template<typename ValueTy >
const char * wpi::StringMapEntry< ValueTy >::getKeyData ( ) const
inline

getKeyData - Return the start of the string data that is the key for this value.

The string data is always stored immediately after the StringMapEntry object.

◆ GetStringMapEntryFromKeyData()

template<typename ValueTy >
static StringMapEntry & wpi::StringMapEntry< ValueTy >::GetStringMapEntryFromKeyData ( const char *  keyData)
inlinestatic

GetStringMapEntryFromKeyData - Given key data that is known to be embedded into a StringMapEntry, return the StringMapEntry itself.


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