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

Represents a COS dictionary. More...

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

Inheritance diagram for Art::Paperback::Carousel::Dictionary:

Public Types

using iterator = typename map<Name, Object>::iterator
 Iterator type.
 
using const_iterator = typename map<Name, Object>::const_iterator
 Immutable iterator type.
 

Public Member Functions

 Dictionary ()
 Constructor.
 
 Dictionary (map< Name, Object >)
 Constructor.
 
 Dictionary (Dictionary const &)
 Constructor.
 
 Dictionary (Dictionary &&)
 Constructor.
 
 ~Dictionary () noexcept
 Destructor.
 
size_t size () const
 Get the size of the dictionary.
 
bool empty () const
 Check if the dictionary is empty. /.
 
bool contains (Name const &)
 Check if the dictionary contains a key.
 
Objectat (Name const &)
 Access entry.
 
Object const & at (Name const &) const
 Access entry.
 
iterator begin ()
 Get begin iterator.
 
const_iterator begin () const
 Get begin iterator.
 
const_iterator cbegin () const
 Get begin iterator.
 
iterator end ()
 Get past-the-end iterator.
 
const_iterator end () const
 Get past-the-end iterator.
 
const_iterator cend () const
 Get past-the-end iterator.
 
void insert (Name const &, Object)
 Insert entry into dictionary.
 
void erase (Name const &)
 Remove entry from dictionary.
 
Dictionaryoperator= (Dictionary const &)
 Assignment.
 
Dictionaryoperator= (Dictionary &&)
 Assignment.
 
bool operator== (Dictionary const &) const
 Comparison.
 
bool operator!= (Dictionary 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

void attach_children (Object_model::Owner &) override
 Attach any children.
 

Private Attributes

map< Name, Object_data
 
Owner * _owner {}
 

Detailed Description

Represents a COS dictionary.

Member Typedef Documentation

◆ iterator

Iterator type.

◆ const_iterator

using Art::Paperback::Carousel::Dictionary::const_iterator = typename map<Name, Object>::const_iterator

Immutable iterator type.

Constructor & Destructor Documentation

◆ Dictionary() [1/4]

Art::Paperback::Carousel::Dictionary::Dictionary ( )

Constructor.

◆ Dictionary() [2/4]

Art::Paperback::Carousel::Dictionary::Dictionary ( map< Name, Object > data)
explicit

Constructor.

◆ Dictionary() [3/4]

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

Constructor.

◆ Dictionary() [4/4]

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

Constructor.

◆ ~Dictionary()

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

Destructor.

Member Function Documentation

◆ size()

size_t Art::Paperback::Carousel::Dictionary::size ( ) const

Get the size of the dictionary.

◆ empty()

bool Art::Paperback::Carousel::Dictionary::empty ( ) const

Check if the dictionary is empty. /.

◆ contains()

bool Art::Paperback::Carousel::Dictionary::contains ( Name const & key)

Check if the dictionary contains a key.

◆ at() [1/2]

Object & Art::Paperback::Carousel::Dictionary::at ( Name const & key)

Access entry.

◆ at() [2/2]

Object const & Art::Paperback::Carousel::Dictionary::at ( Name const & key) const

Access entry.

◆ begin() [1/2]

Dictionary::iterator Art::Paperback::Carousel::Dictionary::begin ( )

Get begin iterator.

◆ begin() [2/2]

Dictionary::const_iterator Art::Paperback::Carousel::Dictionary::begin ( ) const

Get begin iterator.

◆ cbegin()

Dictionary::const_iterator Art::Paperback::Carousel::Dictionary::cbegin ( ) const

Get begin iterator.

◆ end() [1/2]

Dictionary::iterator Art::Paperback::Carousel::Dictionary::end ( )

Get past-the-end iterator.

◆ end() [2/2]

Dictionary::const_iterator Art::Paperback::Carousel::Dictionary::end ( ) const

Get past-the-end iterator.

◆ cend()

Dictionary::const_iterator Art::Paperback::Carousel::Dictionary::cend ( ) const

Get past-the-end iterator.

◆ insert()

void Art::Paperback::Carousel::Dictionary::insert ( Name const & key,
Object object )

Insert entry into dictionary.

◆ erase()

void Art::Paperback::Carousel::Dictionary::erase ( Name const & key)

Remove entry from dictionary.

◆ operator=() [1/2]

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

Assignment.

◆ operator=() [2/2]

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

Assignment.

◆ operator==()

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

Comparison.

◆ operator!=()

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

Comparison.

◆ attach_children()

void Art::Paperback::Carousel::Dictionary::attach_children ( Object_model::Owner & owner)
overrideprotectedvirtual

Attach any children.

Parameters
ownerThe owner of the children.

Reimplemented from Art::Paperback::Carousel::Object_model::Value_base.

◆ 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.