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, ThisInterface >
virtual ~DefaultProgram ()=0
 
virtual bool Equals (Program const &) 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...
 
- Public Member Functions inherited from Om::Language::DefaultConsumer< ThisImplementation, DefaultGiveable< ThisImplementation, Om::Language::Program > >
virtual ~DefaultConsumer ()=0
 
virtual void TakeElement (Operand &)
 Takes a non-empty Element, which gets copied or swapped. More...
 
virtual void TakeElement (Operand 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 void TakeElement (Operator &)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
 
virtual void TakeElement (Operator 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 void TakeElement (Separator &)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
 
virtual void TakeElement (Separator 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 void TakeQuotedElements (Producer &)
 Constructs and takes an Operand, which takes each Element from the argument Producer. More...
 
virtual void TakeQuotedElements (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...
 
- Public Member Functions inherited from Om::DefaultGiveable< ThisImplementation, ThisInterface >
virtual ~DefaultGiveable ()=0
 
- Public Member Functions inherited from Om::DefaultMoveable< ThisImplementation, DefaultCopyable< ThisImplementation, Giveable > >
virtual std::auto_ptr< MoveableMove ()
 
virtual ~DefaultMoveable ()=0
 
- Public Member Functions inherited from Om::DefaultCopyable< ThisImplementation, ThisInterface >
virtual ~DefaultCopyable ()=0
 
virtual std::auto_ptr< CopyableCopy () const
 
- Public Member Functions inherited from Om::Copyable
virtual ~Copyable ()=0
 
- 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 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

◆ 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

◆ GetElementRange() [2/2]

template<typename ThisImplementation >
virtual std::auto_ptr< Om::Source::Source<Element const> > Om::Language::DefaultAtom< ThisImplementation >::GetElementRange ( ) const
virtual

◆ 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).

◆ 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: