Om
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
Om::Language::DefaultAtom< ThisImplementation > Class Template Referenceabstract

A partial implementation of Atom. More...

#include "default_atom.hpp"

+ Inheritance diagram for Om::Language::DefaultAtom< ThisImplementation >:
+ Collaboration diagram for Om::Language::DefaultAtom< ThisImplementation >:

Public Member Functions

virtual ~DefaultAtom ()=0
 
bool operator< (DefaultAtom const &)
 Compares with a Atom; required for use as index in containers. More...
 
virtual void Clear ()
 
bool Equals (DefaultAtom const &) const
 
bool Equals (ThisImplementation const &) const
 
virtual std::auto_ptr< Om::Source::Source< Element > > GetElementRange ()
 
virtual std::auto_ptr< Om::Source::Source< Element const > > GetElementRange () const
 
std::string const & GetString () const
 
virtual bool IsEmpty () const
 
virtual bool Merge (ThisImplementation &)
 
virtual bool Merge (ThisImplementation const &)
 
void Swap (ThisImplementation &)
 
- Public Member Functions inherited from Om::Language::DefaultElement< ThisImplementation, Om::Language::Atom >
virtual ~DefaultElement ()=0
 
virtual bool Equals (Element const &) const
 
bool Equals (ThisImplementation const &) const
 
virtual void GiveElements (Consumer &)
 
virtual void GiveElements (Consumer &) const
 
- Public Member Functions inherited from Om::Language::DefaultProgram< ThisImplementation, Om::Language::Atom >
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< ThisImplementation, DefaultGiveable< ThisImplementation, Om::Language::Atom > >
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< ThisImplementation, Om::Language::Atom >
virtual ~DefaultGiveable ()=0
 
- Public Member Functions inherited from Om::DefaultMoveable< ThisImplementation, DefaultCopyable< ThisImplementation, Om::Language::Atom > >
virtual std::auto_ptr< MoveableMove ()
 
virtual ~DefaultMoveable ()=0
 
- Public Member Functions inherited from Om::DefaultCopyable< ThisImplementation, Om::Language::Atom >
virtual std::auto_ptr< CopyableCopy () const
 
virtual ~DefaultCopyable ()=0
 
- Public Member Functions inherited from Om::Language::Atom
virtual Programoperator * ()
 
virtual Program const & operator * () const
 
- 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 &)
 
virtual void ParseElements (Reader &)=0
 
virtual void ParseQuotedElements (Reader &)=0
 
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< ThisImplementation >
virtual ~Taker ()=0
 
void Take (ThisImplementation &)
 Swaps. More...
 
void Take (ThisImplementation const &)
 Assigns. More...
 

Protected Member Functions

 DefaultAtom ()
 
 DefaultAtom (char const theCodeUnitIterator[])
 
 DefaultAtom (char const theCodeUnit)
 
- Protected Member Functions inherited from Om::Shareable<>
 Shareable ()
 
 Shareable (Shareable const &)
 
Shareableoperator= (Shareable const &)
 

Protected Attributes

std::string thisString
 The NFD-normalized string that defines the Atom. More...
 

Private Member Functions

DefaultAtomoperator= (DefaultAtom const &)
 

Detailed Description

template<typename ThisImplementation>
class Om::Language::DefaultAtom< ThisImplementation >

Definition at line 42 of file default_atom.hpp.

Constructor & Destructor Documentation

◆ ~DefaultAtom()

template<typename ThisImplementation>
virtual Om::Language::DefaultAtom< ThisImplementation >::~DefaultAtom ( )
pure virtual

◆ DefaultAtom() [1/3]

template<typename ThisImplementation>
Om::Language::DefaultAtom< ThisImplementation >::DefaultAtom ( )
protected

◆ DefaultAtom() [2/3]

template<typename ThisImplementation>
Om::Language::DefaultAtom< ThisImplementation >::DefaultAtom ( char const  theCodeUnitIterator[])
explicitprotected
Parameters
theCodeUnitIteratorA non-null pointer to the null-terminated code unit array to copy.

◆ DefaultAtom() [3/3]

template<typename ThisImplementation>
Om::Language::DefaultAtom< ThisImplementation >::DefaultAtom ( char const  theCodeUnit)
explicitprotected
Parameters
theCodeUnitThe ASCII CodePoint to copy.

Member Function Documentation

◆ operator<()

template<typename ThisImplementation>
bool Om::Language::DefaultAtom< ThisImplementation >::operator< ( DefaultAtom< ThisImplementation > const &  )
Returns
True if this Atom string precedes the argument Atom string in a byte-wise ordering.

◆ Clear()

template<typename ThisImplementation>
virtual void Om::Language::DefaultAtom< ThisImplementation >::Clear ( )
virtual

Implements Om::Language::Program.

◆ Equals() [1/2]

template<typename ThisImplementation>
bool Om::Language::DefaultAtom< ThisImplementation >::Equals ( DefaultAtom< ThisImplementation > const &  ) const

◆ Equals() [2/2]

template<typename ThisImplementation>
bool Om::Language::DefaultAtom< ThisImplementation >::Equals ( ThisImplementation const &  ) const

◆ GetElementRange() [1/2]

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

Reimplemented from Om::Language::DefaultElement< ThisImplementation, Om::Language::Atom >.

◆ GetElementRange() [2/2]

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

Reimplemented from Om::Language::DefaultElement< ThisImplementation, Om::Language::Atom >.

◆ GetString()

template<typename ThisImplementation>
std::string const& Om::Language::DefaultAtom< ThisImplementation >::GetString ( ) const
Returns
The string that defines this Atom.

◆ IsEmpty()

template<typename ThisImplementation>
virtual bool Om::Language::DefaultAtom< ThisImplementation >::IsEmpty ( ) const
virtual
Returns
True if empty.

An empty Atom cannot be represented in Om code, but can be handy as an efficient null representation in implementation (e.g. the result after a move).

Implements Om::Language::Program.

◆ Merge() [1/2]

template<typename ThisImplementation>
virtual bool Om::Language::DefaultAtom< ThisImplementation >::Merge ( ThisImplementation &  )
virtual
Returns
True if the Atom was merged.

◆ Merge() [2/2]

template<typename ThisImplementation>
virtual bool Om::Language::DefaultAtom< ThisImplementation >::Merge ( ThisImplementation const &  )
virtual

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

◆ Swap()

template<typename ThisImplementation>
void Om::Language::DefaultAtom< ThisImplementation >::Swap ( ThisImplementation &  )

◆ operator=()

template<typename ThisImplementation>
DefaultAtom& Om::Language::DefaultAtom< ThisImplementation >::operator= ( DefaultAtom< ThisImplementation > const &  )
private

Member Data Documentation

◆ thisString

template<typename ThisImplementation>
std::string Om::Language::DefaultAtom< ThisImplementation >::thisString
protected

Definition at line 133 of file default_atom.hpp.


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