Om
Classes | Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
Om::Language::Literal Class Reference

The Literal Program implementation. More...

#include "literal.hpp"

+ Inheritance diagram for Om::Language::Literal:
+ Collaboration diagram for Om::Language::Literal:

Classes

class  ElementRange
 A Literal Element range. More...
 
class  ElementRange< Literal >
 A mutable Literal Element range. More...
 
class  ElementRange< Literal const >
 An immutable Literal Element range. More...
 

Public Member Functions

virtual ~Literal ()
 
 Literal ()
 
Literaloperator= (Literal)
 
template<typename TheElement >
void BackGive (Consumer &)
 
void BackGiveElement (Consumer &)
 
virtual void Clear ()
 
template<typename TheElement >
void FrontGive (Consumer &)
 
void FrontGiveElement (Consumer &)
 
std::auto_ptr< Om::Source::Source< Element > > GetElementRange ()
 
virtual std::auto_ptr< Om::Source::Source< Element const > > GetElementRange () const
 
virtual void GiveElements (Consumer &)
 Gives each contained Element to the argument. More...
 
virtual void GiveElements (Consumer &) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
 
virtual bool IsEmpty () const
 
virtual void ParseElements (Reader &)
 
virtual void ParseQuotedElements (Reader &)
 
void Swap (Literal &)
 
template<typename TheOperand >
void TakeOperand (TheOperand &)
 
template<typename TheOperator >
void TakeOperator (TheOperator &)
 
template<typename TheProducer >
void TakeQuotedProducer (TheProducer &)
 
template<typename TheSeparator >
void TakeSeparator (TheSeparator &)
 
- Public Member Functions inherited from Om::Language::DefaultProgram< Literal >
virtual ~DefaultProgram ()=0
 
virtual bool Equals (Program const &) const
 
virtual void TakeElements (Producer &)
 
virtual void TakeElements (Producer const &)
 
- Public Member Functions inherited from Om::Language::DefaultConsumer< Literal, DefaultGiveable< Literal, Om::Language::Program > >
virtual ~DefaultConsumer ()=0
 
virtual void TakeElement (Operand &)
 
virtual void TakeElement (Operand const &)
 
virtual void TakeElement (Operator &)
 
virtual void TakeElement (Operator const &)
 
virtual void TakeElement (Separator &)
 
virtual void TakeElement (Separator const &)
 
virtual void TakeQuotedElements (Producer &)
 
virtual void TakeQuotedElements (Producer const &)
 
- Public Member Functions inherited from Om::DefaultGiveable< Literal, Om::Language::Program >
virtual ~DefaultGiveable ()=0
 
- Public Member Functions inherited from Om::DefaultMoveable< Literal, DefaultCopyable< Literal, Om::Language::Program > >
virtual std::auto_ptr< MoveableMove ()
 
virtual ~DefaultMoveable ()=0
 
- Public Member Functions inherited from Om::DefaultCopyable< Literal, Om::Language::Program >
virtual std::auto_ptr< CopyableCopy () const
 
virtual ~DefaultCopyable ()=0
 
- Public Member Functions inherited from Om::Language::Program
virtual ~Program ()=0
 
virtual std::auto_ptr< ProgramGiveProgram ()
 Returns a new Program populated with the contents of this. More...
 
virtual std::auto_ptr< ProgramGiveProgram () const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
 
- Public Member Functions inherited from Om::Language::Consumer
virtual ~Consumer ()=0
 
template<typename TheOperator , typename TheSeparator >
void Parse (Reader &)
 
void TakeElement (Null &)
 Takes a Null Element, which is disregarded. More...
 
void TakeElement (Null const &)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
 
- Public Member Functions inherited from Om::Giveable
virtual ~Giveable ()=0
 
- Public Member Functions inherited from Om::Copyable
virtual ~Copyable ()=0
 
- Public Member Functions inherited from Om::Moveable
virtual ~Moveable ()=0
 
- Public Member Functions inherited from Om::Language::Producer
virtual ~Producer ()=0
 
- Public Member Functions inherited from Om::Shareable<>
virtual ~Shareable ()=0
 
size_t GetOwnerCount () const
 
- Public Member Functions inherited from Om::Taker< Literal >
virtual ~Taker ()=0
 
void Take (Literal &)
 Swaps. More...
 
