Om
Public Member Functions | Static Public Member Functions | List of all members
Om::Language::Null Class Reference

The Null Element implementation. More...

#include "null.hpp"

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

Public Member Functions

 Null ()
 
 Null (Om::Source::Source< CodePoint const > &)
 Swallows the next CodePoint in the Source. More...
 
Nulloperator= (Null const &)
 
virtual Programoperator * ()
 
virtual Program const & operator * () const
 
virtual void Clear ()
 
virtual bool Equals (Element const &) const
 
virtual bool Equals (Program 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 &)
 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 bool Merge (Operator &)
 
virtual bool Merge (Operator const &)
 
virtual bool Merge (Separator &)
 
virtual bool Merge (Separator const &)
 
virtual void ParseElements (Reader &)
 
virtual void ParseQuotedElements (Reader &)
 
virtual void Swap (Null &)
 
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< Null >
virtual ~DefaultElement ()=0
 
bool Equals (Null const &) const
 
- Public Member Functions inherited from Om::Language::DefaultProgram< Null, Om::Language::Element >
virtual ~DefaultProgram ()=0
 
- Public Member Functions inherited from Om::Language::DefaultConsumer< Null, DefaultGiveable< Null, 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< Null, Om::Language::Element >
virtual ~DefaultGiveable ()=0
 
- Public Member Functions inherited from Om::DefaultMoveable< Null, DefaultCopyable< Null, Om::Language::Element > >
virtual std::auto_ptr< MoveableMove ()
 
virtual ~DefaultMoveable ()=0
 
- Public Member Functions inherited from Om::DefaultCopyable< Null, 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 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< Null >
virtual ~Taker ()=0
 
void Take (Null &)
 Swaps. More...
 
void Take (Null const &)
 Assigns. More...
 

Static Public Member Functions

static NullGet ()
 
static char const * GetName ()
 

Additional Inherited Members

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

Detailed Description

Definition at line 53 of file null.hpp.

Constructor & Destructor Documentation

◆ Null() [1/2]

Om::Language::Null::Null ( )

◆ Null() [2/2]

Om::Language::Null::Null ( Om::Source::Source< CodePoint const > &  )
explicit

Member Function Documentation

◆ Get()

static Null& Om::Language::Null::Get ( )
static
Returns
The static Null. This can be a mutable reference because Null is immutable regardless.

◆ GetName()

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

◆ operator=()

Null& Om::Language::Null::operator= ( Null const &  )

◆ operator *() [1/2]

virtual Program& Om::Language::Null::operator * ( )
virtual
Returns
The wrapped Program (Null if none).

Implements Om::Language::Element.

◆ operator *() [2/2]

virtual Program const& Om::Language::Null::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::Null::Clear ( )
virtual

Implements Om::Language::Program.

◆ Equals() [1/2]

virtual bool Om::Language::Null::Equals ( Element const &  ) const
virtual

◆ Equals() [2/2]

virtual bool Om::Language::Null::Equals ( Program const &  ) const
virtual

◆ GetElementRange() [1/2]

virtual std::auto_ptr< Om::Source::Source<Element> > Om::Language::Null::GetElementRange ( )
virtual
Returns
An Element range containing only this Element.

Reimplemented from Om::Language::DefaultElement< Null >.

◆ GetElementRange() [2/2]

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

Reimplemented from Om::Language::DefaultElement< Null >.

◆ GiveElements() [1/2]

virtual void Om::Language::Null::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.

Reimplemented from Om::Language::DefaultElement< Null >.

◆ GiveElements() [2/2]

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

◆ IsEmpty()

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

Implements Om::Language::Program.

◆ Merge() [1/4]

virtual bool Om::Language::Null::Merge ( Operator )
virtual
Returns
True if the Element could be merged.

Reimplemented from Om::Language::Element.

◆ Merge() [2/4]

virtual bool Om::Language::Null::Merge ( 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.

Reimplemented from Om::Language::Element.

◆ Merge() [3/4]

virtual bool Om::Language::Null::Merge ( Separator )
virtual

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

Reimplemented from Om::Language::Element.

◆ Merge() [4/4]

virtual bool Om::Language::Null::Merge ( Separator const &  )
virtual

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

Reimplemented from Om::Language::Element.

◆ ParseElements()

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

◆ ParseQuotedElements()

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

◆ Swap()

virtual void Om::Language::Null::Swap ( Null )
virtual

◆ TakeElements() [1/2]

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

◆ TakeElements() [2/2]

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

◆ TakeOperand()

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

◆ TakeOperator()

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

◆ TakeQuotedProducer()

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

◆ TakeSeparator()

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

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