AESimpleCase Class Reference

This node class represents the Simple Case value expression. More...

Inherits Simba::SQLEngine::AEValueExpr.

List of all members.

Public Member Functions

virtual void AcceptVisitor (AENodeVisitor &in_visitor)
 Calls the correct method on the visitor.
 AESimpleCase (const AESimpleCase &in_other)
 Copy constructor.
 AESimpleCase (SharedPtr< AEValueExpr > in_caseOperand, AutoPtr< AEValueList > in_whenClauseList, SharedPtr< AEValueExpr > in_elseClause, ICoercionHandler *in_coercionHandler)
 Constructor.
virtual AESimpleCaseClone () const
 Creates a clone of this node object.
virtual const AESimpleCaseGetAsSimpleCase () const
 Retrieves the object as an AESimpleCase object.
virtual AESimpleCaseGetAsSimpleCase ()
 Retrieves the object as an AESimpleCase object.
AEValueExprGetCaseOperand ()
 Get a reference to the case operand node.
virtual const AENodeGetChild (simba_size_t in_index) const
 Get a pointer reference to the specified child node.
virtual AENodeGetChild (simba_size_t in_index)
 Get a pointer reference to the specified child node.
virtual simba_size_t GetChildCount () const
 Get the number of child nodes that this node has.
const std::vector
< Simba::DSI::DSIColumnMetadata * > & 
GetComparisonColumnMetadata ()
 Get the coerced column metadata for all the comparisons.
const std::vector
< SqlTypeMetadata * > & 
GetComparisonMetadata ()
 Get the coerced type metadata for all the comparisons.
AEValueExprGetElseClause ()
 Gets a reference to the else clause node. The caller of this method does not own the returned object. If the caller wishes to take control of the ownership of the else clause object, call TakeElseClause() instead.
virtual simba_wstring GetLogString () const
 Returns a string name for this node for the purpose of logging.
virtual AENodeType GetNodeType () const
 Returns an integer that uniquely identifies the node class.
AEValueListGetWhenClauseList ()
 Get a reference to the when clause list.
SqlTypeMetadataGetWhenClauseMetadata () const
 Get a pointer to the coerced SqlTypeMetadata of all the when clauses.
bool HasElseClause () const
 Returns true if this Simple Case has an Else Clause. Returns false otherwise.
void SetCaseOperand (SharedPtr< AEValueExpr > in_caseOperand)
 Grants the ownership of the case operand to this object.
void SetElseClause (SharedPtr< AEValueExpr > in_elseClause)
 Grants the ownership of the else clause to this object.
void SetWhenClauseList (AutoPtr< AEValueList > in_whenClauseList)
 Grants the ownership of the when clause list to this object.
SharedPtr< AEValueExprTakeCaseOperand ()
 Take the ownership of the case operand away from this object.
SharedPtr< AEValueExprTakeElseClause ()
 Take the ownership of the else clause list away from this object.
AutoPtr< AEValueListTakeWhenClauseList ()
virtual ~AESimpleCase ()
 Destructor.

Detailed Description

This node class represents the Simple Case value expression.

Will have two or three children (GetChildCount() returns 2 or 3). Will have three children only if an else clause is present:


Constructor & Destructor Documentation

AESimpleCase ( SharedPtr< AEValueExpr in_caseOperand,
AutoPtr< AEValueList in_whenClauseList,
SharedPtr< AEValueExpr in_elseClause,
ICoercionHandler in_coercionHandler 
)

Constructor.

Parameters:
in_caseOperand The case operand.
in_whenClauseList The when clause list.
in_elseClause The else clause, can be a null SharedPtr.
in_coercionHandler The ICoercionHandler for handling custom coercions. (NOT OWN)
AESimpleCase ( const AESimpleCase in_other  ) 

Copy constructor.

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

Parameters:
in_other The other node to create copy from.
virtual ~AESimpleCase (  )  [virtual]

Destructor.


Member Function Documentation

virtual void AcceptVisitor ( AENodeVisitor in_visitor  )  [virtual]

Calls the correct method on the visitor.

Parameters:
in_visitor The visiting object.

Implements AENode.

virtual AESimpleCase* Clone (  )  const [virtual]

Creates a clone of this node object.

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

Implements AEValueExpr.

virtual const AESimpleCase* GetAsSimpleCase (  )  const [inline, virtual]

Retrieves the object as an AESimpleCase object.

Returns:
this object as an AESimpleCase object. (NOT OWN)

Reimplemented from AEValueExpr.

virtual AESimpleCase* GetAsSimpleCase (  )  [inline, virtual]

Retrieves the object as an AESimpleCase object.

Returns:
this object as an AESimpleCase object. (NOT OWN)

Reimplemented from AEValueExpr.

AEValueExpr* GetCaseOperand (  ) 

Get a reference to the case operand node.

If the caller wishes to take control of the ownership of the case operand object, call TakeCaseOperand() instead.