void Take (Literal const &)
 Assigns. More...
 

Static Public Member Functions

static char const * GetName ()
 

Private Types

typedef boost::ptr_deque< ElementElementDeque
 

Private Member Functions

template<typename TheAtom >
void TakeAtom (TheAtom &)
 

Static Private Member Functions

template<typename TheElementIterator >
static void GiveElements (Consumer &theConsumer, TheElementIterator theCurrent, TheElementIterator const theEnd)
 

Private Attributes

ElementDeque thisElementDeque
 

Additional Inherited Members

- Protected Member Functions inherited from Om::Shareable<>
 Shareable ()
 
 Shareable (Shareable const &)
 
Shareableoperator= (Shareable const &)
 

Detailed Description

Definition at line 54 of file literal.hpp.

Member Typedef Documentation

◆ ElementDeque

typedef boost::ptr_deque<Element> Om::Language::Literal::ElementDeque
private

Definition at line 122 of file literal.hpp.

Constructor & Destructor Documentation

◆ ~Literal()

virtual Om::Language::Literal::~Literal ( )
virtual

◆ Literal()

Om::Language::Literal::Literal ( )

Member Function Documentation

◆ GetName()

static char const* Om::Language::Literal::GetName ( )
static

◆ operator=()

Literal& Om::Language::Literal::operator= ( Literal  )

◆ BackGive()

template<typename TheElement >
void Om::Language::Literal::BackGive ( Consumer )

◆ BackGiveElement()

void Om::Language::Literal::BackGiveElement ( Consumer )

◆ Clear()

virtual void Om::Language::Literal::Clear ( )
virtual

Implements Om::Language::Program.

◆ FrontGive()

template<typename TheElement >
void Om::Language::Literal::FrontGive ( Consumer )

◆ FrontGiveElement()

void Om::Language::Literal::FrontGiveElement ( Consumer )

◆ GetElementRange() [1/2]

std::auto_ptr< Om::Source::Source<Element> > Om::Language::Literal::GetElementRange ( )

◆ GetElementRange() [2/2]

virtual std::auto_ptr< Om::Source::Source<Element const> > Om::Language::Literal::GetElementRange ( ) const
virtual
Returns
A non-null owner pointer to a new Element range.

Implements Om::Language::Program.

◆ GiveElements() [1/3]

virtual void Om::Language::Literal::GiveElements ( Consumer )
virtual
Postcondition
IsEmpty() == true
Remarks
Giving every Element is more efficient than giving a subset and managing incremental state, which is never necessary.

Implements Om::Language::Producer.

◆ GiveElements() [2/3]

virtual void Om::Language::Literal::GiveElements ( Consumer ) const
virtual

◆ IsEmpty()

virtual bool Om::Language::Literal::IsEmpty ( ) const
virtual
Returns
True if there is no Element.

Implements Om::Language::Program.

◆ ParseElements()

virtual void Om::Language::Literal::ParseElements ( Reader )
virtual

◆ ParseQuotedElements()

virtual void Om::Language::Literal::ParseQuotedElements ( Reader )
virtual

◆ Swap()

void Om::Language::Literal::Swap ( Literal )

◆ TakeOperand()

template<typename TheOperand >
void Om::Language::Literal::TakeOperand ( TheOperand &  )

◆ TakeOperator()

template<typename TheOperator >
void Om::Language::Literal::TakeOperator ( TheOperator &  )

◆ TakeQuotedProducer()

template<typename TheProducer >
void Om::Language::Literal::TakeQuotedProducer ( TheProducer &  )

◆ TakeSeparator()

template<typename TheSeparator >
void Om::Language::Literal::TakeSeparator ( TheSeparator &  )

◆ GiveElements() [3/3]

template<typename TheElementIterator >
static void Om::Language::Literal::GiveElements ( Consumer theConsumer,
TheElementIterator  theCurrent,
TheElementIterator const  theEnd 
)
staticprivate
Parameters
theConsumerThe Consumer.
theCurrentThe current Element iterator.
theEndThe end Element iterator.

◆ TakeAtom()

template<typename TheAtom >
void Om::Language::Literal::TakeAtom ( TheAtom &  )
private

Member Data Documentation

◆ thisElementDeque

ElementDeque Om::Language::Literal::thisElementDeque
private

Definition at line 144 of file literal.hpp.


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