libqi-api  2.8.7.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Public Attributes | List of all members
qi::TypeEquivalentString< T, F > Class Template Reference

#include <stringtypeinterface.hxx>

Public Types

using Impl = DefaultTypeImplMethods< T, TypeByPointerPOD< T >>
 
- Public Types inherited from qi::StringTypeInterface
using RawString = std::pair< char *, size_t >
 
using Deleter = boost::function< void(const RawString &)>
 
using ManagedRawString = std::pair< RawString, Deleter >
 

Public Member Functions

 TypeEquivalentString (F f)
 
void set (void **storage, const char *ptr, size_t sz) override
 Set the value of the string. More...
 
ManagedRawString get (void *storage) override
 
 _QI_BOUNCE_TYPE_METHODS (Impl)
 
- Public Member Functions inherited from qi::StringTypeInterface
std::string getString (void *storage)
 Get a copy of the string value. More...
 
void set (void **storage, const std::string &value)
 Set the value of the string. More...
 
TypeKind kind () override
 
- Public Member Functions inherited from qi::TypeInterface
virtual ~TypeInterface ()=default
 
virtual const TypeInfoinfo ()=0
 Get the TypeInfo corresponding to this type. More...
 
virtual void * initializeStorage (void *ptr=nullptr)=0
 
virtual void * ptrFromStorage (void **)=0
 
virtual void * clone (void *)=0
 Allocate a storage and copy the value given as an argument. More...
 
virtual void destroy (void *)=0
 Free all resources of a storage. More...
 
virtual bool less (void *a, void *b)=0
 
const char * infoString ()
 
qi::Signature signature (void *storage=nullptr, bool resolveDynamic=false)
 

Public Attributes

_getter
 

Additional Inherited Members

- Static Public Member Functions inherited from qi::TypeInterface
static TypeInterfacefromSignature (const qi::Signature &sig)
 

Detailed Description

template<typename T, typename F>
class qi::TypeEquivalentString< T, F >

Declare a Type for T of Kind string.

T must be default-constructible, copy-constructible, and provide a constructor accepting a string. F must be a member function pointer, member object pointer, or free function returning a const string&.

Definition at line 147 of file stringtypeinterface.hxx.

Member Typedef Documentation

template<typename T , typename F >
using qi::TypeEquivalentString< T, F >::Impl = DefaultTypeImplMethods<T, TypeByPointerPOD<T>>

Definition at line 151 of file stringtypeinterface.hxx.

Constructor & Destructor Documentation

template<typename T , typename F >
qi::TypeEquivalentString< T, F >::TypeEquivalentString ( f)
inline

Definition at line 150 of file stringtypeinterface.hxx.

Member Function Documentation

template<typename T , typename F >
qi::TypeEquivalentString< T, F >::_QI_BOUNCE_TYPE_METHODS ( Impl  )
template<typename T , typename F >
ManagedRawString qi::TypeEquivalentString< T, F >::get ( void *  storage)
inlineoverridevirtual

Get the internal string representation as UTF-8. It may or may not be a copy.

Implements qi::StringTypeInterface.

Definition at line 159 of file stringtypeinterface.hxx.

template<typename T , typename F >
void qi::TypeEquivalentString< T, F >::set ( void **  storage,
const char *  ptr,
size_t  sz 
)
inlineoverridevirtual

Set the value of the string.

Implements qi::StringTypeInterface.

Definition at line 153 of file stringtypeinterface.hxx.

Member Data Documentation

template<typename T , typename F >
F qi::TypeEquivalentString< T, F >::_getter

Definition at line 166 of file stringtypeinterface.hxx.


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