cwidget  0.5.17
Classes | Public Types | Public Member Functions | List of all members
cwidget::fragment_contents Class Reference

This class represents the formatted contents of a fragment. More...

#include <fragment_contents.h>

Public Types

typedef fragment_lines::iterator iterator
 
typedef fragment_lines::const_iterator const_iterator
 

Public Member Functions

 fragment_contents ()
 Generate empty contents for a fragment. More...
 
 fragment_contents (const fragment_contents &other)
 Copy constructor. More...
 
 ~fragment_contents ()
 When this is destroyed, decrement the lines' reference count. More...
 
void push_back (const fragment_line &l)
 
iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
iterator end () const
 
fragment_linefront ()
 
const fragment_linefront () const
 
fragment_lineback ()
 
const fragment_lineback () const
 
size_t size () const
 
void set_final_nl (bool final_nl_new)
 
bool get_final_nl ()
 
fragment_lineoperator[] (int i)
 
const fragment_lineoperator[] (int i) const
 
fragment_contentsoperator= (const fragment_contents &other)
 

Detailed Description

This class represents the formatted contents of a fragment.

To minimize silly mistakes, the lines are reference-counted.

Todo:
give this proper const_iterators and deal with the mutable-sharing problem (this structure is mutable but has shared data).

Constructor & Destructor Documentation

◆ fragment_contents() [1/2]

cwidget::fragment_contents::fragment_contents ( )
inline

Generate empty contents for a fragment.

◆ fragment_contents() [2/2]

cwidget::fragment_contents::fragment_contents ( const fragment_contents other)
inline

Copy constructor.

◆ ~fragment_contents()

cwidget::fragment_contents::~fragment_contents ( )
inline

When this is destroyed, decrement the lines' reference count.


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