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

The Operand implementation. More...

#include "operand.hpp"

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

Public Member Functions

 Operand ()
 
template<typename TheProgram >
 Operand (std::auto_ptr< TheProgram >)
 
Operandoperator= (Operand)
 
virtual Programoperator * ()
 
virtual Program const & operator * () const
 
virtual void Clear ()
 
bool Equals (Operand const &) const
 
ProgramGetProgram ()
 
Program const * GetProgram () const
 
virtual bool IsEmpty () const
 
virtual void ParseElements (Reader &)
 
virtual void ParseQuotedElements (Reader &)
 
template<typename TheProgram >
void SetProgram (std::auto_ptr< TheProgram >)
 Replaces the Program owned by this Operand with the argument. More...
 
void Swap (Operand &)
 
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::DefaultElement< Operand >
virtual ~DefaultElement ()=0
 
virtual bool Equals (Element const &) const
 
bool Equals (Operand const &) const
 
virtual std::auto_ptr< Om::Source::Source< Element > > GetElementRange ()
 
virtual std::auto_ptr< Om::Source::Source< Element const > > GetElementRange () const
 
virtual void GiveElements (Consumer &)
 
virtual void GiveElements (Consumer &) const
 
- Public Member Functions inherited from Om::Language::DefaultProgram< Operand, Om::Language::Element >
virtual ~DefaultProgram ()=0
 
virtual bool Equals (Program const &) const
 
- Public Member Functions inherited from Om::Language::DefaultConsumer< Operand, DefaultGiveable< Operand, Om::Language::Element > >
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< Operand, Om::Language::Element >
virtual ~DefaultGiveable ()=0
 
- Public Member Functions inherited from Om::DefaultMoveable< Operand, DefaultCopyable< Operand, Om::Language::Element > >
virtual std::auto_ptr< MoveableMove ()
 
virtual ~DefaultMoveable ()=0
 
- Public Member Functions inherited from Om::DefaultCopyable< Operand, Om::Language::Element >
virtual std::auto_ptr< CopyableCopy () const
 
virtual ~DefaultCopyable ()=0
 
- Public Member Functions inherited from Om::Language::Element
virtual ~Element ()=0
 
Programoperator -> ()
 
Program const * operator -> () const
 
virtual bool Merge (Operator &)
 
virtual bool Merge (Operator const &)
 
virtual bool Merge (Separator &)
 
virtual bool Merge (Separator const &)
 
virtual bool Equals (Program const &) const=0
 
virtual std::auto_ptr< Om::Source::Source< Element const > > GetElementRange () const=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< Operand >
virtual ~Taker ()=0
 
void Take (Operand &)
 Swaps. More...
 
void Take (Operand const &)
 Assigns. More...
 

Static Public Member Functions

static char const * GetName ()
 

Private Attributes

Owner< ProgramthisProgram
 

Additional Inherited Members

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

Detailed Description

A non-atomic Element that embeds another Program, which it owns.

Definition at line 55 of file operand.hpp.

Constructor & Destructor Documentation

◆ Operand() [1/2]

Om::Language::Operand::Operand ( )

◆ Operand() [2/2]

template<typename TheProgram >
Om::Language::Operand::Operand ( std::auto_ptr< TheProgram >  )
explicit

Member Function Documentation

◆ GetName()

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

◆ operator=()

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

◆ operator *() [1/2]

virtual Program& Om::Language::Operand::operator * ( )
virtual
Returns
A reference to the Program owned by this Operand. Do not retain this reference.

Implements Om::Language::Element.

◆ operator *() [2/2]

virtual Program const& Om::Language::Operand::operator * ( ) const
virtual

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Implements Om::Language::Element.

◆ Clear()

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

Implements Om::Language::Program.

◆ Equals()

bool Om::Language::Operand::Equals ( Operand const &  ) const

◆ GetProgram() [1/2]

Program* Om::Language::Operand::GetProgram ( )
Returns
A reference to the Program owned by this Operand, or null if none. Do not retain this reference.

◆ GetProgram() [2/2]

Program const* Om::Language::Operand::GetProgram ( ) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ IsEmpty()

virtual bool Om::Language::Operand::IsEmpty ( ) const
virtual
Returns
True if this instance represents an empty Program, which is the case if there is no inner Program (i.e. via default construction).

Implements Om::Language::Program.

◆ ParseElements()

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

◆ ParseQuotedElements()

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

◆ SetProgram()

template<typename TheProgram >
void Om::Language::Operand::SetProgram ( std::auto_ptr< TheProgram >  )

◆ Swap()

void Om::Language::Operand::Swap ( Operand )

◆ TakeElements() [1/2]

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

◆ TakeElements() [2/2]

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

◆ TakeOperand()

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

◆ TakeOperator()

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

◆ TakeQuotedProducer()

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

◆ TakeSeparator()

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

Member Data Documentation

◆ thisProgram

Owner<Program> Om::Language::Operand::thisProgram
private

Definition at line 140 of file operand.hpp.


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