LibreOffice Module connectivity (master) 1
Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Private Attributes | Friends | List of all members
dbtools::OCharsetMap Class Reference

is a class which translates between different charset representations. More...

#include <dbcharset.hxx>

Inheritance diagram for dbtools::OCharsetMap:
[legend]
Collaboration diagram for dbtools::OCharsetMap:
[legend]

Public Types

typedef CharsetIterator iterator
 
typedef CharsetIterator const_iterator
 

Public Member Functions

 OCharsetMap ()
 
virtual ~OCharsetMap ()
 
CharsetIterator find (const rtl_TextEncoding _eEncoding) const
 find the given text encoding in the map. More...
 
CharsetIterator findIanaName (std::u16string_view _rIanaName) const
 find the given IANA name in the map. More...
 
CharsetIterator begin () const
 get access to the first element of the charset collection More...
 
CharsetIterator end () const
 get access to the (last + 1st) element of the charset collection More...
 
CharsetIteratorDerefHelper operator* () const
 
const CharsetIteratoroperator++ ()
 prefix increment More...
 
const CharsetIteratoroperator-- ()
 prefix decrement More...
 

Protected Types

typedef std::set< rtl_TextEncoding > TextEncBag
 

Protected Member Functions

void lateConstruct ()
 
void ensureConstructed () const
 
virtual bool approveEncoding (const rtl_TextEncoding _eEncoding, const rtl_TextEncodingInfo &_rInfo) const
 
 CharsetIterator (const OCharsetMap *_pContainer, OCharsetMap::TextEncBag::const_iterator _aPos)
 

Protected Attributes

TextEncBag m_aEncodings
 

Private Attributes

const OCharsetMapm_pContainer
 
OCharsetMap::TextEncBag::const_iterator m_aPos
 

Friends

class OCharsetMap::CharsetIterator
 
class OCharsetMap
 
OOO_DLLPUBLIC_DBTOOLS bool operator== (const CharsetIterator &lhs, const CharsetIterator &rhs)
 
bool operator!= (const CharsetIterator &lhs, const CharsetIterator &rhs)
 

Detailed Description

is a class which translates between different charset representations.

The set of recognized charsets is very limited: only the ones which are database relevant are implemented at the moment

Possible representations are:

Definition at line 53 of file dbcharset.hxx.

Member Typedef Documentation

◆ const_iterator

Definition at line 64 of file dbcharset.hxx.

◆ iterator

Definition at line 63 of file dbcharset.hxx.

◆ TextEncBag

typedef std::set<rtl_TextEncoding> dbtools::OCharsetMap::TextEncBag
protected

Definition at line 56 of file dbcharset.hxx.

Constructor & Destructor Documentation

◆ OCharsetMap()

dbtools::OCharsetMap::OCharsetMap ( )

References begin, end, and connectivity::find().

◆ ~OCharsetMap()

dbtools::OCharsetMap::~OCharsetMap ( )
virtual

Definition at line 77 of file dbcharset.cxx.

Member Function Documentation

◆ approveEncoding()

bool dbtools::OCharsetMap::approveEncoding ( const rtl_TextEncoding  _eEncoding,
const rtl_TextEncodingInfo &  _rInfo 
) const
protectedvirtual

Definition at line 68 of file dbcharset.cxx.

Referenced by lateConstruct().

◆ begin()

OCharsetMap::CharsetIterator dbtools::OCharsetMap::begin ( ) const

get access to the first element of the charset collection

Definition at line 82 of file dbcharset.cxx.

References CharsetIterator(), ensureConstructed(), and m_aEncodings.

◆ CharsetIterator()

dbtools::OCharsetMap::CharsetIterator ( const OCharsetMap _pContainer,
OCharsetMap::TextEncBag::const_iterator  _aPos 
)
protected

Referenced by begin(), end(), and find().

◆ end()

OCharsetMap::CharsetIterator dbtools::OCharsetMap::end ( ) const

get access to the (last + 1st) element of the charset collection

Definition at line 118 of file dbcharset.cxx.

References CharsetIterator(), ensureConstructed(), and m_aEncodings.

Referenced by connectivity::odbc::OConnection::Construct(), findIanaName(), and lateConstruct().

◆ ensureConstructed()

void dbtools::OCharsetMap::ensureConstructed ( ) const
inlineprotected

Definition at line 86 of file dbcharset.hxx.

Referenced by begin(), end(), find(), and findIanaName().

◆ find()

OCharsetMap::CharsetIterator dbtools::OCharsetMap::find ( const rtl_TextEncoding  _eEncoding) const

find the given text encoding in the map.

Returns
the end iterator if the encoding could not be found.

Definition at line 89 of file dbcharset.cxx.

References CharsetIterator(), ensureConstructed(), and m_aEncodings.

Referenced by findIanaName(), and lateConstruct().

◆ findIanaName()

OCharsetMap::CharsetIterator dbtools::OCharsetMap::findIanaName ( std::u16string_view  _rIanaName) const

find the given IANA name in the map.

Returns
the end iterator if the IANA name could not be found.

Definition at line 96 of file dbcharset.cxx.

References end(), ensureConstructed(), find(), and pq_sdbc_driver::OUStringToOString().

Referenced by connectivity::odbc::OConnection::Construct().

◆ lateConstruct()

void dbtools::OCharsetMap::lateConstruct ( )
protected

Definition at line 34 of file dbcharset.cxx.

References approveEncoding(), end(), find(), and m_aEncodings.

◆ operator*()

CharsetIteratorDerefHelper dbtools::OCharsetMap::operator* ( ) const

◆ operator++()

const CharsetIterator & dbtools::OCharsetMap::operator++ ( )

prefix increment

◆ operator--()

const CharsetIterator & dbtools::OCharsetMap::operator-- ( )

prefix decrement

Friends And Related Function Documentation

◆ OCharsetMap

dbtools::OCharsetMap::OCharsetMap
friend

Definition at line 117 of file dbcharset.hxx.

◆ OCharsetMap::CharsetIterator

friend class OCharsetMap::CharsetIterator
friend

Definition at line 62 of file dbcharset.hxx.

◆ operator!=

bool operator!= ( const CharsetIterator lhs,
const CharsetIterator rhs 
)
friend

Definition at line 120 of file dbcharset.hxx.

◆ operator==

OOO_DLLPUBLIC_DBTOOLS bool operator== ( const CharsetIterator lhs,
const CharsetIterator rhs 
)
friend

Member Data Documentation

◆ m_aEncodings

TextEncBag dbtools::OCharsetMap::m_aEncodings
protected

Definition at line 58 of file dbcharset.hxx.

Referenced by begin(), end(), find(), and lateConstruct().

◆ m_aPos

OCharsetMap::TextEncBag::const_iterator dbtools::OCharsetMap::m_aPos
private

Definition at line 125 of file dbcharset.hxx.

◆ m_pContainer

const OCharsetMap* dbtools::OCharsetMap::m_pContainer
private

Definition at line 124 of file dbcharset.hxx.


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