The Pedigree Project 0.1
Public Member Functions | Private Member Functions | List of all members
HashedStringView Class Reference

#include <StringView.h>

+ Inheritance diagram for HashedStringView:
+ Collaboration diagram for HashedStringView:

Public Member Functions

 HashedStringView (const char *s)
 
 HashedStringView (const char *s, size_t length)
 
 HashedStringView (const StringView &other)
 
 HashedStringView (const HashedStringView &other)
 
 HashedStringView (const String &other)
 
- Public Member Functions inherited from StringView
 StringView (const char *s)
 
 StringView (const char *s, size_t length)
 
 StringView (const StringView &other)
 
 StringView (const String &other)
 
StringView & operator= (const StringView &s)
 
bool operator== (const char *s) const
 
bool operator== (const String &s) const
 
bool operator== (const StringView &s) const
 
bool compare (const char *s, size_t length) const
 
size_t length () const
 
StringView substring (size_t start, size_t end, bool hashed=HASH_STRINGVIEWS_BY_DEFAULT) const
 
String toString () const
 
char operator[] (size_t index) const
 
size_t nextCharacter (size_t i) const
 
size_t prevCharacter (size_t i) const
 
uint32_t hash () const
 
uint32_t hash ()
 
const char * str () const
 
void setHashingEnable (bool enabled)
 

Private Member Functions

bool defaultHashingEnabled () const override
 

Additional Inherited Members

Detailed Description

Variant of StringView that automatically upgrades StringViews to hashed versions if they are not already hashed. Use in cases where a parameter must be able to be hashed but would otherwise be const.

Definition at line 105 of file StringView.h.

Constructor & Destructor Documentation

◆ HashedStringView() [1/5]

HashedStringView::HashedStringView ( const char *  s)
explicit

Definition at line 211 of file StringView.cc.

◆ HashedStringView() [2/5]

HashedStringView::HashedStringView ( const char *  s,
size_t  length 
)

Definition at line 215 of file StringView.cc.

◆ HashedStringView() [3/5]

HashedStringView::HashedStringView ( const StringView &  other)

Definition at line 219 of file StringView.cc.

◆ HashedStringView() [4/5]

HashedStringView::HashedStringView ( const HashedStringView &  other)

Definition at line 223 of file StringView.cc.

◆ HashedStringView() [5/5]

HashedStringView::HashedStringView ( const String &  other)

Definition at line 227 of file StringView.cc.

Member Function Documentation

◆ defaultHashingEnabled()

bool HashedStringView::defaultHashingEnabled ( ) const
overrideprivatevirtual

Reimplemented from StringView.

Definition at line 231 of file StringView.cc.


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