Evo C++ Library v0.5.1
Public Types | Public Member Functions | Static Public Member Functions | List of all members
StrTokVariant< T, NextCh, NextAny > Struct Template Reference

#include <evo/strtok.h>

Inheritance diagram for StrTokVariant< T, NextCh, NextAny >:
Inheritance graph
[legend]

Detailed Description

template<class T, bool(T::*)(char) NextCh, bool(T::*)(const StringBase &) NextAny = &T::nextany>
struct evo::StrTokVariant< T, NextCh, NextAny >

String tokenizer adapter used internally to create variants of existing tokenizers – do not use directly.

Template Parameters
TString tokenizer to extend
NextChPointer to member function for next() to call
NextAnyPointer to member function for nextany() to call

Public Types

typedef StrTokBase BaseType
 Root base type. More...
 
typedef SubString::Size Size
 String size type More...
 
typedef StrTokVariant< T, NextCh, NextAny > ThisType
 This type. More...
 

Public Member Functions

 StrTokVariant ()
 
 StrTokVariant (const ThisType &src)
 
 StrTokVariant (const BaseType &src)
 
 StrTokVariant (const StringBase &str)
 
bool next (char delim)
 
bool nextany (const StringBase &delims)
 
ThisTypeoperator= (const ThisType &src)
 
ThisTypeoperator= (const BaseType &src)
 
ThisTypeoperator= (const StringBase &str)
 

Static Public Member Functions

template<class C , class S >
static C::Size split (C &items, const S &str, char delim=',')
 
template<class S >
static SubString splitat (const S &str, Size index, char delim=',')
 

Member Typedef Documentation

◆ BaseType

Root base type.

◆ Size

String size type

◆ ThisType

typedef StrTokVariant<T,NextCh,NextAny> ThisType

This type.

Constructor & Destructor Documentation

◆ StrTokVariant() [1/4]

StrTokVariant ( )
inline

◆ StrTokVariant() [2/4]

StrTokVariant ( const ThisType src)
inline

◆ StrTokVariant() [3/4]

StrTokVariant ( const BaseType src)
inline

◆ StrTokVariant() [4/4]

StrTokVariant ( const StringBase str)
inline

Member Function Documentation

◆ next()

bool next ( char  delim)
inline

◆ nextany()

bool nextany ( const StringBase delims)
inline

◆ operator=() [1/3]

ThisType& operator= ( const ThisType src)
inline

◆ operator=() [2/3]

ThisType& operator= ( const BaseType src)
inline

◆ operator=() [3/3]

ThisType& operator= ( const StringBase str)
inline

◆ split()

static C::Size split ( C &  items,
const S &  str,
char  delim = ',' 
)
inlinestatic

◆ splitat()

static SubString splitat ( const S &  str,
Size  index,
char  delim = ',' 
)
inlinestatic

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