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

Var.h

Go to the documentation of this file.
00001 // $Id: Var.h,v 1.3 2005/09/07 17:13:03 vern Exp $
00002 //
00003 // Copyright (c) 1995, 1996, 1997, 1998, 1999, 2001, 2002
00004 //      The Regents of the University of California.  All rights reserved.
00005 //
00006 // Redistribution and use in source and binary forms, with or without
00007 // modification, are permitted provided that: (1) source code distributions
00008 // retain the above copyright notice and this paragraph in its entirety, (2)
00009 // distributions including binary code include the above copyright notice and
00010 // this paragraph in its entirety in the documentation or other materials
00011 // provided with the distribution, and (3) all advertising materials mentioning
00012 // features or use of this software display the following acknowledgement:
00013 // ``This product includes software developed by the University of California,
00014 // Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
00015 // the University nor the names of its contributors may be used to endorse
00016 // or promote products derived from this software without specific prior
00017 // written permission.
00018 // THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
00019 // WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
00020 // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00021 
00022 #ifndef var_h
00023 #define var_h
00024 
00025 #include "ID.h"
00026 #include "Expr.h"
00027 #include "Type.h"
00028 
00029 class Func;
00030 class EventHandlerPtr;
00031 
00032 typedef enum { VAR_REGULAR, VAR_CONST, VAR_REDEF, } decl_type;
00033 
00034 extern void add_global(ID* id, BroType* t, init_class c, Expr* init,
00035                         attr_list* attr, decl_type dt);
00036 extern Stmt* add_local(ID* id, BroType* t, init_class c, Expr* init,
00037                         attr_list* attr, decl_type dt);
00038 
00039 extern void add_type(ID* id, BroType* t, attr_list* attr, int is_event);
00040 
00041 extern void begin_func(ID* id, const char* module_name, function_flavor flavor,
00042                        int is_redef, FuncType* t);
00043 extern void end_func(Stmt* body);
00044 
00045 extern Val* internal_val(const char* name);
00046 extern Val* opt_internal_val(const char* name); // returns nil if not defined
00047 extern double opt_internal_double(const char* name);
00048 extern bro_int_t opt_internal_int(const char* name);
00049 extern StringVal* opt_internal_string(const char* name);
00050 extern TableVal* opt_internal_table(const char* name);  // nil if not defined
00051 extern ListVal* internal_list_val(const char* name);
00052 extern BroType* internal_type(const char* name);
00053 extern Func* internal_func(const char* name);
00054 extern EventHandlerPtr internal_handler(const char* name);
00055 
00056 extern EventHandlerPtr bro_signal;
00057 extern int signal_val;  // 0 if no signal pending
00058 
00059 #endif

Generated on Wed Sep 14 02:56:59 2005 for bro_docs by doxygen 1.3.5