Returns:
a pointer reference to the case operand node. (NOT OWN)
virtual const AENode* GetChild ( simba_size_t  in_index  )  const [virtual]

Get a pointer reference to the specified child node.

Parameters:
in_index The zero-based index for the child.
Exceptions:
SEInvalidOperationException if the index is invalid.
Returns:
A pointer reference to the requested child node. (NOT OWN)

Implements AENode.

virtual AENode* GetChild ( simba_size_t  in_index  )  [virtual]

Get a pointer reference to the specified child node.

Parameters:
in_index The zero-based index for the child.
Exceptions:
SEInvalidOperationException if the index is invalid.
Returns:
A pointer reference to the requested child node. (NOT OWN)

Implements AENode.

virtual simba_size_t GetChildCount (  )  const [virtual]

Get the number of child nodes that this node has.

Returns:
The number of child nodes.

Implements AENode.

const std::vector<Simba::DSI::DSIColumnMetadata*>& GetComparisonColumnMetadata (  ) 

Get the coerced column metadata for all the comparisons.

Returns:
a vector reference containing the metadata for each comparison . Note: Pointers in the vector are not owned.
const std::vector<SqlTypeMetadata*>& GetComparisonMetadata (  ) 

Get the coerced type metadata for all the comparisons.

Returns:
a vector reference containing the metadata for each comparison. Note: Pointers in the vector are not owned.
AEValueExpr* GetElseClause (  ) 

Gets a reference to the else clause node. The caller of this method does not own the returned object. If the caller wishes to take control of the ownership of the else clause object, call TakeElseClause() instead.

Returns:
a pointer reference to the else clause node. (NOT OWN)
virtual simba_wstring GetLogString (  )  const [virtual]

Returns a string name for this node for the purpose of logging.

Returns:
A string representation of this node for logging purposes.

Implements AENode.

virtual AENodeType GetNodeType (  )  const [virtual]

Returns an integer that uniquely identifies the node class.

See the definition of AENodeType for values defined.

Returns:
The ID that uniquely identifies this type of nodes.

Implements AENode.

AEValueList* GetWhenClauseList (  ) 

Get a reference to the when clause list.

If the caller wishes to take control of the ownership of the when clause list object, call TakeWhenClauseList() instead.

Returns:
a pointer reference to the when clause list. (NOT OWN)
SqlTypeMetadata* GetWhenClauseMetadata (  )  const

Get a pointer to the coerced SqlTypeMetadata of all the when clauses.

This metadata is used to determine sibling metadata when the case operand of this statement is a parameter. It is calculated by coercing the metadata of all the when clause operands using comparison coercion rules.

Returns:
A pointer to coerced SqlTypeMetadata for the when clauses. (NOT OWN)
bool HasElseClause (  )  const

Returns true if this Simple Case has an Else Clause. Returns false otherwise.

Returns:
true if this Simple Case has an Else Clause; false otherwise.
void SetCaseOperand ( SharedPtr< AEValueExpr in_caseOperand  ) 

Grants the ownership of the case operand to this object.

Parameters:
in_caseOperand The case operand
Exceptions:
SEInvalidArgumentException when in_caseOperand.IsNull() returns true
SEInvalidOperationException when this object already has a case operand
void SetElseClause ( SharedPtr< AEValueExpr in_elseClause  ) 

Grants the ownership of the else clause to this object.

Parameters:
in_elseClause The else clause
Exceptions:
SEInvalidArgumentException when in_elseClause.IsNull() returns true.
SEInvalidOperationException when this object already has an else clause.
void SetWhenClauseList ( AutoPtr< AEValueList in_whenClauseList  ) 

Grants the ownership of the when clause list to this object.

Parameters:
in_whenClauseList The when clause list.
Exceptions:
SEInvalidArgumentException when in_whenClauseList.IsNull() returns true
SEInvalidOperationException when this object already has a when clause list
SharedPtr<AEValueExpr> TakeCaseOperand (  ) 

Take the ownership of the case operand away from this object.

The caller of this method owns the returned object. If the caller only wants to access the else clause list, call GetCaseOperand() instead.

Exceptions:
SEInvalidOperationException when m_caseOperand.IsNull() returns true
Returns:
The case operand. (OWN)
SharedPtr<AEValueExpr> TakeElseClause (  ) 

Take the ownership of the else clause list away from this object.

The caller of this method owns the returned object. If the caller only wants to access the else clause list, call GetElseClause() instead.

Exceptions:
SEInvalidOperationException when m_elseClause.IsNull() returns true
Returns:
The else clause list. (OWN)
AutoPtr<AEValueList> TakeWhenClauseList (  ) 

Take the ownership of the when clause list away from this object. The caller of this method owns the returned object. If the caller only wants to access the when clause list, call GetWhenClauseList() instead.

Exceptions:
SEInvalidOperationException when m_whenClauseList.IsNull() returns true
Returns:
The when clause list. (OWN)

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

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