HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros 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_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_PTR(T)&&!UT_HAS_FMT(UT_REMOVE_PTR(T))))
 
template<typename T >
 ArgValue (T v, UT_ENABLE_IF(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 &t, UT_ENABLE_IF(!UT_IS_PTR(T)))
 
size_t formatCustom (char *buffer, size_t buffer_size) const
 
 ~ArgValue ()
 
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

template<typename W >
class Formatter
 

Detailed Description

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

Definition at line 369 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 569 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 373 of file UT_Format.h.

Constructor & Destructor Documentation

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

Definition at line 382 of file UT_Format.h.

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

Definition at line 383 of file UT_Format.h.

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

Definition at line 384 of file UT_Format.h.

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

Definition at line 385 of file UT_Format.h.

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

Definition at line 386 of file UT_Format.h.

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

Definition at line 387 of file UT_Format.h.

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

Definition at line 388 of file UT_Format.h.

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

Definition at line 389 of file UT_Format.h.

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

Definition at line 390 of file UT_Format.h.

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

Definition at line 391 of file UT_Format.h.

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

Definition at line 392 of file UT_Format.h.

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

Definition at line 393 of file UT_Format.h.

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

Definition at line 408 of file UT_Format.h.

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

Definition at line 422 of file UT_Format.h.

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

Definition at line 423 of file UT_Format.h.

UT::Format::ArgValue::ArgValue ( const UT_String 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 428 of file UT_Format.h.

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

Definition at line 432 of file UT_Format.h.

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

Definition at line 436 of file UT_Format.h.

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

Definition at line 451 of file UT_Format.h.

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

Definition at line 461 of file UT_Format.h.

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

Definition at line 471 of file UT_Format.h.

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

Definition at line 480 of file UT_Format.h.

UT::Format::ArgValue::~ArgValue ( )
inline

Definition at line 504 of file UT_Format.h.

UT::Format::ArgValue::ArgValue ( )
inlineprotected

Definition at line 559 of file UT_Format.h.

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

Definition at line 560 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 488 of file UT_Format.h.

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

Definition at line 551 of file UT_Format.h.

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

Definition at line 508 of file UT_Format.h.

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

Definition at line 518 of file UT_Format.h.

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

Definition at line 510 of file UT_Format.h.

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

Definition at line 534 of file UT_Format.h.

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

Definition at line 546 of file UT_Format.h.

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

Definition at line 525 of file UT_Format.h.

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

Definition at line 539 of file UT_Format.h.

Type UT::Format::ArgValue::type ( ) const
inline

Definition at line 506 of file UT_Format.h.

Friends And Related Function Documentation

template<typename W >
friend class Formatter
friend

Definition at line 557 of file UT_Format.h.

Member Data Documentation

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

Definition at line 590 of file UT_Format.h.

Custom UT::Format::ArgValue::myCustom

Definition at line 594 of file UT_Format.h.

fpreal16 UT::Format::ArgValue::myF16

Definition at line 587 of file UT_Format.h.

fpreal32 UT::Format::ArgValue::myF32

Definition at line 588 of file UT_Format.h.

fpreal64 UT::Format::ArgValue::myF64

Definition at line 589 of file UT_Format.h.

int16 UT::Format::ArgValue::myI16

Definition at line 581 of file UT_Format.h.

int32 UT::Format::ArgValue::myI32

Definition at line 583 of file UT_Format.h.

int64 UT::Format::ArgValue::myI64

Definition at line 585 of file UT_Format.h.

int8 UT::Format::ArgValue::myI8

Definition at line 579 of file UT_Format.h.

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

Definition at line 593 of file UT_Format.h.

SizedString UT::Format::ArgValue::mySizedStr

Definition at line 592 of file UT_Format.h.

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

Definition at line 591 of file UT_Format.h.

uint16 UT::Format::ArgValue::myU16

Definition at line 582 of file UT_Format.h.

uint32 UT::Format::ArgValue::myU32

Definition at line 584 of file UT_Format.h.

uint64 UT::Format::ArgValue::myU64

Definition at line 586 of file UT_Format.h.

uint8 UT::Format::ArgValue::myU8

Definition at line 580 of file UT_Format.h.


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