Zen
A cross-platform functional programming language

OutParam Class Reference

Concrete AST Node representing the out-parameters of a function which returns a set of values (a tuple) More...

#include <Ast.hpp>

Inheritance diagram for OutParam:
UserDefinedTypeSpec ChildTypeSpec TypeSpec Node

List of all members.

Public Member Functions

 OutParam (const AccessType::T &accessType, const z::string &name, const NativeType &ntype, const VariableDefMap &defList, const bool &isTuple)
 Default constructor.
const VariableDefMapgetDefList () const
 Returns the list of values in the tuple.
const bool & getIsTuple () const
 Checks if it is a single value or a tuple.

Private Member Functions

virtual void visit (TypeSpec::Visitor &visitor) const
 Visitor pattern implementation.
virtual const Ast::VariableDefhasMember (const z::string &name) const
 Checks if tuple member exists.

Private Attributes

const VariableDefMap_defList
 Tuple member list node.
const bool _isTuple
 True if this is a tuple, false if it is a single value.

Detailed Description

Concrete AST Node representing the out-parameters of a function which returns a set of values (a tuple)


Constructor & Destructor Documentation

OutParam ( const AccessType::T accessType,
const z::string name,
const NativeType ntype,
const VariableDefMap defList,
const bool &  isTuple 
) [inline]

Default constructor.

Parameters:
accessTypeThe AccessType for this UDT.
nameName of the UDT
ntypeThe NativeType of this UDT.
defListList of enumeration members for this type.
isTupleTrue if this out-param of a function is a single value or a tuple

Member Function Documentation

const VariableDefMap& getDefList ( ) const [inline]

Returns the list of values in the tuple.

Returns:
A reference to the list of values in the tuple
const bool& getIsTuple ( ) const [inline]

Checks if it is a single value or a tuple.

Returns:
True if it is a tuple, false if single value
const Ast::VariableDef * hasMember ( const z::string name) const [private, virtual]

Checks if tuple member exists.

Parameters:
nameName of member to be checked
Returns:
Pointer to VariableDef of member if it exists, else 0

Reimplemented from TypeSpec.

void visit ( TypeSpec::Visitor visitor) const [private, virtual]

Visitor pattern implementation.

Parameters:
visitorThe visitor object.

Implements TypeSpec.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines