tlx
UPtrStdStringSet Class Reference

Class implementing StringSet concept for a std::vector containing std::string objects. More...

#include <string_set.hpp>

Inheritance diagram for UPtrStdStringSet:
UPtrStdStringSetTraits StringSetBase< UPtrStdStringSet, UPtrStdStringSetTraits >

Public Member Functions

 UPtrStdStringSet (const Iterator &begin, const Iterator &end)
 Construct from begin and end string pointers. More...
 
 UPtrStdStringSet (Container &c)
 Construct from a string container. More...
 
size_t size () const
 Return size of string array. More...
 
Iterator begin () const
 Iterator representing first String position. More...
 
Iterator end () const
 Iterator representing beyond last String position. More...
 
Stringoperator[] (const Iterator &i) const
 Array access (readable and writable) to String objects. More...
 
CharIterator get_chars (const String &s, size_t depth) const
 Return CharIterator for referenced string, which belongs to this set. More...
 
bool is_end (const String &s, const CharIterator &i) const
 Returns true if CharIterator is at end of the given String. More...
 
std::string get_string (const String &s, size_t depth=0) const
 Return complete string (for debugging purposes) More...
 
UPtrStdStringSet sub (Iterator begin, Iterator end) const
 Subset this string set using iterator range. More...
 
void print () const
 
- Public Member Functions inherited from StringSetBase< UPtrStdStringSet, UPtrStdStringSetTraits >
UPtrStdStringSetTraits::Stringat (size_t i) const
 index-based array access (readable and writable) to String objects. More...
 
UPtrStdStringSet subi (size_t begin, size_t end) const
 Subset this string set using index range. More...
 
bool check_order (const typename UPtrStdStringSetTraits::String &s1, const typename UPtrStdStringSetTraits::String &s2) const
 
bool check_order () const
 
void print () const
 
bool is_equal (const typename UPtrStdStringSetTraits::String &a, const typename UPtrStdStringSetTraits::CharIterator &ai, const typename UPtrStdStringSetTraits::String &b, const typename UPtrStdStringSetTraits::CharIterator &bi) const
 check equality of two strings a and b at char iterators ai and bi. More...
 
bool is_less (const typename UPtrStdStringSetTraits::String &a, const typename UPtrStdStringSetTraits::CharIterator &ai, const typename UPtrStdStringSetTraits::String &b, const typename UPtrStdStringSetTraits::CharIterator &bi) const
 check if string a is less or equal to string b at iterators ai and bi. More...
 
bool is_leq (const typename UPtrStdStringSetTraits::String &a, const typename UPtrStdStringSetTraits::CharIterator &ai, const typename UPtrStdStringSetTraits::String &b, const typename UPtrStdStringSetTraits::CharIterator &bi) const
 check if string a is less or equal to string b at iterators ai and bi. More...
 
UPtrStdStringSetTraits::Char get_char (const typename UPtrStdStringSetTraits::String &s, size_t depth) const
 
uint8_t get_uint8 (const typename UPtrStdStringSetTraits::String &s, typename UPtrStdStringSetTraits::CharIterator i) const
 Return up to 1 characters of string s at iterator i packed into a uint8_t (only works correctly for 8-bit characters) More...
 
uint8_t get_uint8 (const typename UPtrStdStringSetTraits::String &s, size_t depth) const
 
uint16_t get_uint16 (const typename UPtrStdStringSetTraits::String &s, typename UPtrStdStringSetTraits::CharIterator i) const
 Return up to 2 characters of string s at iterator i packed into a uint16_t (only works correctly for 8-bit characters) More...
 
uint16_t get_uint16 (const typename UPtrStdStringSetTraits::String &s, size_t depth) const
 
uint32_t get_uint32 (const typename UPtrStdStringSetTraits::String &s, typename UPtrStdStringSetTraits::CharIterator i) const
 Return up to 4 characters of string s at iterator i packed into a uint32_t (only works correctly for 8-bit characters) More...
 
uint32_t get_uint32 (const typename UPtrStdStringSetTraits::String &s, size_t depth) const
 
uint64_t get_uint64 (const typename UPtrStdStringSetTraits::String &s, typename UPtrStdStringSetTraits::CharIterator i) const
 Return up to 8 characters of string s at iterator i packed into a uint64_t (only works correctly for 8-bit characters) More...
 
uint64_t get_uint64 (const typename UPtrStdStringSetTraits::String &s, size_t depth) const
 

Static Public Member Functions

static Container allocate (size_t n)
 Allocate a new temporary string container with n empty Strings. More...
 
static void deallocate (Container &c)
 Deallocate a temporary string container. More...
 

Protected Attributes

Iterator begin_
 vector of std::string objects More...
 
Iterator end_
 

Additional Inherited Members

- Public Types inherited from UPtrStdStringSetTraits
typedef uint8_t Char
 exported alias for character type More...
 
typedef std::unique_ptr< std::string > String
 String reference: std::string, which should be reference counted. More...
 
typedef StringIterator
 Iterator over string references: using std::vector's iterator. More...
 
typedef const CharCharIterator
 iterator of characters in a string More...
 
typedef std::pair< Iterator, size_t > Container
 exported alias for assumed string container More...
 

Detailed Description

Class implementing StringSet concept for a std::vector containing std::string objects.

Definition at line 478 of file string_set.hpp.

Constructor & Destructor Documentation

UPtrStdStringSet ( const Iterator begin,
const Iterator end 
)
inline

Construct from begin and end string pointers.

Definition at line 484 of file string_set.hpp.

UPtrStdStringSet ( Container c)
inlineexplicit

Construct from a string container.

Definition at line 489 of file string_set.hpp.

Member Function Documentation

static Container allocate ( size_t  n)
inlinestatic

Allocate a new temporary string container with n empty Strings.

Definition at line 521 of file string_set.hpp.

Iterator begin ( ) const
inline

Iterator representing first String position.

Definition at line 496 of file string_set.hpp.

static void deallocate ( Container c)
inlinestatic

Deallocate a temporary string container.

Definition at line 525 of file string_set.hpp.

Iterator end ( ) const
inline

Iterator representing beyond last String position.

Definition at line 498 of file string_set.hpp.

CharIterator get_chars ( const String s,
size_t  depth 
) const
inline

Return CharIterator for referenced string, which belongs to this set.

Definition at line 505 of file string_set.hpp.

std::string get_string ( const String s,
size_t  depth = 0 
) const
inline

Return complete string (for debugging purposes)

Definition at line 513 of file string_set.hpp.

bool is_end ( const String s,
const CharIterator i 
) const
inline

Returns true if CharIterator is at end of the given String.

Definition at line 509 of file string_set.hpp.

String& operator[] ( const Iterator i) const
inline

Array access (readable and writable) to String objects.

Definition at line 501 of file string_set.hpp.

void print ( ) const
inline

Definition at line 528 of file string_set.hpp.

size_t size ( ) const
inline

Return size of string array.

Definition at line 494 of file string_set.hpp.

UPtrStdStringSet sub ( Iterator  begin,
Iterator  end 
) const
inline

Subset this string set using iterator range.

Definition at line 517 of file string_set.hpp.

Member Data Documentation

Iterator begin_
protected

vector of std::string objects

Definition at line 539 of file string_set.hpp.

Iterator end_
protected

Definition at line 539 of file string_set.hpp.


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