Zen
A cross-platform functional programming language

LogStatement Class Reference

AST Node representing a statement that writes one or more expressions to a log. More...

#include <Ast.hpp>

Inheritance diagram for LogStatement:
Statement Node

List of all members.

Public Member Functions

 LogStatement (const z::string &name, const Ast::ExprList &list)
 Default constructor.
const z::stringgetName () const
 Returns the name of the target logger.
const ExprListgetList () const
 Returns a reference to the list of expressions to be logged.

Private Member Functions

virtual void visit (Statement::Visitor &visitor) const
 Abstract visitor function.

Private Attributes

const z::string _name
 Name of target logger.
const Ast::ExprList_list
 Expression list.

Detailed Description

AST Node representing a statement that writes one or more expressions to a log.

For example:

        dlog <- 10 <- "xxx\n";

Here, 10 and xxx is written to the debug log


Constructor & Destructor Documentation

LogStatement ( const z::string name,
const Ast::ExprList list 
) [inline]

Default constructor.

Parameters:
nameName of the logger to write to
listList of expression to write out.

Member Function Documentation

const ExprList& getList ( ) const [inline]

Returns a reference to the list of expressions to be logged.

Returns:
Expression list.
const z::string& getName ( ) const [inline]

Returns the name of the target logger.

Returns:
Name of target logger.
void visit ( Statement::Visitor visitor) const [private, virtual]

Abstract visitor function.

Parameters:
visitorThe visitor object.

Implements Statement.


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