HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UT::Format::ArgValue Class Reference

#include <UT_Format.h>

Classes

struct  Custom
 
struct  SizedString
 

Public Types

enum  Type {
  Type::None, Type::Int8, Type::UInt8, Type::Int16,
  Type::UInt16, Type::Int32, Type::UInt32, Type::Int64,
  Type::UInt64, Type::Float16, Type::Float32, Type::Float64,
  Type::ZeroString, Type::SizedString, Type::CharString, Type::Pointer,
  Type::Custom
}
 

Public Member Functions

 ArgValue (char v)
 
 ArgValue (int8 v)
 
 ArgValue (uint8 v)
 
 ArgValue (int16 v)
 
 ArgValue (uint16 v)
 
 ArgValue (int32 v)
 
 ArgValue (uint32 v)
 
 ArgValue (int64 v)
 
 ArgValue (uint64 v)
 
 ArgValue (fpreal16 v)
 
 ArgValue (fpreal32 v)
 
 ArgValue (fpreal64 v)
 
 ArgValue (bool v)
 
 ArgValue (char *v)
 
 ArgValue (const char *v)
 
 ArgValue (const UT_String &v)
 
 ArgValue (const UT_StringLit &v)
 
 ArgValue (const UT_StringRef &v)
 
 ArgValue (const UT_StringHolder &v)
 
 ArgValue (const UT_StringView &v)
 
 ArgValue (const std::string &v)
 
 ArgValue (void *v)
 
 ArgValue (const void *v)
 
template<typename T >
 ArgValue (T v, UT_ENABLE_IF(!UT_IS_ENUM(T)&&UT_IS_PTR(T)&&!UT_HAS_FMT(UT_REMOVE_PTR(T))))
 
template<typename T >
 ArgValue (T v, UT_ENABLE_IF(!UT_IS_ENUM(T)&&UT_IS_PTR(T)&&UT_HAS_FMT(UT_REMOVE_PTR(T))))
 
template<typename T , unsigned N>
 ArgValue (T(&v)[N])
 
template<typename T >
 ArgValue (T &v, UT_ENABLE_IF(UT_IS_ENUM(T)&&!UT_HAS_FMT(T)))
 
template<typename T >
 ArgValue (T &v, UT_ENABLE_IF(UT_IS_ENUM(T)&&UT_HAS_FMT(T)))
 
template<typename T >
 ArgValue (T &t, UT_ENABLE_IF(!UT_IS_PTR(T)&&!UT_IS_ENUM(T)))
 
size_t formatCustom (char *buffer, size_t buffer_size) const
 
 ~ArgValue ()=default
 
 ArgValue (const ArgValue &)=default
 
ArgValueoperator= (const ArgValue &)=default
 
Type type () const
 
bool isEmpty () const
 
bool isInteger () const
 
bool isFloat () const
 
bool isSigned () const
 
bool isNumeric () const
 
bool isString () const
 
bool isPointer () const
 
bool isCustom () const
 

Protected Types

using CustomFormat = size_t(*)(char *buffer, size_t buffer_size, const void *value)
 

Protected Member Functions

 ArgValue ()
 
 ArgValue (Type type)
 

Protected Attributes

union {
   int8   myI8
 
   uint8   myU8
 
   int16   myI16
 
   uint16   myU16
 
   int32   myI32
 
   uint32   myU32
 
   int64   myI64
 
   uint64   myU64
 
   fpreal16   myF16
 
   fpreal32   myF32
 
   fpreal64   myF64
 
   char   myChar
 
   const char *   myStr
 
   SizedString   mySizedStr
 
   const void *   myPtr
 
   Custom   myCustom
 
}; 
 

Friends

class Formatter
 

Detailed Description

A container class that holds the individual argument values to be formatted with the format string.

Definition at line 239 of file UT_Format.h.

Member Typedef Documentation

using UT::Format::ArgValue::CustomFormat = size_t(*)(char *buffer, size_t buffer_size, const void *value)
protected

