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

Param Class Reference

#include <pac.h>

Inheritance diagram for Param:

Inheritance graph
[legend]
Collaboration diagram for Param:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Param (ID *arg_id, ID *arg_type_id=0)
 ~Param ()
const char * Decl () const
const IDgetID () const
const char * getTypeName () const
const char * Name () const

Protected Attributes

IDid
IDtype_id
char * decl_str
char * type_name

Constructor & Destructor Documentation

Param::Param ID arg_id,
ID arg_type_id = 0
 

Definition at line 572 of file pac.cc.

References decl_str, id, id, ID::Name(), nfmt(), type_id, and type_name.

00573         : id(arg_id), type_id(arg_type_id)
00574         {
00575         type_name = type_id ?
00576                         nfmt("%s*", type_id->Name()) :
00577                         nfmt("int");
00578         decl_str = nfmt("%s arg_%s", type_name, id->Name());
00579         }

Param::~Param  ) 
 

Definition at line 581 of file pac.cc.

References decl_str, and type_name.

00582         {
00583         delete type_name;
00584         delete decl_str;
00585         }


Member Function Documentation

const char* Param::Decl  )  const [inline]
 

Definition at line 339 of file pac.h.

References decl_str.

00339 { return decl_str; }

const ID* Param::getID  )  const [inline]
 

Definition at line 340 of file pac.h.

References id.

00340 { return id; }

const char* Param::getTypeName  )  const [inline]
 

Definition at line 341 of file pac.h.

References type_name.

00341 { return type_name; }

const char* Param::Name  )  const [inline]
 

Definition at line 342 of file pac.h.

References id, and ID::Name().

00342 { return id->Name(); }


Member Data Documentation

char* Param::decl_str [protected]
 

Definition at line 347 of file pac.h.

Referenced by Decl(), Param(), and ~Param().

ID* Param::id [protected]
 

Definition at line 345 of file pac.h.

Referenced by getID(), Name(), and Param().

ID* Param::type_id [protected]
 

Definition at line 346 of file pac.h.

Referenced by Param().

char* Param::type_name [protected]
 

Definition at line 348 of file pac.h.

Referenced by getTypeName(), Param(), and ~Param().


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