- Aldebaran documentation |
- C++ Libraries |
- index

libqi-api 2.8.7.4

- Main Page
- Related Pages
- Namespaces
- Classes
- Files
- Examples

- Class List
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | List of all members
qi::StringTypeInterface Class Referenceabstract

`#include <typeinterface.hpp>`

## Public Types
using | RawString = std::pair< char *, size_t >
using | Deleter = boost::function< void(const RawString &)>
using | ManagedRawString = std::pair< RawString, Deleter >

## Public Member Functions
std::string | getString (void *storage)
| Get a copy of the string value. More...
virtual ManagedRawString | get (void *storage)=0
void | set (void **storage, const std::string &value)
| Set the value of the string. More...
virtual void | set (void **storage, const char *ptr, size_t sz)=0
| Set the value of the string. More...
TypeKind | kind () override
Public Member Functions inherited from qi::TypeInterface
virtual | ~TypeInterface ()=default
virtual const TypeInfo & | info ()=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)

## Additional Inherited Members
Static Public Member Functions inherited from qi::TypeInterface
static TypeInterface * | fromSignature (const qi::Signature &sig)

## Detailed Description

Definition at line 104 of file typeinterface.hpp.

## Member Typedef Documentation

using qi::StringTypeInterface::Deleter = boost::function<void(const RawString&)>

Definition at line 108 of file typeinterface.hpp.

using qi::StringTypeInterface::ManagedRawString = std::pair<RawString, Deleter>

Definition at line 109 of file typeinterface.hpp.

using qi::StringTypeInterface::RawString = std::pair<char*, size_t>

Definition at line 107 of file typeinterface.hpp.

## Member Function Documentation

virtual ManagedRawString qi::StringTypeInterface::get | ( | void * | storage | ) |
| pure virtual

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

Implemented in qi::TypeEquivalentString< T, F >, qi::TypeImpl< char[I]>, qi::TypeCStringImpl, and qi::StringTypeInterfaceImpl.

std::string qi::StringTypeInterface::getString | ( | void * | storage | ) |
| inline

Get a copy of the string value.

Definition at line 16 of file stringtypeinterface.hxx.

TypeKind qi::StringTypeInterface::kind | ( |  | ) |
| inline override virtual

Get the kind of the data.

This is used to downcast the TypeInterface object to a specialized interface.

Reimplemented from qi::TypeInterface.

Definition at line 120 of file typeinterface.hpp.

void qi::StringTypeInterface::set | ( | void ** | storage,
|  | const std::string & | value
| ) |  |
| inline

Set the value of the string.

Definition at line 25 of file stringtypeinterface.hxx.

virtual void qi::StringTypeInterface::set | ( | void ** | storage,
|  | const char * | ptr,
|  | size_t | sz
| ) |  |
| pure virtual

Set the value of the string.

Implemented in qi::TypeEquivalentString< T, F >, qi::TypeImpl< char[I]>, qi::TypeCStringImpl, and qi::StringTypeInterfaceImpl.

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

- /home/opennao/work/release-2.8/sdk/libqi/qi/type/typeinterface.hpp
- /home/opennao/work/release-2.8/sdk/libqi/qi/type/detail/stringtypeinterface.hxx