Gorgon Game Engine
ConversionValidator< T_ > Class Template Reference

Accepts all input and tries to convert using in-library functions. More...

Public Types

using Type = T_
 

Public Member Functions

bool AllowErase (std::string, int, std::string) const
 Checks if given number of characters can be erased from before. More...
 
bool AllowInsert (std::string, std::string, std::string) const
 Checks if given string can be inserted between start and end. More...
 
bool AllowReplace (std::string, int, std::string, std::string) const
 Checks if given number of characters can be replace with insert at the end of before. More...
 
Type From (std::string text) const
 Converts the given string to the type. If input is not valid, return initial value. More...
 
bool IsValid (std::string) const
 Checks if the given string is valid. More...
 
std::string ToString (const Type &value) const
 Converts the given value to string. More...
 

Detailed Description

template<class T_>
class Gorgon::UI::ConversionValidator< T_ >

Accepts all input and tries to convert using in-library functions.

Member Typedef Documentation

◆ Type

using Type = T_

Member Function Documentation

◆ AllowErase()

bool AllowErase ( std::string  ,
int  ,
std::string   
) const

Checks if given number of characters can be erased from before.

◆ AllowInsert()

bool AllowInsert ( std::string  ,
std::string  ,
std::string   
) const

Checks if given string can be inserted between start and end.

◆ AllowReplace()

bool AllowReplace ( std::string  ,
int  ,
std::string  ,
std::string   
) const

Checks if given number of characters can be replace with insert at the end of before.

◆ From()

Type From ( std::string  text) const

Converts the given string to the type. If input is not valid, return initial value.

◆ IsValid()

bool IsValid ( std::string  ) const

Checks if the given string is valid.

◆ ToString()

std::string ToString ( const Type value) const

Converts the given value to string.

References Gorgon::String::From().


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