SPEEDES 0.4

Index
toc

SPEEDES 0.4

Metric Summary for SPEEDES 0.4

Total number of classes26
Total number of statements562
Total number of free standing functions23
Average statements per class20
Average McCabe complexity per class15
Average number of public member functions per class22
Average number of protected member functions per class0
Average number of parameters per function0.8
Average number of statements per function1.5
Percent of functions documented83%

toc

SPEEDES Fundamentals

Metric Summary for SPEEDES Fundamentals

Total number of classes1246% of total
Total number of statements40772% of total
Total number of free standing functions1147% of total
Average statements per class3158% from average
Average McCabe complexity per class2355% from average
Average number of public member functions per class2725% from average
Average number of protected member functions per class0117% from average
Average number of parameters per function0.99% from average
Average number of statements per function1.55% from average
Percent of functions documented77%-7% from average

toc

EVENTS--------------------------------------------------------------------------+

Metric Summary for EVENTS--------------------------------------------------------------------------+

Total number of classes13% of total
Total number of statements11019% of total
Total number of free standing functions417% of total
Average statements per class81315% from average
Average McCabe complexity per class79425% from average
Average number of public member functions per class120447% from average
Average number of protected member functions per class0-100% from average
Average number of parameters per function0.912% from average
Average number of statements per function1.3-8% from average
Percent of functions documented99%20% from average

Class Metrics

ClassPublic MembersStatementsMcCabe Complexity
C_EVENT1208179

Function Metrics

ClassStatementsMcCabe Complexity
ScheduleEvent124
ScheduleEventHandler152
C_EVENT::get_processed32
C_EVENT::set_NODE21
CancelEvent11
C_EVENT::GetRBQ11
ReScheduleEvent11
C_EVENT::cleanup11
C_EVENT::commit11
C_EVENT::exchange11
C_EVENT::get_CANCEL11
C_EVENT::get_CREATE11
C_EVENT::get_DESTROY11
C_EVENT::get_EVENT_HANDLER_EVENT11
C_EVENT::get_EVENT_TYPE11
C_EVENT::get_GLOBAL_ID11
C_EVENT::get_HOST_USER11
C_EVENT::get_LOCAL_ID11
C_EVENT::get_MESSAGE11
C_EVENT::get_NODE11
C_EVENT::get_N_NODES11
C_EVENT::get_OBJECT_TYPE11
C_EVENT::get_RANDOM11
C_EVENT::get_SIMOBJ11
C_EVENT::get_amque11
C_EVENT::get_cancel_id11
C_EVENT::get_dbl_item11
C_EVENT::get_event_canceled11
C_EVENT::get_evtptr11
C_EVENT::get_free11
C_EVENT::get_lazy11
C_EVENT::get_lazy_proc11
C_EVENT::get_mque11
C_EVENT::get_nopt11
C_EVENT::get_objects11
C_EVENT::get_rbid11
C_EVENT::get_rbq11
C_EVENT::get_tmin11
C_EVENT::get_valid11
C_EVENT::getmess11
C_EVENT::init_qroll_backs11
C_EVENT::insert11
C_EVENT::lazy11
C_EVENT::perm_process11
C_EVENT::process11
C_EVENT::reset_WriteLookahead11
C_EVENT::reset_event_canceled11
C_EVENT::reset_lazy11
C_EVENT::reset_lazy_proc11
C_EVENT::reset_trace11
C_EVENT::reset_valid11
C_EVENT::set_CANCEL11
C_EVENT::set_CREATE11
C_EVENT::set_DESTROY11
C_EVENT::set_EVENT_HANDLER_EVENT11
C_EVENT::set_EVENT_TYPE11
C_EVENT::set_GLOBAL_ID11
C_EVENT::set_HOST_USER11
C_EVENT::set_LOCAL_ID11
C_EVENT::set_MESSAGE11
C_EVENT::set_N_NODES11
C_EVENT::set_OBJECT_TYPE11
C_EVENT::set_RANDOM11
C_EVENT::set_SIMOBJ11
C_EVENT::set_WriteLookahead11
C_EVENT::set_cancel_id11
C_EVENT::set_event_canceled11
C_EVENT::set_evtype11
C_EVENT::set_free11
C_EVENT::set_lazy11
C_EVENT::set_lazy_proc11
C_EVENT::set_objects11
C_EVENT::set_rbid11
C_EVENT::set_rbq11
C_EVENT::set_trace11
C_EVENT::set_valid11
C_EVENT::set_valid_opt11
C_EVENT::temp_process11
C_EVENT::void_event11
C_EVENT::enable_lazy11
C_EVENT::set_one_node_flag11
C_EVENT::set_qproc11
C_EVENT::C_EVENT00
C_EVENT::WriteLookaheadfile00
C_EVENT::attach_object00
C_EVENT::calculate_tmin00
C_EVENT::cancel00
C_EVENT::cancel_event00
C_EVENT::check_canceled00
C_EVENT::check_clear00
C_EVENT::check_proc00
C_EVENT::clear_data00
C_EVENT::clear_messages00
C_EVENT::create_object00
C_EVENT::create_object00
C_EVENT::create_object00
C_EVENT::create_object00
C_EVENT::delete_MESSAGE00
C_EVENT::destroy_object00
C_EVENT::destroy_object00
C_EVENT::event_type00
C_EVENT::get_manager00
C_EVENT::init00
C_EVENT::lazy_rollback00
C_EVENT::local_messages00
C_EVENT::memory_print00
C_EVENT::object_type00
C_EVENT::open_Lookaheadfile00
C_EVENT::open_tracefile00
C_EVENT::optimistic_insert00
C_EVENT::pop_roll_back00
C_EVENT::print_event_memory00
C_EVENT::reset_processed00
C_EVENT::rollback00
C_EVENT::rollback_event00
C_EVENT::schedule00
C_EVENT::schedule00
C_EVENT::schedule00
C_EVENT::schedule00
C_EVENT::sendmess00
C_EVENT::set_processed00
C_EVENT::spin_loop00
C_EVENT::trace00
C_EVENT::set_twosmess00

toc

class C_EVENT : public C_SQ_ITEM

#include "event.H"

Class: C_EVENT
Summary: A generic simulation event
Description: This is the fundamental active building block in SPEEDES
             applications that acts on C_SIMOBJs. It is also the way SPEEDES
             passes simulated time. C_EVENTs are discrete events are designed
             to act on a single class (type) of simulation object, ie, a
             particular descendent of C_SIMOBJ. Events are generally also
             responsible for scheduling other events. To achieve maximum
             reuse, C_EVENTs should provide all of the actions and
             associations between C_SIMOBJs.

Public Interface

C_EVENT GetRBQ WriteLookaheadfile
attach_object calculate_tmin cancel
cancel_event check_canceled check_clear
check_proc cleanup clear_data
clear_messages commit create_object
create_object create_object create_object
delete_MESSAGE destroy_object destroy_object
event_type exchange get_CANCEL
get_CREATE get_DESTROY get_EVENT_HANDLER_EVENT
get_EVENT_TYPE get_GLOBAL_ID get_HOST_USER
get_LOCAL_ID get_MESSAGE get_NODE
get_N_NODES get_OBJECT_TYPE get_RANDOM
get_SIMOBJ get_amque get_cancel_id
get_dbl_item get_event_canceled get_evtptr
get_free get_lazy get_lazy_proc
get_manager get_mque get_nopt
get_objects get_processed get_rbid
get_rbq get_tmin get_valid
getmess init init_qroll_backs
insert lazy lazy_rollback
local_messages memory_print object_type
open_Lookaheadfile open_tracefile optimistic_insert
perm_process pop_roll_back print_event_memory
process reset_WriteLookahead reset_event_canceled
reset_lazy reset_lazy_proc reset_processed
reset_trace reset_valid rollback
rollback_event schedule schedule
schedule schedule sendmess
set_CANCEL set_CREATE set_DESTROY
set_EVENT_HANDLER_EVENT set_EVENT_TYPE set_GLOBAL_ID
set_HOST_USER set_LOCAL_ID set_MESSAGE
set_NODE set_N_NODES set_OBJECT_TYPE
set_RANDOM set_SIMOBJ set_WriteLookahead
set_cancel_id set_event_canceled set_evtype
set_free set_lazy set_lazy_proc
set_objects set_processed set_rbid
set_rbq set_trace set_valid
set_valid_opt spin_loop temp_process
trace void_event enable_lazy
set_one_node_flag set_qproc set_twosmess

Public Interface

C_EVENT () ;
C_RBQ* GetRBQ () ;
INTERNAL METHOD
void WriteLookaheadfile ( const SIMTIME& t2 , int ty2 , int ot2 , int id2 , int nd ) ;
Method: WriteLookaheadfile 
Summary: Write to the lookahead file, if enabled
Description: 
Return: None
t2
Lookahead time.
ty2
Second object EVENT_TYPE.
ot2
Second object OBJECT_TYPE.
id2
Second object LOCAL_ID.
nd
Second object NODE.
void attach_object () ;
INTERNAL METHOD
void calculate_tmin () ;
INTERNAL METHOD
void cancel ( void* ch ) ;
Method: cancel 
Summary: Cancel the event specified by a C_CANCEL_HANDLE
Description: The event to be cancelled must have been scheduled with the
             cancel handle used here (C_CANCEL_HANDLE), and the event to
             cancel must be in the simulated time future.
Return: None.
ch
IN: the cancel handle (C_CANCEL_HANDLE) of the event to cancel, which was the first argument in that event's schedule () call.
int cancel_event () ;
INTERNAL METHOD
int check_canceled ( int& n_roll ) ;
INTERNAL METHOD
n_roll
Number of rollbacks.
int check_clear () ;
INTERNAL METHOD
int check_proc ( int flag ) ;
INTERNAL METHOD
virtual void cleanup () ;
Virtual Method: cleanup 
Summary: User-written code called in the event destructor
Description: 
Return: None
void clear_data () ;
INTERNAL METHOD
void clear_messages () ;
INTERNAL METHOD
virtual void commit () ;
Virtual Method: commit 
Summary: The part of the user process code that is run after the event is
         committed (same as perm_process())