Definition at line 467 of file UT_Format.h.

Member Enumeration Documentation

Enumerator
None 
Int8 
UInt8 
Int16 
UInt16 
Int32 
UInt32 
Int64 
UInt64 
Float16 
Float32 
Float64 
ZeroString 
SizedString 
CharString 
Pointer 
Custom 

Definition at line 243 of file UT_Format.h.

Constructor & Destructor Documentation

UT::Format::ArgValue::ArgValue ( char  v)
inline

Definition at line 252 of file UT_Format.h.

UT::Format::ArgValue::ArgValue ( int8  v)
inline

Definition at line 253 of file UT_Format.h.

UT::Format::ArgValue::ArgValue ( uint8  v)
inline

Definition at line 254 of file UT_Format.h.

UT::Format::ArgValue::ArgValue ( int16  v)
inline

Definition at line 255 of file UT_Format.h.

UT::Format::ArgValue::ArgValue ( uint16  v)
inline

Definition at line 256 of file UT_Format.h.

UT::Format::ArgValue::ArgValue ( int32  v)
inline

Definition at line 257 of file UT_Format.h.

UT::Format::ArgValue::ArgValue ( uint32  v)
inline

Definition at line 258 of file UT_Format.h.

UT::Format::ArgValue::ArgValue ( int64  v)
inline

Definition at line 259 of file UT_Format.h.

UT::Format::ArgValue::ArgValue ( uint64  v)
inline

Definition at line 260 of file UT_Format.h.

UT::Format::ArgValue::ArgValue ( fpreal16  v)
inline

Definition at line 261 of file UT_Format.h.

UT::Format::ArgValue::ArgValue ( fpreal32  v)
inline

Definition at line 262 of file UT_Format.h.

UT::Format::ArgValue::ArgValue ( fpreal64  v)
inline

Definition at line 263 of file UT_Format.h.

UT::Format::ArgValue::ArgValue ( bool  v)
inline

Definition at line 286 of file UT_Format.h.

UT::Format::ArgValue::ArgValue ( char *  v)
inline

Definition at line 300 of file UT_Format.h.

UT::Format::ArgValue::ArgValue ( const char *  v)
inline

Definition at line 301 of file UT_Format.h.

UT::Format::ArgValue::ArgValue ( const UT_String v)
UT::Format::ArgValue::ArgValue ( const UT_StringLit v)
UT::Format::ArgValue::ArgValue ( const UT_StringRef v)
UT::Format::ArgValue::ArgValue ( const UT_StringHolder v)
UT::Format::ArgValue::ArgValue ( const UT_StringView v)
UT::Format::ArgValue::ArgValue ( const std::string v)
inline

Definition at line 307 of file UT_Format.h.

UT::Format::ArgValue::ArgValue ( void v)
inline

Definition at line 311 of file UT_Format.h.

UT::Format::ArgValue::ArgValue ( const void v)
inline

Definition at line 315 of file UT_Format.h.

template<typename T >
UT::Format::ArgValue::ArgValue ( v,
UT_ENABLE_IF(!UT_IS_ENUM(T)&&UT_IS_PTR(T)&&!UT_HAS_FMT(UT_REMOVE_PTR(T)))   
)
inline

Definition at line 331 of file UT_Format.h.

template<typename T >
UT::Format::ArgValue::ArgValue ( v,
UT_ENABLE_IF(!UT_IS_ENUM(T)&&UT_IS_PTR(T)&&UT_HAS_FMT(UT_REMOVE_PTR(T)))   
)
inline

Definition at line 341 of file UT_Format.h.

template<typename T , unsigned N>
UT::Format::ArgValue::ArgValue ( T(&)  v[N])
inline

Definition at line 351 of file UT_Format.h.

template<typename T >
UT::Format::ArgValue::ArgValue ( T &  v,
UT_ENABLE_IF(UT_IS_ENUM(T)&&!UT_HAS_FMT(T))   
)
inline

