libart-paperback 0.1.0-a.1.20260122225059.e5fea306241a
PDF (1.4) library for C++
Art::Paperback::Carousel::Text Class Reference

Represents COS text. More...

#include <art/paperback/carousel/text.hxx>

Inheritance diagram for Art::Paperback::Carousel::Text:

Public Types

enum class  Convention { literal , hexadecimal }
 Enumeration of text conventions. More...
 

Public Member Functions

 Text (Convention=Convention::literal)
 Constructor.
 
 Text (string, Convention=Convention::literal)
 Constructor.
 
 Text (char const *, Convention=Convention::literal)
 Constructor.
 
 Text (Text const &)
 Constructor.
 
 Text (Text &&)
 Constructor.
 
 ~Text () noexcept
 Destructor.
 
Convention convention () const
 Get the text convention used for this object.
 
string const & operator* () const
 Access text string.
 
string const * operator-> () const
 Access text string.
 
Textoperator= (Text const &)
 Assignment.
 
Textoperator= (Text &&)
 Assignment.
 
bool operator== (Text const &) const
 Comparison.
 
bool operator!= (Text const &) const
 Comparison.
 
bool operator< (Text const &) const
 Comparison.
 
bool operator<= (Text const &) const
 Comparison.
 
bool operator> (Text const &) const
 Comparison.
 
bool operator>= (Text const &) const
 Comparison.
 
void attach (Owner &)
 Attach value to owner.
 
Owner * owner ()
 Access owner, if any.
 
Owner const * owner () const
 Access owner, if any.
 

Protected Member Functions

virtual void attach_children (Owner &)
 Attach any children.
 

Private Attributes

Convention _convention
 
string _data
 
Owner * _owner {}
 

Detailed Description

Represents COS text.

The Text class does not impose any limit on the length of the text string.

Member Enumeration Documentation

◆ Convention

Enumeration of text conventions.

See Section 3.2.3, "String Objects" in the PDF-1.4 specification for details about text strings and their representation.

Enumerator
literal 

Indicates the literal convention.

When used, the text string will be written verbatim to the output file, enclosed in parentheses.

Special characters will be written as escape-sequences.

hexadecimal 

Indicates the hexadecimal convention.

When used, the text string will be written as a sequence of hexadecimal digits, enclosed within angle brackets.

The size of the written data will be double the length of the text string when this convention is used.

Constructor & Destructor Documentation

◆ Text() [1/5]

Art::Paperback::Carousel::Text::Text ( Convention convention = Convention::literal)

Constructor.

◆ Text() [2/5]

Art::Paperback::Carousel::Text::Text ( string data,
Convention convention = Convention::literal )

Constructor.

◆ Text() [3/5]

Art::Paperback::Carousel::Text::Text ( char const * data,
Convention convention = Convention::literal )

Constructor.

◆ Text() [4/5]

Art::Paperback::Carousel::Text::Text ( Text const & other)

Constructor.

◆ Text() [5/5]

Art::Paperback::Carousel::Text::Text ( Text && other)

Constructor.

◆ ~Text()

Art::Paperback::Carousel::Text::~Text ( )
noexcept

Destructor.

Member Function Documentation

◆ convention()

Text::Convention Art::Paperback::Carousel::Text::convention ( ) const

Get the text convention used for this object.

◆ operator*()

string const & Art::Paperback::Carousel::Text::operator* ( ) const

Access text string.

◆ operator->()

string const * Art::Paperback::Carousel::Text::operator-> ( ) const

Access text string.

◆ operator=() [1/2]

Text & Art::Paperback::Carousel::Text::operator= ( Text const & other)

Assignment.

◆ operator=() [2/2]

Text & Art::Paperback::Carousel::Text::operator= ( Text && other)

Assignment.

◆ operator==()

bool Art::Paperback::Carousel::Text::operator== ( Text const & other) const

Comparison.

This function only compares the string value of this with other.

The text convention used by either string is ignored.

◆ operator!=()

bool Art::Paperback::Carousel::Text::operator!= ( Text const & other) const

Comparison.

This function only compares the string value of this with other.

The text convention used by either string is ignored.

◆ operator<()

bool Art::Paperback::Carousel::Text::operator< ( Text const & other) const

Comparison.

◆ operator<=()

bool Art::Paperback::Carousel::Text::operator<= ( Text const & other) const

Comparison.

◆ operator>()

bool Art::Paperback::Carousel::Text::operator> ( Text const & other) const

Comparison.

◆ operator>=()

bool Art::Paperback::Carousel::Text::operator>= ( Text const & other) const

Comparison.

◆ attach()

void Art::Paperback::Carousel::Object_model::Value_base::attach ( Owner & owner)
inherited

Attach value to owner.

Parameters
ownerReference to the owner.

◆ owner() [1/2]

Owner * Art::Paperback::Carousel::Object_model::Value_base::owner ( )
inherited

Access owner, if any.

Returns
Returns a pointer to the owner, if attached.

◆ owner() [2/2]

Owner const * Art::Paperback::Carousel::Object_model::Value_base::owner ( ) const
inherited

Access owner, if any.

Returns
Returns a pointer to the owner, if attached.

◆ attach_children()

void Art::Paperback::Carousel::Object_model::Value_base::attach_children ( Owner & owner)
protectedvirtualinherited

Attach any children.

Parameters
ownerThe owner of the children.

Reimplemented in Art::Paperback::Carousel::Array, and Art::Paperback::Carousel::Dictionary.