LibreOffice Module forms (master) 1
Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
xforms::Convert Class Reference

#include <convert.hxx>

Public Member Functions

bool hasType (const css::uno::Type &)
 can we convert this type? More...
 
css::uno::Sequence< css::uno::Type > getTypes () const
 get list of convertible types More...
 
OUString toXSD (const css::uno::Any &rAny)
 convert any to XML representation More...
 
css::uno::Any toAny (const OUString &, const css::uno::Type &)
 convert XML representation to Any of given type More...
 

Static Public Member Functions

static Convertget ()
 get/create Singleton class More...
 
static OUString collapseWhitespace (const OUString &_rString)
 replace all sequences of 0x08, 0x0A, 0x0D, 0x20 with a single 0x20. More...
 

Private Types

typedef OUString(* fn_toXSD) (const css::uno::Any &)
 
typedef css::uno::Any(* fn_toAny) (const OUString &)
 
typedef std::pair< fn_toXSD, fn_toAnyConvert_t
 
typedef std::map< css::uno::Type, Convert_t, TypeLessMap_t
 

Private Member Functions

 Convert ()
 
void init ()
 

Private Attributes

Map_t maMap
 

Detailed Description

Definition at line 41 of file convert.hxx.

Member Typedef Documentation

◆ Convert_t

typedef std::pair<fn_toXSD,fn_toAny> xforms::Convert::Convert_t
private

Definition at line 46 of file convert.hxx.

◆ fn_toAny

typedef css::uno::Any(* xforms::Convert::fn_toAny) (const OUString &)
private

Definition at line 45 of file convert.hxx.

◆ fn_toXSD

typedef OUString(* xforms::Convert::fn_toXSD) (const css::uno::Any &)
private

Definition at line 44 of file convert.hxx.

◆ Map_t

typedef std::map<css::uno::Type, Convert_t, TypeLess> xforms::Convert::Map_t
private

Definition at line 47 of file convert.hxx.

Constructor & Destructor Documentation

◆ Convert()

Convert::Convert ( )
private

Definition at line 40 of file convert.cxx.

References init().

Member Function Documentation

◆ collapseWhitespace()

OUString Convert::collapseWhitespace ( const OUString &  _rString)
static

replace all sequences of 0x08, 0x0A, 0x0D, 0x20 with a single 0x20.

also strip leading/trailing whitespace.

Definition at line 305 of file convert.cxx.

References aBuffer, i, nLength, and u.

Referenced by xforms::Model::getNodeDisplayName().

◆ get()

Convert & Convert::get ( )
static

◆ getTypes()

css::uno::Sequence< css::uno::Type > Convert::getTypes ( ) const

get list of convertible types

Definition at line 286 of file convert.cxx.

References maMap, and comphelper::mapKeysToSequence().

Referenced by xforms::Binding::getSupportedValueTypes().

◆ hasType()

bool Convert::hasType ( const css::uno::Type &  rType)

can we convert this type?

Definition at line 281 of file convert.cxx.

References maMap.

Referenced by xforms::Binding::supportsType().

◆ init()

void Convert::init ( )
private

Definition at line 263 of file convert.cxx.

References cppu::UnoType< typename T >::get(), and maMap.

Referenced by Convert().

◆ toAny()

css::uno::Any Convert::toAny ( const OUString &  rValue,
const css::uno::Type &  rType 
)

convert XML representation to Any of given type

Definition at line 297 of file convert.cxx.

References maMap.

Referenced by xforms::ODateType::_getValue(), xforms::OTimeType::_getValue(), xforms::ODateTimeType::_getValue(), and xforms::Binding::getValue().

◆ toXSD()

OUString Convert::toXSD ( const css::uno::Any &  rAny)

Member Data Documentation

◆ maMap

Map_t xforms::Convert::maMap
private

Definition at line 48 of file convert.hxx.

Referenced by getTypes(), hasType(), init(), toAny(), and toXSD().


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