zypp::TranslatedText Class Reference

Class that represent a text and multiple translations. More...

#include <TranslatedText.h>

List of all members.

Public Member Functions

 TranslatedText ()
 Default ctor.
 TranslatedText (const std::string &text, const Locale &lang=Locale())
 Ctor.
 TranslatedText (const std::list< std::string > &text, const Locale &lang=Locale())
 Ctor.
 ~TranslatedText ()
 Dtor.
bool empty () const
 true if the text have no translations for any language
std::string asString (const Locale &lang=Locale()) const
 Synonym for text.
std::string text (const Locale &lang=Locale()) const
std::set< Localelocales () const
void setText (const std::string &text, const Locale &lang=Locale())
void setText (const std::list< std::string > &text, const Locale &lang=Locale())
Locale detectLanguage () const

Static Public Attributes

static const
TranslatedText 
notext
 static default empty translated text

Private Attributes

RWCOW_pointer< Impl_pimpl
 Pointer to implementation.

Friends

std::ostream & operator<< (std::ostream &str, const TranslatedText &obj)
 Stream output.

Classes

struct  Impl
 TranslatedText implementation. More...


Detailed Description

Class that represent a text and multiple translations.

Definition at line 34 of file TranslatedText.h.


Constructor & Destructor Documentation

zypp::TranslatedText::TranslatedText (  ) 

Default ctor.

Definition at line 136 of file TranslatedText.cc.

zypp::TranslatedText::TranslatedText ( const std::string &  text,
const Locale lang = Locale() 
) [explicit]

Ctor.

Definition at line 145 of file TranslatedText.cc.

zypp::TranslatedText::TranslatedText ( const std::list< std::string > &  text,
const Locale lang = Locale() 
) [explicit]

Ctor.

Definition at line 155 of file TranslatedText.cc.

zypp::TranslatedText::~TranslatedText (  ) 

Dtor.

Definition at line 165 of file TranslatedText.cc.


Member Function Documentation

bool zypp::TranslatedText::empty (  )  const

true if the text have no translations for any language

Definition at line 191 of file TranslatedText.cc.

References _pimpl.

Referenced by zypp::detail::PatchImplIf::interactive().

std::string zypp::TranslatedText::asString ( const Locale lang = Locale()  )  const [inline]

Synonym for text.

Definition at line 63 of file TranslatedText.h.

References text().

std::string zypp::TranslatedText::text ( const Locale lang = Locale()  )  const

Definition at line 174 of file TranslatedText.cc.

References _pimpl.

Referenced by zypp::cache::CacheStore::appendTranslatedStringAttribute(), asString(), zypp::storage::XMLSelectionImpl::category(), and zypp::storage::translatedTextToXML().

std::set< Locale > zypp::TranslatedText::locales (  )  const

Definition at line 180 of file TranslatedText.cc.

References _pimpl.

Referenced by zypp::cache::CacheStore::appendTranslatedStringAttribute(), and zypp::storage::translatedTextToXML().

void zypp::TranslatedText::setText ( const std::string &  text,
const Locale lang = Locale() 
)

Definition at line 177 of file TranslatedText.cc.

References _pimpl.

Referenced by zypp::cache::ResolvableQuery::Impl::queryTranslatedStringAttributeInternal(), and zypp::target::rpm::RPMPackageImpl::RPMPackageImpl().

void zypp::TranslatedText::setText ( const std::list< std::string > &  text,
const Locale lang = Locale() 
)

Definition at line 185 of file TranslatedText.cc.

References _pimpl.

Locale zypp::TranslatedText::detectLanguage (  )  const

Definition at line 188 of file TranslatedText.cc.

References _pimpl.


Friends And Related Function Documentation

std::ostream & operator<< ( std::ostream &  str,
const TranslatedText obj 
) [friend]

Stream output.

Definition at line 81 of file TranslatedText.h.


Member Data Documentation

const TranslatedText zypp::TranslatedText::notext [static]

static default empty translated text

Definition at line 58 of file TranslatedText.h.

Referenced by zypp::detail::ResObjectImplIf::delnotify(), zypp::detail::ResObjectImplIf::description(), zypp::detail::ResObjectImplIf::insnotify(), zypp::detail::ResObjectImplIf::licenseToConfirm(), and zypp::detail::ResObjectImplIf::summary().

RWCOW_pointer<Impl> zypp::TranslatedText::_pimpl [private]

Pointer to implementation.

Definition at line 76 of file TranslatedText.h.

Referenced by detectLanguage(), empty(), locales(), setText(), and text().


The documentation for this class was generated from the following files:
Generated on Tue Sep 25 19:23:16 2007 for libzypp by  doxygen 1.5.3