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)

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 143 of file TranslatedText.cc.

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

Ctor.

Definition at line 152 of file TranslatedText.cc.

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

Ctor.

Definition at line 162 of file TranslatedText.cc.

zypp::TranslatedText::~TranslatedText  ) 
 

Dtor.

Definition at line 172 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 198 of file TranslatedText.cc.

References _pimpl.

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 181 of file TranslatedText.cc.

References _pimpl.

Referenced by asString(), zypp::storage::XMLSelectionImpl::category(), zypp::Pattern::category(), zypp::ResObject::delnotify(), zypp::ResObject::description(), zypp::ResObject::insnotify(), zypp::ResObject::licenseToConfirm(), zypp::Product::shortName(), zypp::ResObject::summary(), and zypp::storage::translatedTextToXML().

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

Definition at line 187 of file TranslatedText.cc.

References _pimpl.

Referenced by zypp::storage::translatedTextToXML().

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

Definition at line 184 of file TranslatedText.cc.

References _pimpl.

Referenced by zypp::source::susetags::ProductMetadataParser::parseLine(), and zypp::target::rpm::RPMPackageImpl::RPMPackageImpl().

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

Definition at line 192 of file TranslatedText.cc.

References _pimpl.

Locale zypp::TranslatedText::detectLanguage  )  const
 

Definition at line 195 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 Thu Jul 6 00:07:31 2006 for zypp by  doxygen 1.4.6