PSNonTerminalParseNode Class Reference

This class represents NonTerminal ParseNodes. NonTerminal ParseNodes have 1 or more child nodes. More...

Inherits Simba::SQLEngine::PSParseNode.

List of all members.

Public Member Functions

void AcceptVisitor (IParseTreeVisitor &in_visitor)
 Node's Accept method, used to pass a visitor.
virtual PSParseNodeAddChild (PSParseNode *in_child)
 Adds a child to the end of the list of children.
virtual PSParseNodeAddChildren (PSParseNode *in_parent)
 Add children from another node to the end of the list of children.
virtual PSNonTerminalParseNodeClone () const
 Creates a clone of this node object.
virtual PSNonTerminalParseNodeGetAsNonTerminalParseNode ()
 Gets the object as a PSNonTerminalParseNode object.
virtual PSParseNodeGetChild (simba_size_t in_childIndex)
 Get the specified child node.
virtual simba_size_t GetChildCount () const
 Get the number of child nodes that this node has.
PSDataType GetDataType () const
 Returns the data type of this node.
virtual simba_wstring GetLogString () const
 Returns a log string representation of this node.
virtual PSNonTerminalType GetNonTerminalType () const
 Returns the NonTerminal type of this node.
 PSNonTerminalParseNode (const PSNonTerminalParseNode &in_other)
 Copy constructor.
 PSNonTerminalParseNode (PSNonTerminalType in_type)
 Constructor.
virtual void SetChild (simba_size_t in_childIndex, PSParseNode *in_child)
 Set the given child index to the specified child node.
virtual const simba_wstringToString () const
 Returns a string representation of this node.
 ~PSNonTerminalParseNode ()
 Destructor.

Static Public Member Functions

static void InitializeMaps ()

Detailed Description

This class represents NonTerminal ParseNodes. NonTerminal ParseNodes have 1 or more child nodes.


Constructor & Destructor Documentation

Constructor.

Parameters:
in_type The PSNonTerminalType of this node.
PSNonTerminalParseNode ( const PSNonTerminalParseNode in_other  ) 

Copy constructor.

To support "cloning". See Clone() method.

Parameters:
in_other The other node from which to create a copy.

Destructor.


Member Function Documentation

void AcceptVisitor ( IParseTreeVisitor in_visitor  )  [virtual]

Node's Accept method, used to pass a visitor.

Parameters:
in_visitor the visitor that is to be used to visit this node

Implements PSParseNode.

virtual PSParseNode* AddChild ( PSParseNode in_child  )  [virtual]

Adds a child to the end of the list of children.

NOTE: Child nodes are NOT OWNed by their parent PSNonTerminalParseNode*s. Instead, the PSRootParseNode OWNs all nodes.

Parameters:
in_child The child parse node to add to this node's list of children. (NOT OWN)
Exceptions:
SEInvalidArgumentException when in_child is NULL
Returns:
this PSParseNode. (NOT OWN)

Reimplemented from PSParseNode.

virtual PSParseNode* AddChildren ( PSParseNode in_parent  )  [virtual]

Add children from another node to the end of the list of children.

This method is only valid for a node of type PS_DT_PARENT. After a successful addition, this object owns the added child nodes.

The default implementation in this class always throw an SEInvalidOperationException. A sub-class of type PS_DT_PARENT must override this method.

Parameters:
in_parent The parent node containing list of children to be added (NOT OWN)
Exceptions:
SEInvalidArgumentException when in_parent NULL.
Returns:
A pointer to "this" node. (NOT OWN)

Reimplemented from PSParseNode.

virtual PSNonTerminalParseNode* Clone (  )  const [virtual]

Creates a clone of this node object.

Returns:
A clone of this node object. (OWN)

Implements PSParseNode.

virtual PSNonTerminalParseNode* GetAsNonTerminalParseNode (  )  [inline, virtual]

Gets the object as a PSNonTerminalParseNode object.

Returns:
this object as a PSNonTerminalParseNode object. (NOT OWN)

Reimplemented from PSParseNode.

virtual PSParseNode* GetChild ( simba_size_t  in_childIndex  )  [virtual]

Get the specified child node.

Parameters:
in_childIndex The child index.
Exceptions:
SEInvalidArgumentException when in_childIndex is out of bound
Returns:
the child node. (NOT OWN)

Reimplemented from PSParseNode.

virtual simba_size_t GetChildCount (  )  const [virtual]

Get the number of child nodes that this node has.

Returns:
number of child nodes.

Reimplemented from PSParseNode.

PSDataType GetDataType (  )  const [virtual]

Returns the data type of this node.

This implementation always returns PSDataType::PS_DT_PARENT

Returns:
The data type of this node.

Implements PSParseNode.

virtual simba_wstring GetLogString (  )  const [virtual]

Returns a log string representation of this node.

Returns:
A log string representation of this node.

Reimplemented from PSParseNode.

virtual PSNonTerminalType GetNonTerminalType (  )  const [virtual]

Returns the NonTerminal type of this node.

Returns:
The NonTerminal type of this node.

Reimplemented from PSParseNode.

static void InitializeMaps (  )  [static]
virtual void SetChild ( simba_size_t  in_childIndex,
PSParseNode in_child 
) [virtual]

Set the given child index to the specified child node.

This function does not delete the current child at the specified index. The root parse node has ownership of all parse nodes. Call PSRootParseNode::RemoveParseNode() to delete it.

Exceptions:
SEInvalidArgumentException when in_childIndex is out of bounds.
Parameters:
in_childIndex The child index.
in_child The child to set at the given index. (OWN)

Reimplemented from PSParseNode.

virtual const simba_wstring& ToString (  )  const [virtual]

Returns a string representation of this node.

Returns:
The string representation of this node.

Reimplemented from PSParseNode.


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

Generated on Wed May 17 14:21:18 2017 for SimbaEngine 10.1.3.1011 by simba