Stan  2.14.0
probability, sampling & optimization
Public Types | Public Member Functions | Public Attributes | List of all members
stan::lang::statement Struct Reference

Structure to wrap the variant type of statements. More...

#include <statement.hpp>

Public Types

typedef boost::variant< boost::recursive_wrapper< nil >, boost::recursive_wrapper< assignment >, boost::recursive_wrapper< assgn >, boost::recursive_wrapper< sample >, boost::recursive_wrapper< increment_log_prob_statement >, boost::recursive_wrapper< expression >, boost::recursive_wrapper< statements >, boost::recursive_wrapper< for_statement >, boost::recursive_wrapper< conditional_statement >, boost::recursive_wrapper< while_statement >, boost::recursive_wrapper< break_continue_statement >, boost::recursive_wrapper< print_statement >, boost::recursive_wrapper< reject_statement >, boost::recursive_wrapper< return_statement >, boost::recursive_wrapper< no_op_statement > > statement_t
 The variant type of statements. More...
 

Public Member Functions

 statement ()
 Construct a default (nil) statement. More...
 
 statement (const statement_t &st)
 Construct a statement from the specified raw variant type wrapper. More...
 
 statement (const nil &st)
 Construct a statement variant type wrapper from the specified basic statement. More...
 
 statement (const assignment &st)
 Construct a statement variant type wrapper from the specified basic statement. More...
 
 statement (const assgn &st)
 Construct a statement variant type wrapper from the specified basic statement. More...
 
 statement (const sample &st)
 Construct a statement variant type wrapper from the specified basic statement. More...
 
 statement (const increment_log_prob_statement &st)
 Construct a statement variant type wrapper from the specified basic statement. More...
 
 statement (const expression &st)
 Construct a statement variant type wrapper from the specified basic statement. More...
 
 statement (const statements &st)
 Construct a statement variant type wrapper from the specified basic statement. More...
 
 statement (const for_statement &st)
 Construct a statement variant type wrapper from the specified basic statement. More...
 
 statement (const conditional_statement &st)
 Construct a statement variant type wrapper from the specified basic statement. More...
 
 statement (const while_statement &st)
 Construct a statement variant type wrapper from the specified basic statement. More...
 
 statement (const break_continue_statement &st)
 Construct a statement variant type wrapper from the specified basic statement. More...
 
 statement (const print_statement &st)
 Construct a statement variant type wrapper from the specified basic statement. More...
 
 statement (const reject_statement &st)
 Construct a statement variant type wrapper from the specified basic statement. More...
 
 statement (const no_op_statement &st)
 Construct a statement variant type wrapper from the specified basic statement. More...
 
 statement (const return_statement &st)
 Construct a statement variant type wrapper from the specified basic statement. More...
 
bool is_no_op_statement () const
 Return true if the basic statement held by the variant type in this wrapper is the no-op statement. More...
 

Public Attributes

statement_t statement_
 The statement variant type held by this wrapper. More...
 
std::size_t begin_line_
 The line in the source code where the statement begins. More...
 
std::size_t end_line_
 The line in the source code where the statement ends. More...
 

Detailed Description

Structure to wrap the variant type of statements.

Definition at line 29 of file statement.hpp.

Member Typedef Documentation

§ statement_t

typedef boost::variant<boost::recursive_wrapper<nil>, boost::recursive_wrapper<assignment>, boost::recursive_wrapper<assgn>, boost::recursive_wrapper<sample>, boost::recursive_wrapper<increment_log_prob_statement>, boost::recursive_wrapper<expression>, boost::recursive_wrapper<statements>, boost::recursive_wrapper<for_statement>, boost::recursive_wrapper<conditional_statement>, boost::recursive_wrapper<while_statement>, boost::recursive_wrapper<break_continue_statement>, boost::recursive_wrapper<print_statement>, boost::recursive_wrapper<reject_statement>, boost::recursive_wrapper<return_statement>, boost::recursive_wrapper<no_op_statement> > stan::lang::statement::statement_t

The variant type of statements.

Definition at line 48 of file statement.hpp.

Constructor & Destructor Documentation

§ statement() [1/17]

stan::lang::statement::statement ( )

Construct a default (nil) statement.

Definition at line 9 of file statement_def.hpp.

§ statement() [2/17]

stan::lang::statement::statement ( const statement_t st)

