| ns2 Network Simulator C++ Class Hierarchy of version ns-snapshot-20040722 | |
| | Home | Source Code | Manual | FAQ | Mailing List Archive | Search | | | Download | |
Compounds | |
| class | TclArguments |
| class | TclObjectHelper |
Defines | |
| #define | DECLARE_OTCLCLASS(classname, otclname) |
| #define | DEFINE_ABSTRACT_OTCL_CLASS(classname, otclname) |
| #define | DEFINE_OTCL_CLASS(classname, otclname) |
| #define | INSTPROC(c_method) |
| #define | INSTPROC_PUBLIC(c_method) INSTPROC(c_method) |
| #define | INSTPROC_PRIVATE(c_method) INSTPROC(c_method) |
| #define | PROC(c_static_method) |
| #define | PROC_PUBLIC(c_static_method) PROC(c_static_method) |
| #define | PROC_PRIVATE(c_static_method) PROC(c_static_method) |
| #define | BEGIN_PARSE_ARGS(argc, argv) TclArguments _args_(argc, argv) |
| #define | END_PARSE_ARGS |
| #define | ARG(var) |
| #define | ARG_DEFAULT(var, default) |
|
|
Value: |
|
|
Value: |
|
|
|
|
|
Value: \ static class classname ## _Class : public TclClass, \ public TclObjectHelper<classname> { \ public: \ typedef TclObjectHelper<classname> MyHelper; \ typedef classname MyTclObject; \ \ classname ## _Class() : TclClass(otclname) { } \ TclObject *create(int argc, const char*const* argv); \ void otcl_mappings(); \ } classname ## _class_obj |
|
|
Value: DECLARE_OTCLCLASS(classname, otclname); \ \ inline TclObject *classname ## _Class::create(int , \ const char*const* ) { \ Tcl::instance().resultf("cannot create object of abstract class " \ "'%s'", classname_); \ return NULL; \ } \ \ void classname ## _Class::otcl_mappings() |
|
|
Value: DECLARE_OTCLCLASS(classname, otclname); \ \ inline TclObject *classname ## _Class::create(int , \ const char*const* ) { \ return (new MyTclObject); \ } \ \ void classname ## _Class::otcl_mappings() |
|
|
Value: if (_args_.more_args()) { \ Tcl::instance().resultf("Extra arguments (starting at " \ "argument %d)", _args_.current()-1); \ _args_.add_error(); \ return TCL_ERROR; \ } |
|
|
Value: { \
static MyHelper::TMethod method = &MyTclObject::c_method; \
OTclAddIMethod(class_, #c_method, MyHelper::dispatch_, \
(void*) &method, NULL); \
}
|
|
|
|
|
|
|
|
|
Value: { \
int (*method)(int,const char*const*) = &MyTclObject::c_static_method;\
OTclAddPMethod((OTclObject*)class_, #c_static_method, \
TclObject::dispatch_static_proc, \
(void*) method, NULL); \
}
|
|
|
|
|
|
|