Description: The user should override this method whenever they want code to
             be guaranteed not to rollback. This is achieved by the SPEEDES
             framework by calling this method after the event has been
             committed (ie, after it has passed global virtual time and thus
             won't ever again rollback). This method is overridden whenever
             the user needs to call code outside of the SPEEDES framework and
             calling it more than once is undesired (such as calling screen
             graphics). An alternative to using commit() is to extend the
             SPEEDES framework with rollbackable items that can thus be used
             within the process() method.
Return: None
void* create_object ( SIMTIME& time , int object_type , int object_node ) ;
Overloaded Method: create_object
Summary: Schedule for dynamically creating a simulation object (C_SIMOBJ)
Description: This is simply a schedule call for a CREATE event. Like all
             schedule calls, it returns the associated message.
Return: the message for dynamically created simulation object (C_SIMOBJ)
time
IN: simulated time to create the object.
object_type
IN: type of object to create.
object_node
IN: node on which to create the object.
void* create_object ( void* ch , SIMTIME& time , int object_type , int object_node ) ;
Overloaded Method: create_object
Summary: Schedule for dynamically creating a simulation object (C_SIMOBJ)
Description: This is simply a schedule call for a CREATE event. Like all
             schedule calls, it returns the associated message.
Return: the message for dynamically created simulation object (C_SIMOBJ)
ch
Cancel handle (see schedule method).
time
IN: simulated time to create the object.
object_type
IN: type of object to create.
object_node
IN: node on which to create the object.
void* create_object ( SIMTIME& time , int object_type , int object_node , int mess_size , char*& buf ) ;
Overloaded Method: create_object
Summary: Schedule for dynamically creating a simulation object (C_SIMOBJ)
Description: This is simply a schedule call for a CREATE event. Like all
             schedule calls, it returns the associated message.
Return: the message for dynamically created simulation object (C_SIMOBJ)
time
IN: simulated time to create the object.
object_type
IN: type of object to create.
object_node
IN: node on which to create the object.
mess_size
IN: (OPTIONAL) number of bytes of the variable-length part of the event message.
buf
IN: (USED IF AND ONLY IF "mess_size" IS USED) the variable-length part of the event message.
void* create_object ( void* ch , SIMTIME& time , int object_type , int object_node , int mess_size , char*& buf ) ;
Overloaded Method: create_object
Summary: Schedule for dynamically creating a simulation object (C_SIMOBJ)
Description: This is simply a schedule call for a CREATE event. Like all
             schedule calls, it returns the associated message.
Return: the message for dynamically created simulation object (C_SIMOBJ)
ch
Cancel handle (see schedule method).
time
IN: simulated time to create the object.
object_type
IN: type of object to create.
object_node
IN: node on which to create the object.
mess_size
IN: (OPTIONAL) number of bytes of the variable-length part of the event message.
buf
IN: (USED IF AND ONLY IF "mess_size" IS USED) the variable-length part of the event message.
void delete_MESSAGE () ;
INTERNAL METHOD
void* destroy_object ( SIMTIME& time , int object_type , int object_id , int object_node ) ;
Overloaded Method: destroy_object 
Summary: Schedule for dynamically destroying (deleting) a simulation object
         (C_SIMOBJ)
Description: This is simply a schedule call for a DESTROY event. Like all
             schedule calls, it returns the associated message.
Return: the message for dynamically destroyed simulation object (C_SIMOBJ)
time
IN: simulated time to destroy the object.
object_type
IN: type of object to destroy.
object_id
IN: the LOCAL_ID of the object to destroy.
object_node
IN: node on which to destroy the object.
void* destroy_object ( void* ch , SIMTIME& time , int object_type , int object_id , int object_node ) ;
Overloaded Method: destroy object
Summary: Schedule for dynamically destroying (deleting) a simulation object
         (C_SIMOBJ)
Description: This is simply a schedule call for a DESTROY event. Like all
             schedule calls, it returns the associated message.
Return: the message for dynamically destroyed simulation object (C_SIMOBJ)
ch
Cancel handle (see schedule method).
time
IN: simulated time to destroy the object.
object_type
IN: type of object to destroy.
object_id
IN: the LOCAL_ID of the object to destroy.
object_node
IN: node on which to destroy the object.
int event_type ( char* c ) ;
Method: event_type
Summary: Get the enumerated ID for an event type, specified by the event
         type's string name
Description: 
Return: the enumerated ID for an event type
virtual void exchange () ;
Virtual Method: exchange 
Summary: This is for the user to write exchange code for fast rollbacks.
Description: This is usually not required, since rollbackable items in the
             process virtual method essentially undergo exchanges
             automatically. But if rollbackable items are not available for
             certain state data, this method allows the user to write
             low-level code to exchange a value with a saved previous
             value. The SPEEDES framework calls this method whenever
             performing a rollback.
Return: None 
int get_CANCEL () ;
Method: get_CANCEL 
Summary: Get the ID (ie, the enumerated type) of the CANCEL event
Description: This is used for scheduling CANCEL events, which are events that
             cancel other non-committed events on the event queue
Return: the ID (ie, the enumerated type) of the CANCEL event
int get_CREATE () ;
Method: get_CREATE 
Summary: Get the ID (ie, the enumerated type) of the CREATE event
Description: This is used for scheduling CREATE events, which are events that
             dynamically create simulation objects (C_SIMOBJs)
Return: the ID (ie, the enumerated type) of the CREATE event
int get_DESTROY () ;
Method: get_DESTROY 
Summary: Get the ID (ie, the enumerated type) of the DESTROY event
Description: This is used for scheduling DESTROY events, which are events that
             dynamically destroy (delete) simulation objects (C_SIMOBJs)
Return: the ID (ie, the enumerated type) of the DESTROY event
int get_EVENT_HANDLER_EVENT () ;
Method: get_EVENT_HANDLER_EVENT
Summary: Get the ID (ie, the enumerated type) of the EVENT_HANDLER_EVENT
         event
Description: This is used internally by SPEEDES to get the id of the event
             handler event
Return: the ID (ie, the enumerated type) of the DESTROY event
int get_EVENT_TYPE () ;
Method: get_EVENT_TYPE 
Summary: Get the ID (or enumerated type) of the type of this event
Description: A unique EVENT_TYPE is required for each C_EVENT class, and is
             found in event_types.C
Return: the OBJECT_TYPE, ie, the ID of the type of this simulation type
int get_GLOBAL_ID () ;
Method: get_GLOBAL_ID 
Summary: Get the unique ID, simulaiton-wide, of the object associated with
         this event. GLOBAL_ID generated automatically, but can be overridden
         by the user.
Description: 
Return: the unique ID of this simulation object
C_HOST_USER* get_HOST_USER () ;
INTERNAL METHOD
int get_LOCAL_ID () ;
Method: get_LOCAL_ID 
Summary: Get the ID of the simulation object associated with this event
Description: Each object manager has its own set of C_SIMOBJs, each with
             their own LOCAL_ID. Thus LOCAL_ID only needs to be unique for a
             given object manager (C_OBJMAN), not unique to a given node or
             to a given simulation
Return: the ID of this simulation object
C_HEADER* get_MESSAGE () ;
Method: get_MESSAGE 
Summary: Get the message used to enact this event
Description: This is a fundamental method for C_EVENT, since events are
             enacted by a message, and that message often contains
             information intended to be extracted by its effected event. Use
             this method get and then read the contents of the message.
Return: the message used to enact this event
int get_NODE () ;
Method: get_NODE 
Summary: Get the node (process number on local machine) that this C_SIMOBJ is
         instantialted on. 
Description: 
Return: the node (process number on local machine) that this C_SIMOBJ
        is instantialted on.
int get_N_NODES () ;
Method: get_N_NODES
Summary: Get the total number of nodes (process number on local machine) in
         the entire simulation (including all other machines' process)
Description: 
Return: total number of nodes
int get_OBJECT_TYPE () ;
Method: get_OBJECT_TYPE 
Summary: Get the ID (or enumerated type) of the type of the simulation
         object associated with this event
Description: A unique OBJECT_TYPE is required for each C_SIMOBJ class.  Each
             C_SIMOBJ class is managed by one instantiation of
             C_OBJMAN. Thus, the OBJECT_TYPE also uniquely defines the type
             of C_SIMOBJ that each instantiation of C_OBJMAN manages. Each
             node has a single instantiation of C_OBJECTS, which in turn
             manages a list of C_OBJMANs. C_OBJECTS refers to each C_OBJMAN
             by the OBJECT_TYPE it manages.
Return: the OBJECT_TYPE, ie, the ID of the type of this simulation type
C_RANDOM* get_RANDOM () ;
Method: get_RANDOM 
Summary: Get the random number generator. There is exactly one C_RANDOM
         object per node, set automatically by the framework.
Description: see C_RANDOM
Return: the random number generator
C_SIMOBJ* get_SIMOBJ () ;
Method: get_SIMOBJ
Summary: Get the simulation object (C_SIMOBJ) associated with this event
Description: This is a fundamental method for C_EVENT, since events are
             designed to act upon one type of simulation object, ie one class
             that inherits from C_SIMOBJ. Use this method to read and write
             to the simulation object on which the event is acting.
Return: the simulation object associated with this event
C_QUEUE* get_amque () ;
INTERNAL METHOD
int get_cancel_id () ;
INTERNAL METHOD
C_DBL_ITEM* get_dbl_item () ;
INTERNAL METHOD
int get_event_canceled () ;
INTERNAL METHOD
C_LPTR* get_evtptr () ;
INTERNAL METHOD
int get_free () ;
INTERNAL METHOD
int get_lazy () ;
INTERNAL METHOD
int get_lazy_proc () ;
INTERNAL METHOD
void* get_manager ( int om ) ;
Method: get_manager 
Summary: Get the object manager for another simulation object, specified by
         its OBJECT_TYPE
Description: 
Return: an object manager, casted to (void *)
om
IN: OBJECT_TYPE of the desired object manager.
C_QUEUE* get_mque () ;
INTERNAL METHOD
int get_nopt () ;
INTERNAL METHOD
C_OBJECTS* get_objects () ;
INTERNAL METHOD
int get_processed () ;
INTERNAL METHOD
int get_rbid () ;
INTERNAL METHOD
C_QUEUE* get_rbq () ;
INTERNAL METHOD
double get_tmin () ;
INTERNAL METHOD
int get_valid () ;
INTERNAL METHOD
void getmess ( C_QUEUE* q1nd ) ;
INTERNAL METHOD
q1nd
OUT: the messages coming in.
virtual void init ( C_HEADER* ) ;
Virtual Method: init 
Summary: Initialize this event
Description: This is for the user to write code that gets executed in this
             event's constructor. That is, code in this method will not occur
             in the process virtual method phase, and thus will not get
             rolled back.
Return: None
The framework passes in the message for the event here, and its use is optional.
void init_qroll_backs () ;
INTERNAL METHOD
void insert () ;
INTERNAL METHOD
virtual int lazy () ;
Virtual Method: lazy 
Summary: User code written to determine, each time this event rolls back,
         whether to roll forward (and thus avoid the overhead of sending
         antimessages and reprocessing) or to undergo the normal rollback
         operations.
Description: Often when an event gets rolled back and reproccessed, the
             results of the simulation are the same (or nearly the same) as
             if the framework didn't roll it back at all even though it was
             processed out of simulated time order. This is user code to
             determine whether this event should send out antimessages when
             it gets rolled back (like a regular rollback) or whether, after
             rolling back, tests show that nothing critical would change by
             sending out antimessages and thus it can simply roll forward
             back to where it was before it got rolled back.
Return: flag for whether the lazy test passed (non-zero = pass). If it
        passes, and if lazy cancellation is enabled, this event is rolled
        forward without sending out antimessages. If it fails, it is treated
        just like any other rollback.
int lazy_rollback () ;
INTERNAL METHOD
int local_messages () ;
INTERNAL METHOD
void memory_print () ;
Method: memory_print 
Summary: print out event free list memory statistics
Description: 
Return: None
int object_type ( char* c ) ;
Method: object_type
Summary: Retrieves a simulation object's OBJECT_TYPE (see set_OBJECT_TYPE)
         based on its string NAME
Description: 
Return: the object type of this simulation object
void open_Lookaheadfile ( char* filename ) ;
Method: open_Lookaheadfile 
Summary: Open a file into which to output lookahead information
Description: 
Return: None
void open_tracefile ( char* filename ) ;
Method: open_tracefile 
Summary: Open a file into which to output trace information (see trace())
Description: 
Return: None
filename
Filename for trace output.
int optimistic_insert () ;
INTERNAL METHOD
virtual void perm_process () ;
Virtual Method: perm_process
Summary: The part of the user process code that is run after the event is
         committed (same as commit())
Description: The user should override this method whenever they want code to
             be guaranteed not to rollback. This is achieved by the SPEEDES
             framework by calling this method after the event has been
             committed (ie, after it has passed global virtual time and thus
             won't ever again rollback). This method is overridden whenever
             the user needs to call code outside of the SPEEDES framework and
             calling it more than once is undesired (such as calling screen
             graphics). An alternative to using commit() is to extend the
             SPEEDES framework with rollbackable items that can thus be used
             within the process() method.
Return: None
void pop_roll_back () ;
INTERNAL METHOD
void print_event_memory () ;
Method: print_event_memory 
Summary: print out event free list memory statistics
Description: 
Return: None
virtual void process () ;
Virtual Method: process 
Summary: The main process user code block (same as temp_process())
Description: The user overrides this method for essentially every C_EVENT.
             That is because it is the place where the body of user code is
             written for the event. It is the only virtual method wherein
             rollbackable operations (such as using STATE variables, etc.)
             are permitted. State information that is not rollbackable should
             not be used in this method, since this method is run more than
             once whenever it is rolled back and reprocessed. Also, calls to
             outside of the SPEEDES framework should not go here for the same
             reason, and should instead occur in the commit virtual function.
Return: None
void reset_WriteLookahead () ;
Method: reset_WriteLookahead 
Summary: Disable write lookahead
Description: 
Return: None
void reset_event_canceled () ;
INTERNAL METHOD
void reset_lazy () ;
Method: reset_lazy 
Summary: Disable lazy cancellation
Description: 
Return: None
void reset_lazy_proc () ;
INTERNAL METHOD
void reset_processed () ;
INTERNAL METHOD
void reset_trace () ;
Method: reset_trace 
Summary: Disable tracing this event
Description: 
Return: None
void reset_valid () ;
INTERNAL METHOD
int rollback () ;
INTERNAL METHOD
int rollback_event () ;
INTERNAL METHOD
void* schedule ( const SIMTIME& time , int event_type , int object_type , int object_id , int object_node ) ;
Overloaded Method: schedule
Summary: Schedule an event at the present or a future simulated time for any
         simulation object (C_SIMOBJ) in the simulation
Description: This is a fundamental method for C_EVENT, since events are
             generally responsible for scheduling future events. The message
             for this event schedule is returned (*C_HEADER), and should be
             subsequently filled in. This is OK, since the message isn't sent
             until after the event user code (the process() virtual method)
             completes.
Return: the message for this scheduled event (*C_HEADER)
time
IN: simulated time.
event_type
IN: enumerated or integer type of event to schedule.
object_type
IN: enumerated or integer type of object for which to schedule the event (must be the one type of object required for the event_type).
object_id
IN: the LOCAL_ID of the object for which to schedule the event.
object_node
IN: the NODE of the object for which to schedule the event.
void* schedule ( void* ch , const SIMTIME& time , int event_type , int object_type , int object_id , int object_node ) ;
Overloaded Method: schedule
Summary: Schedule a cancelable event at the present or a future simulated
         time for any simulation object (C_SIMOBJ) in the simulation
Description: This is a fundamental method for C_EVENT, since events are
             generally responsible for scheduling future events. The message
             for this event schedule is returned (inherited from C_HEADER),
             and should be subsequently filled in. This is OK, since the
             message isn't sent until after the event user code (the
             process() virtual method) completes. The cancel handle (first
             argument) simply must be an uninitialized object (ie, the user
             need only create it, not fill it in) of type C_CANCEL_HANDLE (or
             equivalently, C_ANTIMESS, which is what it is typedef'd
             with). This function returns the handle filled-in with all of
             the information to use this handle later in the cancel () call,
             to later cancel the event now being scheduled. The cancel ()
             call, if later called by the user, will cancel the event now
             being scheduled by scheduling a CANCEL event. When calling
             cancel (), the event to cancel must be in the simulated time
             future.
Return: The message for this scheduled event (inherited from C_HEADER)
ch
INOUT: cancel handle.
time
IN: simulated time.
event_type
IN: enumerated or integer type of event to schedule.
object_type
IN: enumerated or integer type of object for which to schedule the event (must be the one type of object required for the event_type).
object_id
IN: the LOCAL_ID of the object for which to schedule the event.
object_node
IN: the NODE of the object for which to schedule the event.
void* schedule ( const SIMTIME& time , int event_type , int object_type , int object_id , int object_node , int mess_size , char*& buf ) ;
Overloaded Method: schedule
Summary: Schedule an event at the present or a future simulated time for any
         simulation object (C_SIMOBJ) in the simulation. This version of
         schedule () allows the event's message to contain a variable-length
         character buffer as well as the variables contained in the inherited
         C_HEADER.
Description: This is a fundamental method for C_EVENT, since events are
             generally responsible for scheduling future events. The message
             for this event schedule is returned (*C_HEADER), and should be
             subsequently filled in. This is OK, since the message isn't sent
             until after the event user code (the process() virtual method)
             completes.
Return: the message for this scheduled event (*C_HEADER)
time
IN: simulated time.
event_type
IN: enumerated or integer type of event to schedule.
object_type
IN: enumerated or integer type of object for which to schedule the event (must be the one type of object required for the event_type).
object_id
IN: the LOCAL_ID of the object for which to schedule the event.
object_node
IN: the NODE of the object for which to schedule the event.
mess_size
IN: (OPTIONAL) number of bytes of the variable-length part of the event message.
buf
IN: (USED IF AND ONLY IF "size" IS USED) the variable-length part of the event message.
void* schedule ( void* ch , const SIMTIME& time , int event_type , int object_type , int object_id , int object_node , int mess_size , char*& buf ) ;
Overloaded Method: schedule
Summary: Schedule a cancelable event at the present or a future simulated
         time for any simulation object (C_SIMOBJ) in the simulation. This
         version of schedule () allows the event's message to contain a
         variable-length character buffer as well as the variables contained
         in the inherited C_HEADER.
Description: This is a fundamental method for C_EVENT, since events are
             generally responsible for scheduling future events. The message
             for this event schedule is returned (inherited from C_HEADER),
             and should be subsequently filled in. This is OK, since the
             message isn't sent until after the event user code (the
             process() virtual method) completes. The cancel handle (first
             argument) simply must be an uninitialized object (ie, the user
             need only create it, not fill it in) of type C_CANCEL_HANDLE (or
             equivalently, C_ANTIMESS, which is what it is typedef'd
             with). This function returns the handle filled-in with all of
             the information to use this handle later in the cancel () call,
             to later cancel the event now being scheduled. The cancel ()
             call, if later called by the user, will cancel the event now
             being scheduled by scheduling a CANCEL event. When calling
             cancel (), the event to cancel must be in the simulated time
             future.
Return: The message for this scheduled event (inherited from C_HEADER)
ch
IN: cancel handle.
time
IN: simulated time.
event_type
IN: enumerated or integer type of event to schedule.
object_type
IN: enumerated or integer type of object for which to schedule the event (must be the one type of object required for the event_type).
object_id
IN: the LOCAL_ID of the object for which to schedule the event.
object_node
IN: the NODE of the object for which to schedule the event.
mess_size
IN: (OPTIONAL) number of bytes of the variable-length part of the event message.
buf
IN: (USED IF AND ONLY IF "size" IS USED) the variable-length part of the event message.
void sendmess ( C_QUEUE* q1nd ) ;
INTERNAL METHOD
q1nd
IN: the messages to send out.
void set_CANCEL ( int c ) ;
INTERNAL METHOD
void set_CREATE ( int c ) ;
INTERNAL METHOD
void set_DESTROY ( int d ) ;
INTERNAL METHOD
void set_EVENT_HANDLER_EVENT ( int e ) ;
INTERNAL METHOD
void set_EVENT_TYPE ( int et ) ;
INTERNAL METHOD
void set_GLOBAL_ID ( int g ) ;
INTERNAL METHOD
void set_HOST_USER ( C_HOST_USER* h ) ;
INTERNAL METHOD
void set_LOCAL_ID ( int l ) ;
INTERNAL METHOD
void set_MESSAGE ( C_HEADER* h ) ;
INTERNAL METHOD
void set_NODE ( int nd ) ;
INTERNAL METHOD
void set_N_NODES ( int nds ) ;
INTERNAL METHOD
void set_OBJECT_TYPE ( int ot ) ;
INTERNAL METHOD
void set_RANDOM ( C_RANDOM* ran ) ;
INTERNAL METHOD
void set_SIMOBJ ( C_SIMOBJ* g ) ;
INTERNAL METHOD
void set_WriteLookahead () ;
Method: set_WriteLookahead 
Summary: Enable write lookahead
Description: 
Return: None
void set_cancel_id ( int cid ) ;
INTERNAL METHOD
void set_event_canceled () ;
INTERNAL METHOD
void set_evtype ( C_EVENT_TYPES* et ) ;
INTERNAL METHOD
void set_free () ;
INTERNAL METHOD
void set_lazy () ;
Method: set_lazy 
Summary: Enable lazy cancellation
Description: 
Return: None
void set_lazy_proc () ;
INTERNAL METHOD
void set_objects ( C_OBJECTS* obj ) ;
INTERNAL METHOD
void set_processed () ;
INTERNAL METHOD
void set_rbid ( int r ) ;
INTERNAL METHOD
void set_rbq ( C_RBQ* r ) ;
INTERNAL METHOD
void set_trace () ;
Method: set_trace 
Summary: Enable tracing this event
Description: 
Return: None
void set_valid () ;
INTERNAL METHOD
void set_valid_opt () ;
INTERNAL METHOD
void spin_loop ( double twait ) ;
INTERNAL METHOD
twait
Amount of time to add to the desired point in time to wait.
virtual void temp_process () ;
Virtual Method: temp_process 
Summary: The main process user code block (same as process())
Description: This method is essentially always overridden for every C_EVENT.
             That is because it is the place where the body of user code is
             written for the event. It is the only virtual method wherein
             rollbackable operations (such as using STATE variables, etc.)
             are permitted. State information that is not rollbackable should
             not be used in this method, since this method is run more than
             once whenever it is rolled back and reprocessed. Also, calls to
             outside of the SPEEDES framework should not go here for the same
             reason, and should instead occur in the commit virtual function.
Return: None
void trace () ;
Method: trace 
Summary: Trace this event
Description: Provide statistics about this event to a trace file during run
             time
Return: None
virtual int void_event () ;
INTERNAL METHOD
static void enable_lazy () ;
INTERNAL METHOD
static void set_one_node_flag ( int onf ) ;
INTERNAL METHOD
static void set_qproc ( C_DBL_QUEUE* q ) ;
INTERNAL METHOD
static void set_twosmess ( void* tm ) ;
INTERNAL METHOD

Protected Interface

Protected Data

static int CANCEL;
Cancel event type id.
static int CREATE;
Create object event type id.
static int DESTROY;
Destroy object event type id.
static int EVENT_HANDLER_EVENT;
Event handler event type id.
int EVENT_TYPE;
Event type.
int GLOBAL_ID;
Global id for simobj.
static C_HOST_USER* HOST_USER;
Host user object.
C_HEADER* MESSAGE;
Pointer to event message.
static int NODE;
Node.
static int N_NODES;
Number of nodes.
int OBJECT_TYPE;
Object type.
static C_RANDOM* RANDOM;
Random number generator.
C_SIMOBJ* SIMOBJ;
Generic object for all objects.
static C_RBQ* rbq;
Roll back queue manager.

Private Interface

Private Data

static int EnableLazy;
Lazy cancellation enabled flag.
static FILE* LookaheadFP;
File pointer for lookahead file.
static char* Lookaheadfile;
Name of lookahead file.
static int WriteLookahead;
Write lookahead file (1=on, 0=off).
int cancel_id;
Cancel event id.
C_DBL_ITEM dbl_item;
Processed event item.
static C_DBL_QUEUE* dbl_qproc;
Queue of processed events.
int event_canceled;
Event has canceled flag.
C_LPTR evtptr;
Optimistic event object.
static C_EVENT_TYPES* evtype;
Event and message memory manager.
static int first_cancel;
Flag for first canceled event.
int free_flag;
Flag set only by free list management.
static int gencid;
Generated cancel id.
int lazy_flag;
Flag for lazy cancellation.
int lazy_proc;
Flag for lazy processed.
static C_OBJECTS* objects;
Object manager.
C_OBJEVT objevt;
Object event status and link.
static int one_node_flag;
One node flag.
C_QUEUE optevts;
Queue of optimistically generated events.
C_QUEUE qanti;
Queue of outgoing antimessages.
C_QUEUE qmessout;
Queue of outgoing messages.
C_QUEUE qroll_backs;
Queue of roll backs.
int rbid;
Roll back unique id.
static double spin_clock;
Clocked spin time.
static double spin_time;
Desired spin time.
double tmin;
Minimum time of a generated message.
static FILE* traceFP;
File pointer for trace file.
static char* tracefile;
Name of trace file.
static int traceflag;
Trace flag (1 means on, 0 means off).
int valid;
Valid event flag.

CancelEvent #include "ScheduleEvent.H"
void CancelEvent(C_CANCEL_HANDLE* cancelHandle ) ;
Function: CancelEvent
Summary: Cancels an event (or event handler) that was previously scheduled.
Description: This function may be called from anywhere in a SPEEDES
             application to retract an event that was previously scheduled.
Return: void
cancelHandle
IN: Cancel handle.

ReScheduleEvent #include "ScheduleEvent.H"
C_CANCEL_HANDLE ReScheduleEvent(const SIMTIME& time , C_HEADER* header = NULL , char* data = NULL , int dataBytes = 0 ) ;
Function: ReScheduleEvent
Summary: Re-schedules the same event to be processed for the same simobj at
         a future time.
Description: This function can be called from anywhere within SPEEDES to
             reschedule the same event for the same simobj for processing
             at a later time.
Return: A cancel handle for the event which can be later used to retract
        the event before it is processed. Applications are not required to
        use this returned value.
time
IN: Logical time.
header
IN: Optional message for scheduling the event.
data
IN: Variable length data that gets passed with the event (optional).
dataBytes
IN: Number of bytes for variable length data.

ScheduleEvent #include "ScheduleEvent.H"
C_CANCEL_HANDLE ScheduleEvent(const SIMTIME& time , int eventType , int simobjType , int simobjLocalId , int simobjNode , C_HEADER* header = NULL , char* data = NULL , int dataBytes = 0 ) ;
Function: ScheduleEvent
Summary: Schedules an event to be processed for a simobj at a specified.
         time. Events must never be scheduled in the past of the current
         event.
Description: This function can be called from anywhere within SPEEDES to
             schedule an event. An event must have a time tag, event type
             simulation object type, simulation object local Id, and node
             number to uniquely identify the event and the simobj that it
             acts on. Optional arguments are the message header (users must
             set specified data members before making the schedule call), and
             a variable data buffer followed by the number of bytes. If the
             variable data buffer is not provided, the SPEEDES internal
             free list mechanisms are used to reduce overheads.
Return: A cancel handle for the event which can be later used to retract
        the event before it is processed. Applications are not required to
        use this returned value.
time
IN: Logical time.
eventType
IN: Event type Id.
simobjType
IN: Simulation object type.
simobjLocalId
IN: Simulation object local Id.
simobjNode
IN: Node that the simulation object is on.
header
IN: Optional message for scheduling the event.
data
IN: Variable length data that gets passed with the event (optional).
dataBytes
IN: Number of bytes for variable length data.

ScheduleEventHandler #include "ScheduleEvent.H"
C_CANCEL_HANDLE ScheduleEventHandler(const SIMTIME& time , char* eventName , int simobjType , int simobjLocalId , int simobjNode , char* data , int dataBytes ) ;
Overloaded Function: ScheduleEventHandler
Summary: Schedule an event handler for the present or future time for any
         simulation object (C_SIMOBJ) in the simulation. The data that
         is passed in gets delivered to the event handler when it is
         processed. The cancel handle is returned to the application and can
         later be used to retract the event.
Description: This method may be called from anywhere in a SPEEDES
             application and schedules an event handler for any simulation
             object. The eventName is the name of the event handler(s) that
             get invoked when the event is processed. The data passed in
             is what is delivered to the event handler. The cancel
             handle is returned to the user. This allows the event to later
             be retracted using the Cancel() method.
Return: void
time
IN: Simulated time.
eventName
IN: String name of the event handler.
simobjType
IN: Simulation object type.
simobjLocalId
IN: LOCAL_ID of the simulation object.
simobjNode
IN: NODE that the simulation object is on.
data
IN: Variable length data that is passed to the event handler(s).
dataBytes
IN: Number of bytes in the data.

toc

OBJECTS------------------------------------------------------------------------+

Metric Summary for OBJECTS------------------------------------------------------------------------+

Total number of classes311% of total
Total number of statements9717% of total
Total number of free standing functions00% of total
Average statements per class3265% from average
Average McCabe complexity per class2671% from average
Average number of public member functions per class3351% from average
Average number of protected member functions per class1767% from average
Average number of parameters per function0.97% from average
Average number of statements per function1.4-6% from average
Percent of functions documented98%19% from average

Class Metrics

ClassPublic MembersStatementsMcCabe Complexity
C_SIMOBJ737862
C_OBJMAN261915
C_GLOBAL_NAME000

Function Metrics

ClassStatementsMcCabe Complexity
C_SIMOBJ::CheckSubType93
C_SIMOBJ::CheckSubscription93
C_OBJMAN::term52
C_SIMOBJ::SetEventHandlerHashSize32
C_SIMOBJ::schedule31
C_SIMOBJ::init_objs21
C_OBJMAN::reserve_n_objects21
C_SIMOBJ::EXCHANGE_SEED11
C_OBJMAN::create_object11
C_OBJMAN::define_object11
C_OBJMAN::destroy_object11
C_SIMOBJ::get_EXTSUBS11
C_SIMOBJ::get_GLOBAL_ID11
C_SIMOBJ::get_LOCAL_ID11
C_SIMOBJ::get_NAME11
C_SIMOBJ::get_NODE11
C_OBJMAN::get_N_LOC11
C_SIMOBJ::get_N_NODES11
C_SIMOBJ::get_N_OBJECT_TYPES11
C_OBJMAN::get_N_TOT11
C_SIMOBJ::get_OBJECT_TYPE11
C_SIMOBJ::get_RANDOM11
C_SIMOBJ::get_SEED11
C_SIMOBJ::get_TIME11
C_SIMOBJ::get_TOTAL_OBJECTS11
C_OBJMAN::get_allids_size11
C_SIMOBJ::get_blocking11
C_SIMOBJ::get_cancel_queue11
C_SIMOBJ::get_evtq11
C_SIMOBJ::get_last_etype11
C_SIMOBJ::get_local_rqueue11
C_SIMOBJ::get_monitor11
C_SIMOBJ::get_ncancel11
C_OBJMAN::get_obj11
C_SIMOBJ::get_obman11
C_SIMOBJ::get_obname11
C_SIMOBJ::get_qmon11
C_SIMOBJ::get_rq_holder11
C_SIMOBJ::get_uid_seed11
C_OBJMAN::init_object11
C_SIMOBJ::object_type11
C_SIMOBJ::print11
C_SIMOBJ::remove_block11
C_OBJMAN::reset_interact11
C_SIMOBJ::reset_nlobjs11
C_SIMOBJ::set_GLOBAL_ID11
C_SIMOBJ::set_LOCAL_ID11
C_SIMOBJ::set_NAME11
C_SIMOBJ::set_NODE11
C_OBJMAN::set_N_LOC11
C_SIMOBJ::set_N_NODES11
C_SIMOBJ::set_N_OBJECT_TYPES11
C_OBJMAN::set_N_TOT11
C_SIMOBJ::set_OBJECT_TYPE11
C_SIMOBJ::set_RANDOM11
C_SIMOBJ::set_SEED11
C_SIMOBJ::set_TIME11
C_SIMOBJ::set_TOTAL_OBJECTS11
C_SIMOBJ::set_evtype11
C_SIMOBJ::set_init_event_queue11
C_OBJMAN::set_interact11
C_SIMOBJ::set_last_etype11
C_SIMOBJ::set_obman11
C_SIMOBJ::set_rbq11
C_SIMOBJ::set_rq_holder11
C_SIMOBJ::set_rqueue11
C_SIMOBJ::set_uid_seed11
C_SIMOBJ::terminate11
C_SIMOBJ::add_block11
C_SIMOBJ::add_unblock11
C_SIMOBJ::get_qblock11
C_SIMOBJ::C_SIMOBJ00
C_OBJMAN::C_OBJMAN00
C_SIMOBJ::AddEventHandler00
C_SIMOBJ::CheckEventHandler00
C_SIMOBJ::ProcessEventHandlers00
C_SIMOBJ::RemoveEventHandler00
C_OBJMAN::add_object00
C_SIMOBJ::combine_total_objects00
C_SIMOBJ::event_type00
C_OBJMAN::get_allids00
C_SIMOBJ::get_manager00
C_OBJMAN::get_nodid00
C_OBJMAN::get_nodid00
C_OBJMAN::get_oid00
C_SIMOBJ::get_tblock00
C_OBJMAN::init_events00
C_SIMOBJ::insert_event00
C_OBJMAN::name_hash00
C_SIMOBJ::print_event_memory00
C_OBJMAN::print_global_names00
C_SIMOBJ::query00
C_OBJMAN::remove_object00
C_SIMOBJ::schedule00
C_SIMOBJ::schedule00
C_OBJMAN::set_N_LOC00
C_OBJMAN::set_global_names00
C_SIMOBJ::unblock00
C_SIMOBJ::update_block00
C_OBJMAN::deal_me00
C_OBJMAN::deal_me00

toc >>

class C_GLOBAL_NAME : public C_ITEM

#include "objman.H"

Class: C_GLOBAL_NAME
Summary: Structure for a hash table of global names
Description: Used only by C_OBJMAN

Public Interface

Public Data

int lid;
char name [ MAX_NAME_LENGTH ];
int node;

<<toc >>

class C_OBJMAN : public C_SIMOBJ

#include "objman.H"

Class: C_OBJMAN
Summary: Manages (creates and distributes) the C_SIMOBJs of a given type on
         this node. Also, since this class inherits from C_SIMOBJ itself, it
         can handle events scheduled for itself (LOCAL_ID = -1).
Description: Descendants of this class should set the variables
             C_OBJMAN::N_LOC and C_OBJMAN::N_TOT, call reserve_n_objects ()
             and define_object (), and increment TOTAL_OBJECTS. To card deal
             this object type, use deal_me ().

Public Interface

C_OBJMAN add_object create_object
define_object destroy_object get_N_LOC
get_N_TOT get_allids get_allids_size
get_nodid get_nodid get_obj
get_oid init_events init_object
name_hash print_global_names remove_object
reserve_n_objects reset_interact set_N_LOC
set_N_LOC set_N_TOT set_global_names
set_interact term

Public Interface

C_OBJMAN () ;
void add_object ( C_SIMOBJ* simobj ) ;
INTERNAL METHOD
simobj
Dynamically created C_SIMOBJ to add to the simulation.
virtual C_SIMOBJ* create_object () ;
Virtual Method: create_object
Summary: Dynamically (and rollbackably) create a C_SIMOBJ of this C_OBJMAN's
         OBJECT_TYPE
Description: Defaults to returning NULL (must be overridden)
Return: pointer to a dynamically-created C_SIMOBJ of this C_OBJMAN's
        OBJECT_TYPE
virtual void define_object ( C_SIMOBJ* gen ) ;
Virtual Method: define_object
Summary: Put a C_SIMOBJ into the array of C_SIMOBJs managed by this C_OBJMAN
Description: 
Return: None
gen
C_SIMOBJ to define.
virtual void destroy_object ( C_SIMOBJ* ) ;
Virtual Method: destroy_object
Summary: Dynamically (and rollbackably) destroy a C_SIMOBJ of this C_OBJMAN's
         OBJECT_TYPE
Description: Defaults to a pass-through method (must be overridden)
Return: None
C_SIMOBJ to destroy.
int get_N_LOC () ;
Method: get_N_LOC
Summary: Get N_LOC, which is the total number of this C_OBJMAN's type of
         C_SIMOBJ on this node
Description: 
Return: N_LOC
int get_N_TOT () ;
Method: get_N_TOT
Summary: Get N_TOT, which is the total number of this C_OBJMAN's type of
         C_SIMOBJ in the simulation
Description: 
Return: N_TOT
char* get_allids () ;
INTERNAL METHOD
int get_allids_size () ;
INTERNAL METHOD
void get_nodid ( char* name , int& nd , int& lid ) ;
Overloaded Method: get_nodid
Summary: Get the NODE and LOCAL_ID of the C_SIMOBJ specified by its NAME
Description: 
Return: None
name
IN: name of C_SIMOBJ of interest.
nd
OUT: The NODE of the C_SIMOBJ of interest.
lid
OUT: The LOCAL_ID of the C_SIMOBJ of interest.
virtual void get_nodid ( int oi , int& n , int& i ) ;
Overloaded Method: get_nodid
Summary: Get the NODE and LOCAL_ID of the C_SIMOBJ specified by its GLOBAL_ID
Description: 
Return: None
oi
IN: The GLOBAL_ID of the C_SIMOBJ of interest.
n
OUT: The NODE of the C_SIMOBJ of interest.
i
OUT: The LOCAL_ID of the C_SIMOBJ of interest.
virtual C_SIMOBJ* get_obj ( int oid ) ;
Virtual Method: get_obj
Summary: Get the C_SIMOBJ from this C_OBJMAN (ie, of this C_OBJMAN's
         OBJECT_TYPE) specified by LOCAL_ID
Description: 
Return: The C_SIMOBJ from this C_OBJMAN (ie, of this C_OBJMAN's OBJECT_TYPE)
        specified by LOCAL_ID
oid
Object ID (LOCAL_ID of output C_SIMOBJ).
virtual void get_oid ( int& oi , int n , int i ) ;
Virtual Method: get_oid
Summary: Get the GLOBAL_ID of the C_SIMOBJ specified by NODE and LOCAL_ID
Description: 
Return: None
oi
OUT: GLOBAL_ID of C_SIMOBJ of interest.
n
IN: NODE of C_SIMOBJ of interest.
i
IN: LOCAL_ID of C_SIMOBJ of interest.
virtual void init_events () ;
Virtual Method: init_events
Summary: Method in which to schedule initial events.
Description: This method is called just before the beginning of the
             simulation.  (I.e., just prior to simulated time = zero). This
             is done so users can schedule evetns for simulated time =
             zero. Users schedule initial events in each C_OBJMAN on each
             node by overriding this method.
Return: None
virtual void init_object ( C_SIMOBJ* , void* ) ;
Virtual Method: init_object
Summary: Initialize a particular C_SIMOBJ managed by this C_OBJMAN 
Description: Defaults to a pass-through method (must be overridden)
Return: None
Intended as C_SIMOBJ to initialize.
Intended as initialization data.
int name_hash ( char* name ) ;
INTERNAL METHOD
void print_global_names () ;
Method: print_global_names
Summary: Print the global name database to cout (see set_global_names())
Description: 
Return: None
void remove_object ( C_SIMOBJ* simobj ) ;
INTERNAL METHOD
simobj
C_SIMOBJ to remove from the simulation.
virtual void reserve_n_objects ( int n ) ;
Virtual Method: reserve_n_objects
Summary: Allocate memory for an array of n pointers to the C_SIMOBJs to be
         created by this C_OBJMAN
Description: By default,
Return: None
n
Number of objects to reserve.
void reset_interact () ;
INTERNAL METHOD
void set_N_LOC () ;
Method: set_N_LOC
Summary: Set N_LOC, which is the total number of this C_OBJMAN's type of
         C_SIMOBJ on this node
Description: Users are responsible to set this variable in this C_OBJMAN's
             constructor. This version of this overloaded method uses N_TOT
             (which must be set previously by the user) and N_NODES to
             determine N_LOC, using the deal_me () algorithm.
Return: None
void set_N_LOC ( int n ) ;
Overloaded Method: set_N_LOC
Summary: Set N_LOC, which is the total number of this C_OBJMAN's type of
         C_SIMOBJ on this node
Description: Users are responsible to set this variable in this C_OBJMAN's
             constructor
Return: None
n
N_LOC.
void set_N_TOT ( int n ) ;
Method: set_N_TOT
Summary: Set N_TOT, which is the total number of this C_OBJMAN's type of
         C_SIMOBJ in the simulation
Description: Users are responsible to set this variable in this C_OBJMAN's
             constructor
Return: None
n
N_TOT.
void set_global_names () ;
Method: set_global_names
Summary: Creates a hash table of the NAMEs of all of the C_SIMOBJs in the
         simulation for easy lookups using get_nodid (char *name, int &nd,
         int &lid)
Description: The purpose of this method is to ease the burden on the user
             when scheduling events. This method uses global reduction
             techniques to create a local data base of each C_SIMOBJ in the
             simulation that has the NAME attribute defined (regardless of
             what node they reside on). We recommend calling this method in
             this C_OBJMAN's constructor. Then, get_nodid (char *name, int
             &nd, int &lid) and print_global_names() can be called any time
             during the simulation and access the database created at that
             point. However, the database is not updated as C_SIMOBJs are
             created and destroyed.
Return: None
void set_interact () ;
INTERNAL METHOD
void term ( double tend ) ;
INTERNAL METHOD

Protected Interface

int deal_me ( int nobjs ) ;
Local number of objects of my type.
nobjs
IN: total number of objects of this type to be managed collectively by all C_OBJMANs of this type on all nodes (normally N_TOT).
int deal_me ( int nobjs , int& offset ) ;
Method: deal_me
Summary: card deal objects of this simulation object type for this node
Description: This function is called by this simulation type's object manager
             constructor when the distribution strategy for this class of
             simulation objects is to "card deal" all the simulation objects
             of this type to all of the nodes in the simulation. nobjs is the
             total number of objects of this type to be managed collectively
             by all C_OBJMANs of this type on all nodes (normally N_TOT is
             passed as the argument for this parameter). This function
             returns the number of those objects that this node should manage
             (the other nodes will manage the other objects).  This C_OBJMAN
             manages objects with ids in the calling manager of offset +
             N_NODES * j, where j is a whole number. Or, another way to state
             this is that offset is used to determine which C_SIMOBJs this
             C_OBJMAN should manage. Namely, this C_OBJMAN manages all
             C_SIMOJs of LOCAL_ID == i where ((i-offset+N_NODES)%N_NODES) ==
             0 and (0 <= i < N_TOT).
Return: N_LOC
nobjs
IN: total number of objects of this type to be managed collectively by all C_OBJMANs of this type on all nodes (normally N_TOT).
offset
OUT: node offset.

Protected Data

int N_LOC;
Local number of objects of my type.
int N_TOT;
Total number of objects of my type.

Private Interface

Private Data

static int done;
Pointer to the objects.
C_GLOBAL_NAME* global_name;
Array of global names.
C_SIMOBJ** gobj;
Pointer to the objects.
int interact;
Interaction flag.
C_QUEUE* name_queue;
Array of queues of global names.
ion flag int ndef;
Number of local object defined so far.
static int ntobj;
Number of total objects.
static int seed_update;
Seed update.

<<toc

class C_SIMOBJ : public C_SQ_ITEM

#include "simobj.H"

Class: C_SIMOJ
Summary: A generic SPEEDES simulation object
Description: This is the fundamental modeling unit in SPEEDES applications on
             which C_EVENTs act. C_SIMOBJs must be designed independent of
             other C_SIMOBJs so as to permit each C_SIMOBJ to temporarily
             exist at different logical (simulated) times as controlled by
             the operative time management algorithm. C_SIMOBJs are permitted
             to schedule events for other C_SIMOBJs, but this is generally
             discouraged in favor of maximizing C_SIMOBJ reuse. To achieve
             greater reuse, C_SIMOBJs should use events attached to
             themselves for scheduling events for other C_SIMOBJs.

Public Interface

C_SIMOBJ AddEventHandler CheckEventHandler
CheckSubType CheckSubscription EXCHANGE_SEED
ProcessEventHandlers RemoveEventHandler SetEventHandlerHashSize
combine_total_objects event_type get_EXTSUBS
get_GLOBAL_ID get_LOCAL_ID get_NAME
get_NODE get_N_NODES get_N_OBJECT_TYPES
get_OBJECT_TYPE get_RANDOM get_SEED
get_TIME get_TOTAL_OBJECTS get_blocking
get_cancel_queue get_evtq get_last_etype
get_local_rqueue get_manager get_monitor
get_ncancel get_obman get_obname
get_qmon get_rq_holder get_tblock
get_uid_seed init_objs insert_event
object_type print print_event_memory
query remove_block reset_nlobjs
schedule schedule schedule
set_GLOBAL_ID set_LOCAL_ID set_NAME
set_NODE set_N_NODES set_N_OBJECT_TYPES
set_OBJECT_TYPE set_RANDOM set_SEED
set_TIME set_TOTAL_OBJECTS set_evtype
set_init_event_queue set_last_etype set_obman
set_rbq set_rq_holder set_rqueue
set_uid_seed terminate unblock
update_block add_block add_unblock
get_qblock

Public Interface

C_SIMOBJ () ;
void AddEventHandler ( char* eventName , EVENT_HANDLER* eventHandler ) ;
Method: AddEventHandler
Summary: Adds the event handler to the simobj. If the hash table has not
         been created, it automatically creates the hash table with a
         nominal size.
Description: adds the event handler to the simobj's set of event handlers.
             Note that it is possible to add more than one event handler for
             a specified eventName. Each eventName is managed in an item
             that is stored in the EventHandlerHash table as a group.
Return: void.
int CheckEventHandler ( char* eventName ) ;
IN: id of external module
    if applicable (-1 means
    event not generated by
    external module)
int CheckSubType ( char* Type , int externalId ) ;
Method: CheckSubType
Summary: Checks if an external module (specified by the externalId input)
         has subscribed to a specified type (represented as the string Type)
Description: Searches through the EXTSUBS list for the pair <Type and
             externalId> and returns 1 if found (otherwise, returns 0).
Return: Returns 1 if the subscription type for that externalId is in
        the EXTSUBS list. Otherwise, returns 0.
int CheckSubscription ( char* Name ) ;
Method: CheckSubscription
Summary: Checks if a subscription type specified by the input argument Name
         is in the EXTSUBS list.
Description: Searches through the EXTSUBS list for the named subscription.
Return: Returns 1 if the subscription name is in the EXTSUBS list.
        Otherwise, returns 0.
void EXCHANGE_SEED ( int& seed ) ;
Method: EXCHANGE_SEED
Summary: Exchange the SEED of this C_SIMOBJ for rollback purposes
Description: 
Return: None
seed
INOUT: SEED to exchange with this C_SIMOBJ's SEED.
void ProcessEventHandlers ( char* eventName , SIMTIME& timeTag , char* data , int dataBytes , int externalId ) ;
Method: ProcessEventHandlers
Summary: Processes all of the event handlers with a specified name..
Description: Removes the event handler from the simobj's set of event
             handlers.
Return: void.
eventName
IN: name of the event type.
timeTag
IN: simulation time.
data
IN: data passed to the IN: event handler.
dataBytes
IN: number of bytes for data.
externalId
IN: id of external module if applicable (-1 means event not generated by external module).
void RemoveEventHandler ( char* eventName , EVENT_HANDLER* eventHandler ) ;
Method: RemoveEventHandler
Summary: Removbes the event handler from the simobj. Note that the event
         name item that is in the EventHandlerHash table is never deleted.
Description: Removes the event handler from the simobj's set of event
             handlers.
Return: void.
void SetEventHandlerHashSize ( int hashSize ) ;
Method: SetEventHandlerHashSize
Summary: Sets the size of the hash table for storing event handlers.
Description: Creates the hash table for event handlers and uses the input
             argument to define the size of the hash table. Reasonable sizes
             for the hash table would be the number of different kinds of
             event names.
Return: void.
void combine_total_objects () ;
INTERNAL METHOD
int event_type ( char* c ) ;
Method: event_type 
Summary: Get the enumerated ID for an event type, specified by the event
         type's string name
Description: 
Return: the enumerated ID for an event type
c
IN: NAME of an event.
C_XQUEUE* get_EXTSUBS () ;
Method: get_EXTSUBS
Summary: Gets the list of external subscriptions
Description: Returns the EXTSUBS C_XQUEUE
Return: Returns the pointer to the EXTSUBS object (of type C_XQUEUE)
int get_GLOBAL_ID () ;
Method: get_GLOBAL_ID
Summary: Get the unique ID, simulaiton-wide, of this object. GLOBAL_ID
         generated automatically, but can be overridden by the user.
Description: 
Return: the unique ID of this simulation object
int get_LOCAL_ID () ;
Method: get_LOCAL_ID
Summary: Get the ID of this simulation object
Description: Each object manager has its own set of C_SIMOBJs, each with
             their own LOCAL_ID. Thus LOCAL_ID only needs to be unique for a
             given object manager (C_OBJMAN), not unique to a given node or
             to a given simulation
Return: the ID of this simulation object
char* get_NAME () ;
Method: get_NAME
Summary: Get the name of this object (for referring to this C_SIMOBJ by name)
Description: 
Return: name of this object
int get_NODE () const;
Method: get_NODE
Summary: Get the node (process number on local machine) that this C_SIMOBJ is
         instantialted on.
Description:
Return: the node (process number on local machine) that this C_SIMOBJ
        is instantialted on.
int get_N_NODES () ;
Method: get_N_NODES
Summary: Get the total number of nodes (process number on local machine) in
         the entire simulation (including all other machines' process)
Description: 
Return: total number of nodes
int get_N_OBJECT_TYPES () ;
Method: get_N_OBJECT_TYPES
Summary: Get the total number of OBJECT_TYPEs (see above) in the current
         simulation
Description: 
Return: the total number of OBJECT_TYPEs (see above) in the current
        simulation
int get_OBJECT_TYPE () ;
Method: get_OBJECT_TYPE
Summary: Get the ID (or enumerated type) of the type of this simulation
         object
Description: A unique OBJECT_TYPE is required for each C_SIMOBJ class.  Each
             C_SIMOBJ class is managed by one instantiation of
             C_OBJMAN. Thus, the OBJECT_TYPE also uniquely defines the type
             of C_SIMOBJ that each instantiation of C_OBJMAN manages. Each
             node has a single instantiation of C_OBJECTS, which in turn
             manages a list of C_OBJMANs. C_OBJECTS refers to each C_OBJMAN
             by the OBJECT_TYPE it manages.
Return: the OBJECT_TYPE, ie, the ID of the type of this simulation type
C_RANDOM* get_RANDOM () ;
Method: get_RANDOM
Summary: Get the random number generator. There is exactly one C_RANDOM
         object per node, set automatically by the framework.
Description: see C_RANDOM
Return: the random number generator
STATE_INT get_SEED () ;
Method: get_SEED
Summary: Get the seed for the random number generator. Must be saved and
         recalled for repeatability due to rollbacks.
Description: 
Return: the random number generator seed
SIMTIME& get_TIME () ;
INTERNAL METHOD
int get_TOTAL_OBJECTS () ;
Method: get_TOTAL_OBJECTS
Summary: Get the total number of objects in the simulation. That is, the sum
         of each object of each object type on each node.
Description: 
Return: the total number of objects in the simulation
int get_blocking () ;
INTERNAL METHOD
C_XQUEUE* get_cancel_queue () ;
INTERNAL METHOD
C_DBL_QUEUE* get_evtq () ;
INTERNAL METHOD
int get_last_etype () ;
INTERNAL METHOD
C_RQUEUE* get_local_rqueue () ;
INTERNAL METHOD
void* get_manager ( int om ) ;
Method: get_manager
Summary: Get the object manager for another simulation object, specified by
         its OBJECT_TYPE
Description: 
Return: an object manager, casted to (void *)
om
IN: OBJECT_TYPE of the desired object manager.
int get_monitor () ;
Method: get_monitor
Summary: Get the number of external monitors connected to this simulation
         object
Description: 
Return: the number of external monitors connected to this simulation
        object
int get_ncancel () ;
INTERNAL METHOD
C_OBJECT_TYPES* get_obman () ;
INTERNAL METHOD
char* get_obname ( int i ) ;
INTERNAL METHOD
C_QUEUE* get_qmon () ;
Method: get_qmon
Summary: Get the list of external monitors connected to this simulation
         object
Description: 
Return: the list of external monitors connected to this simulation object
C_RQ_HOLDER* get_rq_holder () ;
INTERNAL METHOD
SIMTIME& get_tblock () ;
INTERNAL METHOD
int get_uid_seed () ;
INTERNAL METHOD
void init_objs () ;
INTERNAL METHOD
void insert_event ( C_SQ_ITEM* event ) ;
INTERNAL METHOD
int object_type ( char* c ation object ) ;
Method: object_type
Summary: Retrieves a simulation object's OBJECT_TYPE (see set_OBJECT_TYPE)
         based on its string NAME
Description: 
Return: the object type of this simulation object
virtual void print () ;
Virtual Method: print
Summary: User-overridable function to print something about this simulation
         object during run-time
Description:
Return: None
void print_event_memory () ;
INTERNAL METHOD
virtual void query ( double time_tag , NAME_VALUE_LIST& NameValueList ) ;
Virtual Method: query
Summary: Query this simulation object for a name-value list of information
Description: Simulation objects can be queried during run-time for real-time
             updates of their state. The state information queried is defined
             by the simulation object at compile time by overridding this
             virtual function.
Return: the size, in bytes, of the returned buffer, buff
time_tag
IN: simulated time for the query.
NameValueList
OUT: query list.
void remove_block ( C_ITEM* it ) ;
INTERNAL METHOD
it
IN: the event to remove from this node's list of blocking events.
void reset_nlobjs () ;
INTERNAL METHOD
void* schedule ( const SIMTIME& time , int event_type , int object_type , int object_id , int object_node ) ;
Overloaded Method: schedule
Summary: Schedule an event at the present or a future simulated time for any
         simulation object (C_SIMOBJ) in the simulation
Description: For reusability, prefer scheduling events in the process user
             code of events (C_EVENTs). See the schedule methods in C_EVENT.
Return: the message for this scheduled event
time
IN: simulated time.
event_type
IN: enumerated or integer type of event to schedule.
object_type
IN: enumerated or integer type of object for which to schedule the event (must be the one type of object required for the event_type).
object_id
IN: the LOCAL_ID of the object for which to schedule the event.
object_node
IN: the NODE of the object for which to schedule the event.
void* schedule ( double time , int event_type , int object_type , int object_id , int object_node ) ;
Overloaded Method: schedule
Summary: Schedule an event at the present or a future simulated time for any
         simulation object (C_SIMOBJ) in the simulation
Description: For reusability, prefer scheduling events in the process user
             code of events (C_EVENTs). See the schedule methods in C_EVENT.
Return: the message for this scheduled event
time
IN: simulated time as a double (ie, no priority fields).
event_type
IN: enumerated or integer type of event to schedule.
object_type
IN: enumerated or integer type of object for which to schedule the event (must be the one type of object required for the event_type).
object_id
IN: the LOCAL_ID of the object for which to schedule the event.
object_node
IN: the NODE of the object for which to schedule the event.
void* schedule ( const SIMTIME& time , int event_type , int object_type , int object_id , int object_node , int size , char*& buf ) ;
Overloaded Method: schedule
Summary: Schedule an event at the present or a future simulated time for any
         simulation object (C_SIMOBJ) in the simulation
Description: For reusability, prefer scheduling events in the process user
             code of events (C_EVENTs). See the schedule methods in C_EVENT.
Return: the message for this event
time
IN: simulated time.
event_type
IN: enumerated or integer type of event to schedule.
object_type
IN: enumerated or integer type of object for which to schedule the event (must be the one type of object required for the event_type).
object_id
IN: the LOCAL_ID of the object for which to schedule the event.
object_node
IN: the NODE of the object for which to schedule the event.
size
IN: (OPTIONAL) number of bytes of the variable-length part of the event message.
buf
IN: (USED IF AND ONLY IF "size" IS USED) the variable-length part of the event message.
void set_GLOBAL_ID ( int i ) ;
Method: set_GLOBAL_ID
Summary: Set the unique ID, simulaiton-wide, of this object. GLOBAL_ID
         generated automatically, but can be overridden by the user with this
         method.
Description: 
Return: None
void set_LOCAL_ID ( int i ) ;
INTERNAL METHOD
void set_NAME ( char* n ) ;
INTERNAL METHOD
void set_NODE ( int nd ) ;
INTERNAL METHOD
void set_N_NODES ( int nds ) ;
INTERNAL METHOD
void set_N_OBJECT_TYPES ( int nt ) ;
INTERNAL METHOD
void set_OBJECT_TYPE ( int obtyp ) ;
INTERNAL METHOD
void set_RANDOM ( C_RANDOM* r ) ;
INTERNAL METHOD
void set_SEED ( int sd ) ;
INTERNAL METHOD
void set_TIME ( SIMTIME& tt ) ;
INTERNAL METHOD
void set_TOTAL_OBJECTS ( int to ) ;
INTERNAL METHOD
void set_evtype ( void* e ) ;
INTERNAL METHOD
void set_init_event_queue ( C_QUEUE* qi ) ;
INTERNAL METHOD
void set_last_etype ( int e ) ;
INTERNAL METHOD
void set_obman ( C_OBJECT_TYPES* ob ) ;
INTERNAL METHOD
void set_rbq ( C_RBQ* r ) ;
INTERNAL METHOD
void set_rq_holder ( C_RQ_HOLDER* rqh ) ;
INTERNAL METHOD
void set_rqueue ( C_RQUEUE* rq ) ;
INTERNAL METHOD
void set_uid_seed ( int sd ) ;
INTERNAL METHOD
virtual void terminate ( double ) ;
Virtual Method: terminate
Summary: User-overridable function for operations (such as printing
         statistics) associated with this simulation object to be performed
         when the simulation completes
Description: 
Return: None
The simulation passes the end time of the simulation here (tend). Using this value is of course optional.
void unblock ( int soc ) ;
INTERNAL METHOD
soc
IN: the socket ID to unblock.
void update_block () ;
INTERNAL METHOD
static void add_block ( C_ITEM* it ) ;
INTERNAL METHOD
it
IN: the event after which the current event is to be inserted.
static void add_unblock ( C_ITEM* it ) ;
INTERNAL METHOD
it
IN: the event after which the current event is to be inserted.
static C_QUEUE* get_qblock () ;
INTERNAL METHOD

Protected Interface

Protected Data

C_XQUEUE EXTSUBS;
Requested external subscriptions.
int GLOBAL_ID;
Unique id for simulation.
char* NAME;
Name of object.
static int NODE;
Node id.
static int N_NODES;
The total number of nodes.
static int N_OBJECT_TYPES;
Number of object types.
int OBJECT_TYPE;
Object type.
static C_RANDOM* RANDOM;
Shared random number generator.
STATE_INT SEED;
Random number SEED.
SIMTIME TIME;
Time of object GEB3.
static int TOTAL_OBJECTS;
Total number of objects created.
int id;
Local object id.
static C_RBQ* rbq;
Roll back queue object.

Private Interface

Private Data

C_XHASH* EventHandlerHash;
Manages event handlers.
C_XQUEUE cancel_queue;
Queue of canceled events.
static int done;
Done flag (first simobj created).
C_DBL_QUEUE evtq;
Event queue for object.
static void* evtype;
Evtype manages event creation.
static C_QUEUE* init_events;
Initial event queue.
int last_etype;
Last event type of object.
C_RQUEUE local_rqueue;
Speedes queue for this object.
static int nlobjs;
Number of local objects.
static C_OBJECT_TYPES* obman;
Object manager constructor.
static C_QUEUE* qblock;
Queue of blocking events.
C_QUEUE qmon;
Queue of external monitors.
static C_QUEUE* qunblock;
Queue of unblocking events.
C_RQ_HOLDER* rq_holder;
Rqueue holder for the object.
static C_RQUEUE* rqueue;
Speedes queue for local objects.
static int uid_seed;
Unique id for this object.

toc

ROLLBACKABLE OPERATIONS------------------------------------+

Metric Summary for ROLLBACKABLE OPERATIONS------------------------------------+

Total number of classes726% of total
Total number of statements12321% of total
Total number of free standing functions00% of total
Average statements per class18-10% from average
Average McCabe complexity per class11-25% from average
Average number of public member functions per class11-50% from average
Average number of protected member functions per class0-100% from average
Average number of parameters per function0.7-15% from average
Average number of statements per function1.716% from average
Percent of functions documented14%-82% from average

Class Metrics

ClassPublic MembersStatementsMcCabe Complexity
STATE_INT213222
RB_ostream143516
STATE_DOUBLE121813
STATE_FLOAT121813
STATE_POINTER7138
STATE_STRING966
BASE_STATE111

Function Metrics

ClassStatementsMcCabe Complexity
RB_ostream::initAltStream82
STATE_DOUBLE::assign72
STATE_FLOAT::assign72
STATE_INT::assign72
STATE_POINTER::assign72
RB_ostream::RB_ostream42
STATE_INT::Exchange41
RB_ostream::RB_ostream31
STATE_INT::operator delete21
STATE_INT::operator new21
RB_ostream::operator<<21
RB_ostream::operator<<21
RB_ostream::operator<<21
RB_ostream::operator<<21
RB_ostream::operator<<21
RB_ostream::operator<<21
RB_ostream::operator<<21
RB_ostream::operator<<21
RB_ostream::operator<<21
STATE_POINTER::STATE_POINTER11
STATE_INT::STATE_INT11
STATE_DOUBLE::STATE_DOUBLE11
STATE_STRING::STATE_STRING11
STATE_FLOAT::STATE_FLOAT11
STATE_STRING::~STATE_STRING11
STATE_STRING::operator=11
STATE_DOUBLE::operator=11
STATE_FLOAT::operator=11
STATE_INT::operator=11
STATE_POINTER::operator=11
STATE_POINTER::operator char*11
STATE_STRING::operator char*11
STATE_DOUBLE::operator double11
STATE_FLOAT::operator float11
STATE_INT::operator int11
STATE_POINTER::operator void*11
STATE_INT::operator%=11
STATE_INT::operator&=11
STATE_DOUBLE::operator*=11
STATE_FLOAT::operator*=11
STATE_INT::operator*=11
STATE_INT::operator++11
STATE_DOUBLE::operator++11
STATE_FLOAT::operator++11
STATE_DOUBLE::operator+=11
STATE_FLOAT::operator+=11
STATE_INT::operator+=11
STATE_INT::operator--11
STATE_DOUBLE::operator--11
STATE_FLOAT::operator--11
STATE_DOUBLE::operator-=11
STATE_FLOAT::operator-=11
STATE_INT::operator-=11
STATE_DOUBLE::operator/=11
STATE_FLOAT::operator/=11
STATE_INT::operator/=11
RB_ostream::operator<<11
RB_ostream::operator<<11
STATE_INT::operator<<=11
STATE_INT::operator>>=11
STATE_INT::operator^=11
STATE_INT::operator|=11
STATE_INT::print11
STATE_DOUBLE::print11
STATE_FLOAT::print11
STATE_STRING::print11
STATE_POINTER::print11
STATE_INT::print11
STATE_DOUBLE::print11
STATE_FLOAT::print11
STATE_STRING::print11
STATE_POINTER::print11
BASE_STATE::set_rbq11
STATE_STRING::EraseString00
STATE_STRING::SetNoRollback00
STATE_STRING::assign00

toc >>

class BASE_STATE

#include "state_variable.H"

INTERNAL METHODSummary: Holds the C_RBQ (rollback queue manager) for all the rollbackable
           classes that inherit from this
  Description: 

Public Interface

void set_rbq ( C_RBQ* r ) ;

Protected Interface

Protected Data

static C_RBQ* rbq;

<<toc >>

class RB_ostream : public BASE_STATE

#include "state_variable.H"

Class: RB_ostream
Summary: Rollbackable ostream
Description: Use this just as you would a normal ostream when that ostream
             is part of the state of a C_SIMOBJ or non-C_SIMOBJ object (ie,
             when it needs to be rollbackable)

Public Interface

RB_ostream RB_ostream operator<<
operator<< operator<< operator<<
operator<< operator<< operator<<
operator<< operator<< operator<<
operator<< initAltStream

Public Interface

RB_ostream ( RB_ostream::ostream* targetOutStream = & cout ) ;
RB_ostream ( char* fname ) ;
alt_ostream& operator<< ( IO_Manipulator f ) ;
alt_ostream& operator<< ( const char* s ) ;
alt_ostream& operator<< ( double x ) ;
alt_ostream& operator<< ( float x ) ;
alt_ostream& operator<< ( int i ) ;
alt_ostream& operator<< ( long i ) ;
alt_ostream& operator<< ( short i ) ;
alt_ostream& operator<< ( unsigned int i ) ;
alt_ostream& operator<< ( unsigned long i ) ;
alt_ostream& operator<< ( unsigned short i ) ;
alt_ostream& operator<< ( void* pt ) ;
alt_ostream& initAltStream () ;

Private Interface

Private Data

ofstream filestream;
ostream* outstream;
Either a file or cout.
int toFile_p;
Is output going to a file?

<<toc >>

class STATE_DOUBLE : public BASE_STATE

#include "state_variable.H"

State_double object.

Class: STATE_DOUBLE (typedef'd to RB_double)
Summary: Rollbackable double
Description: Use this just as you would a normal double when that double
             is part of the state of a C_SIMOBJ or non-C_SIMOBJ object (ie,
             when it needs to be rollbackable)

Public Interface

STATE_DOUBLE operator= operator double
operator*= operator++ operator+=
operator-- operator-= operator/=
assign print print

Public Interface

STATE_DOUBLE () ;
double operator= ( double d ) ;
operator double () ;
...... Conversion method allows this object to be used as a double.
double operator*= ( double d ) ;
double operator++ () ;
double operator+= ( double d ) ;
double operator-- () ;
double operator-= ( double d ) ;
double operator/= ( double d ) ;
double assign ( double d ) ;
void print ( char* s ) ;
void print () ;
...... Other methods.

Public Data

double state_variable;

<<toc >>

class STATE_FLOAT : public BASE_STATE

#include "state_variable.H"

Class: STATE_FLOAT (typedef'd to RB_float)
Summary: Rollbackable float
Description: Use this just as you would a normal float when that float
             is part of the state of a C_SIMOBJ or non-C_SIMOBJ object (ie,
             when it needs to be rollbackable)

Public Interface

STATE_FLOAT operator= operator float
operator*= operator++ operator+=
operator-- operator-= operator/=
assign print print

Public Interface

STATE_FLOAT () ;
float operator= ( float d ) ;
operator float () ;
...... Conversion method allows this object to be used as a double.
float operator*= ( float d ) ;
float operator++ () ;
float operator+= ( float d ) ;
float operator-- () ;
float operator-= ( float d ) ;
float operator/= ( float d ) ;
double assign ( float d ) ;
void print ( char* s ) ;
void print () ;
...... Other methods.

Public Data

float state_variable;

<<toc >>

class STATE_INT : public BASE_STATE

#include "state_variable.H"

Class: STATE_INT (typedef'd to RB_int)
Summary: Rollbackable integer
Description: Use this just as you would a normal integer when that integer
             is part of the state of a C_SIMOBJ or non-C_SIMOBJ object (ie,
             when it needs to be rollbackable)

Public Interface

STATE_INT operator= operator delete
operator int operator new operator%=
operator&= operator*= operator++
operator+= operator-- operator-=
operator/= operator<<= operator>>=
operator^= operator|= Exchange
assign print print

Public Interface

STATE_INT () ;
int operator= ( int i ) ;
void operator delete ( void* p ) ;
operator int () ;
...... Conversion method allows this object to be used as an int.
void* operator new ( size_t s , int n = 1 ) ;
...... Overloading new and delete operators.
int operator%= ( int i ) ;
int operator&= ( int i ) ;
int operator*= ( int i ) ;
int operator++ () ;
int operator+= ( int i ) ;
int operator-- () ;
int operator-= ( int i ) ;
int operator/= ( int i ) ;
int operator<<= ( int i ) ;
int operator>>= ( int i ) ;
int operator^= ( int i ) ;
int operator|= ( int i ) ;
void Exchange ( int& var ) ;
int assign ( int i ) ;
void print ( char* s ) ;
void print () ;
...... Other methods.

Public Data

int state_variable;

<<toc >>

class STATE_POINTER : public BASE_STATE

#include "state_variable.H"

State_pointer object.

Description: Use this just as you would a normal  when that 
             is part of the state of an C_SIMOBJ or non-C_SIMOBJ object (ie,
             when it needs to be rollbackable)

Class: STATE_POINTER (typedef'd to RB_pointer)
Summary: Rollbackable pointer
Description: Use this just as you would a normal void or character pointer on
             the right-hand side of equations when that pointer is part of
             the state of a C_SIMOBJ or non-C_SIMOBJ object (ie, when it
             needs to be rollbackable). In addition to regular use on the
             right-hand side of equations as a void or character pointer,
             this object can be rollbackably set equal to another void
             pointer using the = operator. The = operator is the only
             left-hand side of equations operator supported.

Public Interface

STATE_POINTER operator= operator char*
operator void* assign print
print

Public Interface

STATE_POINTER () ;
void* operator= ( void* v ) ;
operator char* () ;
operator void* () ;
...... Conversion method allows this object to be used as a void* or char.
void* assign ( void* p ) ;
void print ( char* s ) ;
void print () ;
...... Other methods.

Public Data

void* state_variable;

<<toc

class STATE_STRING : public BASE_STATE

#include "state_variable.H"

State_string object.

Class: STATE_STRING (typedef'd to RB_string)
Summary: Rollbackable character pointer
Description: Use this just as you would a normal character pointer on the
             right-hand side of equations when that character pointer is part
             of the state of a C_SIMOBJ or non-C_SIMOBJ object (ie, when it
             needs to be rollbackable). In addition to regular use on the
             right-hand side of equations as a character pointer, this object
             can be set equal to another character pointer using the =
             operator, and the string that the other character pointer points
             to will be rollbackably copied to this character pointer. Memory
             management is handled automatically. The = operator is the only
             left-hand side of equations operator supported.

Public Interface

STATE_STRING ~STATE_STRING operator=
operator char* EraseString SetNoRollback
assign print print

Public Interface

STATE_STRING () ;
~STATE_STRING () ;
char* operator= ( char* v ) ;
operator char* () ;
...... Conversion method allows this object to be used as a char.
void EraseString () ;
void SetNoRollback ( char* s ) ;
char* assign ( char* s ) ;
void print ( char* s ) ;
void print () ;
...... Other methods.

Public Data

char* state_variable;

toc

SIMULATED TIME---------------------------------------------------------+

Metric Summary for SIMULATED TIME---------------------------------------------------------+

Total number of classes13% of total
Total number of statements7713% of total
Total number of free standing functions730% of total
Average statements per class69253% from average
Average McCabe complexity per class44193% from average
Average number of public member functions per class3455% from average
Average number of protected member functions per class0-100% from average
Average number of parameters per function1.249% from average
Average number of statements per function1.929% from average
Percent of functions documented76%-9% from average

Class Metrics

ClassPublic MembersStatementsMcCabe Complexity
SIMTIME346944

Function Metrics

ClassStatementsMcCabe Complexity
SIMTIME::operator<95
SIMTIME::operator>95
SIMTIME::operator==53
SIMTIME::operator=41
SIMTIME::operator+=41
SIMTIME::operator-=41
SIMTIME::SetValues31
SIMTIME::operator=21
SIMTIME::operator+=21
SIMTIME::operator-=21
operator<<21
SIMTIME::SetPriority21
SIMTIME::SIMTIME11
SIMTIME::operator double11
SIMTIME::operator!=11
operator!=11
SIMTIME::operator!=11
SIMTIME::operator<11
operator<11
SIMTIME::operator<=11
operator<=11
SIMTIME::operator<=11
SIMTIME::operator==11
operator==11
SIMTIME::operator>11
operator>11
SIMTIME::operator>=11
operator>=11
SIMTIME::operator>=11
SIMTIME::DecrementPriority111
SIMTIME::DecrementPriority211
SIMTIME::GetPriority111
SIMTIME::GetPriority211
SIMTIME::GetTime11
SIMTIME::IncrementPriority111
SIMTIME::IncrementPriority211
SIMTIME::SetPriority11
SIMTIME::SetPriority111
SIMTIME::SetPriority211
SIMTIME::SetTime11
SIMTIME::print11

toc

class SIMTIME

#include "simtime.H"

Class: SIMTIME
Summary: An abstract representation of simulated time
Description: SIMTIME uses a double for representing the physical time and
             then two integer priority fields for breaking physical time
             ties. This is for repeatability when on multiple nodes and
             rollbacks are involved. Since rollbacks are not repeatable, when
             events are rescheduled, there must be a way to order them the
             same way each time they are reprocessed. Since physical times
             are often the same, priorities are needed to indicate the order
             in which events which have the same physical time are to be
             processed. The first priority field has precedence over the
             second priority field. The combination of the physical time and
             the two priority fields is called logical time. Repeatable
             rollbackable simulations are assured only if events always
             schedule new events in future logical time. In other words,
             scheduling must either have physical time non-zero lookahead, or
             physical time zero lookahead with higher priority values
             (meaning later logical time) than the priorities of the current
             event.

Public Interface

SIMTIME operator= operator=
operator double operator!= operator!=
operator+= operator+= operator-=
operator-= operator< operator<
operator<= operator<= operator==
operator== operator> operator>
operator>= operator>= DecrementPriority1
DecrementPriority2 GetPriority1 GetPriority2
GetTime IncrementPriority1 IncrementPriority2
SetPriority SetPriority SetPriority1
SetPriority2 SetTime SetValues
print

Public Interface

SIMTIME ( double t = DefaultTime , int p1 = DefaultPriority1 , int p2 = DefaultPriority2 ) ;
Constructor: SIMTIME (same as SetValues ())
Summary: Set the three values in the SIMTIME object
Description: The three values are 1. physical time, 2. first priority
             field, 3. second priority field.
t
Physical time.
p1
First priority field.
p2
Second priority field.
SIMTIME& operator= ( const SIMTIME& tt ) ;
Method: operator =
Summary: When assigned to another SIMTIME, this SIMTIME undergoes an
         element-by-element copy, INCLUDING CHANGING ITS PRIORITIES
Description: 
Return: A reference to this SIMTIME object
SIMTIME& operator= ( double t ) ;
Method: operator =
Summary: When assigned to a double, SIMTIME assigns that double to its
         physical time WITHOUT CHANGING ITS PRIORITIES
Description: 
Return: A reference to this SIMTIME object
operator double () const;
Method: operator double
Summary: When used as a primitive, SIMTIME automatically converts to a double
         representing its physical time
Description: 
Return: The physical time
int operator!= ( double t ) const;
int operator!= ( const SIMTIME& tt ) const;
Method: operator !=
Summary: Perform a not-equal logical time comparison between this SIMTIME and
         another SIMTIME
Description: That this is a logical time comparison means that the physical
             time is compared and if they are equal, the first priority
             fields are compared and if they are equal, the second priority
             fields are compared
Return: Whether this SIMTIME is not equal to the specified SIMTIME in logical
        time
SIMTIME& operator+= ( SIMTIME& tt ) ;
Method: operator +=
Summary: When add-assigned to another SIMTIME, SIMTIME adds that double to
         its physical time INCLUDING CHANGING ITS PRIORITIES
Description: 
Return: A reference to this SIMTIME object
SIMTIME& operator+= ( double t ) ;
Method: operator +=
Summary: When add-assigned to a double, SIMTIME adds that double to its
         physical time WITHOUT CHANGING ITS PRIORITIES
Description: 
Return: A reference to this SIMTIME object
SIMTIME& operator-= ( SIMTIME& tt ) ;
Method: operator -=
Summary: When substract-assigned to another SIMTIME, SIMTIME subtracts that
         double from its physical time INCLUDING CHANGING ITS PRIORITIES
Description: 
Return: A reference to this SIMTIME object
SIMTIME& operator-= ( double t ) ;
Method: operator -=
Summary: When subtract-assigned to a double, SIMTIME subtracts that double
         from its physical time WITHOUT CHANGING ITS PRIORITIES
Description: 
Return: A reference to this SIMTIME object
int operator< ( const SIMTIME& tt ) const;
Method: operator <
Summary: Perform a less-than logical time comparison between this SIMTIME and
         another SIMTIME
Description: That this is a logical time comparison means that the physical
             time is compared and if they are equal, the first priority
             fields are compared and if they are equal, the second priority
             fields are compared
Return: Whether this SIMTIME is earlier than the specified SIMTIME in
        logical time
int operator< ( double t ) const;
Comparison operators between a SIMTIME and a double.
int operator<= ( double t ) const;
int operator<= ( const SIMTIME& tt ) const;
Method: operator <=
Summary: Perform a less-than-or-equal logical time comparison between this
         SIMTIME and another SIMTIME
Description: That this is a logical time comparison means that the physical
             time is compared and if they are equal, the first priority
             fields are compared and if they are equal, the second priority
             fields are compared
Return: Whether this SIMTIME is earlier or equal to the specified SIMTIME in
        logical time
int operator== ( double t ) const;
int operator== ( const SIMTIME& tt ) const;
Method: operator ==
Summary: Perform an equality logical time comparison between this SIMTIME and
         another SIMTIME
Description: That this is a logical time comparison means that the physical
             time is compared and if they are equal, the first priority
             fields are compared and if they are equal, the second priority
             fields are compared
Return: Whether this SIMTIME is equal to the specified SIMTIME in logical
        time
int operator> ( double t ) const;
int operator> ( const SIMTIME& tt ) const;
Method: operator >
Summary: Perform a greater-than logical time comparison between this SIMTIME
         and another SIMTIME
Description: That this is a logical time comparison means that the physical
             time is compared and if they are equal, the first priority
             fields are compared and if they are equal, the second priority
             fields are compared
Return: Whether this SIMTIME is later than the specified SIMTIME in
        logical time
int operator>= ( double t ) const;
int operator>= ( const SIMTIME& tt ) const;
Method: operator >=
Summary: Perform a greater-than-or-equal logical time comparison between this
         SIMTIME and another SIMTIME
Description: That this is a logical time comparison means that the physical
             time is compared and if they are equal, the first priority
             fields are compared and if they are equal, the second priority
             fields are compared
Return: Whether this SIMTIME is later or equal to the specified SIMTIME in
        logical time
void DecrementPriority1 ( int value = 1 ) ;
Method: DecrementPriority1
Summary: Subtract a specified amount from the first priority field (default=1)
Description: 
Return: None
value
Amount to subtract from first priority field.
void DecrementPriority2 ( int value = 1 ) ;
Method: DecrementPriority2
Summary: Subtract a specified amount from the second priority field (default=1)
Description: 
Return: None
value
Amount to subtract from second priority field.
int GetPriority1 () const;
Method: GetPriority1
Summary: Get the first priority field
Description: 
Return: The first priority field value
int GetPriority2 () const;
Method: GetPriority2
Summary: Get the second priority field
Description: 
Return: The second priority field 
double GetTime () const;
Method: GetTime
Summary: Get the physical time
Description: 
Return: The physical time
void IncrementPriority1 ( int value = 1 ) ;
Method: IncrementPriority1
Summary: Add a specified amount to the first priority field (default=1)
Description: 
Return: None
value
Amount to add to first priority field.
void IncrementPriority2 ( int value = 1 ) ;
Method: IncrementPriority2
Summary: Add a specified amount to the second priority field (default=1)
Description: 
Return: None
value
Amount to add to first priority field.
void SetPriority ( int p1 ) ;
Overloaded Method: SetPriority (same as SetPriority1)
Summary: Set the first priority field
Description: 
Return: None
p1
First priority field value.
void SetPriority ( int p1 , int p2 ) ;
Overloaded Method: SetPriority
Summary:  Set the first and second priority fields
Description: 
Return: None
p1
First priority field value.
p2
Second priority field value.
void SetPriority1 ( int p ) ;
Method: SetPriority1 (same as SetPriority)
Summary: Set the first priority field
Description: 
Return: None
p
First priority field value.
void SetPriority2 ( int p ) ;
Method: SetPriority2
Summary: Set the second priority field
Description: 
Return: None
p
Second priority field value.
void SetTime ( double t ) ;
Method: SetTime
Summary: Set the physical time
Description: 
Return: None
t
Physical time.
void SetValues ( double t = DefaultTime , int p1 = DefaultPriority1 , int p2 = DefaultPriority2 ) ;
Method: SetValues
Summary: Set the three values in the SIMTIME object
Description: The three values are 1. physical time, 2. first priority
             field, 3. second priority field.
Return: None
t
Physical time.
p1
First priority field.
p2
Second priority field.
void print ( ostream& out = cout ) ;
Method: print
Summary: Print the SIMTIME object's values
Description: 
Return: None
out
Ostream object to which to print.

Protected Interface

Protected Data

NET_INT Priority1;
First tie breaker.
NET_INT Priority2;
Second tie breaker.
NET_DOUBLE Time;
Physical time.

operator!= #include "simtime.H"
int operator!=(double t , const SIMTIME& tt ) ;

operator< #include "simtime.H"
int operator<(double t , const SIMTIME& tt ) ;
Operators when the double is on the left side.

operator<< #include "simtime.H"
ostream& operator<<(ostream& out , const SIMTIME& tt ) ;
Method: operator <<
Summary: Print the comtents of this SIMTIME to an ostream
Description: 
Return: The specified ostream
out
The ostream to which to print.
tt
SIMTIME to print.

operator<= #include "simtime.H"
int operator<=(double t , const SIMTIME& tt ) ;

operator== #include "simtime.H"
int operator==(double t , const SIMTIME& tt ) ;

operator> #include "simtime.H"
int operator>(double t , const SIMTIME& tt ) ;

operator>= #include "simtime.H"
int operator>=(double t , const SIMTIME& tt ) ;

toc

Utilities

Metric Summary for Utilities

Total number of classes1453% of total
Total number of statements15527% of total
Total number of free standing functions1252% of total
Average statements per class10-50% from average
Average McCabe complexity per class8-47% from average
Average number of public member functions per class17-21% from average
Average number of protected member functions per class0-100% from average
Average number of parameters per function0.7-12% from average
Average number of statements per function1.3-11% from average
Percent of functions documented90%9% from average

toc

MISCELLANEOUS----------------------------------------------------------+

Metric Summary for MISCELLANEOUS----------------------------------------------------------+

Total number of classes519% of total
Total number of statements508% of total
Total number of free standing functions00% of total
Average statements per class10-49% from average
Average McCabe complexity per class7-51% from average
Average number of public member functions per class21-3% from average
Average number of protected member functions per class0-100% from average
Average number of parameters per function0.914% from average
Average number of statements per function1.4-2% from average
Percent of functions documented95%15% from average

Class Metrics

ClassPublic MembersStatementsMcCabe Complexity
DATA_PARSER371310
C_RANDOM33128
C_FREE_LIST16137
STOPWATCH1287
C_HOLDER845

Function Metrics

ClassStatementsMcCabe Complexity
DATA_PARSER::GetNextType42
C_FREE_LIST::CopyType41
C_FREE_LIST::set_type41
C_RANDOM::set_gauss31
DATA_PARSER::GetFirstType21
STOPWATCH::Reset21
C_RANDOM::set_float_limits21
C_RANDOM::set_int_limits21
DATA_PARSER::GetMark11
C_FREE_LIST::GetName11
C_FREE_LIST::GetNames11
DATA_PARSER::GetNdefines11
DATA_PARSER::GetNtypes11
C_FREE_LIST::GetNtypes11
DATA_PARSER::GetNumReferences11
DATA_PARSER::GetSetName11
DATA_PARSER::GoToType11
DATA_PARSER::SetMark11
STOPWATCH::UseClockTime11
STOPWATCH::UseWallTime11
C_FREE_LIST::delete_list11
STOPWATCH::get_CumulativeClockTime11
STOPWATCH::get_CumulativeTime11
C_HOLDER::get_buff11
STOPWATCH::get_name11
C_HOLDER::get_node11
C_RANDOM::get_seed11
C_HOLDER::get_size11
C_FREE_LIST::get_size11
STOPWATCH::print11
C_RANDOM::set_exp11
C_RANDOM::set_fast11
C_HOLDER::set_node11
C_RANDOM::set_seed11
C_RANDOM::set_slow11
C_HOLDER::C_HOLDER01
C_RANDOM::C_RANDOM00
C_FREE_LIST::C_FREE_LIST00
STOPWATCH::STOPWATCH00
DATA_PARSER::DATA_PARSER00
C_HOLDER::C_HOLDER00
DATA_PARSER::~DATA_PARSER00
STOPWATCH::~STOPWATCH00
DATA_PARSER::Find00
DATA_PARSER::GetArraySize00
DATA_PARSER::GetDefine00
DATA_PARSER::GetEnum00
DATA_PARSER::GetFirstDefine00
DATA_PARSER::GetFloat00
DATA_PARSER::GetInt00
DATA_PARSER::GetLogical00
DATA_PARSER::GetNextDefine00
DATA_PARSER::GetNtypes00
DATA_PARSER::GetNumElements00
DATA_PARSER::GetNumSetsInGroup00
DATA_PARSER::GetReferenceName00
DATA_PARSER::GetString00
DATA_PARSER::GetType00
DATA_PARSER::GoTo00
DATA_PARSER::GoToFirstElement00
DATA_PARSER::GoToFirstReference00
DATA_PARSER::GoToNextElement00
DATA_PARSER::GoToNextReference00
DATA_PARSER::MoveIn00
DATA_PARSER::MoveOut00
DATA_PARSER::MoveOutCompletely00
DATA_PARSER::MoveToFirstSetInGroup00
DATA_PARSER::MoveToNextSetInGroup00
STOPWATCH::StartTimer00
STOPWATCH::StopTimer00
C_RANDOM::compute_beta_fF00
C_FREE_LIST::delete_list00
C_FREE_LIST::delete_object00
C_FREE_LIST::delete_object00
C_RANDOM::erf00
C_RANDOM::fact00
C_FREE_LIST::generate00
C_HOLDER::get00
C_RANDOM::get_random_beta00
C_RANDOM::get_random_bit00
C_RANDOM::get_random_bits00
C_RANDOM::get_random_exp00
C_RANDOM::get_random_float00
C_RANDOM::get_random_float00
C_RANDOM::get_random_gauss00
C_RANDOM::get_random_int00
C_RANDOM::get_random_int100
C_RANDOM::get_random_mag_vector00
C_RANDOM::get_random_unit_vector00
C_FREE_LIST::get_size00
C_RANDOM::his_bit00
C_RANDOM::his_double00
C_RANDOM::his_exp00
C_RANDOM::his_gauss00
C_RANDOM::his_int00
C_RANDOM::his_int100
C_RANDOM::inverse_erf00
C_FREE_LIST::new_object00
C_RANDOM::print00
C_FREE_LIST::print00
STOPWATCH::print00
DATA_PARSER::print00
C_RANDOM::print_cycle00
C_HOLDER::set00
C_RANDOM::set_beta00
C_FREE_LIST::set_ntypes00

toc >>

class C_FREE_LIST

#include "free_list.H"

Class: C_FREE_LIST
Summary: Manager of all of the freelists on a node
Description: This class can manage multiple freelist object types (ie, manage
             many freelists, each with a separate freelist type ID
             corresponding to a C++ class). new_object () and delete_object()
             are the fundamental calls for the C_FREELIST class. They replace
             calling new and delete directly by saving no-longer-needed
             objects when calling delete_object() and then returning pointers
             to those no-longer-needed objects when calling new_object()
             (which is much faster than dynamically allocating a new one) if
             possible. If a freelist object type has no available old copies,
             then calling new_object() dynamically creates a new one and
             returns it. The name "freelist" refers to the list of currently
             no-longer-needed, but not deleted, objects that are available
             for future use.

Public Interface

C_FREE_LIST CopyType GetName
GetNames GetNtypes delete_list
delete_list delete_object delete_object
generate get_size get_size
new_object print set_ntypes
set_type

Public Interface

C_FREE_LIST () ;
void CopyType ( char* NewName , int NewType , int OldType ) ;
Method: CopyType
Summary: Create a new freelist type with a new name by copying the
         constructor, size and neach attributes from an old (already
         existing) freelist type
Description: 
Return: None
NewName
Name of new freelist type.
NewType
Type ID of new type.
OldType
Type ID of old type.
char* GetName ( int i ) ;
Method: GetName
Summary: Get the name of the i'th freelist
Description: 
Return: The name of the i'th freelist
i
Element ordering of the desired freelist name.
char** GetNames () ;
Method: GetNames
Summary: Get a pointer to the first element of the array of names of
         freelists
Description: 
Return: Freelist name array
int GetNtypes () ;
Method: GetNtypes
Summary: Get the number of type IDs of freelists
Description: 
Return: The number of type IDs of freelists (ntypes)
void delete_list ( C_QUEUE* q ) ;
the freelist's freelist object type ID
into which this object is to be placed 
void delete_list ( C_QUEUE* q , int type ) ;
Method: delete_list
Summary: Add a list of objects back into a free list
Description: 
Return: None
q
Object list to delete.
type
Objec\t type ID to delete.
void delete_object ( void* object ) ;
Overloaded Method: delete_object
Summary: Put a no longer needed object, whose state currently contains a
         freelist object type ID, into its freelist
Description: This and new_object() are the fundamental calls for the
             C_FREELIST class. They replace calling new and delete directly
             by saving no-longer-needed objects when calling delete_object()
             and then returning pointers to those no-longer-needed objects
             when calling new_object() (which is much faster than dynamically
             allocating a new one) if possible. If a freelist object type has
             no available old copies, then calling new_object() dynamically
             creates a new one and returns it. The name "freelist" refers to
             the list of currently no-longer-needed, but not deleted, objects
             that are available for future use.  Returned objects are casted
             to (void *) and are not necessarily in their initialized
             state. Use this version of this method when the object already
             has a freelist object type ID. If this object has used the other
             version of this method before, then this version can be used
             thereafter. Or, if its freelist object type ID has been set by
             some other means, this version can be used.
Return: None
object
Object to put into its freelist, casted to (void *).
void delete_object ( void* object , int type ) ;
Overloaded Method: delete_object
Summary: Put a no longer needed object, which has possibly never participated
         in freelists before, into a freelist specified by freelist object
         type ID
Description: This and new_object() are the fundamental calls for the
             C_FREELIST class. They replace calling new and delete directly
             by saving no-longer-needed objects when calling delete_object()
             and then returning pointers to those no-longer-needed objects
             when calling new_object() (which is much faster than dynamically
             allocating a new one) if possible. If a freelist object type has
             no available old copies, then calling new_object() dynamically
             creates a new one and returns it. The name "freelist" refers to
             the list of currently no-longer-needed, but not deleted, objects
             that are available for future use.  Returned objects are casted
             to (void *) and are not necessarily in their initialized
             state. Use this version of this method when the object does not
             yet have (or may not have) a freelist object type ID, but is the
             type associated with the specified freelist object type ID. If
             this object has never set its freelist object type ID and has
             never been the calling argument in this version of this method
             before, then this version must be used, and then the other
             version of this method can be used thereafter.
Return: None
object
An object of the type associated with the freelist object type ID specified by this method's second argument, casted to (*void).
type
The freelist's freelist object type ID into which this object is to be placed.
void* generate ( char* buff ) ;
Objec\t type ID to delete.
buff
Buffer from which to generate an object.
int get_size ( int type ) ;
Overloaded Method: get_size
Summary: Get the size of a freelist object type
Description: 
Return: The size of the specified freelist object type
type
Freelist object type ID.
int get_size ( void* object ) ;
Overloaded Method: get_size
Summary: Get the size of a freelist object type
Description: The specified object must inherit from C_ITEM, or SPEEDES has
             undefined behavior. If it is a C_ITEM but not part of a
             freelist, -1 is returned.
Return: The size of the freelist object type of the specified object, or -1
        if this object is not part of a freelist
object
Pointer to an object, casted to void.
void* new_object ( int type ) ;
Method: new_object
Summary: Get or construct an object of an existing freelist object type ID
Description: This and delete_object() are the fundamental calls for the
             C_FREELIST class. They replace calling new and delete directly
             by saving no-longer-needed objects when calling delete_object()
             and then returning pointers to those no-longer-needed objects
             when calling new_object() (which is much faster than dynamically
             allocating a new one) if possible. If a freelist object type has
             no available old copies, then calling new_object() dynamically
             creates a new one and returns it. The name "freelist" refers to
             the list of currently no-longer-needed, but not deleted, objects
             that are available for future use.  Returned objects are casted
             to (void *) and are not necessarily in their initialized state.
Return: An object of the specified type
type
An existing freelist object type ID.
void print ( ostream& out = cout ) ;
Method: print
Summary: Print out status information for the free list
Description: 
Return: None
out
Ostream to which to print.
void set_ntypes ( int n ) ;
Method: set_ntypes
Summary: Set (and create) n types of freelist objects
Description: When called the first time, this function allocates an array of
             n elements of size, neach, ncreated, name, constructor,
             qfree. These are the necessary attributes for each freelist
             object type. When called after the first time, it moves these
             arrays to new places in memory and adds or subtracts elements to
             the new array.
Return: None
n
Number of freelist types.
void set_type ( char* nam , int type , void* (* f ) ( int ) , int sz , int n ) ;
Method: set_type
Summary: Sets the name, constructor, size, and neach for a specified freelist
         object type
Description: 
Return: None

Private Interface

Private Data

void** constructor;
char** name;
int* ncreated;
int* neach;
int ntypes;
C_QUEUE* qfree;
int* size;

<<toc >>

class C_HOLDER : public C_ITEM

#include "holder.H"

Class: C_HOLDER 
Summary: A C_ITEM with an size-unlimited character buffer in it and the
         node to which it is supposed to arrive when sent as a message

Public Interface

C_HOLDER C_HOLDER get
get_buff get_node get_size
set set_node

Public Interface

C_HOLDER () ;
C_HOLDER ( char* b , int s , int n ) ;
Constructor Method: 
Summary: Initialize the data in the object
Description: 
b
IN: character buffer of which this object is a holder.
s
IN: size of character buffer, in bytes.
n
IN: node to which this C_HOLDER is supposed to arrive when sent as a message.
void get ( char*& b , int& s , int& n ) ;
Method: get
Summary: Get all the data in this C_HOLDER
Description: 
Return: None
b
OUT: character buffer of which this object is a holder.
s
OUT: size of character buffer, in bytes.
n
OUT: node to which this C_HOLDER is supposed to arrive when sent as a message.
char* get_buff () ;
Method: get_buff
Summary: Get the character buffer of which this object is a holder, in bytes
Description: 
Return: The buffer
int get_node () ;
Method: get_node
Summary: Get the node to which this C_HOLDER is supposed to arrive when sent
         as a message
Description: 
Return: The node to which this C_HOLDER is supposed to arrive when sent as a
        message
int get_size () ;
Method: get_size
Summary: Get the size of the character buffer of which this object is a
         holder, in bytes
Description: 
Return: The size of the buffer, in bytes
void set ( char* b , int s , int n ) ;
Method: set
Summary: Set all the data in this C_HOLDER
Description: 
Return: None
b
IN: character buffer of which this object is a holder.
s
IN: size of character buffer, in bytes.
n
IN: node to which this C_HOLDER is supposed to arrive when sent as a message.
void set_node ( int n ) ;
Method: set_node
Summary: Set the node to which this C_HOLDER is supposed to arrive when sent
         as a message
Description: 
Return: None

Private Interface

Private Data

char* buff;
Pointer to a buffer.
int node;
Node that the buffer should be sent to.
int size;
Size of the buffer.

<<toc >>

class C_RANDOM

#include "random.H"

Class: C_RANDOM
Summary: Random number generator (one per node)
Description: Use this class to generate random numbers. It keeps track of
             its seed automatically, but not rollbackably. For rollbacks,
             the seed must be saved by the simulation objects unless the
             process model is being used, in which case rollbackable random
             numbers is supported automatically.

Public Interface

C_RANDOM compute_beta_fF erf
fact get_random_beta get_random_bit
get_random_bits get_random_exp get_random_float
get_random_float get_random_gauss get_random_int
get_random_int1 get_random_mag_vector get_random_unit_vector
get_seed his_bit his_double
his_exp his_gauss his_int
his_int1 inverse_erf print
print_cycle set_beta set_exp
set_fast set_float_limits set_gauss
set_int_limits set_seed set_slow

Public Interface

C_RANDOM () ;
void compute_beta_fF ( double tt , double& ff , double& FF ) ;
Method: compute_beta_fF
Summary: Computes the beta density distributions f and F
Description: 
Return: None
tt
IN: t.
ff
OUT: beta density distributions f.
FF
OUT: beta density distributions F.
double erf ( double x ) ;
INTERNAL METHOD
double fact ( int n ) ;
INTERNAL METHOD
n
IN: specified integer.
double get_random_beta () ;
Method: get_random_beta
Summary: Get a random beta number
Description: 
Return: A random beta number
int get_random_bit () ;
INTERNAL METHOD
int get_random_bits ( int nbits ) ;
Method: get_random_bits
Summary: Generate a random integer with a specified number of bits
Description: Uses the generate-random-bits (slower but more random) algorithm
Return: A random integer with a specified number of bits
nbits
IN: specified number of bits.
double get_random_exp () ;
Method: get_random_exp
Summary: Generate a random float (double) according to an exponential
         distribution with parameters set by the last call to set_exp ()
Description: 
Return: A random float (double) according to an exponential distribution
double get_random_float () ;
Overloaded Method: get_random_float
Summary: Generate a random float (double) between the low limit and high
         limit as last set by set_float_limits ()
Description: Uses the algorithm specified by the last call to either
             set_fast () or set_slow ()
Return: A random float (double)
double get_random_float ( int nbits ) ;
Overloaded Method: get_random_float
Summary: Generate a random integer with a specified number of bits
Description: Uses the generate-random-bits (slower but more random) algorithm
Return:  A random integer with a specified number of bits
nbits
IN: specified number of bits.
double get_random_gauss () ;
Method: get_random_gauss
Summary: Generate a random float (double) according to a gaussian
         distribution with parameters set by the last call to set_gauss ()
Description: 
Return: A random float (double) according to a gaussian distribution
int get_random_int () ;
Method: get_random_int
Summary: Generate a random integer between the low limit and high limit as
         last set by set_int_limits ()
Description: Uses the algorithm specified by the last call to either
             set_fast () or set_slow ()
Return: A random integer
int get_random_int1 () ;
INTERNAL METHOD
void get_random_mag_vector ( double mag , double vec [ 3 ] ) ;
Method: get_random_mag_vector
Summary: Generate a random magnitude vector
Description: This first generates a unit vector, then multiplies the
             magnitude by a random gaussian with sigma=1 and mean=0, and then
             multiplies that number by each of the components of the unit
             vector
Return: None
mag
IN: magnitude.
OUT: magnitude vector.
void get_random_unit_vector ( double vec [ 3 ] ) ;
Method: get_random_unit_vector
Summary: Generate a random unit vector
Description: 
Return: None
OUT: unit vector.
int get_seed () ;
Method: get_seed
Summary: Get the seed for this generator
Description: 
Return: The seed for this generator
void his_bit () ;
INTERNAL METHOD
void his_double () ;
INTERNAL METHOD
void his_exp () ;
INTERNAL METHOD
void his_gauss () ;
INTERNAL METHOD
void his_int () ;
INTERNAL METHOD
void his_int1 () ;
INTERNAL METHOD
double inverse_erf ( double x ) ;
INTERNAL METHOD
void print () ;
INTERNAL METHOD
void print_cycle () ;
INTERNAL METHOD
void set_beta ( int n1 , int n2 ) ;
Method: set_beta
Summary: Set n1 and n2 for beta distributions
Description: 
Return: None
n1
IN: n1.
n2
IN: n2.
void set_exp ( double l ) ;
Method: set_exp
Summary: Set lambda for random exponential distributions
Description: 
Return: None
l
IN: lambda.
void set_fast () ;
Method: set_fast
Summary: Set the generator to linear-congruential mode (far faster than
         generate-random-bits mode, and far more cycles before the random
         number cycle repeats, but far less even random number distribution)
Description: 
Return: None
void set_float_limits ( double l , double h ) ;
Method: set_float_limits
Summary: Set the low and high limits for random floats (doubles)
Description: These variables become state for this object. Since there is
             only one of this object per node, this method should be called
             at least once per event where random floats are generated.
Return: None
l
IN: low limit for random floats.
h
IN: high limit for random floats.
void set_gauss ( double s , double m ) ;
Method: set_gauss
Summary: Set sigma and mean for random gaussian distributions
Description: 
Return: None
s
IN: sigma.
m
IN: mean.
void set_int_limits ( int l , int h ) ;
Method: set_int_limits
Summary: Set the low and high limits for random integers
Description: These variables become state for this object. Since there is
             only one of this object per node, this method should be called
             at least once per event where random integers are generated.
Return: None
l
IN: low limit for random integers.
h
IN: high limit for random integers.
void set_seed ( int sd ) ;
Method: set_seed
Summary: Set the seed for this generator
Description: 
Return: None
sd
IN: seed.
void set_slow () ;
Method: set_slow
Summary: Set the generator to generate-random-bits mode (far slower than
         linear-congruential mode, and far less cycles before the random
         number cycle repeats (256,000 cycles), but far more even random
         number distribution)
Description: 
Return: None

Private Interface

Private Data

double* beta_coeff_F;
Coefficients for the cum. Beta function.
double* beta_coeff_f;
Coefficients for the beta function.
double beta_n1;
Beta function n1.
double beta_n2;
Beta function n2;
int fastmode;
Flag for fast random number generation.
double fhi;
Upper limit for float random numbers.
double flo;
Lower limit for float random numbers.
int gaussflag;
Flag for an extra gaussian value available.
double gaussvalue;
Extra gaussian value.
int hi;
Upper limit for integer random numbers.
double lambda;
Lambda for exponential distributions.
int lo;
Lower limit for integer random numbers.
double mean;
Mean for gaussian distributions.
double scaler;
Maximum integer random number.
int seed;
Random number seed (used by everthing).
double sigma;
Sigma for gaussian distributions.

<<toc >>

class DATA_PARSER

#include "DataParser.H"

Class: DATA_PARSER
Summary:  Object that reads in an input file and provides data for 
          applications.
Description: This DATA_PARSER is designed to parse files of the format
             exemplified by:

// begin example *.par file

Set_1
{
  int i_1 14
  reference Group_1 Set_2
  reference Group_1 Set_3
  Group_1 Set_4
  {
    int i 40
  }
  Set_5
  {
    int 1 50
  }
  int i_2 16
  enum e_1
  string s_1 happy
  float f_1 1.4
  logical l_1 T
}

Set_2
{
  int i 20
}

Set_3
{
  int i 30
}

// end example *.par file

DEFINITIONS:
-Top-Level Set: A named, braced collection of primitives and/or
                  embedded sets that is not embedded in another
                  set
-Embedded Set:  A named, braced collection of primitives and/or
                  embedded sets that is embedded in another set
-Reference Set: An alias of (ie, a specifier to include) a
                  top-level set embedded in either a top-level
                  set or an embedded set
-Set Group:     A collection of embedded sets and/or reference
                  sets nested one level into a top-level set or
                  an embedded set unified by a common group
                  name for the purpose of accessing each set in
                  the group in turn via a loop control structure
-Group Name:    The string tag that unifies a set group
-Primitive:     A named value of one of the fundamental units
                  of data extractable by the DATA_PARSER,
                  consisting of one of the following types:
                  integer, enumeration, logical, float, string,
                  or define

KEYWORDS:

-"reference":   specifies a set as a reference set, followed
                  by a group name, followed by a top-level set
                  name
-"int":         specifies a integer primitive, followed by a
                  variable name, followed by a value 
-"enum":        specifies a enumeration primitive, followed by
                  a variable name, followed by a value 
-"logical":     specifies a logical primitive, followed by a
                  variable name, followed by a value 
-"float":       specifies a floating point primitive, followed
                  by a variable name, followed by a value 
-"string":      specifies a string primitive, followed by a
                  variable name, followed by a value 
-"define":      specifies a define primitive, followed by a
                  variable name, followed by a value 

             OVERVIEW:
             Methods are provided to move in and out of top-level
             sets (such as "Set_1" above), embedded sets (such as
             "Set_4" above), and reference sets (such as "Set_2"
             nested in "Set_1" above). The set to which the user has
             most recently moved is called the current set. Get*()
             methods are provided to extract primitive data (such as
             ints, floats, etc.) from the current set. Sets are
             reference sets when preceded by two words: the key word
             "reference" and a group name. Reference sets are nested
             sets that are actually an inline inclusion of a
             top-level set of the same set name. Sets may be grouped
             together for the user to loop through them by having a
             common group name (such as "Group_1" in the above
             example). Sets that are members of a group may be
             reference sets (such as "Set_2" nested in "Set_1"
             above) or embedded sets (such as "Set_4" above). When
             looping through a group (call it Group_1) nested one
             level into a set (call it Set_1), the current set
             changes each iteration of the loop to the nested set in
             Group_1 currently arrived at by the loop. This set be
             inline or a "reference" to a top-level set. At any
             point during set_a's loop through Group_1, the user may
             MoveIn () to the current set in Group_1, perform any
             Get*()'s, loop through groups, perform nested
             MoveIn()'s and MoveOut()'s, and then finally MoveOut ()
             back to Set_1 and continue where Set_1 left off in its
             loop through Group_1.
Implementation: The DATA_PARSER handles such nested navigation
                through a *.par file through internally keeping
                track of a stack of pointers to sets. It "pushes" a
                set pointer onto this stack when the user calls
                MoveIn() or MoveToFirstSetInGroup(), "pops" set
                pointer(s) off this stack when the user calls
                MoveOut () or MoveOutCompletely (), and both "pops"
                and "pushes" a set pointer when the user calls
                MoveToNextSetInGroup ().

Public Interface

DATA_PARSER ~DATA_PARSER Find
GetArraySize GetDefine GetEnum
GetFirstDefine GetFirstType GetFloat
GetInt GetLogical GetMark
GetNdefines GetNextDefine GetNextType
GetNtypes GetNtypes GetNumElements
GetNumReferences GetNumSetsInGroup GetReferenceName
GetSetName GetString GetType
GoTo GoToFirstElement GoToFirstReference
GoToNextElement GoToNextReference GoToType
MoveIn MoveOut MoveOutCompletely
MoveToFirstSetInGroup MoveToNextSetInGroup SetMark
print

Public Interface

DATA_PARSER ( const char* fileName ) ;
Constructor Method: DATA_PARSER
Summary: Construct a DATA_PARSER with the file it is so parse
Description: The data parser must always be constructed with the file it is
             to parse. Thus each DATA_PARSER is designed to parse one and
             only one file. To parse multiple files, simply create multiple
             DATA_PARSERs.
fileName
File to be parsed.
~DATA_PARSER () ;
void* Find ( void* Mark , char* ReferenceName ) ;
INTERNAL METHOD
int GetArraySize ( char* Name ) ;
Method: GetArraySize
Summary: Gets the size of the array of a primitive, specified by its
         name, nested one level inside of the current set, without
         changing which set is the current set
Description: If the specified primitive is not an array, this results
             in a terminal error
Return: The size of the array of a primitive, specified by its name, nested
        one level inside of the current set
char* GetDefine ( char* name , int Index = - 1 ) ;
Method: GetDefine
Summary: Gets the value of a define primitive, specified by its
         name, nested one level inside of the current set, without
         changing which set is the current set
Description: If the specified primitive is not a define, this results
             in a terminal error
Return: The value of a define primitive (the string following the define
        name), specified by the define name, nested one level inside of the
        current set
int GetEnum ( char* name , int Index = - 1 ) ;
Method: GetEnum
Summary: Gets the value of an enumeration primitive, specified by
         its name, nested one level inside of the current set,
         without changing which set is the current set
Description: If the specified primitive is not an enumeration, this results
             in a terminal error
Return: The value of an enumeration primitive (the integral order of this
        primitve starting at 0 in the current set of enumerations),
        specified by its name, nested one level inside of the current set
void GetFirstDefine ( char*& name , char*& value ) ;
INTERNAL METHOD
void* GetFirstType () ;
INTERNAL METHOD
double GetFloat ( char* name , int Index = - 1 ) ;
Method: GetFloat
Summary: Gets the value of a float (floating point) primitive,
         specified by its name, nested one level inside of the
         current set, without changing which set is the current set
Description: If the specified primitive is not a float, this results
             in a terminal error
Return: The value of a float primitive, specified by its name, nested
        one level inside of the current set
int GetInt ( char* name , int Index = - 1 ) ;
Method: GetInt
Summary: Gets the value of an integer primitive, specified by its
         name, nested one level inside of the current set, without
         changing which set is the current set
Description: If the specified primitive is not an integer, this results
             in a terminal error
Return: The value of an integer primitive, specified by its name, nested
        one level inside of the current set
int GetLogical ( char* name , int Index = - 1 ) ;
Method: GetLogical
Summary: Gets the value of a logical primitive, specified by its
         name, nested one level inside of the current set, without
         changing which set is the current set
Description: If the specified primitive is not a logical, this results
             in a terminal error
Return: The value of a logical primitive (0 for f or false, 1 for t or
        true), specified by its name, nested one level inside of the
        current set
void* GetMark () ;
INTERNAL METHOD
int GetNdefines () ;
INTERNAL METHOD
void GetNextDefine ( char*& name , char*& value ) ;
INTERNAL METHOD
void* GetNextType ( void* current ) ;
INTERNAL METHOD
int GetNtypes () ;
INTERNAL METHOD
int GetNtypes ( char* Type ) ;
INTERNAL METHOD
int GetNumElements ( void* Mark , char* ReferenceName = NULL ) ;
INTERNAL METHOD
int GetNumReferences ( void* Mark , char* ReferenceName ) ;
INTERNAL METHOD
int GetNumSetsInGroup ( char* groupName ) ;
Method: GetNumSetsInGroup
Summary: Get the number of sets belonging to the specified set group
         nested one level in from the current set. This method does
         not change which set is the current set.
Description: This method is normally used just before looping
             through a set group so as to know how many sets to loop
             through.
Return: The number of sets belonging to a reference name group nested one
        level in from the current set
groupName
Group name of the set group of interest.
char* GetReferenceName () ;
INTERNAL METHOD
char* GetSetName () ;
Method: GetSetName
Summary: Gets the name of the current set
Description: 
Return: The name of the current set
char* GetString ( char* name , int Index = - 1 ) ;
Method: GetString
Summary: Gets the value of a string primitive, specified by its
         name, nested one level inside of the current set, without
         changing which set is the current set
Description: If the specified primitive is not a string, this results
             in a terminal error
Return: The value of a string primitive, specified by its name, nested
        one level inside of the current set
char* GetType () ;
INTERNAL METHOD
void* GoTo ( char* FirstName , ... ) ;
INTERNAL METHOD
void* GoToFirstElement ( void* Mark , char* ReferenceName = NULL ) ;
INTERNAL METHOD
void* GoToFirstReference ( void* Mark , char* ReferenceName ) ;
INTERNAL METHOD
void* GoToNextElement ( void* Mark , char* ReferenceName = NULL ) ;
INTERNAL METHOD
void* GoToNextReference ( void* Mark , char* ReferenceName ) ;
INTERNAL METHOD
void* GoToType ( char* TypeName ) ;
INTERNAL METHOD
void MoveIn ( char* setName ) ;
Method: MoveIn
Summary: Move into a top-level set (if not currently in a set) or
         into a set nested in the current set. The set moved to is
         called the current set, in which subsequant data extraction
         is possible.
Description: MoveIn () is used to move to a set (with or without a
             reference name or the keyword "reference") that is
             nested in the current set (ie, the set to which the
             user last moved). MoveIn () must be called at least
             once (ie, to move to a top-level set and then move into
             nested sets as desired) before any data extraction is
             possible. MoveIn (), MoveOut (), MoveOutCompletely (),
             MoveToFirstSetInGroup (), and MoveToNextSetInGroup () are
             the five recommended methods to use for navigating
             through the nested data structures in a *.par file.
Return: None
setName
The name of the set into which to move.
void MoveOut ( int numLevels = 1 ) ;
Method: MoveOut
Summary: Move out of a set to the set in which it is nested,
         optionally multiple times
Description: MoveOut () changes the current set to be the set in
             which the cureent set is nested. MoveIn (), MoveOut (),
             MoveOutCompletely (), MoveToFirstSetInGroup (), and
             MoveToNextSetInGroup () are the five recommended methods
             to use for navigating through the nested data
             structures in a *.par file.
Return: None
numLevels
The number of MoveOuts to execute.
void MoveOutCompletely () ;
Method: MoveOutCompletely
Summary: Jump out of the arbitrarily deeply nested current set, such
         that the next call to MoveIn () moves to a top-level set.
Description: MoveOutCompletely () is equivalent to calling MoveOut
             () multiple times until no longer in any sets (ie,
             reseting the DATA_PARSER to the initial condition where
             there is no current set). Thus, the user must call
             MoveIn () with a top-level set as the argument just
             after calling MoveOutCompletely () in order to do any
             subsequent data extraction. MoveIn (), MoveOut (),
             MoveOutCompletely (), MoveToFirstSetInGroup (), and
             MoveToNextSetInGroup () are the five recommended methods
             to use for navigating through the nested data
             structures in a *.par file.
Return: None
void MoveToFirstSetInGroup ( char* groupName ) ;
Method: MoveToFirstSetInGroup
Summary: Moves into the first set of the specified set group. The
         set to which the DATA_PARSER moves becomes the current set.
Description: If the first set in the specified set group is an
             inline set, the DATA_PARSER will move one nested level
             into that set, which becomes the current set. On the
             other hand, if the first set in the specified set group
             is a reference, the DATA_PARSER will actually move to
             the top-level set referenced and make that set the
             current set. MoveIn (), MoveOut (), MoveOutCompletely
             (), MoveToFirstSetInGroup (), and MoveToNextSetInGroup
             () are the five recommended methods to use for
             navigating through the nested data structures in a
              .par file.
Return: None
groupName
Group name of the set group of interest.
void MoveToNextSetInGroup () ;
Method: MoveToNextSetInGroup
Summary: Moves into the next set of the set group specified by the
         last call to MoveToFirstSetInGroup () at this level in the
         nested structure. The set to which the DATA_PARSER moves
         becomes the current set.
Description: If the next set in the set group specified by the last
             call to MoveToFirstSetInGroup () is an inline set, the
             DATA_PARSER will move out of the current set and then
             into that inline set, which becomes the current set. On
             the other hand, if the next set is a reference, the
             DATA_PARSER will move out of the current set and then
             actually move to the top-level set referenced and make
             that set the current set. MoveIn (), MoveOut (),
             MoveOutCompletely (), MoveToFirstSetInGroup (), and
             MoveToNextSetInGroup () are the five recommended
             methods to use for navigating through the nested data
             structures in a *.par file.
Return: None
void SetMark ( void* Mark ) ;
INTERNAL METHOD
void print ( ostream& out = cout ) ;
Method: print
Summary: Print this DATA_PARSER's *.par file with appropriate indentation
Description: 
Return: None

Private Interface

Private Data

DEFINE_DATA_TYPE* DefPtr;
char* FileName;
BASE_DATA_TYPE* GoToBDT;
Current Mark.
C_QUEUE Qatoms;
C_QUEUE Qtypes;
C_QUEUE markStack;
void* setMark;
Current set in which references are being looped.
char setMarkRefName [ 128 ];
Current set in which references are being looped Current set's reference name being looped.

<<toc

class STOPWATCH

#include "StopWatch.H"

Class: STOPWATCH
Summary: Class for single and/or cumulative timing of any time intervals in
         the simulation. Timing always includes both wall (actual/real 
         total) time and CPU (computer processing) time.
Description: Use objects of this class to time any aspects of the
             simulation. Objects can be named during construction, reset, and
             repeatedly started and stopped. If not reset, they only keep
             track of cumulative time. Either CPU or wall time can be set as
             the default of what is returned and/or printed, but STOPWATCHes
             always keep track of both. Thus the flag for CPU or wall time
             returning and printing can be changed at any time ad infinitum
             during the cumulative timing.

Public Interface

STOPWATCH ~STOPWATCH Reset
StartTimer StopTimer UseClockTime
UseWallTime get_CumulativeClockTime get_CumulativeTime
get_name print print

Public Interface

STOPWATCH ( char* n ) ;
Constructor: 
Summary: Initializes the object and sets the name of the stopwatch (can be
         NULL)
Description: 
n
IN: name of stopwatch (can be NULL).
~STOPWATCH () ;
void Reset () ;
Method: Reset
Summary: Reset cumulative wall time and and CPU time
Description: The first time StartTimer() and StopTimer() are called after
             object construction or after calling Reset(), this class begins
             cumulative timing from zero for both wall clock timing and CPU
             timing. Otherwise it continues accumulating both wall clock and
             CPU time from past StartTimer()/StopTimer intervals. Regardless
             of the Clock Flag, the class cumulatively stores both types of
             time.
Return: None
void StartTimer () ;
Method: StartTimer
Summary: Begin timing a new time interval for either wall time or CPU time,
         and continue cumulative wall time and CPU time
Description: Objects of this type will return the time interval beginning
             with this call when the next StopTimer() is called. The time
             value returned depends on the setting of the Clock Flag (the
             default is wall time) when StopTimer is called, which can be set
             before or after calling StartTimer() with the methods
             UseWallTime() and UseClockTime(). The first time this method is
             called after object construction or after calling Reset(), this
             method begins cumulative timing from zero for both wall clock
             timing and CPU timing. Otherwise it continues accumulating both
             wall clock and CPU time from past StartTimer()/StopTimer
             intervals. Regardless of the Clock Flag, the class cumulatively
             stores both types of time.
Return: None
double StopTimer () ;
Method: StopTimer
Summary: Stop timing the interval since the last StartTimer() call, stop
         cumulative wall time and CPU time, and return the time value of the
         time interval since the last StartTimer() call
Description: This returns the time interval beginning with the most recent
             StartTimer() call. The time value returned depends on the
             current setting of the Clock Flag (the default is wall time),
             which must be set previously, but can be set before or after the
             most recent StartTimer() call with the methods UseWallTime() and
             UseClockTime(). The first time StartTimer() and StopTimer() are
             called after object construction or after calling Reset(), this
             class begins cumulative timing from zero for both wall clock
             timing and CPU timing. Otherwise it continues accumulating both
             wall clock and CPU time from past StartTimer()/StopTimer
             intervals. Regardless of the Clock Flag, the class cumulatively
             stores both types of time.
Return: Either wall time or CPU time in seconds, depending on the Clock Flag,
        which is set by using either UseWallTime() or UseClockTime()
void UseClockTime () ;
Method: UseClockTime
Summary: 
Description:
Return: None
void UseWallTime () ;
Method: UseWallTime
Summary: 
Description: 
Return: None
double get_CumulativeClockTime () const;
Method: get_CumulativeClockTime
Summary: Get cumulative CPU time
Description: The first time StartTimer() and StopTimer() are called after
             object construction or after calling Reset(), this class begins
             cumulative timing from zero for both wall clock timing and CPU
             timing. Otherwise it continues accumulating both wall clock and
             CPU time from past StartTimer()/StopTimer intervals. Regardless
             of the Clock Flag, the class cumulatively stores both types of
             time.
Return: Cumulative CPU time in seconds
double get_CumulativeTime () const;
Method: get_CumulativeTime
Summary: Get cumulative wall time
Description: The first time StartTimer() and StopTimer() are called after
             object construction or after calling Reset(), this class begins
             cumulative timing from zero for both wall clock timing and CPU
             timing. Otherwise it continues accumulating both wall clock and
             CPU time from past StartTimer()/StopTimer intervals. Regardless
             of the Clock Flag, the class cumulatively stores both types of
             time.
Return: Cumulative wall time in seconds
const char* get_name () const;
Method: get_name
Summary: Get the name of this Stopwatch
Description: This is set in the constructor of this class
Return: The name of this Stopwatch
void print () const;
Overloaded Method: print
Summary: Print the name of this stopwatch and the cumulative wall and CPU
         times to cout
Description: 
Return: None
void print ( ostream& out ) const;
Overloaded Method: print
Summary: Print the name of this stopwatch and the cumulative wall and CPU
         times
Description: 
Return: None
out
IN: ostream to which to print.

Private Interface

Private Data

int ClockFlag;
double CumulativeClockTime;
double CumulativeTime;
clock_t StartClockTime;
double StartTime;
char* name;

toc

NON-ROLLBACKABLE CONTAINERS---------------------------+

Metric Summary for NON-ROLLBACKABLE CONTAINERS---------------------------+

Total number of classes623% of total
Total number of statements7012% of total
Total number of free standing functions313% of total
Average statements per class11-44% from average
Average McCabe complexity per class9-38% from average
Average number of public member functions per class16-28% from average
Average number of protected member functions per class0-100% from average
Average number of parameters per function0.6-29% from average
Average number of statements per function1.3-14% from average
Percent of functions documented91%10% from average

Class Metrics

ClassPublic MembersStatementsMcCabe Complexity
C_ITEM223223
C_DBL_ITEM121212
C_QUEUE321010
C_HASH1787
C_DBL_QUEUE1133
C_DUMMY_V111

Function Metrics

ClassStatementsMcCabe Complexity
C_ITEM::compare52
C_HASH::~C_HASH22
C_ITEM::set_time_tag31
C_ITEM::set_time_tag31
C_ITEM::C_ITEM21
RB_NEW_C_ITEM21
C_ITEM::copy21
C_HASH::get21
C_ITEM::set_time_tag21
C_DBL_ITEM::C_DBL_ITEM11
C_ITEM::GetDoubleValue11
C_ITEM::GetName11
RB_DELETE_SINGLE_C_ITEM11
C_ITEM::SetDoubleValue11
delete_single_C_ITEM11
C_HASH::get_all11
C_QUEUE::get_bot11
C_DBL_QUEUE::get_bot11
C_ITEM::get_freeid11
C_DBL_ITEM::get_id11
C_ITEM::get_id11
C_DBL_QUEUE::get_length11
C_QUEUE::get_length11
C_ITEM::get_link11
C_DBL_ITEM::get_next11
C_HASH::get_nitems11
C_DBL_ITEM::get_previous11
C_DBL_ITEM::get_ptr11
C_HASH::get_size11
C_ITEM::get_time_tag11
C_DBL_QUEUE::get_top11
C_QUEUE::get_top11
C_DBL_ITEM::get_valu11
C_QUEUE::length11
C_QUEUE::next11
C_QUEUE::pbot11
C_DUMMY_V::print11
C_ITEM::print11
C_DBL_ITEM::print11
C_ITEM::printfile11
C_HASH::printq11
C_ITEM::printstream11
C_QUEUE::ptop11
C_ITEM::put_link11
C_QUEUE::set_bot11
C_ITEM::set_freeid11
C_ITEM::set_id11
C_DBL_ITEM::set_id11
C_QUEUE::set_length11
C_ITEM::set_link11
C_DBL_ITEM::set_next11
C_DBL_ITEM::set_previous11
C_DBL_ITEM::set_ptr11
C_ITEM::set_time_tag11
C_QUEUE::set_top11
C_DBL_ITEM::set_valu11
C_ITEM::~C_ITEM01
C_QUEUE::C_QUEUE00
C_DBL_QUEUE::C_DBL_QUEUE00
C_HASH::C_HASH00
C_HASH::add00
C_DBL_QUEUE::check_order00
C_QUEUE::clear00
C_HASH::combine00
C_QUEUE::concat00
C_QUEUE::copy00
C_HASH::dehash00
C_HASH::dehash00
C_QUEUE::deque00
C_QUEUE::deque00
C_QUEUE::fast_pop_top00
C_HASH::get00
C_HASH::get_hashid00
C_QUEUE::get_item00
C_QUEUE::init00
C_DBL_QUEUE::insert00
C_QUEUE::insert00
C_QUEUE::insert_after00
C_QUEUE::join00
C_QUEUE::merge00
C_DBL_QUEUE::pop_bot00
C_DBL_QUEUE::pop_top00
C_QUEUE::pop_top00
C_QUEUE::print00
C_HASH::printh00
C_QUEUE::printstream00
C_DBL_QUEUE::push_bot00
C_QUEUE::push_bot00
C_DBL_QUEUE::push_top00
C_QUEUE::push_top00
C_DBL_QUEUE::remove00
C_QUEUE::remove00
C_HASH::remove00
C_QUEUE::remove00
C_HASH::remove00
C_QUEUE::reset00
C_HASH::reset00
C_QUEUE::sort00

toc >>

class C_DBL_ITEM

#include "dbl_item.H"

Class: C_DBL_ITEM
Summary: Base class for classes whose objects can be non-rollbackably
         inserted into doubly linked list data structures of type
         C_DBL_QUEUE
Description: Classes must inherit from this class to be inserted into
             C_DBL_QUEUEs. This class does not have any rollback support, and
             is thus simply a generic doubly-linked queue item that can be
             sorted according to simulated time tags by a C_DBL_QUEUE. For
             doubly-linked rollbackable queues, use C_SQ_ITEMs and
             C_XQUEUEs. Objects of this type can only be inserted into
             C_DBL_QUEUEs (ie, not C_QUEUEs or C_XQUEUEs). They can also be
             used in a C_DBL_QUEUE used as a stack. That is, when
             consistantly popping from the top of the queue, pushing can be
             to the top or the bottom of the queue. When consistantly pushing
             to the top, the C_QUEUE acts as a stack. When consistantly
             pushing to the bottom, the C_QUEUE acts as a queue. Pushing
             effects are vice-versa when consistantly popping from the bottom
             (rather than the top) of the queue. Sorting and inserting
             operations always put the low time value on top so that
             consecutive pops off the top of the sorted queue or stack occurs
             in simulated time order.

Public Interface

C_DBL_ITEM get_id get_next
get_previous get_ptr get_valu
print set_id set_next
set_previous set_ptr set_valu

Public Interface

C_DBL_ITEM () ;
int get_id () ;
Method: get_id
Summary: Gets the ID of this item
Description: 
Return: The ID of this item
C_DBL_ITEM* get_next () ;
Method: get_next
Summary: Gets the forward link from this C_DBL_ITEM to the next C_DBL_ITEM
Description: Use this to get the C_DBL_ITEM linked as the next C_DBL_ITEM in
             the doubly-linked C_DBL_QUEUE data structure in which this
             C_DBL_ITEM is contained
Return: The C_DBL_ITEM forwardly linked from this C_DBL_ITEM
C_DBL_ITEM* get_previous () ;
Method: get_previous
Summary: Gets the backward link from this C_DBL_ITEM to the previous
         C_DBL_ITEM
Description: Use this to get the C_DBL_ITEM linked as the previous C_DBL_ITEM
             in the doubly-linked C_DBL_QUEUE data structure in which this
             C_DBL_ITEM is contained
Return: The C_DBL_ITEM backwardly linked from this C_DBL_ITEM
void* get_ptr () ;
Method: get_ptr
Summary: Gets the pointer of this item to its data
Description: 
Return: The pointer to this item's data
SIMTIME& get_valu () ;
Method: get_valu
Summary: Gets the simulated time of this item
Description: 
Return: The simulated time of this item
virtual void print () ;
Virtual Method: print 
Summary: By default, this method prints the ID and simulation time to stderr,
         but is user-overridable.
Description: 
Return: None
void set_id ( int i ) ;
Method: set_id
Summary: Sets the ID of this item
Description: 
Return: None
i
IN: the ID of this item.
void set_next ( C_DBL_ITEM* nxt ) ;
INTERNAL METHOD
nxt
IN: C_ITEM to follow this one in the C_DBL_QUEUE this is currently contained in.
void set_previous ( C_DBL_ITEM* prv ) ;
INTERNAL METHOD
prv
IN: C_ITEM to preceed this one in the C_DBL_QUEUE this is currently contained in.
void set_ptr ( void* p ) ;
Method: set_ptr
Summary: Sets the pointer of this item to its data 
Description: 
Return: None
p
IN: the pointer to this item's data.
void set_valu ( const SIMTIME& v ) ;
Method: set_valu
Summary: Sets the simulated time of this item
Description: 
Return: None
v
The simulated time of this item.

Protected Interface

Protected Data

int id;
Id of the item.
void* ptr;
Pointer to some data.
SIMTIME valu;
Value of the item.

Private Interface

Private Data

C_DBL_ITEM* next;
Link to next item.
C_DBL_ITEM* previous;
Link to previous item.

<<toc >>

class C_DBL_QUEUE

#include "dbl_queue.H"

Class: C_DBL_QUEUE
Summary: Doubly-linked list non-rollbackable data structure
Description: This class is simply a non-rollbackable generic dounly-linked
             queue that sorts C_DBL_ITEMs according to simulated time
             tags. It can also be used as a stack. That is, when consistantly
             popping from the top of the queue, pushing can be to the top or
             the bottom of the queue. When consistantly pushing to the top,
             the C_DBL_QUEUE acts as a stack. When consistantly pushing to
             the bottom, the C_DBL_QUEUE acts as a queue. Pushing effects are
             vice-versa when consistantly popping from the bottom (rather
             than the top) of the queue (for C_XQUEUEs or C_DBL_QUEUEs
             only). Sorting and inserting operations always put the low time
             value on top so that consecutive pops off the top of the sorted
             queue or stack occurs in simulated time order.

Public Interface

C_DBL_QUEUE check_order get_bot
get_length get_top insert
pop_bot pop_top push_bot
push_top remove

Public Interface

C_DBL_QUEUE () ;
void check_order () ;
INTERNAL METHODMethod: check_order
  Summary: Checks if the items are in time order, from earliest to latestS
  Description: 
  Return: None
C_DBL_ITEM* get_bot () ;
Method: get_bot
Summary: Get a pointer to the item at the bottom of the queue without
         removing it from the queue.
Description: 
Return: A pointer to the item at the bottom of the queue
int get_length () ;
Method: get_length
Summary: Get the number of items in the queue
Description: 
Return: The number of items in the queue
C_DBL_ITEM* get_top () ;
Method: get_top
Summary: Get a pointer to the item at the top of the queue without removing
         it from the queue.
Description: 
Return: A pointer to the item at the top of the queue
void insert ( C_DBL_ITEM* dbl_item ) ;
Method: insert
Summary: Inserts a specified item into the queue in time order (earlier time
         on top)
Description: 
Return: None
dbl_item
IN: specified item to insert.
C_DBL_ITEM* pop_bot () ;
Method: pop_bot
Summary: Pops a specified item off of (ie, removes a specified item from) the
         bottom of the queue and returns it
Description: 
Return: Item that has been popped off of (removed from) the bottom of the
        queue
C_DBL_ITEM* pop_top () ;
Method: pop_top
Summary: Pops a specified item off of (ie, removes a specified item from) the
         top of the queue and returns it
Description: 
Return: Item that has been popped off of (removed from) the top of the queue
void push_bot ( C_DBL_ITEM* dbl_item ) ;
Method: push_bot
Summary: Pushes a specified item onto (ie, inserts a specified item at) the
         bottom of the queue
Description: 
Return: None
dbl_item
IN: specified item to insert.
void push_top ( C_DBL_ITEM* dbl_item ) ;
Method: push_top
Summary: Pushes a specified item onto (ie, inserts a specified item at) the
         top of the queue
Description: This method moves the top pointer in this queue to the specified
             item, which then points to the old top item
Return: None
dbl_item
IN: specified item to insert.
void remove ( C_DBL_ITEM* dbl_item ) ;
Method: remove
Summary: Remove (delete) an item from the queue
Description: 
Return: None
dbl_item
IN: item to remove from the queue.

Private Interface

Private Data

C_DBL_ITEM* bot;
Pointer to the bottom of the queue.
int length;
Length of the queue.
C_DBL_ITEM* top;
Pointer to the top of the queue.

<<toc >>

class C_DUMMY_V

#include "qitem.H"

INTERNAL METHODSummary: Dummy class that puts the V table at the top of item objects
  Description: 

Public Interface

virtual void print () ;

Private Interface

Private Data

NET_INT dummy_v_allign;

<<toc >>

class C_HASH

#include "hash.H"

Class: C_HASH
Summary: An array of queues with array like access to items
Description: 

Public Interface

C_HASH ~C_HASH add
combine dehash dehash
get get get_all
get_hashid get_nitems get_size
printh printq remove
remove reset

Public Interface

C_HASH ( int n ) ;
Constructor Method: 
Summary: Constructs a C_HASH with a hash array of specified length
Description: 
n
Length of hash array.
~C_HASH () ;
void add ( C_ITEM* item ) ;
Method: add
Summary: Add a specified C_ITEM to the hash table
Description: Push specified item to the bottom of the appropriate queue in
             the hash array
Return: None
item
C_ITEM to add.
void combine () ;
Method: combine
Summary: Concatonate each queue in this hash array into one queue, leaving
         the original hash table intact
Description: The resulting single queue can then be retrieved with the method
             get_all () and printed with printq ().
Return: None
void dehash ( C_ITEM* item ) ;
Method: dehash
Summary: 
Description: 
Return: None
C_ITEM* dehash ( int id ) ;
Method: dehash
Summary: 
Description: 
Return: C_ITEM
C_ITEM* get ( char* name ) ;
Method: get
Summary: Return the C_ITEM in this hash table specified by item's name
Description: Gets the item from the appropriate queue in the hash array
Return: The C_ITEM in this hash table specified by item's name
name
Name of C_ITEM to get.
C_ITEM* get ( int hid ) ;
Method: get
Summary: Return the C_ITEM in this hash table specified by item's ID
Description: Gets the item from the appropriate queue in the hash array
Return: The C_ITEM in this hash table specified by item's ID
hid
ID of C_ITEM to get.
C_QUEUE* get_all () ;
Method: get_all
Summary: Get the combined queue generated by the last call to combine ()
Description: 
Return: The combined queue generated by the last call to combine ()
int get_hashid ( char* name ) ;
Method: get_hashid
Summary: Return a C_ITEM's ID in this hash table specified by its name
Description: 
Return: The C_ITEM's ID in this hash table specified by its name
name
Name of C_ITEM from whom to get ID.
int get_nitems () ;
Method: get_nitems
Summary: Get the number of C_ITEMs in this hash table
Description: 
Return: The number of C_ITEMs in this hash table
int get_size () ;
Method: get_size
Summary: Get the number of queues in this hash array
Description: 
Return: The number of queues in this hash array
void printh () ;
Method: printh
Summary: Print each C_ITEM in the hash table
Description: This prints the hash table by calling the virtual function print
             () on all of the C_ITEMs in the hash table. Unlike printq (),
             this method does not rely on first calling combine ().
Return: None
void printq () ;
Method: printq
Summary: Print each C_ITEM in the combined hash table
Description: Unlike printh (), which simply prints the hash table, this
             method relies on first calling combine () which concatonates the
             hash array into one combined queue. The resulting combined queue
             is printed with this method by calling the virtual function
             print () on all of the C_ITEMs in the combined queue.
Return: None
void remove ( C_ITEM* item ) ;
Method: remove
Summary: Remove (delete) the specified item from this hash table
Description: 
Return: None
item
C_ITEM to remove.
void remove ( int id ) ;
Method: remove
Summary: Remove (delete) an item from this hash table specified by its ID
Description: 
Return: None
id
ID of C_ITEM to remove.
void reset () ;
Method: reset
Summary: Clear the hash table
Description: Clear (delete) every queue in the hash array, then set length of
             the hash array to zero
Return: None

Protected Interface

Protected Data

int nitems;
Total number of items in the hash.
C_QUEUE* q;
Array of queues (dimension size).
C_QUEUE* qall;
A queue of concatonated hash queues.
int size;
Size of queue array.

<<toc >>

class C_ITEM : public C_DUMMY_V

#include "qitem.H"

Class: C_ITEM
Summary: Base class for classes whose objects can be non-rollbackably
         inserted into singly linked list data structures of type C_QUEUE
Description: Classes must inherit from this class to be inserted into
             C_QUEUEs. This class does not have any rollback support, and is
             thus simply a generic queue item that can be sorted according to
             simulated time tags by a C_QUEUE. Objects of this type can only
             be inserted into C_QUEUEs (ie, not C_XQUEUEs, which require
             rollback support). They can also be used in a C_QUEUE used as a
             stack. That is, popping must always be from the top of the queue
             (since it is singly linked) but pushing can be to the top or the
             bottom of the queue. When consistantly pushing to the top, the
             C_QUEUE acts as a stack. When consistantly pushing to the
             bottom, the C_QUEUE acts as a queue. Sorting and inserting
             operations always put the low time value on top so that popping
             off the sorted queue or stack occurs in simulated time order.

Public Interface

C_ITEM ~C_ITEM GetDoubleValue
GetName SetDoubleValue compare
copy get_freeid get_id
get_link get_time_tag print
printfile printstream put_link
set_freeid set_id set_link
set_time_tag set_time_tag set_time_tag
set_time_tag

Public Interface

C_ITEM () ;
virtual ~C_ITEM () ;
Virtual Destructor: ~C_ITEM
Summary: By default, this destructor does nothing, but is user-overridable
Description: 
double GetDoubleValue () ;
Method: GetDoubleValue 
Summary: Gets the simulated time tag for this C_ITEM without returning the
         priority fields
Description: 
Return: The simulated time tag (as a double without returning the priority
        fields)
virtual char* GetName () ;
Virtual Method: GetName 
Summary: By default, this is not implemented, but is user-overridable, and is
         intended to return the name of this C_ITEM. 
Description: 
Return: A character pointer intended to return the name of this C_ITEM
void SetDoubleValue ( double v ) ;
Method: SetDoubleValue 
Summary: Sets the simulated time tag for this C_ITEM without setting or
         affecting the SIMTIME priority fields
Description: 
Return: None
virtual int compare ( C_ITEM* it ) ;
Virtual Method: compare 
Summary: By default, this method determines whether the IDs of this and
         another C_ITEM are the same. It is user-overridable.
Description:  
Return: Flag for whether the IDs of this and the passed-in C_ITEM are the 
        same
it
IN: the C_ITEM with which to compare.
virtual C_ITEM* copy () ;
Virtual Method: copy
Summary: By default, this is not implemented, but is user overridable.
Description: 
Return: A C_ITEM
int get_freeid () ;
INTERNAL METHOD
int get_id () ;
Method: get_id 
Summary: Get the ID of this C_ITEM
Description: 
Return: The ID of this C_ITEM
C_ITEM* get_link () ;
Method: get_link 
Summary: Gets the link for this C_ITEM (ie, the link in the singly-linked
         C_QUEUE data structure)
Description: 
Return: The link for this C_ITEM (ie, the link in the singly-linke C_QUEUE
        data structure)
SIMTIME& get_time_tag () ;
Method: get_time_tag 
Summary: Gets the simulated time tag for this C_ITEM
Description: 
Return: The simulated time tag (SIMTIME)
virtual void print () ;
Virtual Method: print 
Summary: By default, this method prints the ID and simulation time to stderr,
         but is user-overridable.
Description: 
Return: None
virtual void printfile ( FILE* ) ;
Virtual Method: printfile 
Summary: By default, this is not implemented, but is user-overridable, and is
         intended to print statistics about this C_ITEM to a file.
Description: 
Return: None
IN: file to print to.
virtual void printstream ( ostream& out ) ;
Virtual Method: printstream 
Summary: By default, this method prints the ID and simulation time to an
         ostream object, but is user-overridable.
Description: 
Return: None
out
IN: ostream object to print to.
void put_link ( C_ITEM* lnk ) ;
INTERNAL METHOD
lnk
IN: next C_ITEM in the C_QUEUE.
void set_freeid ( int i ) ;
INTERNAL METHOD
void set_id ( int i ) ;
Method: set_id 
Summary: Set the ID of this C_ITEM
Description: 
Return: None
void set_link ( C_ITEM* lnk ) ;
INTERNAL METHOD
lnk
IN: next C_ITEM in the C_QUEUE.
void set_time_tag ( const SIMTIME& t ) ;
Method: set_time_tag 
Summary: Sets the simulated time tag for this C_ITEM
Description:
Return: None
t
IN: simulated time tag.
void set_time_tag ( double t ) ;
Overloaded Method: set_time_tag 
Summary: Sets the simulated time tag for this C_ITEM, setting the SIMTIME
         priority fields automatically to zero.
Description:
Return: None
t
IN: time tag.
void set_time_tag ( double t , int p1 ) ;
Overloaded Method: set_time_tag 
Summary: Sets the simulated time tag for this C_ITEM, setting the first
         SIMTIME priority field to a passed-in value, and setting the second
         priority field automatically to zero.
Description: 
Return: None
t
IN: time tag.
p1
IN: first priority field.
void set_time_tag ( double t , int p1 , int p2 ) ;
Overloaded Method: set_time_tag 
Summary: Sets the simulated time tag for this C_ITEM, including both priority
         fields
Description: 
Return: None
t
IN: time tag.
p1
IN: first priority field.
p2
IN: second priority field.

Public Data

NET_INT freeid;
Free list id.
NET_INT id;
Id.
NET_INT item_allign;
C_ITEM* link;
SIMTIME time_tag;
Time tag of item for sorting.

<<toc

class C_QUEUE

#include "queue.H"

Class: C_QUEUE
Summary: Singly linked list non-rollbackable data structure
Description: This class does not have any rollback support, and is thus
             simply a generic queue that sorts C_ITEMs according to simulated
             time tags. It can also be used as a stack. That is, popping must
             always be from the top of the queue (since it is singly linked)
             but pushing can be to the top or the bottom of the queue. When
             consistantly pushing to the top, this data structure acts as a
             stack. When consistantly pushing to the bottom, it acts as a
             queue. Sorting and inserting always put the low time value on
             top so that popping off the sorted queue or stack occurs in
             simulated time order.

Public Interface

C_QUEUE clear concat
copy deque deque
fast_pop_top get_bot get_item
get_length get_top init
insert insert_after join
length merge next
pbot pop_top print
printstream ptop push_bot
push_top remove remove
reset set_bot set_length
set_top sort

Public Interface

C_QUEUE () ;
void clear () ;
Method: clear
Summary: Clear this queue and delete all the items
Description: Sets top and bottom of this queue to NULL, and number of items
             to zero
Return: None
void concat ( C_QUEUE* q ) ;
Method: concat
Summary: Concatenate a specified queue with this queue, and reset the 
         specified queue
Description: 
Return: None
q
IN: specified queue to concatenate with this queue.
C_QUEUE* copy () ;
Method: copy
Summary: Copy this queue
Description: 
Return: A copy of this queue
void deque ( C_ITEM* item ) ;
Overloaded Method: deque
Summary: Remove (but don't delete) an item from the queue
Description: 
Return: None
item
IN: item to remove.
C_ITEM* deque ( int rid ) ;
Overloaded Method: deque
Summary: Remove (but don't delete) an item from the queue
Description: 
Return: A removed (but not deleted) item from the queue
rid
IN: ID of item to remove.
C_ITEM* fast_pop_top () ;
Method: fast_pop_top
Summary: Pops a specified item off of (ie, removes a specified item from) the
         top of the queue and returns it, but loses track of the number of
         items in the queue
Description: This method has undefined (erroneous) behavior when the queue is
             empty or has only one item in it. It also does not decrement the
             number of items. If either of these issues are (or potentially
             are) a problem, use pop_top, which is a slower but safe routine,
             instead.
Return: Item that has been popped off of (removed from) the top of the queue
C_ITEM* get_bot () ;
Method: get_bot (same as pbot)
Summary: Get a pointer to the item at the bottom of the queue without
         removing it from the queue.
Description: 
Return: A pointer to the item at the bottom of the queue
C_ITEM* get_item ( int id ) ;
Method: get_item
Summary: Get a pointer to the item with a specified ID
Description: 
Return: A pointer to the item with a specified ID
id
IN: ID of item.
int get_length () ;
Method: get_length (same as length)
Summary: Get the number of items in the queue
Description: 
Return: The number of items in the queue
C_ITEM* get_top () ;
Method: get_top (same as ptop)
Summary: Get a pointer to the item at the top of the queue without removing
         it from the queue.
Description: 
Return: A pointer to the item at the top of the queue
void init ( C_ITEM* t , C_ITEM* b , int len ) ;
Method: init 
Summary: Initialize the queue object
Description: This should be called initially or just after clearing the
             queue. Otherwise, calling this method will permanently lose the
             current information in the queue and create memory leaks.
Return: None
t
IN: top of the queue.
b
IN: bottom of the queue.
len
IN: number of items in the queue.
void insert ( C_ITEM* item ) ;
Method: insert (same as insert_after)
Summary: Insert a specified item into this queue, with the item having the
         lower simulated time tag on top
Description: 
Return: None
item
IN: specified item to insert into this queue.
void insert_after ( C_ITEM* item ) ;
Method: insert_after (same as insert)
Summary: Insert an item into this queue, with the item having the lower 
         simulated time tag on top
Description: 
Return: None
item
IN: specified item to insert into this queue.
void join ( C_QUEUE* q ) ;
Method: join
Summary: Concatenate a specified queue to this queue, but do not reset 
         the specified queue
Description: 
Return: None
q
IN: specified queue to concatenate with this queue.
int length () ;
Method: length (same as get_length)
Summary: Get the number of items in the queue
Description: 
Return: The number of items in the queue
void merge ( C_QUEUE* q ) ;
Method: merge
Summary: Merge a specified queue into this queue in simulated time order
Description: 
Return: None
q
IN: specified queue to merge with this queue.
C_ITEM* next ( C_ITEM* item ) ;
Method: next
Summary: Get a pointer to the item in the queue immediately following (ie
         below) a specified item without removing it from the queue
Description: 
Return: A pointer to the item in the queue immediately following (ie
        below) a specified item without removing it from the queue
item
IN: specified item after which the requested item lies.
C_ITEM* pbot () ;
Method: pbot (same as get_bot)
Summary: Get a pointer to the item at the bottom of the queue without
         removing it from the queue.
Description: 
Return: A pointer to the item at the bottom of the queue
C_ITEM* pop_top () ;
Method: pop_top
Summary: Pops a specified item off of (ie, removes a specified item from) the
         top of the queue and returns it
Description: 
Return: Item that has been popped off of (removed from) the top of the queue
void print () ;
Method: print
Summary: Print the items in this queue
Description: 
Return: None
void printstream ( ostream& out ) ;
Method: printstream
Summary: print the items in this queue using stream io
Description: 
Return: None
out
IN: the ostream to which to print.
C_ITEM* ptop () ;
Method: ptop (same as get_top)
Summary: Get a pointer to the item at the top of the queue without removing
         it from the queue.
Description: 
Return: A pointer to the item at the top of the queue
void push_bot ( C_ITEM* item ) ;
Method: push_bot
Summary: Pushes a specified item onto (ie, inserts a specified item at) the
         bottom of the queue
Description: 
Return: None
item
IN: specified item to insert.
void push_top ( C_ITEM* item ) ;
Method: push_top
Summary: Pushes a specified item onto (ie, inserts a specified item at) the
         top of the queue
Description: This method moves the top pointer in this queue to the specified
             item, which then points to the old top item
Return: None
item
IN: specified item to insert.
void remove ( C_ITEM* item ) ;
Overloaded Method: remove
Summary: Remove (delete) an item from the queue
Description: 
Return: None
item
IN: item to remove.
void remove ( int id ) ;
Overloaded Method: remove
Summary: Remove (delete) an item from the queue
Description: 
Return: None
id
IN: ID of item to remove.
void reset () ;
Method: reset
Summary: Clear this queue without deleting the items
Description: Sets top and bottom of this queue to NULL, and number of items
             to zero
Return: None
void set_bot ( C_ITEM* item ) ;
Method: set_bot
Summary: Set the bottom of the queue to point to a specified item
Description: This should be called initially or just after clearing the
             queue. Otherwise, calling this method will permanently lose the
             current information in the queue and create memory leaks.
Return: None
void set_length ( int l ) ;
Method: set_length
Summary: Set the number of items in the queue (GET RID OF!)
Description: 
Return: None
void set_top ( C_ITEM* item ) ;
IN: number of items in the queue.
void sort () ;
Method: sort
Summary: Sort the queue in time order
Description: If the number of items is 15 or less, this method uses insertion
             sort. Otherwise, it recursively divides the items into pairs of
             two halves until the number of items in each resulting half is
             15 or less. These are sorted with insertion sort. Once each each
             pair has two sorted halves, the two halves are merged into one
             sorted temporary queue.  Finally, it recursively merges all
             sorted temporary queues into the final sorted queue.
Return: None

Protected Interface

Protected Data

C_ITEM* bot;
static int cutoff;
Cutoff number for sorting.
int n_items;
int queue_allign1;
int queue_allign2;
int queue_allign3;
C_ITEM* top;

RB_DELETE_SINGLE_C_ITEM #include "qitem.H"
void RB_DELETE_SINGLE_C_ITEM(C_ITEM* obj ) ;

RB_NEW_C_ITEM #include "qitem.H"
C_ITEM* RB_NEW_C_ITEM(C_ITEM* obj ) ;

delete_single_C_ITEM #include "qitem.H"
void delete_single_C_ITEM(void* v ) ;

toc

ROLLBACKABLE CONTAINERS------------------------------------+

Metric Summary for ROLLBACKABLE CONTAINERS------------------------------------+

Total number of classes311% of total
Total number of statements356% of total
Total number of free standing functions939% of total
Average statements per class7-62% from average
Average McCabe complexity per class6-58% from average
Average number of public member functions per class13-39% from average
Average number of protected member functions per class0-100% from average
Average number of parameters per function0.5-36% from average
Average number of statements per function1.3-14% from average
Percent of functions documented78%-6% from average

Class Metrics

ClassPublic MembersStatementsMcCabe Complexity
C_SQ_ITEM999
C_XQUEUE1675
C_XHASH1565

Function Metrics

ClassStatementsMcCabe Complexity
RB_NEW_C_SQ_ITEM31
C_XQUEUE::reset31
RB_NEW_C_SQ_ITEM21
RB_NEW_C_XQUEUE21
C_XHASH::find21
C_SQ_ITEM::C_SQ_ITEM11
RB_DELETE_ARRAY_C_SQ_ITEM11
RB_DELETE_SINGLE_C_SQ_ITEM11
RB_DELETE_SINGLE_C_XQUEUE11
delete_C_SQ_ITEM_array11
delete_single_C_SQ_ITEM11
delete_single_C_XQUEUE11
C_XHASH::get_all11
C_SQ_ITEM::get_backlink11
C_XQUEUE::get_bot11
C_XQUEUE::get_length11
C_XHASH::get_length11
C_SQ_ITEM::get_processed11
C_SQ_ITEM::get_queue11
C_XHASH::get_size11
C_XQUEUE::get_top11
C_XHASH::printq11
C_SQ_ITEM::reset_processed11
C_SQ_ITEM::set_backlink11
C_XQUEUE::set_length11
C_SQ_ITEM::set_processed11
C_SQ_ITEM::set_xinsert11
C_SQ_ITEM::set_xremove11
C_XQUEUE::C_XQUEUE00
C_XHASH::C_XHASH00
C_XHASH::add00
C_XQUEUE::check_integrity00
C_XHASH::combine00
C_XHASH::exchange00
C_XQUEUE::exchange00
C_XHASH::find00
C_XQUEUE::find00
C_XHASH::get_hashid00
C_XQUEUE::join00
C_XQUEUE::pop_bot00
C_XQUEUE::pop_top00
C_XQUEUE::print00
C_XHASH::printh00
C_XQUEUE::push_bot00
C_XQUEUE::push_top00
C_XHASH::remove00
C_XQUEUE::remove00
C_XHASH::remove00
C_XHASH::reset00

toc >>

class C_SQ_ITEM : public C_ITEM

#include "sq_item.H"

Class: C_SQ_ITEM.

Summary: Base class for classes whose objects can be rollbackably inserted
         into doubly-linked list data structures of type C_XQUEUE, or
         non-rollbackably inserted into singly-linked list data structures of
         type C_QUEUE
Description: Classes must inherit from this class to be inserted into
             C_XQUEUEs or C_QUEUEs. This class is simply a generic queue item
             that can be sorted according to simulated time tags by a
             C_XQUEUE (doubly-linked) or C_QUEUE (singly-linked). All
             operations on a C_SQ_ITEM in or by a C_XQUEUE are rollbackable,
             while all operations on a C_SQ_ITEM in or by a C_QUEUE are
             non-rollbackable. They can also be used in a C_XQUEUE or a
             C_QUEUE used as a stack. That is, when consistantly popping from
             the top of the queue (which is the only way to pop in a C_QUEUE,
             since it is singly-linked), pushing can be to the top or the
             bottom of the queue. When consistantly pushing to the top, the
             C_XQUEUE or C_QUEUE acts as a stack. When consistantly pushing
             to the bottom, the C_XQUEUE or C_QUEUE acts as a queue. Pushing
             effects are vice-versa when consistantly popping from the bottom
             (rather than the top) of the queue (for C_XQUEUEs or
             C_DBL_QUEUEs only). Sorting and inserting operations always put
             the low time value on top so that consecutive pops off the top
             of the sorted queue or stack occurs in simulated time order.

Public Interface

C_SQ_ITEM get_backlink get_processed
get_queue reset_processed set_backlink
set_processed set_xinsert set_xremove

Public Interface

C_SQ_ITEM () ;
C_SQ_ITEM* get_backlink () ;
Method: get_backlink
Summary: Gets the back link for this C_ITEM (ie, the link to the previous
         item in the doubly-linked C_XQUEUE data structure)
Description: 
Return: The back link for this C_ITEM (ie, the link to the previous item in
        the doubly-linked C_XQUEUE data structure)
int get_processed () ;
INTERNAL METHOD
C_QUEUE* get_queue () ;
INTERNAL METHOD
void reset_processed () ;
INTERNAL METHOD
void set_backlink ( C_SQ_ITEM* bl ) ;
INTERNAL METHOD
void set_processed () ;
INTERNAL METHOD
void set_xinsert () ;
INTERNAL METHOD
void set_xremove () ;
INTERNAL METHOD

Public Data

C_SQ_ITEM* backlink;
int processed;
C_QUEUE queue;
JB: used for rqueues.
NET_INT sq_item_allign;

<<toc >>

class C_XHASH

#include "xhash.H"

Public Interface

C_XHASH add combine
exchange find find
get_all get_hashid get_length
get_size printh printq
remove remove reset

Public Interface

C_XHASH ( int n ) ;
Constructor Method: 
Summary: Constructs a C_XHASH with a hash array of specified length
Description: 
n
Length of hash array.
void add ( C_SQ_ITEM* item ) ;
Method: add
Summary: Add a specified C_SQ_ITEM to the hash table
Description: Push specified item to the bottom of the appropriate queue in
             the hash array
Return: None
item
C_SQ_ITEM to add.
void combine () ;
Method: combine
Summary: Concatonate each queue in this hash array into one queue, leaving
         the original hash table intact
Description: The resulting single queue can then be retrieved with the method
             get_all () and printed with printq ().
Return: None
void exchange ( C_SQ_ITEM* x_item ) ;
INTERNAL METHOD
x_item
IN: C_SQ_ITEM to exchange.
C_SQ_ITEM* find ( char* name ) ;
Overloaded Method: find
Summary: Return the C_SQ_ITEM in this hash table specified by item's name
Description: Gets the item from the appropriate queue in the hash array
Return: The C_SQ_ITEM in this hash table specified by item's name
C_SQ_ITEM* find ( int hid ) ;
Overloaded Method: find
Summary: Return the C_SQ_ITEM in this hash table specified by item's ID
Description: Gets the item from the appropriate queue in the hash array
Return: The C_SQ_ITEM in this hash table specified by item's ID
hid
ID of item to find.
C_XQUEUE* get_all () ;
Method: get_all
Summary: Get the combined queue generated by the last call to combine ()
Description: 
Return: The combined queue generated by the last call to combine ()
int get_hashid ( char* name ) ;
Method: get_hashid
Summary: Passes in the name that is used for hashing and returns the hash
         id that is used for the array index.
Return: The hash id that is used for the array index
int get_length () ;
Method: get_length
Summary: Get the number of C_SQ_ITEMs in this hash table
Description: 
Return: The number of C_SQ_ITEMs in this hash table
int get_size () ;
Method: get_size
Summary: Get the number of queues in this hash array
Description: 
Return: The number of queues in this hash array
void printh () ;
Method: printh
Summary: Print each C_SQ_ITEM in the hash table
Description: This prints the hash table by calling the virtual function print
             () on all of the C_SQ_ITEMs in the hash table. Unlike printq (),
             this method does not rely on first calling combine ().
Return: None
void printq () ;
Method: printq
Summary: Print each C_SQ_ITEM in the combined hash table
Description: Unlike printh (), which simply prints the hash table, this
             method relies on first calling combine () which concatonates the
             hash array into one combined queue. The resulting combined queue
             is printed with this method by calling the virtual function
             print () on all of the C_SQ_ITEMs in the combined queue.
Return: None
void remove ( C_SQ_ITEM* item ) ;
Method: remove
Summary: Remove (but don't delete) the specified item from this hash table
Description: 
Return: None
item
INOUT: C_SQ_ITEM to remove.
C_SQ_ITEM* remove ( int id ) ;
Method: remove
Summary: Remove (but don't delete) an item from this hash table specified
         by its ID
Description: 
Return: None
id
IN: ID of C_SQ_ITEM to remove.
void reset () ;
Method: reset
Summary: Clear the hash table
Description: Clear (delete) every queue in the hash array, then set length of
             the hash array to zero
Return: None

Protected Interface

Protected Data

int nitems;
Total number of items in the xhash.
C_XQUEUE* q;
Array of queues (dimension size).
C_XQUEUE* qall;
A queue of concatonated xhash queues.
int size;
Size of queue array.

<<toc

class C_XQUEUE

#include "xqueue.H"

Class: C_XQUEUE
Summary: Doubly-linked list rollbackable data structure
Description: This class is simply a rollbackable generic queue that sorts
             C_SQ_ITEMs according to simulated time tags. It can also be used
             as a stack. That is, when consistantly popping from the top of
             the queue, pushing can be to the top or the bottom of the
             queue. When consistantly pushing to the top, the C_XQUEUE acts
             as a stack. When consistantly pushing to the bottom, the
             C_XQUEUE acts as a queue. Pushing effects are vice-versa when
             consistantly popping from the bottom (rather than the top) of
             the queue (for C_XQUEUEs or C_DBL_QUEUEs only). Sorting and
             inserting operations always put the low time value on top so
             that consecutive pops off the top of the sorted queue or stack
             occurs in simulated time order.

Public Interface

C_XQUEUE check_integrity exchange
find get_bot get_length
get_top join pop_bot
pop_top print push_bot
push_top remove reset
set_length

Public Interface

C_XQUEUE () ;
int check_integrity () ;
INTERNAL METHODMethod: check_integrity
  Summary: Make sure the variables of this class are consistent with one
           another
  Description: 
  Return: None
void exchange ( C_SQ_ITEM* x_item ) ;
INTERNAL METHOD
C_SQ_ITEM* find ( int id ) ;
Method: find
Summary: Find (without deleting) an item from the queue
Description: 
Return: An item from the queue
id
IN: item ID to find from the queue.
C_SQ_ITEM* get_bot () ;
Method: get_bot
Summary: Get a pointer to the item at the bottom of the queue without
         removing it from the queue.
Description: 
Return: A pointer to the item at the bottom of the queue
int get_length () ;
Method: get_length
Summary: Get the number of items in the queue
Description: 
Return: The number of items in the queue
C_SQ_ITEM* get_top () ;
Method: get_top
Summary: Get a pointer to the item at the top of the queue without removing
         it from the queue.
Description: 
Return: A pointer to the item at the top of the queue
void join ( C_XQUEUE* q ) ;
Method: join
Summary: Concatenate a specified queue to this queue, but do not reset 
         the specified queue
Description: 
Return: None
q
IN: specified queue to concatenate with this queue.
C_SQ_ITEM* pop_bot () ;
Method: pop_bot
Summary: Pops a specified item off of (ie, removes a specified item from) the
         bottom of the queue and returns it
Description: 
Return: Item that has been popped off of (removed from) the bottom of the
        queue
C_SQ_ITEM* pop_top () ;
Method: pop_top
Summary: Pops a specified item off of (ie, removes a specified item from) the
         top of the queue and returns it
Description: 
Return: Item that has been popped off of (removed from) the top of the queue
void print () ;
Method: print
Summary: Print the items in this queue
Description: 
Return: None
void push_bot ( C_SQ_ITEM* x_item ) ;
Method: push_bot
Summary: Pushes a specified item onto (ie, inserts a specified item at) the
         bottom of the queue
Description: 
Return: None
x_item
IN: specified item to insert.
void push_top ( C_SQ_ITEM* x_item ) ;
Method: push_top
Summary: Pushes a specified item onto (ie, inserts a specified item at) the
         top of the queue
Description: This method moves the top pointer in this queue to the specified
             item, which then points to the old top item
Return: None
x_item
IN: specified item to insert.
void remove ( C_SQ_ITEM* x_item ) ;
Method: remove
Summary: Remove (but don't delete) an item from the queue
Description: 
Return: None
x_item
INOUT: item to remove from the queue.
void reset () ;
Method: reset
Summary: Clear this queue without deleting the items
Description: Sets top and bottom of this queue to NULL, and number of items
             to zero
Return: None
void set_length ( int l ) ;
Method: set_length
Summary: Set the number of items in the queue (GET RID OF!)
Description: 
Return: None

Private Interface

Private Data

C_SQ_ITEM* bot;
int length;
C_SQ_ITEM* top;
int xqueue_allign1;
int xqueue_allign2;
int xqueue_allign3;

RB_DELETE_ARRAY_C_SQ_ITEM #include "sq_item.H"
void RB_DELETE_ARRAY_C_SQ_ITEM(C_SQ_ITEM* obj ) ;

RB_DELETE_SINGLE_C_SQ_ITEM #include "sq_item.H"
void RB_DELETE_SINGLE_C_SQ_ITEM(C_SQ_ITEM* obj ) ;

RB_DELETE_SINGLE_C_XQUEUE #include "xqueue.H"
void RB_DELETE_SINGLE_C_XQUEUE(C_XQUEUE* obj ) ;

RB_NEW_C_SQ_ITEM #include "sq_item.H"
C_SQ_ITEM* RB_NEW_C_SQ_ITEM(C_SQ_ITEM* obj ) ;

RB_NEW_C_SQ_ITEM #include "sq_item.H"
C_SQ_ITEM* RB_NEW_C_SQ_ITEM(size_t num_C_SQ_ITEM ) ;

RB_NEW_C_XQUEUE #include "xqueue.H"
C_XQUEUE* RB_NEW_C_XQUEUE(C_XQUEUE* obj ) ;

delete_C_SQ_ITEM_array #include "sq_item.H"
void delete_C_SQ_ITEM_array(void* v ) ;

delete_single_C_SQ_ITEM #include "sq_item.H"
void delete_single_C_SQ_ITEM(void* v ) ;

delete_single_C_XQUEUE #include "xqueue.H"
void delete_single_C_XQUEUE(void* v ) ;

toc

Index

Classes and Structs
BASE_STATE C_DBL_ITEM C_DBL_QUEUE
C_DUMMY_V C_EVENT C_FREE_LIST
C_GLOBAL_NAME C_HASH C_HOLDER
C_ITEM C_OBJMAN C_QUEUE
C_RANDOM C_SIMOBJ C_SQ_ITEM
C_XHASH C_XQUEUE DATA_PARSER
RB_ostream SIMTIME STATE_DOUBLE
STATE_FLOAT STATE_INT STATE_POINTER
STATE_STRING STOPWATCH

Functions
operator!= operator< operator<<
operator<= operator== operator>
operator>= CancelEvent RB_DELETE_ARRAY_C_SQ_ITEM
RB_DELETE_SINGLE_C_ITEM RB_DELETE_SINGLE_C_SQ_ITEM RB_DELETE_SINGLE_C_XQUEUE
RB_NEW_C_ITEM RB_NEW_C_SQ_ITEM RB_NEW_C_SQ_ITEM
RB_NEW_C_XQUEUE ReScheduleEvent ScheduleEvent
ScheduleEventHandler delete_C_SQ_ITEM_array delete_single_C_ITEM
delete_single_C_SQ_ITEM delete_single_C_XQUEUE