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::Expression Class Reference

The Expression Program implementation. More...

#include "expression.hpp"

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

Classes

class  ElementRange
 An Expression Element range. More...
 
class  FormRange
 An Expression Form range. More...
 
class  FormRange< Form >
 A mutable Expression Form range. More...
 
class  FormRange< Form const >
 An immutable Expression Form range. More...
 

Public Member Functions

 Expression ()
 
Expressionoperator= (Expression)
 
void BackGiveForm (Consumer &)
 
void BackGiveTerm (Consumer &)
 
void BackPopTerm ()
 
template<typename TheOperand >
void BackTakeOperand (TheOperand &)
 
template<typename TheOperator >
void BackTakeOperator (TheOperator &)
 
template<typename TheProducer >
void BackTakeQuotedProducer (TheProducer &)
 
virtual void Clear ()
 
void FrontGiveForm (Consumer &)
 
void FrontGiveTerm (Consumer &)
 
void FrontPopTerm ()
 
template<typename TheOperand >
void FrontTakeOperand (TheOperand &)
 
template<typename TheOperator >
void FrontTakeOperator (TheOperator &)
 
template<typename TheProducer >
void FrontTakeQuotedProducer (TheProducer &)
 
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 (Expression &)
 
void TakeElements (Expression &)
 
void TakeElements (Expression const &)
 
virtual void TakeElements (Producer &)
 Takes each Element of the argument. More...
 
virtual void TakeElements (Producer const &)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
 
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< Expression >
virtual ~DefaultProgram ()=0
 
virtual bool Equals (Program const &) const
 
- Public Member Functions inherited from Om::Language::DefaultConsumer< Expression, DefaultGiveable< Expression, 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< Expression, Om::Language::Program >
virtual ~DefaultGiveable ()=0
 
- Public Member Functions inherited from Om::DefaultMoveable< Expression, DefaultCopyable< Expression, Om::Language::Program > >
virtual std::auto_ptr< MoveableMove ()
 
virtual ~DefaultMoveable ()=0
 
- Public Member Functions inherited from Om::DefaultCopyable< Expression, 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< Expression >
virtual ~Taker ()=0
 
void Take (Expression &)
 Swaps. More...
 
void Take (Expression const &)
 Assigns. More...
 

Static Public Member Functions

static char const * GetName ()
 

Private Types

typedef std::deque< FormFormDeque
 

Private Member Functions

FormGetBackTaker ()
 
FormGetFrontTaker ()
 

Static Private Member Functions

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

Private Attributes

FormDeque thisFormDeque
 

Additional Inherited Members

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

Detailed Description

Definition at line 55 of file expression.hpp.

Member Typedef Documentation

◆ FormDeque

typedef std::deque<Form> Om::Language::Expression::FormDeque
private

Definition at line 147 of file expression.hpp.

Constructor & Destructor Documentation

◆ Expression()

Om::Language::Expression::Expression ( )

Member Function Documentation

◆ GetName()

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

◆ operator=()

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

◆ BackGiveForm()

void Om::Language::Expression::BackGiveForm ( Consumer )

◆ BackGiveTerm()

void Om::Language::Expression::BackGiveTerm ( Consumer )

◆ BackPopTerm()

void Om::Language::Expression::BackPopTerm ( )

◆ BackTakeOperand()

template<typename TheOperand >
void Om::Language::Expression::BackTakeOperand ( TheOperand &  )

◆ BackTakeOperator()

template<typename TheOperator >
void Om::Language::Expression::BackTakeOperator ( TheOperator &  )

◆ BackTakeQuotedProducer()

template<typename TheProducer >
void Om::Language::Expression::BackTakeQuotedProducer ( TheProducer &  )

◆ Clear()

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

Implements Om::Language::Program.

◆ FrontGiveForm()

void Om::Language::Expression::FrontGiveForm ( Consumer )

◆ FrontGiveTerm()

void Om::Language::Expression::FrontGiveTerm ( Consumer )

◆ FrontPopTerm()

void Om::Language::Expression::FrontPopTerm ( )

◆ FrontTakeOperand()

template<typename TheOperand >
void Om::Language::Expression::FrontTakeOperand ( TheOperand &  )

◆ FrontTakeOperator()

template<typename TheOperator >
void Om::Language::Expression::FrontTakeOperator ( TheOperator &  )

◆ FrontTakeQuotedProducer()

template<typename TheProducer >
void Om::Language::Expression::FrontTakeQuotedProducer ( TheProducer &  )

◆ GetElementRange()

virtual std::auto_ptr< Om::Source::Source<Element const> > Om::Language::Expression::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::Expression::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::Expression::GiveElements ( Consumer ) const
virtual

◆ IsEmpty()

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

Implements Om::Language::Program.

◆ ParseElements()

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

◆ ParseQuotedElements()

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

◆ Swap()

void Om::Language::Expression::Swap ( Expression )

◆ TakeElements() [1/4]

void Om::Language::Expression::TakeElements ( Expression )

◆ TakeElements() [2/4]

void Om::Language::Expression::TakeElements ( Expression const &  )

◆ TakeElements() [3/4]

virtual void Om::Language::Expression::TakeElements ( Producer )
virtual

◆ TakeElements() [4/4]

virtual void Om::Language::Expression::TakeElements ( Producer const &  )
virtual

◆ TakeOperand()

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

◆ TakeOperator()

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

◆ TakeQuotedProducer()

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

◆ TakeSeparator()

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

◆ GiveElements() [3/3]

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

◆ GetBackTaker()

Form& Om::Language::Expression::GetBackTaker ( )
private

◆ GetFrontTaker()

Form& Om::Language::Expression::GetFrontTaker ( )
private

Member Data Documentation

◆ thisFormDeque

FormDeque Om::Language::Expression::thisFormDeque
private

Definition at line 170 of file expression.hpp.


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