Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members

AddStmt Class Reference

#include <Stmt.h>

Inheritance diagram for AddStmt:

Inheritance graph
[legend]
Collaboration diagram for AddStmt:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 AddStmt (Expr *e)
int IsPure () const
ValExec (Frame *f, stmt_flow_type &flow) const
TraversalCode Traverse (TraversalCallback *cb) const

Protected Member Functions

 AddStmt ()
 DECLARE_SERIAL (AddStmt)

Friends

class Stmt

Constructor & Destructor Documentation

AddStmt::AddStmt Expr e  ) 
 

Definition at line 818 of file Stmt.cc.

References Expr::CanAdd(), BroObj::Error(), and STMT_ADD.

00818                             : ExprStmt(STMT_ADD, arg_e)
00819         {
00820         if ( ! e->CanAdd() )
00821                 Error("illegal add statement");
00822         }

AddStmt::AddStmt  )  [inline, protected]
 

Definition at line 283 of file Stmt.h.

00283 {}


Member Function Documentation

AddStmt::DECLARE_SERIAL AddStmt   )  [protected]
 

Val * AddStmt::Exec Frame f,
stmt_flow_type flow
const [virtual]
 

Reimplemented from ExprStmt.

Definition at line 829 of file Stmt.cc.

References Expr::Add(), FLOW_NEXT, and Stmt::RegisterAccess().

00830         {
00831         RegisterAccess();
00832         flow = FLOW_NEXT;
00833         e->Add(f);
00834         return 0;
00835         }

int AddStmt::IsPure  )  const [virtual]
 

Reimplemented from ExprStmt.

Definition at line 824 of file Stmt.cc.

00825         {
00826         return 0;
00827         }

TraversalCode AddStmt::Traverse TraversalCallback cb  )  const [virtual]
 

Reimplemented from ExprStmt.

Definition at line 838 of file Stmt.cc.

References HANDLE_TC_STMT_POST, HANDLE_TC_STMT_PRE, TraversalCallback::PostStmt(), TraversalCallback::PreStmt(), TraversalCode, and Expr::Traverse().

00839         {
00840         TraversalCode tc = cb->PreStmt(this);
00841         HANDLE_TC_STMT_PRE(tc);
00842 
00843         // Argument is stored in base class's "e" field.
00844         tc = e->Traverse(cb);
00845         HANDLE_TC_STMT_PRE(tc);
00846 
00847         tc = cb->PostStmt(this);
00848         HANDLE_TC_STMT_POST(tc);
00849         }


Friends And Related Function Documentation

friend class Stmt [friend]
 

Reimplemented from ExprStmt.

Definition at line 282 of file Stmt.h.


The documentation for this class was generated from the following files:
Generated on Wed Sep 14 03:07:33 2005 for bro_docs by doxygen 1.3.5