Definition at line 359 of file UT_Format.h.

template<typename T >
UT::Format::ArgValue::ArgValue ( T &  v,
UT_ENABLE_IF(UT_IS_ENUM(T)&&UT_HAS_FMT(T))   
)
inline

Definition at line 366 of file UT_Format.h.

template<typename T >
UT::Format::ArgValue::ArgValue ( T &  t,
UT_ENABLE_IF(!UT_IS_PTR(T)&&!UT_IS_ENUM(T))   
)
inline

Definition at line 376 of file UT_Format.h.

UT::Format::ArgValue::~ArgValue ( )
default
UT::Format::ArgValue::ArgValue ( const ArgValue )
default
UT::Format::ArgValue::ArgValue ( )
inlineprotected

Definition at line 457 of file UT_Format.h.

UT::Format::ArgValue::ArgValue ( Type  type)
inlineprotected

Definition at line 458 of file UT_Format.h.

Member Function Documentation

size_t UT::Format::ArgValue::formatCustom ( char *  buffer,
size_t  buffer_size 
) const
inline

Definition at line 384 of file UT_Format.h.

bool UT::Format::ArgValue::isCustom ( ) const
inline

Definition at line 449 of file UT_Format.h.

bool UT::Format::ArgValue::isEmpty ( ) const
inline

Definition at line 406 of file UT_Format.h.

bool UT::Format::ArgValue::isFloat ( ) const
inline

Definition at line 416 of file UT_Format.h.

bool UT::Format::ArgValue::isInteger ( ) const
inline

Definition at line 408 of file UT_Format.h.

bool UT::Format::ArgValue::isNumeric ( ) const
inline

Definition at line 432 of file UT_Format.h.

bool UT::Format::ArgValue::isPointer ( ) const
inline

Definition at line 444 of file UT_Format.h.

bool UT::Format::ArgValue::isSigned ( ) const
inline

Definition at line 423 of file UT_Format.h.

bool UT::Format::ArgValue::isString ( ) const
inline

Definition at line 437 of file UT_Format.h.

ArgValue& UT::Format::ArgValue::operator= ( const ArgValue )
default
Type UT::Format::ArgValue::type ( ) const
inline

Definition at line 404 of file UT_Format.h.

Friends And Related Function Documentation

friend class Formatter
friend

Definition at line 455 of file UT_Format.h.

Member Data Documentation

union { ... }
char UT::Format::ArgValue::myChar

Definition at line 488 of file UT_Format.h.

Custom UT::Format::ArgValue::myCustom

Definition at line 492 of file UT_Format.h.

fpreal16 UT::Format::ArgValue::myF16

Definition at line 485 of file UT_Format.h.

fpreal32 UT::Format::ArgValue::myF32

Definition at line 486 of file UT_Format.h.

fpreal64 UT::Format::ArgValue::myF64

Definition at line 487 of file UT_Format.h.

int16 UT::Format::ArgValue::myI16

Definition at line 479 of file UT_Format.h.

int32 UT::Format::ArgValue::myI32

Definition at line 481 of file UT_Format.h.

int64 UT::Format::ArgValue::myI64

Definition at line 483 of file UT_Format.h.

int8 UT::Format::ArgValue::myI8

Definition at line 477 of file UT_Format.h.

const void* UT::Format::ArgValue::myPtr

Definition at line 491 of file UT_Format.h.

SizedString UT::Format::ArgValue::mySizedStr

Definition at line 490 of file UT_Format.h.

const char* UT::Format::ArgValue::myStr

Definition at line 489 of file UT_Format.h.

uint16 UT::Format::ArgValue::myU16

Definition at line 480 of file UT_Format.h.

uint32 UT::Format::ArgValue::myU32

Definition at line 482 of file UT_Format.h.

uint64 UT::Format::ArgValue::myU64

Definition at line 484 of file UT_Format.h.

uint8 UT::Format::ArgValue::myU8

Definition at line 478 of file UT_Format.h.


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