MntComponent Class Reference
#include <mnt_component.h>
Inheritance diagram for MntComponent:
List of all members.
Detailed Description
MntComponent is the base class of all Mnt components.
A component is a C++ object that can be accessed using Tcl interface. A MntComponent typically receives some data, processes it, and passes it to zero or more other components.
To use MntComponent, two things are typically needed. First, overwrite the recv() method to process the data. Second, create a static class object to expose the component to Tcl.
MntComponent objects can be linked at the Tcl-level to create a tree of components. Data flows through the tree, and are processed along the way.
An MntComponent object maintains a link list of other components "downstream", i.e., nodes to pass data to.
Constructor & Destructor Documentation
MntComponent::MntComponent |
( |
|
) |
|
|
|
Constructor for MntComponent, initialize every member to NULL. |
Member Function Documentation
|
Add a link from this object to another component c
- Parameters:
-
| c | component to linked to. |
|
int MntComponent::command |
( |
int |
argc, |
|
|
const char *const * |
argv |
|
) |
|
|
|
This method overwrites TclObject command method and adds additional mapping from C++ functions to Tcl function.
Reimplemented in MntPump. |
|
Remove the link from this object to component c. If c is not a valid down stream object, nothing happens. If for some reasons multiple c exists, all instances of c is removed.
- Parameters:
-
|
char* MntComponent::eval_instproc |
( |
const char * |
method |
) |
[inline] |
|
|
This methods is the hook from C++ to Tcl methods. It allows invocation Tcl methods from C++.
- Parameters:
-
| method | the name of the Tcl method to invoke. This string, can optionally contains arguments to the method as well. |
|
virtual void MntComponent::flush |
( |
|
) |
[inline, virtual] |
|
|
Some MntComponent object may buffer some data instead of processing them immediately. In such cases, it may be necessary to call flush() at appropriate point of the program to push the buffered data down stream. |
virtual void MntComponent::flush_next |
( |
|
) |
[inline, virtual] |
|
|
This method calls flush method of all components down stream. |
MntComponent* MntComponent::lookup_tcl_object |
( |
const char * |
name |
) |
[inline] |
|
|
Given the name of a Tcl object, returns the pointer to the corresponding C++ object.
- Parameters:
-
| name | A string containing the name of the Tcl object to looked up. |
|
virtual void MntComponent::pull |
( |
MntClientData |
param |
) |
[inline, virtual] |
|
|
This method pull data from the upstream node when needed. ??? |
virtual void MntComponent::push |
( |
MntComponent * |
component, |
|
|
MntClientData |
data |
|
) |
[inline, virtual] |
|
virtual void MntComponent::push |
( |
MntData * |
data |
) |
[inline, virtual] |
|
|
This method sends processed data to all components down stream.
- Parameters:
-
| data | Processed data to pass down stream. |
|
|
This method sends processed data to the a specific component.
- Parameters:
-
| component | Component to pass data to. |
| data | Processed data object to pass to component. |
|
virtual void MntComponent::recv |
( |
MntData * |
|
) |
[inline, virtual] |
|
|
This method should be overwritten by subclass. This is where most actions happens. Whenever some data is received, this method is called. Typically, a component will process the data in this method, and call push() to push processed data to the nodes down stream.
Reimplemented in MntRTPFileWriter, and MntRTPPayloadDumper. |
Member Data Documentation
|
first node to passed data to |
|
next node in the link list of downstream nodes |
|
node this component will received data from |
The documentation for this class was generated from the following files:
- /Users/ooiwt/5248proj/stage1/src/mnt_component.h
- /Users/ooiwt/5248proj/stage1/src/mnt_component.cc
Generated on Thu Aug 25 14:07:39 2005 for mnt by
1.4.4