obby::no_operation< Document > Class Template Reference

#include <no_operation.hpp>

Inheritance diagram for obby::no_operation< Document >:

obby::operation< Document > List of all members.

Public Types

typedef operation< Document > operation_type
typedef operation_type::document_type document_type

Public Member Functions

 no_operation ()
 no_operation (const net6::packet &pack, unsigned int &index)
virtual operation_typeclone () const
virtual operation_typereverse (const document_type &doc) const
virtual void apply (document_type &doc, const user *author) const
virtual operation_typetransform (const operation_type &base_op) const
virtual operation_typetransform_insert (position pos, const std::string &text) const
virtual operation_typetransform_delete (position pos, position len) const
virtual void append_packet (net6::packet &pack) const

Detailed Description

template<typename Document>
class obby::no_operation< Document >

no_operation is an operation that does nothing. This is a helper class that may be created if a delete_operation gets transformed against a delete_operation which fully overlaps the range of the first operation. In this case, the effect of the first operation is fully handled by the second one and nothing has to be done anymore.

Definition at line 34 of file no_operation.hpp.


Member Typedef Documentation

template<typename Document>
typedef operation<Document> obby::no_operation< Document >::operation_type

Definition at line 37 of file no_operation.hpp.

template<typename Document>
typedef operation_type::document_type obby::no_operation< Document >::document_type

Reimplemented from obby::operation< Document >.

Definition at line 38 of file no_operation.hpp.


Constructor & Destructor Documentation

template<typename Document>
obby::no_operation< Document >::no_operation (  ) 

Standard constructor.

Definition at line 85 of file no_operation.hpp.

template<typename Document>
obby::no_operation< Document >::no_operation ( const net6::packet &  pack,
unsigned int &  index 
)

Reads a no_operation from the given network packet.

Definition at line 91 of file no_operation.hpp.


Member Function Documentation

template<typename Document>
no_operation< Document >::operation_type * obby::no_operation< Document >::clone (  )  const [virtual]

Creates a copy of this operation.

Implements obby::operation< Document >.

Definition at line 99 of file no_operation.hpp.

Referenced by obby::no_operation< Document >::transform_delete(), and obby::no_operation< Document >::transform_insert().

template<typename Document>
no_operation< Document >::operation_type * obby::no_operation< Document >::reverse ( const document_type doc  )  const [virtual]

Creates the reverse operation of this one.

Parameters:
doc Document to receive additional information from.

Definition at line 106 of file no_operation.hpp.

template<typename Document>
void obby::no_operation< Document >::apply ( document_type doc,
const user author 
) const [virtual]

Applies this operation to a document. Since this is a no_operation, nothing will be done.

Definition at line 112 of file no_operation.hpp.

template<typename Document>
no_operation< Document >::operation_type * obby::no_operation< Document >::transform ( const operation_type base_op  )  const [virtual]

Transforms base_op against this operation. Since this is a no_operation, nothing will be transformed.

Definition at line 119 of file no_operation.hpp.

References obby::operation< Document >::clone().

template<typename Document>
no_operation< Document >::operation_type * obby::no_operation< Document >::transform_insert ( position  pos,
const std::string &  text 
) const [virtual]

Includes the effect of the given insertion into this operation. Since this is a no_operation, nothing will be done.

Implements obby::operation< Document >.

Definition at line 126 of file no_operation.hpp.

References obby::no_operation< Document >::clone().

template<typename Document>
no_operation< Document >::operation_type * obby::no_operation< Document >::transform_delete ( position  pos,
position  len 
) const [virtual]

Includes the effect of the given deletion into this operation. Since this is a no_operation, nothing will be done.

Implements obby::operation< Document >.

Definition at line 134 of file no_operation.hpp.

References obby::no_operation< Document >::clone().

template<typename Document>
void obby::no_operation< Document >::append_packet ( net6::packet &  pack  )  const [virtual]

Appends the operation to the given packet.

Implements obby::operation< Document >.

Definition at line 141 of file no_operation.hpp.


The documentation for this class was generated from the following file:
Generated on Fri Jan 11 10:01:33 2008 for obby by  doxygen 1.5.1