Construct a statement from the specified raw variant type wrapper.

Parameters
ststatement variant type

Definition at line 11 of file statement_def.hpp.

§ statement() [3/17]

stan::lang::statement::statement ( const nil st)

Construct a statement variant type wrapper from the specified basic statement.

Parameters
stbasic statement

Definition at line 13 of file statement_def.hpp.

§ statement() [4/17]

stan::lang::statement::statement ( const assignment st)

Construct a statement variant type wrapper from the specified basic statement.

Parameters
stbasic statement

Definition at line 15 of file statement_def.hpp.

§ statement() [5/17]

stan::lang::statement::statement ( const assgn st)

Construct a statement variant type wrapper from the specified basic statement.

Parameters
stbasic statement

Definition at line 17 of file statement_def.hpp.

§ statement() [6/17]

stan::lang::statement::statement ( const sample st)

Construct a statement variant type wrapper from the specified basic statement.

Parameters
stbasic statement

Definition at line 19 of file statement_def.hpp.

§ statement() [7/17]

stan::lang::statement::statement ( const increment_log_prob_statement st)

Construct a statement variant type wrapper from the specified basic statement.

Parameters
stbasic statement

Definition at line 21 of file statement_def.hpp.

§ statement() [8/17]

stan::lang::statement::statement ( const expression st)

Construct a statement variant type wrapper from the specified basic statement.

Parameters
stbasic statement

Definition at line 27 of file statement_def.hpp.

§ statement() [9/17]

stan::lang::statement::statement ( const statements st)

Construct a statement variant type wrapper from the specified basic statement.

Parameters
stbasic statement

Definition at line 25 of file statement_def.hpp.

§ statement() [10/17]

stan::lang::statement::statement ( const for_statement st)

Construct a statement variant type wrapper from the specified basic statement.

Parameters
stbasic statement

Definition at line 29 of file statement_def.hpp.

§ statement() [11/17]

stan::lang::statement::statement ( const conditional_statement st)

Construct a statement variant type wrapper from the specified basic statement.

Parameters
stbasic statement

Definition at line 36 of file statement_def.hpp.

§ statement() [12/17]

stan::lang::statement::statement ( const while_statement st)

Construct a statement variant type wrapper from the specified basic statement.

Parameters
stbasic statement

Definition at line 31 of file statement_def.hpp.

§ statement() [13/17]

stan::lang::statement::statement ( const break_continue_statement st)

Construct a statement variant type wrapper from the specified basic statement.

Parameters
stbasic statement

Definition at line 33 of file statement_def.hpp.

§ statement() [14/17]

stan::lang::statement::statement ( const print_statement st)

Construct a statement variant type wrapper from the specified basic statement.

Parameters
stbasic statement

Definition at line 38 of file statement_def.hpp.

§ statement() [15/17]

stan::lang::statement::statement ( const reject_statement st)

Construct a statement variant type wrapper from the specified basic statement.

Parameters
stbasic statement

Definition at line 40 of file statement_def.hpp.

§ statement() [16/17]

stan::lang::statement::statement ( const no_op_statement st)

Construct a statement variant type wrapper from the specified basic statement.

Parameters
stbasic statement

Definition at line 44 of file statement_def.hpp.

§ statement() [17/17]

stan::lang::statement::statement ( const return_statement st)

Construct a statement variant type wrapper from the specified basic statement.

Parameters
stbasic statement

Definition at line 42 of file statement_def.hpp.

Member Function Documentation

§ is_no_op_statement()

bool stan::lang::statement::is_no_op_statement ( ) const

Return true if the basic statement held by the variant type in this wrapper is the no-op statement.

Returns
true if this is a no-op statement wrapper

Definition at line 46 of file statement_def.hpp.

Member Data Documentation

§ begin_line_

std::size_t stan::lang::statement::begin_line_

The line in the source code where the statement begins.

Definition at line 199 of file statement.hpp.

§ end_line_

std::size_t stan::lang::statement::end_line_

The line in the source code where the statement ends.

Definition at line 204 of file statement.hpp.

§ statement_

statement_t stan::lang::statement::statement_

The statement variant type held by this wrapper.

Definition at line 194 of file statement.hpp.


The documentation for this struct was generated from the following files:

     [ Stan Home Page ] © 2011–2016, Stan Development Team.