Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

edge Class Template Reference

#include <edge.h>

Inheritance diagram for edge:

Inheritance graph
[legend]
Collaboration diagram for edge:

Collaboration graph
[legend]
List of all members.

Detailed Description

template<typename PolicyT = policy_default, typename StringT = CTTL_STD_STRING>
class cttl::edge< PolicyT, StringT >

Implements concept of logical mutable substring inside user input text.

PolicyT
Template parameter specifying white space policy. Default policy is cttl::policy_default.
StringT
Template parameter specifying type of the encapsulated string. The default is std::string
See also:

Definition at line 63 of file edge.h.

Public Types

typedef StringT string_T
 Defines type of encapsulated string.
typedef StringT::value_type char_T
 Defines type of encapsulated character.
typedef xtl_mutable_offset_manager<
StringT > 
offset_manager_T
 Defines offset manager type for this type of edge.
typedef PolicyT policy_T
 Defines type of space policy.
typedef PolicyT::strict_policy_T strict_policy_T
 Defines type of policy for strict universe.
typedef edge< strict_policy_T,
StringT > 
strict_edge_T
 Defines type of edge template specialization for strict grammar evaluation.
typedef node< StringT > node_T
 Defines type of the encapsulated cttl::node objects.

Public Member Functions

 edge (input< StringT > &inp_, int start_, int finish_)
 Constructs new edge from the instance of cttl::input object.
 edge (node< StringT > &node_first_, node< StringT > &node_second_)
 Constructs new edge from two cttl::node objects.
template<typename Other_policyT>
 edge (const_edge< Other_policyT, StringT > const &other_)
 Constructs new edge from another edge or const_edge with different policy type.
 edge (const_edge< PolicyT, StringT > const &other_)
 Constructs exact copy of the existing edge.
template<typename Other_policyT>
 edge (const_edge< Other_policyT, StringT > const &other_, PolicyT &policy_)
 Constructs new edge from another edge with policy type explicitly provided by the user.
void text (StringT const &str_)
 Changes underlying text.
void text (const_edge< PolicyT, StringT > const &other_)
 Changes underlying text.
StringT text () const
 Returns underlying text.
void text_swap (edge< PolicyT, StringT > &other_)
 Swaps underlying text of two edges.
edge< PolicyT, StringT > & operator= (const_edge< PolicyT, StringT > const &other_)
 Edge assignment.
edge< PolicyT, StringT > & operator= (StringT const &str_)
 Assigns new text to the edge.


Member Typedef Documentation

typedef edge< strict_policy_T, StringT > strict_edge_T
 

Defines type of edge template specialization for strict grammar evaluation.

For more information, see strict universe overview.

Reimplemented from const_edge.

Definition at line 91 of file edge.h.

typedef PolicyT::strict_policy_T strict_policy_T
 

Defines type of policy for strict universe.

C++ type designated as strict policy type must provide a default constructor. The strict policy is always constructed as a static member of the strict universe using the default constructor, and therefore, the strict policy must have stateless implementation.

Reimplemented from const_edge.

Definition at line 85 of file edge.h.


Constructor & Destructor Documentation

edge input< StringT > &  inp_,
int  start_,
int  finish_
[inline]
 

Constructs new edge from the instance of cttl::input object.

Parameters:
inp_ Mutable reference to cttl::input object
start_ Identity of the this->first node.
finish_ Identity of the this->second node.

Definition at line 113 of file edge.h.

edge node< StringT > &  node_first_,
node< StringT > &  node_second_
[inline]
 

Constructs new edge from two cttl::node objects.

Parameters:
node_first_ Upper boundary of the edge.
node_second_ Lower boundary of the edge.

Definition at line 128 of file edge.h.

edge const_edge< Other_policyT, StringT > const &  other_  )  [inline]
 

Constructs new edge from another edge or const_edge with different policy type.

Other_policyT
Template parameter specifying white space policy of another edge.
Parameters:
other_ reference to instance of existing edge.
Postcondition:
This particular constructor allows to convert existing edge to an edge with const_edge::default_policy().

Definition at line 151 of file edge.h.

edge const_edge< Other_policyT, StringT > const &  other_,
PolicyT &  policy_
[inline]
 

Constructs new edge from another edge with policy type explicitly provided by the user.

Other_policyT
Template parameter specifying white space policy of another edge.
Parameters:
other_ instance of existing edge.
policy_ mutable reference to an instance of the policy object that will be retained for the lifetime of this edge.
Postcondition:
The program should not let the policy_ to go out of scope while this instance of edge is in service.

Definition at line 186 of file edge.h.


Member Function Documentation

edge< PolicyT, StringT >& operator= StringT const &  str_  )  [inline]
 

Assigns new text to the edge.

Parameters:
str_ reference to the source string.
See also:

Definition at line 263 of file edge.h.

edge< PolicyT, StringT >& operator= const_edge< PolicyT, StringT > const &  other_  )  [inline]
 

Edge assignment.

Parameters:
other_ instance of existing edge.
Edge assignment mathces the behavior of the copy constructor.

See also:

Reimplemented from const_edge.

Definition at line 248 of file edge.h.

void text_swap edge< PolicyT, StringT > &  other_  )  [inline]
 

Swaps underlying text of two edges.

Remarks:
Standard version of std::swap() for two edges swaps identities of the corresponding cttl::node objects, const_edge::this->first and const_edge::this->second.

The text_swap() swaps the underlying text of two edges.
See also:

Definition at line 226 of file edge.h.

References edge::text().


The documentation for this class was generated from the following file:
Generated on Thu Nov 2 17:45:00 2006 for Common Text Transformation Library by  doxygen 1.3.9.1