# HG changeset patch # User Mitch Watrous # Date 1300983824 25200 # Node ID 9d2c79c992d76348f2df290e060417a6896169ec # Parent afe2960e58b71f6634f47e82e2186fae0497248b Split contrib module into config-store and tools diff -r afe2960e58b7 -r 9d2c79c992d7 bindings/python/apidefs/gcc-ILP32/ns3_module_config_store.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bindings/python/apidefs/gcc-ILP32/ns3_module_config_store.py Thu Mar 24 09:23:44 2011 -0700 @@ -0,0 +1,261 @@ +from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers + +def register_types(module): + root_module = module.get_root() + + ## file-config.h: ns3::FileConfig [class] + module.add_class('FileConfig', allow_subclassing=True) + ## gtk-config-store.h: ns3::GtkConfigStore [class] + module.add_class('GtkConfigStore') + ## file-config.h: ns3::NoneFileConfig [class] + module.add_class('NoneFileConfig', parent=root_module['ns3::FileConfig']) + ## config-store.h: ns3::ConfigStore [class] + module.add_class('ConfigStore', parent=root_module['ns3::ObjectBase']) + ## config-store.h: ns3::ConfigStore::Mode [enumeration] + module.add_enum('Mode', ['LOAD', 'SAVE', 'NONE'], outer_class=root_module['ns3::ConfigStore']) + ## config-store.h: ns3::ConfigStore::FileFormat [enumeration] + module.add_enum('FileFormat', ['XML', 'RAW_TEXT'], outer_class=root_module['ns3::ConfigStore']) + + ## Register a nested module for the namespace Config + + nested_module = module.add_cpp_namespace('Config') + register_types_ns3_Config(nested_module) + + + ## Register a nested module for the namespace FatalImpl + + nested_module = module.add_cpp_namespace('FatalImpl') + register_types_ns3_FatalImpl(nested_module) + + + ## Register a nested module for the namespace addressUtils + + nested_module = module.add_cpp_namespace('addressUtils') + register_types_ns3_addressUtils(nested_module) + + + ## Register a nested module for the namespace aodv + + nested_module = module.add_cpp_namespace('aodv') + register_types_ns3_aodv(nested_module) + + + ## Register a nested module for the namespace dot11s + + nested_module = module.add_cpp_namespace('dot11s') + register_types_ns3_dot11s(nested_module) + + + ## Register a nested module for the namespace dsdv + + nested_module = module.add_cpp_namespace('dsdv') + register_types_ns3_dsdv(nested_module) + + + ## Register a nested module for the namespace flame + + nested_module = module.add_cpp_namespace('flame') + register_types_ns3_flame(nested_module) + + + ## Register a nested module for the namespace internal + + nested_module = module.add_cpp_namespace('internal') + register_types_ns3_internal(nested_module) + + + ## Register a nested module for the namespace olsr + + nested_module = module.add_cpp_namespace('olsr') + register_types_ns3_olsr(nested_module) + + +def register_types_ns3_Config(module): + root_module = module.get_root() + + +def register_types_ns3_FatalImpl(module): + root_module = module.get_root() + + +def register_types_ns3_addressUtils(module): + root_module = module.get_root() + + +def register_types_ns3_aodv(module): + root_module = module.get_root() + + +def register_types_ns3_dot11s(module): + root_module = module.get_root() + + +def register_types_ns3_dsdv(module): + root_module = module.get_root() + + +def register_types_ns3_flame(module): + root_module = module.get_root() + + +def register_types_ns3_internal(module): + root_module = module.get_root() + + +def register_types_ns3_olsr(module): + root_module = module.get_root() + + +def register_methods(root_module): + register_Ns3FileConfig_methods(root_module, root_module['ns3::FileConfig']) + register_Ns3GtkConfigStore_methods(root_module, root_module['ns3::GtkConfigStore']) + register_Ns3NoneFileConfig_methods(root_module, root_module['ns3::NoneFileConfig']) + register_Ns3ConfigStore_methods(root_module, root_module['ns3::ConfigStore']) + return + +def register_Ns3FileConfig_methods(root_module, cls): + ## file-config.h: ns3::FileConfig::FileConfig() [constructor] + cls.add_constructor([]) + ## file-config.h: ns3::FileConfig::FileConfig(ns3::FileConfig const & arg0) [copy constructor] + cls.add_constructor([param('ns3::FileConfig const &', 'arg0')]) + ## file-config.h: void ns3::FileConfig::Attributes() [member function] + cls.add_method('Attributes', + 'void', + [], + is_pure_virtual=True, is_virtual=True) + ## file-config.h: void ns3::FileConfig::Default() [member function] + cls.add_method('Default', + 'void', + [], + is_pure_virtual=True, is_virtual=True) + ## file-config.h: void ns3::FileConfig::Global() [member function] + cls.add_method('Global', + 'void', + [], + is_pure_virtual=True, is_virtual=True) + ## file-config.h: void ns3::FileConfig::SetFilename(std::string filename) [member function] + cls.add_method('SetFilename', + 'void', + [param('std::string', 'filename')], + is_pure_virtual=True, is_virtual=True) + return + +def register_Ns3GtkConfigStore_methods(root_module, cls): + ## gtk-config-store.h: ns3::GtkConfigStore::GtkConfigStore(ns3::GtkConfigStore const & arg0) [copy constructor] + cls.add_constructor([param('ns3::GtkConfigStore const &', 'arg0')]) + ## gtk-config-store.h: ns3::GtkConfigStore::GtkConfigStore() [constructor] + cls.add_constructor([]) + ## gtk-config-store.h: void ns3::GtkConfigStore::ConfigureAttributes() [member function] + cls.add_method('ConfigureAttributes', + 'void', + []) + ## gtk-config-store.h: void ns3::GtkConfigStore::ConfigureDefaults() [member function] + cls.add_method('ConfigureDefaults', + 'void', + []) + return + +def register_Ns3NoneFileConfig_methods(root_module, cls): + ## file-config.h: ns3::NoneFileConfig::NoneFileConfig(ns3::NoneFileConfig const & arg0) [copy constructor] + cls.add_constructor([param('ns3::NoneFileConfig const &', 'arg0')]) + ## file-config.h: ns3::NoneFileConfig::NoneFileConfig() [constructor] + cls.add_constructor([]) + ## file-config.h: void ns3::NoneFileConfig::Attributes() [member function] + cls.add_method('Attributes', + 'void', + [], + is_virtual=True) + ## file-config.h: void ns3::NoneFileConfig::Default() [member function] + cls.add_method('Default', + 'void', + [], + is_virtual=True) + ## file-config.h: void ns3::NoneFileConfig::Global() [member function] + cls.add_method('Global', + 'void', + [], + is_virtual=True) + ## file-config.h: void ns3::NoneFileConfig::SetFilename(std::string filename) [member function] + cls.add_method('SetFilename', + 'void', + [param('std::string', 'filename')], + is_virtual=True) + return + +def register_Ns3ConfigStore_methods(root_module, cls): + ## config-store.h: ns3::ConfigStore::ConfigStore(ns3::ConfigStore const & arg0) [copy constructor] + cls.add_constructor([param('ns3::ConfigStore const &', 'arg0')]) + ## config-store.h: ns3::ConfigStore::ConfigStore() [constructor] + cls.add_constructor([]) + ## config-store.h: void ns3::ConfigStore::ConfigureAttributes() [member function] + cls.add_method('ConfigureAttributes', + 'void', + []) + ## config-store.h: void ns3::ConfigStore::ConfigureDefaults() [member function] + cls.add_method('ConfigureDefaults', + 'void', + []) + ## config-store.h: ns3::TypeId ns3::ConfigStore::GetInstanceTypeId() const [member function] + cls.add_method('GetInstanceTypeId', + 'ns3::TypeId', + [], + is_const=True, is_virtual=True) + ## config-store.h: static ns3::TypeId ns3::ConfigStore::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## config-store.h: void ns3::ConfigStore::SetFileFormat(ns3::ConfigStore::FileFormat format) [member function] + cls.add_method('SetFileFormat', + 'void', + [param('ns3::ConfigStore::FileFormat', 'format')]) + ## config-store.h: void ns3::ConfigStore::SetFilename(std::string filename) [member function] + cls.add_method('SetFilename', + 'void', + [param('std::string', 'filename')]) + ## config-store.h: void ns3::ConfigStore::SetMode(ns3::ConfigStore::Mode mode) [member function] + cls.add_method('SetMode', + 'void', + [param('ns3::ConfigStore::Mode', 'mode')]) + return + +def register_functions(root_module): + module = root_module + register_functions_ns3_Config(module.get_submodule('Config'), root_module) + register_functions_ns3_FatalImpl(module.get_submodule('FatalImpl'), root_module) + register_functions_ns3_addressUtils(module.get_submodule('addressUtils'), root_module) + register_functions_ns3_aodv(module.get_submodule('aodv'), root_module) + register_functions_ns3_dot11s(module.get_submodule('dot11s'), root_module) + register_functions_ns3_dsdv(module.get_submodule('dsdv'), root_module) + register_functions_ns3_flame(module.get_submodule('flame'), root_module) + register_functions_ns3_internal(module.get_submodule('internal'), root_module) + register_functions_ns3_olsr(module.get_submodule('olsr'), root_module) + return + +def register_functions_ns3_Config(module, root_module): + return + +def register_functions_ns3_FatalImpl(module, root_module): + return + +def register_functions_ns3_addressUtils(module, root_module): + return + +def register_functions_ns3_aodv(module, root_module): + return + +def register_functions_ns3_dot11s(module, root_module): + return + +def register_functions_ns3_dsdv(module, root_module): + return + +def register_functions_ns3_flame(module, root_module): + return + +def register_functions_ns3_internal(module, root_module): + return + +def register_functions_ns3_olsr(module, root_module): + return + diff -r afe2960e58b7 -r 9d2c79c992d7 bindings/python/apidefs/gcc-ILP32/ns3_module_contrib.py --- a/bindings/python/apidefs/gcc-ILP32/ns3_module_contrib.py Thu Mar 24 15:11:56 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,626 +0,0 @@ -from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers - -def register_types(module): - root_module = module.get_root() - - ## average.h: ns3::Average [class] - module.add_class('Average', template_parameters=['double']) - ## delay-jitter-estimation.h: ns3::DelayJitterEstimation [class] - module.add_class('DelayJitterEstimation') - ## event-garbage-collector.h: ns3::EventGarbageCollector [class] - module.add_class('EventGarbageCollector') - ## file-config.h: ns3::FileConfig [class] - module.add_class('FileConfig', allow_subclassing=True) - ## gnuplot.h: ns3::Gnuplot [class] - module.add_class('Gnuplot') - ## gnuplot.h: ns3::GnuplotCollection [class] - module.add_class('GnuplotCollection') - ## gnuplot.h: ns3::GnuplotDataset [class] - module.add_class('GnuplotDataset') - ## gtk-config-store.h: ns3::GtkConfigStore [class] - module.add_class('GtkConfigStore') - ## file-config.h: ns3::NoneFileConfig [class] - module.add_class('NoneFileConfig', parent=root_module['ns3::FileConfig']) - ## config-store.h: ns3::ConfigStore [class] - module.add_class('ConfigStore', parent=root_module['ns3::ObjectBase']) - ## config-store.h: ns3::ConfigStore::Mode [enumeration] - module.add_enum('Mode', ['LOAD', 'SAVE', 'NONE'], outer_class=root_module['ns3::ConfigStore']) - ## config-store.h: ns3::ConfigStore::FileFormat [enumeration] - module.add_enum('FileFormat', ['XML', 'RAW_TEXT'], outer_class=root_module['ns3::ConfigStore']) - ## flow-id-tag.h: ns3::FlowIdTag [class] - module.add_class('FlowIdTag', parent=root_module['ns3::Tag']) - ## gnuplot.h: ns3::Gnuplot2dDataset [class] - module.add_class('Gnuplot2dDataset', parent=root_module['ns3::GnuplotDataset']) - ## gnuplot.h: ns3::Gnuplot2dDataset::Style [enumeration] - module.add_enum('Style', ['LINES', 'POINTS', 'LINES_POINTS', 'DOTS', 'IMPULSES', 'STEPS', 'FSTEPS', 'HISTEPS'], outer_class=root_module['ns3::Gnuplot2dDataset']) - ## gnuplot.h: ns3::Gnuplot2dDataset::ErrorBars [enumeration] - module.add_enum('ErrorBars', ['NONE', 'X', 'Y', 'XY'], outer_class=root_module['ns3::Gnuplot2dDataset']) - ## gnuplot.h: ns3::Gnuplot2dFunction [class] - module.add_class('Gnuplot2dFunction', parent=root_module['ns3::GnuplotDataset']) - ## gnuplot.h: ns3::Gnuplot3dDataset [class] - module.add_class('Gnuplot3dDataset', parent=root_module['ns3::GnuplotDataset']) - ## gnuplot.h: ns3::Gnuplot3dFunction [class] - module.add_class('Gnuplot3dFunction', parent=root_module['ns3::GnuplotDataset']) - - ## Register a nested module for the namespace Config - - nested_module = module.add_cpp_namespace('Config') - register_types_ns3_Config(nested_module) - - - ## Register a nested module for the namespace FatalImpl - - nested_module = module.add_cpp_namespace('FatalImpl') - register_types_ns3_FatalImpl(nested_module) - - - ## Register a nested module for the namespace addressUtils - - nested_module = module.add_cpp_namespace('addressUtils') - register_types_ns3_addressUtils(nested_module) - - - ## Register a nested module for the namespace aodv - - nested_module = module.add_cpp_namespace('aodv') - register_types_ns3_aodv(nested_module) - - - ## Register a nested module for the namespace dot11s - - nested_module = module.add_cpp_namespace('dot11s') - register_types_ns3_dot11s(nested_module) - - - ## Register a nested module for the namespace dsdv - - nested_module = module.add_cpp_namespace('dsdv') - register_types_ns3_dsdv(nested_module) - - - ## Register a nested module for the namespace flame - - nested_module = module.add_cpp_namespace('flame') - register_types_ns3_flame(nested_module) - - - ## Register a nested module for the namespace internal - - nested_module = module.add_cpp_namespace('internal') - register_types_ns3_internal(nested_module) - - - ## Register a nested module for the namespace olsr - - nested_module = module.add_cpp_namespace('olsr') - register_types_ns3_olsr(nested_module) - - -def register_types_ns3_Config(module): - root_module = module.get_root() - - -def register_types_ns3_FatalImpl(module): - root_module = module.get_root() - - -def register_types_ns3_addressUtils(module): - root_module = module.get_root() - - -def register_types_ns3_aodv(module): - root_module = module.get_root() - - -def register_types_ns3_dot11s(module): - root_module = module.get_root() - - -def register_types_ns3_dsdv(module): - root_module = module.get_root() - - -def register_types_ns3_flame(module): - root_module = module.get_root() - - -def register_types_ns3_internal(module): - root_module = module.get_root() - - -def register_types_ns3_olsr(module): - root_module = module.get_root() - - -def register_methods(root_module): - register_Ns3Average__Double_methods(root_module, root_module['ns3::Average< double >']) - register_Ns3DelayJitterEstimation_methods(root_module, root_module['ns3::DelayJitterEstimation']) - register_Ns3EventGarbageCollector_methods(root_module, root_module['ns3::EventGarbageCollector']) - register_Ns3FileConfig_methods(root_module, root_module['ns3::FileConfig']) - register_Ns3Gnuplot_methods(root_module, root_module['ns3::Gnuplot']) - register_Ns3GnuplotCollection_methods(root_module, root_module['ns3::GnuplotCollection']) - register_Ns3GnuplotDataset_methods(root_module, root_module['ns3::GnuplotDataset']) - register_Ns3GtkConfigStore_methods(root_module, root_module['ns3::GtkConfigStore']) - register_Ns3NoneFileConfig_methods(root_module, root_module['ns3::NoneFileConfig']) - register_Ns3ConfigStore_methods(root_module, root_module['ns3::ConfigStore']) - register_Ns3FlowIdTag_methods(root_module, root_module['ns3::FlowIdTag']) - register_Ns3Gnuplot2dDataset_methods(root_module, root_module['ns3::Gnuplot2dDataset']) - register_Ns3Gnuplot2dFunction_methods(root_module, root_module['ns3::Gnuplot2dFunction']) - register_Ns3Gnuplot3dDataset_methods(root_module, root_module['ns3::Gnuplot3dDataset']) - register_Ns3Gnuplot3dFunction_methods(root_module, root_module['ns3::Gnuplot3dFunction']) - return - -def register_Ns3Average__Double_methods(root_module, cls): - ## average.h: ns3::Average::Average(ns3::Average const & arg0) [copy constructor] - cls.add_constructor([param('ns3::Average< double > const &', 'arg0')]) - ## average.h: ns3::Average::Average() [constructor] - cls.add_constructor([]) - ## average.h: double ns3::Average::Avg() const [member function] - cls.add_method('Avg', - 'double', - [], - is_const=True) - ## average.h: uint32_t ns3::Average::Count() const [member function] - cls.add_method('Count', - 'uint32_t', - [], - is_const=True) - ## average.h: double ns3::Average::Error90() const [member function] - cls.add_method('Error90', - 'double', - [], - is_const=True) - ## average.h: double ns3::Average::Error95() const [member function] - cls.add_method('Error95', - 'double', - [], - is_const=True) - ## average.h: double ns3::Average::Error99() const [member function] - cls.add_method('Error99', - 'double', - [], - is_const=True) - ## average.h: double ns3::Average::Max() const [member function] - cls.add_method('Max', - 'double', - [], - is_const=True) - ## average.h: double ns3::Average::Mean() const [member function] - cls.add_method('Mean', - 'double', - [], - is_const=True) - ## average.h: double ns3::Average::Min() const [member function] - cls.add_method('Min', - 'double', - [], - is_const=True) - ## average.h: void ns3::Average::Reset() [member function] - cls.add_method('Reset', - 'void', - []) - ## average.h: double ns3::Average::Stddev() const [member function] - cls.add_method('Stddev', - 'double', - [], - is_const=True) - ## average.h: void ns3::Average::Update(double const & x) [member function] - cls.add_method('Update', - 'void', - [param('double const &', 'x')]) - ## average.h: double ns3::Average::Var() const [member function] - cls.add_method('Var', - 'double', - [], - is_const=True) - return - -def register_Ns3DelayJitterEstimation_methods(root_module, cls): - ## delay-jitter-estimation.h: ns3::DelayJitterEstimation::DelayJitterEstimation(ns3::DelayJitterEstimation const & arg0) [copy constructor] - cls.add_constructor([param('ns3::DelayJitterEstimation const &', 'arg0')]) - ## delay-jitter-estimation.h: ns3::DelayJitterEstimation::DelayJitterEstimation() [constructor] - cls.add_constructor([]) - ## delay-jitter-estimation.h: ns3::Time ns3::DelayJitterEstimation::GetLastDelay() const [member function] - cls.add_method('GetLastDelay', - 'ns3::Time', - [], - is_const=True) - ## delay-jitter-estimation.h: ns3::Time ns3::DelayJitterEstimation::GetLastJitter() const [member function] - cls.add_method('GetLastJitter', - 'ns3::Time', - [], - is_const=True) - ## delay-jitter-estimation.h: static void ns3::DelayJitterEstimation::PrepareTx(ns3::Ptr packet) [member function] - cls.add_method('PrepareTx', - 'void', - [param('ns3::Ptr< ns3::Packet const >', 'packet')], - is_static=True) - ## delay-jitter-estimation.h: void ns3::DelayJitterEstimation::RecordRx(ns3::Ptr packet) [member function] - cls.add_method('RecordRx', - 'void', - [param('ns3::Ptr< ns3::Packet const >', 'packet')]) - return - -def register_Ns3EventGarbageCollector_methods(root_module, cls): - ## event-garbage-collector.h: ns3::EventGarbageCollector::EventGarbageCollector(ns3::EventGarbageCollector const & arg0) [copy constructor] - cls.add_constructor([param('ns3::EventGarbageCollector const &', 'arg0')]) - ## event-garbage-collector.h: ns3::EventGarbageCollector::EventGarbageCollector() [constructor] - cls.add_constructor([]) - ## event-garbage-collector.h: void ns3::EventGarbageCollector::Track(ns3::EventId event) [member function] - cls.add_method('Track', - 'void', - [param('ns3::EventId', 'event')]) - return - -def register_Ns3FileConfig_methods(root_module, cls): - ## file-config.h: ns3::FileConfig::FileConfig() [constructor] - cls.add_constructor([]) - ## file-config.h: ns3::FileConfig::FileConfig(ns3::FileConfig const & arg0) [copy constructor] - cls.add_constructor([param('ns3::FileConfig const &', 'arg0')]) - ## file-config.h: void ns3::FileConfig::Attributes() [member function] - cls.add_method('Attributes', - 'void', - [], - is_pure_virtual=True, is_virtual=True) - ## file-config.h: void ns3::FileConfig::Default() [member function] - cls.add_method('Default', - 'void', - [], - is_pure_virtual=True, is_virtual=True) - ## file-config.h: void ns3::FileConfig::Global() [member function] - cls.add_method('Global', - 'void', - [], - is_pure_virtual=True, is_virtual=True) - ## file-config.h: void ns3::FileConfig::SetFilename(std::string filename) [member function] - cls.add_method('SetFilename', - 'void', - [param('std::string', 'filename')], - is_pure_virtual=True, is_virtual=True) - return - -def register_Ns3Gnuplot_methods(root_module, cls): - ## gnuplot.h: ns3::Gnuplot::Gnuplot(ns3::Gnuplot const & arg0) [copy constructor] - cls.add_constructor([param('ns3::Gnuplot const &', 'arg0')]) - ## gnuplot.h: ns3::Gnuplot::Gnuplot(std::string const & outputFilename="", std::string const & title="") [constructor] - cls.add_constructor([param('std::string const &', 'outputFilename', default_value='""'), param('std::string const &', 'title', default_value='""')]) - ## gnuplot.h: void ns3::Gnuplot::AddDataset(ns3::GnuplotDataset const & dataset) [member function] - cls.add_method('AddDataset', - 'void', - [param('ns3::GnuplotDataset const &', 'dataset')]) - ## gnuplot.h: void ns3::Gnuplot::AppendExtra(std::string const & extra) [member function] - cls.add_method('AppendExtra', - 'void', - [param('std::string const &', 'extra')]) - ## gnuplot.h: static std::string ns3::Gnuplot::DetectTerminal(std::string const & filename) [member function] - cls.add_method('DetectTerminal', - 'std::string', - [param('std::string const &', 'filename')], - is_static=True) - ## gnuplot.h: void ns3::Gnuplot::GenerateOutput(std::ostream & os) const [member function] - cls.add_method('GenerateOutput', - 'void', - [param('std::ostream &', 'os')], - is_const=True) - ## gnuplot.h: void ns3::Gnuplot::SetExtra(std::string const & extra) [member function] - cls.add_method('SetExtra', - 'void', - [param('std::string const &', 'extra')]) - ## gnuplot.h: void ns3::Gnuplot::SetLegend(std::string const & xLegend, std::string const & yLegend) [member function] - cls.add_method('SetLegend', - 'void', - [param('std::string const &', 'xLegend'), param('std::string const &', 'yLegend')]) - ## gnuplot.h: void ns3::Gnuplot::SetTerminal(std::string const & terminal) [member function] - cls.add_method('SetTerminal', - 'void', - [param('std::string const &', 'terminal')]) - ## gnuplot.h: void ns3::Gnuplot::SetTitle(std::string const & title) [member function] - cls.add_method('SetTitle', - 'void', - [param('std::string const &', 'title')]) - return - -def register_Ns3GnuplotCollection_methods(root_module, cls): - ## gnuplot.h: ns3::GnuplotCollection::GnuplotCollection(ns3::GnuplotCollection const & arg0) [copy constructor] - cls.add_constructor([param('ns3::GnuplotCollection const &', 'arg0')]) - ## gnuplot.h: ns3::GnuplotCollection::GnuplotCollection(std::string const & outputFilename) [constructor] - cls.add_constructor([param('std::string const &', 'outputFilename')]) - ## gnuplot.h: void ns3::GnuplotCollection::AddPlot(ns3::Gnuplot const & plot) [member function] - cls.add_method('AddPlot', - 'void', - [param('ns3::Gnuplot const &', 'plot')]) - ## gnuplot.h: void ns3::GnuplotCollection::GenerateOutput(std::ostream & os) const [member function] - cls.add_method('GenerateOutput', - 'void', - [param('std::ostream &', 'os')], - is_const=True) - ## gnuplot.h: ns3::Gnuplot & ns3::GnuplotCollection::GetPlot(unsigned int id) [member function] - cls.add_method('GetPlot', - 'ns3::Gnuplot &', - [param('unsigned int', 'id')]) - ## gnuplot.h: void ns3::GnuplotCollection::SetTerminal(std::string const & terminal) [member function] - cls.add_method('SetTerminal', - 'void', - [param('std::string const &', 'terminal')]) - return - -def register_Ns3GnuplotDataset_methods(root_module, cls): - ## gnuplot.h: ns3::GnuplotDataset::GnuplotDataset(ns3::GnuplotDataset const & original) [copy constructor] - cls.add_constructor([param('ns3::GnuplotDataset const &', 'original')]) - ## gnuplot.h: static void ns3::GnuplotDataset::SetDefaultExtra(std::string const & extra) [member function] - cls.add_method('SetDefaultExtra', - 'void', - [param('std::string const &', 'extra')], - is_static=True) - ## gnuplot.h: void ns3::GnuplotDataset::SetExtra(std::string const & extra) [member function] - cls.add_method('SetExtra', - 'void', - [param('std::string const &', 'extra')]) - ## gnuplot.h: void ns3::GnuplotDataset::SetTitle(std::string const & title) [member function] - cls.add_method('SetTitle', - 'void', - [param('std::string const &', 'title')]) - ## gnuplot.h: ns3::GnuplotDataset::GnuplotDataset(ns3::GnuplotDataset::Data * data) [constructor] - cls.add_constructor([param('ns3::GnuplotDataset::Data *', 'data')], - visibility='protected') - return - -def register_Ns3GtkConfigStore_methods(root_module, cls): - ## gtk-config-store.h: ns3::GtkConfigStore::GtkConfigStore(ns3::GtkConfigStore const & arg0) [copy constructor] - cls.add_constructor([param('ns3::GtkConfigStore const &', 'arg0')]) - ## gtk-config-store.h: ns3::GtkConfigStore::GtkConfigStore() [constructor] - cls.add_constructor([]) - ## gtk-config-store.h: void ns3::GtkConfigStore::ConfigureAttributes() [member function] - cls.add_method('ConfigureAttributes', - 'void', - []) - ## gtk-config-store.h: void ns3::GtkConfigStore::ConfigureDefaults() [member function] - cls.add_method('ConfigureDefaults', - 'void', - []) - return - -def register_Ns3NoneFileConfig_methods(root_module, cls): - ## file-config.h: ns3::NoneFileConfig::NoneFileConfig(ns3::NoneFileConfig const & arg0) [copy constructor] - cls.add_constructor([param('ns3::NoneFileConfig const &', 'arg0')]) - ## file-config.h: ns3::NoneFileConfig::NoneFileConfig() [constructor] - cls.add_constructor([]) - ## file-config.h: void ns3::NoneFileConfig::Attributes() [member function] - cls.add_method('Attributes', - 'void', - [], - is_virtual=True) - ## file-config.h: void ns3::NoneFileConfig::Default() [member function] - cls.add_method('Default', - 'void', - [], - is_virtual=True) - ## file-config.h: void ns3::NoneFileConfig::Global() [member function] - cls.add_method('Global', - 'void', - [], - is_virtual=True) - ## file-config.h: void ns3::NoneFileConfig::SetFilename(std::string filename) [member function] - cls.add_method('SetFilename', - 'void', - [param('std::string', 'filename')], - is_virtual=True) - return - -def register_Ns3ConfigStore_methods(root_module, cls): - ## config-store.h: ns3::ConfigStore::ConfigStore(ns3::ConfigStore const & arg0) [copy constructor] - cls.add_constructor([param('ns3::ConfigStore const &', 'arg0')]) - ## config-store.h: ns3::ConfigStore::ConfigStore() [constructor] - cls.add_constructor([]) - ## config-store.h: void ns3::ConfigStore::ConfigureAttributes() [member function] - cls.add_method('ConfigureAttributes', - 'void', - []) - ## config-store.h: void ns3::ConfigStore::ConfigureDefaults() [member function] - cls.add_method('ConfigureDefaults', - 'void', - []) - ## config-store.h: ns3::TypeId ns3::ConfigStore::GetInstanceTypeId() const [member function] - cls.add_method('GetInstanceTypeId', - 'ns3::TypeId', - [], - is_const=True, is_virtual=True) - ## config-store.h: static ns3::TypeId ns3::ConfigStore::GetTypeId() [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_static=True) - ## config-store.h: void ns3::ConfigStore::SetFileFormat(ns3::ConfigStore::FileFormat format) [member function] - cls.add_method('SetFileFormat', - 'void', - [param('ns3::ConfigStore::FileFormat', 'format')]) - ## config-store.h: void ns3::ConfigStore::SetFilename(std::string filename) [member function] - cls.add_method('SetFilename', - 'void', - [param('std::string', 'filename')]) - ## config-store.h: void ns3::ConfigStore::SetMode(ns3::ConfigStore::Mode mode) [member function] - cls.add_method('SetMode', - 'void', - [param('ns3::ConfigStore::Mode', 'mode')]) - return - -def register_Ns3FlowIdTag_methods(root_module, cls): - ## flow-id-tag.h: ns3::FlowIdTag::FlowIdTag(ns3::FlowIdTag const & arg0) [copy constructor] - cls.add_constructor([param('ns3::FlowIdTag const &', 'arg0')]) - ## flow-id-tag.h: ns3::FlowIdTag::FlowIdTag() [constructor] - cls.add_constructor([]) - ## flow-id-tag.h: ns3::FlowIdTag::FlowIdTag(uint32_t flowId) [constructor] - cls.add_constructor([param('uint32_t', 'flowId')]) - ## flow-id-tag.h: static uint32_t ns3::FlowIdTag::AllocateFlowId() [member function] - cls.add_method('AllocateFlowId', - 'uint32_t', - [], - is_static=True) - ## flow-id-tag.h: void ns3::FlowIdTag::Deserialize(ns3::TagBuffer buf) [member function] - cls.add_method('Deserialize', - 'void', - [param('ns3::TagBuffer', 'buf')], - is_virtual=True) - ## flow-id-tag.h: uint32_t ns3::FlowIdTag::GetFlowId() const [member function] - cls.add_method('GetFlowId', - 'uint32_t', - [], - is_const=True) - ## flow-id-tag.h: ns3::TypeId ns3::FlowIdTag::GetInstanceTypeId() const [member function] - cls.add_method('GetInstanceTypeId', - 'ns3::TypeId', - [], - is_const=True, is_virtual=True) - ## flow-id-tag.h: uint32_t ns3::FlowIdTag::GetSerializedSize() const [member function] - cls.add_method('GetSerializedSize', - 'uint32_t', - [], - is_const=True, is_virtual=True) - ## flow-id-tag.h: static ns3::TypeId ns3::FlowIdTag::GetTypeId() [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_static=True) - ## flow-id-tag.h: void ns3::FlowIdTag::Print(std::ostream & os) const [member function] - cls.add_method('Print', - 'void', - [param('std::ostream &', 'os')], - is_const=True, is_virtual=True) - ## flow-id-tag.h: void ns3::FlowIdTag::Serialize(ns3::TagBuffer buf) const [member function] - cls.add_method('Serialize', - 'void', - [param('ns3::TagBuffer', 'buf')], - is_const=True, is_virtual=True) - ## flow-id-tag.h: void ns3::FlowIdTag::SetFlowId(uint32_t flowId) [member function] - cls.add_method('SetFlowId', - 'void', - [param('uint32_t', 'flowId')]) - return - -def register_Ns3Gnuplot2dDataset_methods(root_module, cls): - ## gnuplot.h: ns3::Gnuplot2dDataset::Gnuplot2dDataset(ns3::Gnuplot2dDataset const & arg0) [copy constructor] - cls.add_constructor([param('ns3::Gnuplot2dDataset const &', 'arg0')]) - ## gnuplot.h: ns3::Gnuplot2dDataset::Gnuplot2dDataset(std::string const & title="Untitled") [constructor] - cls.add_constructor([param('std::string const &', 'title', default_value='"Untitled"')]) - ## gnuplot.h: void ns3::Gnuplot2dDataset::Add(double x, double y) [member function] - cls.add_method('Add', - 'void', - [param('double', 'x'), param('double', 'y')]) - ## gnuplot.h: void ns3::Gnuplot2dDataset::Add(double x, double y, double errorDelta) [member function] - cls.add_method('Add', - 'void', - [param('double', 'x'), param('double', 'y'), param('double', 'errorDelta')]) - ## gnuplot.h: void ns3::Gnuplot2dDataset::Add(double x, double y, double minY, double maxY) [member function] - cls.add_method('Add', - 'void', - [param('double', 'x'), param('double', 'y'), param('double', 'minY'), param('double', 'maxY')]) - ## gnuplot.h: void ns3::Gnuplot2dDataset::AddEmptyLine() [member function] - cls.add_method('AddEmptyLine', - 'void', - []) - ## gnuplot.h: static void ns3::Gnuplot2dDataset::SetDefaultErrorBars(ns3::Gnuplot2dDataset::ErrorBars errorBars) [member function] - cls.add_method('SetDefaultErrorBars', - 'void', - [param('ns3::Gnuplot2dDataset::ErrorBars', 'errorBars')], - is_static=True) - ## gnuplot.h: static void ns3::Gnuplot2dDataset::SetDefaultStyle(ns3::Gnuplot2dDataset::Style style) [member function] - cls.add_method('SetDefaultStyle', - 'void', - [param('ns3::Gnuplot2dDataset::Style', 'style')], - is_static=True) - ## gnuplot.h: void ns3::Gnuplot2dDataset::SetErrorBars(ns3::Gnuplot2dDataset::ErrorBars errorBars) [member function] - cls.add_method('SetErrorBars', - 'void', - [param('ns3::Gnuplot2dDataset::ErrorBars', 'errorBars')]) - ## gnuplot.h: void ns3::Gnuplot2dDataset::SetStyle(ns3::Gnuplot2dDataset::Style style) [member function] - cls.add_method('SetStyle', - 'void', - [param('ns3::Gnuplot2dDataset::Style', 'style')]) - return - -def register_Ns3Gnuplot2dFunction_methods(root_module, cls): - ## gnuplot.h: ns3::Gnuplot2dFunction::Gnuplot2dFunction(ns3::Gnuplot2dFunction const & arg0) [copy constructor] - cls.add_constructor([param('ns3::Gnuplot2dFunction const &', 'arg0')]) - ## gnuplot.h: ns3::Gnuplot2dFunction::Gnuplot2dFunction(std::string const & title="Untitled", std::string const & function="") [constructor] - cls.add_constructor([param('std::string const &', 'title', default_value='"Untitled"'), param('std::string const &', 'function', default_value='""')]) - ## gnuplot.h: void ns3::Gnuplot2dFunction::SetFunction(std::string const & function) [member function] - cls.add_method('SetFunction', - 'void', - [param('std::string const &', 'function')]) - return - -def register_Ns3Gnuplot3dDataset_methods(root_module, cls): - ## gnuplot.h: ns3::Gnuplot3dDataset::Gnuplot3dDataset(ns3::Gnuplot3dDataset const & arg0) [copy constructor] - cls.add_constructor([param('ns3::Gnuplot3dDataset const &', 'arg0')]) - ## gnuplot.h: ns3::Gnuplot3dDataset::Gnuplot3dDataset(std::string const & title="Untitled") [constructor] - cls.add_constructor([param('std::string const &', 'title', default_value='"Untitled"')]) - ## gnuplot.h: void ns3::Gnuplot3dDataset::Add(double x, double y, double z) [member function] - cls.add_method('Add', - 'void', - [param('double', 'x'), param('double', 'y'), param('double', 'z')]) - ## gnuplot.h: void ns3::Gnuplot3dDataset::AddEmptyLine() [member function] - cls.add_method('AddEmptyLine', - 'void', - []) - ## gnuplot.h: static void ns3::Gnuplot3dDataset::SetDefaultStyle(std::string const & style) [member function] - cls.add_method('SetDefaultStyle', - 'void', - [param('std::string const &', 'style')], - is_static=True) - ## gnuplot.h: void ns3::Gnuplot3dDataset::SetStyle(std::string const & style) [member function] - cls.add_method('SetStyle', - 'void', - [param('std::string const &', 'style')]) - return - -def register_Ns3Gnuplot3dFunction_methods(root_module, cls): - ## gnuplot.h: ns3::Gnuplot3dFunction::Gnuplot3dFunction(ns3::Gnuplot3dFunction const & arg0) [copy constructor] - cls.add_constructor([param('ns3::Gnuplot3dFunction const &', 'arg0')]) - ## gnuplot.h: ns3::Gnuplot3dFunction::Gnuplot3dFunction(std::string const & title="Untitled", std::string const & function="") [constructor] - cls.add_constructor([param('std::string const &', 'title', default_value='"Untitled"'), param('std::string const &', 'function', default_value='""')]) - ## gnuplot.h: void ns3::Gnuplot3dFunction::SetFunction(std::string const & function) [member function] - cls.add_method('SetFunction', - 'void', - [param('std::string const &', 'function')]) - return - -def register_functions(root_module): - module = root_module - register_functions_ns3_Config(module.get_submodule('Config'), root_module) - register_functions_ns3_FatalImpl(module.get_submodule('FatalImpl'), root_module) - register_functions_ns3_addressUtils(module.get_submodule('addressUtils'), root_module) - register_functions_ns3_aodv(module.get_submodule('aodv'), root_module) - register_functions_ns3_dot11s(module.get_submodule('dot11s'), root_module) - register_functions_ns3_dsdv(module.get_submodule('dsdv'), root_module) - register_functions_ns3_flame(module.get_submodule('flame'), root_module) - register_functions_ns3_internal(module.get_submodule('internal'), root_module) - register_functions_ns3_olsr(module.get_submodule('olsr'), root_module) - return - -def register_functions_ns3_Config(module, root_module): - return - -def register_functions_ns3_FatalImpl(module, root_module): - return - -def register_functions_ns3_addressUtils(module, root_module): - return - -def register_functions_ns3_aodv(module, root_module): - return - -def register_functions_ns3_dot11s(module, root_module): - return - -def register_functions_ns3_dsdv(module, root_module): - return - -def register_functions_ns3_flame(module, root_module): - return - -def register_functions_ns3_internal(module, root_module): - return - -def register_functions_ns3_olsr(module, root_module): - return - diff -r afe2960e58b7 -r 9d2c79c992d7 bindings/python/apidefs/gcc-ILP32/ns3_module_network.py --- a/bindings/python/apidefs/gcc-ILP32/ns3_module_network.py Thu Mar 24 15:11:56 2011 +0100 +++ b/bindings/python/apidefs/gcc-ILP32/ns3_module_network.py Thu Mar 24 09:23:44 2011 -0700 @@ -113,6 +113,8 @@ module.add_class('TagBuffer') ## chunk.h: ns3::Chunk [class] module.add_class('Chunk', parent=root_module['ns3::ObjectBase']) + ## flow-id-tag.h: ns3::FlowIdTag [class] + module.add_class('FlowIdTag', parent=root_module['ns3::Tag']) ## header.h: ns3::Header [class] module.add_class('Header', parent=root_module['ns3::Chunk']) ## llc-snap-header.h: ns3::LlcSnapHeader [class] @@ -404,6 +406,7 @@ register_Ns3Tag_methods(root_module, root_module['ns3::Tag']) register_Ns3TagBuffer_methods(root_module, root_module['ns3::TagBuffer']) register_Ns3Chunk_methods(root_module, root_module['ns3::Chunk']) + register_Ns3FlowIdTag_methods(root_module, root_module['ns3::FlowIdTag']) register_Ns3Header_methods(root_module, root_module['ns3::Header']) register_Ns3LlcSnapHeader_methods(root_module, root_module['ns3::LlcSnapHeader']) register_Ns3PacketBurst_methods(root_module, root_module['ns3::PacketBurst']) @@ -2579,6 +2582,59 @@ is_pure_virtual=True, is_const=True, is_virtual=True) return +def register_Ns3FlowIdTag_methods(root_module, cls): + ## flow-id-tag.h: ns3::FlowIdTag::FlowIdTag(ns3::FlowIdTag const & arg0) [copy constructor] + cls.add_constructor([param('ns3::FlowIdTag const &', 'arg0')]) + ## flow-id-tag.h: ns3::FlowIdTag::FlowIdTag() [constructor] + cls.add_constructor([]) + ## flow-id-tag.h: ns3::FlowIdTag::FlowIdTag(uint32_t flowId) [constructor] + cls.add_constructor([param('uint32_t', 'flowId')]) + ## flow-id-tag.h: static uint32_t ns3::FlowIdTag::AllocateFlowId() [member function] + cls.add_method('AllocateFlowId', + 'uint32_t', + [], + is_static=True) + ## flow-id-tag.h: void ns3::FlowIdTag::Deserialize(ns3::TagBuffer buf) [member function] + cls.add_method('Deserialize', + 'void', + [param('ns3::TagBuffer', 'buf')], + is_virtual=True) + ## flow-id-tag.h: uint32_t ns3::FlowIdTag::GetFlowId() const [member function] + cls.add_method('GetFlowId', + 'uint32_t', + [], + is_const=True) + ## flow-id-tag.h: ns3::TypeId ns3::FlowIdTag::GetInstanceTypeId() const [member function] + cls.add_method('GetInstanceTypeId', + 'ns3::TypeId', + [], + is_const=True, is_virtual=True) + ## flow-id-tag.h: uint32_t ns3::FlowIdTag::GetSerializedSize() const [member function] + cls.add_method('GetSerializedSize', + 'uint32_t', + [], + is_const=True, is_virtual=True) + ## flow-id-tag.h: static ns3::TypeId ns3::FlowIdTag::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## flow-id-tag.h: void ns3::FlowIdTag::Print(std::ostream & os) const [member function] + cls.add_method('Print', + 'void', + [param('std::ostream &', 'os')], + is_const=True, is_virtual=True) + ## flow-id-tag.h: void ns3::FlowIdTag::Serialize(ns3::TagBuffer buf) const [member function] + cls.add_method('Serialize', + 'void', + [param('ns3::TagBuffer', 'buf')], + is_const=True, is_virtual=True) + ## flow-id-tag.h: void ns3::FlowIdTag::SetFlowId(uint32_t flowId) [member function] + cls.add_method('SetFlowId', + 'void', + [param('uint32_t', 'flowId')]) + return + def register_Ns3Header_methods(root_module, cls): cls.add_output_stream_operator() ## header.h: ns3::Header::Header() [constructor] diff -r afe2960e58b7 -r 9d2c79c992d7 bindings/python/apidefs/gcc-ILP32/ns3_module_tools.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bindings/python/apidefs/gcc-ILP32/ns3_module_tools.py Thu Mar 24 09:23:44 2011 -0700 @@ -0,0 +1,448 @@ +from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers + +def register_types(module): + root_module = module.get_root() + + ## average.h: ns3::Average [class] + module.add_class('Average', template_parameters=['double']) + ## delay-jitter-estimation.h: ns3::DelayJitterEstimation [class] + module.add_class('DelayJitterEstimation') + ## event-garbage-collector.h: ns3::EventGarbageCollector [class] + module.add_class('EventGarbageCollector') + ## gnuplot.h: ns3::Gnuplot [class] + module.add_class('Gnuplot') + ## gnuplot.h: ns3::GnuplotCollection [class] + module.add_class('GnuplotCollection') + ## gnuplot.h: ns3::GnuplotDataset [class] + module.add_class('GnuplotDataset') + ## gnuplot.h: ns3::Gnuplot2dDataset [class] + module.add_class('Gnuplot2dDataset', parent=root_module['ns3::GnuplotDataset']) + ## gnuplot.h: ns3::Gnuplot2dDataset::Style [enumeration] + module.add_enum('Style', ['LINES', 'POINTS', 'LINES_POINTS', 'DOTS', 'IMPULSES', 'STEPS', 'FSTEPS', 'HISTEPS'], outer_class=root_module['ns3::Gnuplot2dDataset']) + ## gnuplot.h: ns3::Gnuplot2dDataset::ErrorBars [enumeration] + module.add_enum('ErrorBars', ['NONE', 'X', 'Y', 'XY'], outer_class=root_module['ns3::Gnuplot2dDataset']) + ## gnuplot.h: ns3::Gnuplot2dFunction [class] + module.add_class('Gnuplot2dFunction', parent=root_module['ns3::GnuplotDataset']) + ## gnuplot.h: ns3::Gnuplot3dDataset [class] + module.add_class('Gnuplot3dDataset', parent=root_module['ns3::GnuplotDataset']) + ## gnuplot.h: ns3::Gnuplot3dFunction [class] + module.add_class('Gnuplot3dFunction', parent=root_module['ns3::GnuplotDataset']) + + ## Register a nested module for the namespace Config + + nested_module = module.add_cpp_namespace('Config') + register_types_ns3_Config(nested_module) + + + ## Register a nested module for the namespace FatalImpl + + nested_module = module.add_cpp_namespace('FatalImpl') + register_types_ns3_FatalImpl(nested_module) + + + ## Register a nested module for the namespace addressUtils + + nested_module = module.add_cpp_namespace('addressUtils') + register_types_ns3_addressUtils(nested_module) + + + ## Register a nested module for the namespace aodv + + nested_module = module.add_cpp_namespace('aodv') + register_types_ns3_aodv(nested_module) + + + ## Register a nested module for the namespace dot11s + + nested_module = module.add_cpp_namespace('dot11s') + register_types_ns3_dot11s(nested_module) + + + ## Register a nested module for the namespace dsdv + + nested_module = module.add_cpp_namespace('dsdv') + register_types_ns3_dsdv(nested_module) + + + ## Register a nested module for the namespace flame + + nested_module = module.add_cpp_namespace('flame') + register_types_ns3_flame(nested_module) + + + ## Register a nested module for the namespace internal + + nested_module = module.add_cpp_namespace('internal') + register_types_ns3_internal(nested_module) + + + ## Register a nested module for the namespace olsr + + nested_module = module.add_cpp_namespace('olsr') + register_types_ns3_olsr(nested_module) + + +def register_types_ns3_Config(module): + root_module = module.get_root() + + +def register_types_ns3_FatalImpl(module): + root_module = module.get_root() + + +def register_types_ns3_addressUtils(module): + root_module = module.get_root() + + +def register_types_ns3_aodv(module): + root_module = module.get_root() + + +def register_types_ns3_dot11s(module): + root_module = module.get_root() + + +def register_types_ns3_dsdv(module): + root_module = module.get_root() + + +def register_types_ns3_flame(module): + root_module = module.get_root() + + +def register_types_ns3_internal(module): + root_module = module.get_root() + + +def register_types_ns3_olsr(module): + root_module = module.get_root() + + +def register_methods(root_module): + register_Ns3Average__Double_methods(root_module, root_module['ns3::Average< double >']) + register_Ns3DelayJitterEstimation_methods(root_module, root_module['ns3::DelayJitterEstimation']) + register_Ns3EventGarbageCollector_methods(root_module, root_module['ns3::EventGarbageCollector']) + register_Ns3Gnuplot_methods(root_module, root_module['ns3::Gnuplot']) + register_Ns3GnuplotCollection_methods(root_module, root_module['ns3::GnuplotCollection']) + register_Ns3GnuplotDataset_methods(root_module, root_module['ns3::GnuplotDataset']) + register_Ns3Gnuplot2dDataset_methods(root_module, root_module['ns3::Gnuplot2dDataset']) + register_Ns3Gnuplot2dFunction_methods(root_module, root_module['ns3::Gnuplot2dFunction']) + register_Ns3Gnuplot3dDataset_methods(root_module, root_module['ns3::Gnuplot3dDataset']) + register_Ns3Gnuplot3dFunction_methods(root_module, root_module['ns3::Gnuplot3dFunction']) + return + +def register_Ns3Average__Double_methods(root_module, cls): + ## average.h: ns3::Average::Average(ns3::Average const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Average< double > const &', 'arg0')]) + ## average.h: ns3::Average::Average() [constructor] + cls.add_constructor([]) + ## average.h: double ns3::Average::Avg() const [member function] + cls.add_method('Avg', + 'double', + [], + is_const=True) + ## average.h: uint32_t ns3::Average::Count() const [member function] + cls.add_method('Count', + 'uint32_t', + [], + is_const=True) + ## average.h: double ns3::Average::Error90() const [member function] + cls.add_method('Error90', + 'double', + [], + is_const=True) + ## average.h: double ns3::Average::Error95() const [member function] + cls.add_method('Error95', + 'double', + [], + is_const=True) + ## average.h: double ns3::Average::Error99() const [member function] + cls.add_method('Error99', + 'double', + [], + is_const=True) + ## average.h: double ns3::Average::Max() const [member function] + cls.add_method('Max', + 'double', + [], + is_const=True) + ## average.h: double ns3::Average::Mean() const [member function] + cls.add_method('Mean', + 'double', + [], + is_const=True) + ## average.h: double ns3::Average::Min() const [member function] + cls.add_method('Min', + 'double', + [], + is_const=True) + ## average.h: void ns3::Average::Reset() [member function] + cls.add_method('Reset', + 'void', + []) + ## average.h: double ns3::Average::Stddev() const [member function] + cls.add_method('Stddev', + 'double', + [], + is_const=True) + ## average.h: void ns3::Average::Update(double const & x) [member function] + cls.add_method('Update', + 'void', + [param('double const &', 'x')]) + ## average.h: double ns3::Average::Var() const [member function] + cls.add_method('Var', + 'double', + [], + is_const=True) + return + +def register_Ns3DelayJitterEstimation_methods(root_module, cls): + ## delay-jitter-estimation.h: ns3::DelayJitterEstimation::DelayJitterEstimation(ns3::DelayJitterEstimation const & arg0) [copy constructor] + cls.add_constructor([param('ns3::DelayJitterEstimation const &', 'arg0')]) + ## delay-jitter-estimation.h: ns3::DelayJitterEstimation::DelayJitterEstimation() [constructor] + cls.add_constructor([]) + ## delay-jitter-estimation.h: ns3::Time ns3::DelayJitterEstimation::GetLastDelay() const [member function] + cls.add_method('GetLastDelay', + 'ns3::Time', + [], + is_const=True) + ## delay-jitter-estimation.h: ns3::Time ns3::DelayJitterEstimation::GetLastJitter() const [member function] + cls.add_method('GetLastJitter', + 'ns3::Time', + [], + is_const=True) + ## delay-jitter-estimation.h: static void ns3::DelayJitterEstimation::PrepareTx(ns3::Ptr packet) [member function] + cls.add_method('PrepareTx', + 'void', + [param('ns3::Ptr< ns3::Packet const >', 'packet')], + is_static=True) + ## delay-jitter-estimation.h: void ns3::DelayJitterEstimation::RecordRx(ns3::Ptr packet) [member function] + cls.add_method('RecordRx', + 'void', + [param('ns3::Ptr< ns3::Packet const >', 'packet')]) + return + +def register_Ns3EventGarbageCollector_methods(root_module, cls): + ## event-garbage-collector.h: ns3::EventGarbageCollector::EventGarbageCollector(ns3::EventGarbageCollector const & arg0) [copy constructor] + cls.add_constructor([param('ns3::EventGarbageCollector const &', 'arg0')]) + ## event-garbage-collector.h: ns3::EventGarbageCollector::EventGarbageCollector() [constructor] + cls.add_constructor([]) + ## event-garbage-collector.h: void ns3::EventGarbageCollector::Track(ns3::EventId event) [member function] + cls.add_method('Track', + 'void', + [param('ns3::EventId', 'event')]) + return + +def register_Ns3Gnuplot_methods(root_module, cls): + ## gnuplot.h: ns3::Gnuplot::Gnuplot(ns3::Gnuplot const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Gnuplot const &', 'arg0')]) + ## gnuplot.h: ns3::Gnuplot::Gnuplot(std::string const & outputFilename="", std::string const & title="") [constructor] + cls.add_constructor([param('std::string const &', 'outputFilename', default_value='""'), param('std::string const &', 'title', default_value='""')]) + ## gnuplot.h: void ns3::Gnuplot::AddDataset(ns3::GnuplotDataset const & dataset) [member function] + cls.add_method('AddDataset', + 'void', + [param('ns3::GnuplotDataset const &', 'dataset')]) + ## gnuplot.h: void ns3::Gnuplot::AppendExtra(std::string const & extra) [member function] + cls.add_method('AppendExtra', + 'void', + [param('std::string const &', 'extra')]) + ## gnuplot.h: static std::string ns3::Gnuplot::DetectTerminal(std::string const & filename) [member function] + cls.add_method('DetectTerminal', + 'std::string', + [param('std::string const &', 'filename')], + is_static=True) + ## gnuplot.h: void ns3::Gnuplot::GenerateOutput(std::ostream & os) const [member function] + cls.add_method('GenerateOutput', + 'void', + [param('std::ostream &', 'os')], + is_const=True) + ## gnuplot.h: void ns3::Gnuplot::SetExtra(std::string const & extra) [member function] + cls.add_method('SetExtra', + 'void', + [param('std::string const &', 'extra')]) + ## gnuplot.h: void ns3::Gnuplot::SetLegend(std::string const & xLegend, std::string const & yLegend) [member function] + cls.add_method('SetLegend', + 'void', + [param('std::string const &', 'xLegend'), param('std::string const &', 'yLegend')]) + ## gnuplot.h: void ns3::Gnuplot::SetTerminal(std::string const & terminal) [member function] + cls.add_method('SetTerminal', + 'void', + [param('std::string const &', 'terminal')]) + ## gnuplot.h: void ns3::Gnuplot::SetTitle(std::string const & title) [member function] + cls.add_method('SetTitle', + 'void', + [param('std::string const &', 'title')]) + return + +def register_Ns3GnuplotCollection_methods(root_module, cls): + ## gnuplot.h: ns3::GnuplotCollection::GnuplotCollection(ns3::GnuplotCollection const & arg0) [copy constructor] + cls.add_constructor([param('ns3::GnuplotCollection const &', 'arg0')]) + ## gnuplot.h: ns3::GnuplotCollection::GnuplotCollection(std::string const & outputFilename) [constructor] + cls.add_constructor([param('std::string const &', 'outputFilename')]) + ## gnuplot.h: void ns3::GnuplotCollection::AddPlot(ns3::Gnuplot const & plot) [member function] + cls.add_method('AddPlot', + 'void', + [param('ns3::Gnuplot const &', 'plot')]) + ## gnuplot.h: void ns3::GnuplotCollection::GenerateOutput(std::ostream & os) const [member function] + cls.add_method('GenerateOutput', + 'void', + [param('std::ostream &', 'os')], + is_const=True) + ## gnuplot.h: ns3::Gnuplot & ns3::GnuplotCollection::GetPlot(unsigned int id) [member function] + cls.add_method('GetPlot', + 'ns3::Gnuplot &', + [param('unsigned int', 'id')]) + ## gnuplot.h: void ns3::GnuplotCollection::SetTerminal(std::string const & terminal) [member function] + cls.add_method('SetTerminal', + 'void', + [param('std::string const &', 'terminal')]) + return + +def register_Ns3GnuplotDataset_methods(root_module, cls): + ## gnuplot.h: ns3::GnuplotDataset::GnuplotDataset(ns3::GnuplotDataset const & original) [copy constructor] + cls.add_constructor([param('ns3::GnuplotDataset const &', 'original')]) + ## gnuplot.h: static void ns3::GnuplotDataset::SetDefaultExtra(std::string const & extra) [member function] + cls.add_method('SetDefaultExtra', + 'void', + [param('std::string const &', 'extra')], + is_static=True) + ## gnuplot.h: void ns3::GnuplotDataset::SetExtra(std::string const & extra) [member function] + cls.add_method('SetExtra', + 'void', + [param('std::string const &', 'extra')]) + ## gnuplot.h: void ns3::GnuplotDataset::SetTitle(std::string const & title) [member function] + cls.add_method('SetTitle', + 'void', + [param('std::string const &', 'title')]) + ## gnuplot.h: ns3::GnuplotDataset::GnuplotDataset(ns3::GnuplotDataset::Data * data) [constructor] + cls.add_constructor([param('ns3::GnuplotDataset::Data *', 'data')], + visibility='protected') + return + +def register_Ns3Gnuplot2dDataset_methods(root_module, cls): + ## gnuplot.h: ns3::Gnuplot2dDataset::Gnuplot2dDataset(ns3::Gnuplot2dDataset const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Gnuplot2dDataset const &', 'arg0')]) + ## gnuplot.h: ns3::Gnuplot2dDataset::Gnuplot2dDataset(std::string const & title="Untitled") [constructor] + cls.add_constructor([param('std::string const &', 'title', default_value='"Untitled"')]) + ## gnuplot.h: void ns3::Gnuplot2dDataset::Add(double x, double y) [member function] + cls.add_method('Add', + 'void', + [param('double', 'x'), param('double', 'y')]) + ## gnuplot.h: void ns3::Gnuplot2dDataset::Add(double x, double y, double errorDelta) [member function] + cls.add_method('Add', + 'void', + [param('double', 'x'), param('double', 'y'), param('double', 'errorDelta')]) + ## gnuplot.h: void ns3::Gnuplot2dDataset::Add(double x, double y, double minY, double maxY) [member function] + cls.add_method('Add', + 'void', + [param('double', 'x'), param('double', 'y'), param('double', 'minY'), param('double', 'maxY')]) + ## gnuplot.h: void ns3::Gnuplot2dDataset::AddEmptyLine() [member function] + cls.add_method('AddEmptyLine', + 'void', + []) + ## gnuplot.h: static void ns3::Gnuplot2dDataset::SetDefaultErrorBars(ns3::Gnuplot2dDataset::ErrorBars errorBars) [member function] + cls.add_method('SetDefaultErrorBars', + 'void', + [param('ns3::Gnuplot2dDataset::ErrorBars', 'errorBars')], + is_static=True) + ## gnuplot.h: static void ns3::Gnuplot2dDataset::SetDefaultStyle(ns3::Gnuplot2dDataset::Style style) [member function] + cls.add_method('SetDefaultStyle', + 'void', + [param('ns3::Gnuplot2dDataset::Style', 'style')], + is_static=True) + ## gnuplot.h: void ns3::Gnuplot2dDataset::SetErrorBars(ns3::Gnuplot2dDataset::ErrorBars errorBars) [member function] + cls.add_method('SetErrorBars', + 'void', + [param('ns3::Gnuplot2dDataset::ErrorBars', 'errorBars')]) + ## gnuplot.h: void ns3::Gnuplot2dDataset::SetStyle(ns3::Gnuplot2dDataset::Style style) [member function] + cls.add_method('SetStyle', + 'void', + [param('ns3::Gnuplot2dDataset::Style', 'style')]) + return + +def register_Ns3Gnuplot2dFunction_methods(root_module, cls): + ## gnuplot.h: ns3::Gnuplot2dFunction::Gnuplot2dFunction(ns3::Gnuplot2dFunction const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Gnuplot2dFunction const &', 'arg0')]) + ## gnuplot.h: ns3::Gnuplot2dFunction::Gnuplot2dFunction(std::string const & title="Untitled", std::string const & function="") [constructor] + cls.add_constructor([param('std::string const &', 'title', default_value='"Untitled"'), param('std::string const &', 'function', default_value='""')]) + ## gnuplot.h: void ns3::Gnuplot2dFunction::SetFunction(std::string const & function) [member function] + cls.add_method('SetFunction', + 'void', + [param('std::string const &', 'function')]) + return + +def register_Ns3Gnuplot3dDataset_methods(root_module, cls): + ## gnuplot.h: ns3::Gnuplot3dDataset::Gnuplot3dDataset(ns3::Gnuplot3dDataset const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Gnuplot3dDataset const &', 'arg0')]) + ## gnuplot.h: ns3::Gnuplot3dDataset::Gnuplot3dDataset(std::string const & title="Untitled") [constructor] + cls.add_constructor([param('std::string const &', 'title', default_value='"Untitled"')]) + ## gnuplot.h: void ns3::Gnuplot3dDataset::Add(double x, double y, double z) [member function] + cls.add_method('Add', + 'void', + [param('double', 'x'), param('double', 'y'), param('double', 'z')]) + ## gnuplot.h: void ns3::Gnuplot3dDataset::AddEmptyLine() [member function] + cls.add_method('AddEmptyLine', + 'void', + []) + ## gnuplot.h: static void ns3::Gnuplot3dDataset::SetDefaultStyle(std::string const & style) [member function] + cls.add_method('SetDefaultStyle', + 'void', + [param('std::string const &', 'style')], + is_static=True) + ## gnuplot.h: void ns3::Gnuplot3dDataset::SetStyle(std::string const & style) [member function] + cls.add_method('SetStyle', + 'void', + [param('std::string const &', 'style')]) + return + +def register_Ns3Gnuplot3dFunction_methods(root_module, cls): + ## gnuplot.h: ns3::Gnuplot3dFunction::Gnuplot3dFunction(ns3::Gnuplot3dFunction const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Gnuplot3dFunction const &', 'arg0')]) + ## gnuplot.h: ns3::Gnuplot3dFunction::Gnuplot3dFunction(std::string const & title="Untitled", std::string const & function="") [constructor] + cls.add_constructor([param('std::string const &', 'title', default_value='"Untitled"'), param('std::string const &', 'function', default_value='""')]) + ## gnuplot.h: void ns3::Gnuplot3dFunction::SetFunction(std::string const & function) [member function] + cls.add_method('SetFunction', + 'void', + [param('std::string const &', 'function')]) + return + +def register_functions(root_module): + module = root_module + register_functions_ns3_Config(module.get_submodule('Config'), root_module) + register_functions_ns3_FatalImpl(module.get_submodule('FatalImpl'), root_module) + register_functions_ns3_addressUtils(module.get_submodule('addressUtils'), root_module) + register_functions_ns3_aodv(module.get_submodule('aodv'), root_module) + register_functions_ns3_dot11s(module.get_submodule('dot11s'), root_module) + register_functions_ns3_dsdv(module.get_submodule('dsdv'), root_module) + register_functions_ns3_flame(module.get_submodule('flame'), root_module) + register_functions_ns3_internal(module.get_submodule('internal'), root_module) + register_functions_ns3_olsr(module.get_submodule('olsr'), root_module) + return + +def register_functions_ns3_Config(module, root_module): + return + +def register_functions_ns3_FatalImpl(module, root_module): + return + +def register_functions_ns3_addressUtils(module, root_module): + return + +def register_functions_ns3_aodv(module, root_module): + return + +def register_functions_ns3_dot11s(module, root_module): + return + +def register_functions_ns3_dsdv(module, root_module): + return + +def register_functions_ns3_flame(module, root_module): + return + +def register_functions_ns3_internal(module, root_module): + return + +def register_functions_ns3_olsr(module, root_module): + return + diff -r afe2960e58b7 -r 9d2c79c992d7 bindings/python/apidefs/gcc-ILP32/ns3modulegen_generated.py --- a/bindings/python/apidefs/gcc-ILP32/ns3modulegen_generated.py Thu Mar 24 15:11:56 2011 +0100 +++ b/bindings/python/apidefs/gcc-ILP32/ns3modulegen_generated.py Thu Mar 24 09:23:44 2011 -0700 @@ -17,20 +17,21 @@ import ns3_module_network import ns3_module_visualizer import ns3_module_bridge -import ns3_module_contrib +import ns3_module_config_store import ns3_module_emu import ns3_module_mobility import ns3_module_mpi import ns3_module_network_test import ns3_module_stats +import ns3_module_tools import ns3_module_topology_read import ns3_module_propagation import ns3_module_internet import ns3_module_point_to_point +import ns3_module_flow_monitor import ns3_module_wifi import ns3_module_applications import ns3_module_click -import ns3_module_flow_monitor import ns3_module_nix_vector_routing import ns3_module_openflow import ns3_module_tap_bridge @@ -114,17 +115,17 @@ ns3_module_bridge__local.register_types(module) root_module.end_section('ns3_module_bridge') - root_module.begin_section('ns3_module_contrib') - ns3_module_contrib.register_types(module) + root_module.begin_section('ns3_module_config_store') + ns3_module_config_store.register_types(module) try: - import ns3_module_contrib__local + import ns3_module_config_store__local except ImportError: pass else: - ns3_module_contrib__local.register_types(module) + ns3_module_config_store__local.register_types(module) - root_module.end_section('ns3_module_contrib') + root_module.end_section('ns3_module_config_store') root_module.begin_section('ns3_module_emu') ns3_module_emu.register_types(module) @@ -180,6 +181,17 @@ ns3_module_stats__local.register_types(module) root_module.end_section('ns3_module_stats') + root_module.begin_section('ns3_module_tools') + ns3_module_tools.register_types(module) + + try: + import ns3_module_tools__local + except ImportError: + pass + else: + ns3_module_tools__local.register_types(module) + + root_module.end_section('ns3_module_tools') root_module.begin_section('ns3_module_topology_read') ns3_module_topology_read.register_types(module) @@ -224,6 +236,17 @@ ns3_module_point_to_point__local.register_types(module) root_module.end_section('ns3_module_point_to_point') + root_module.begin_section('ns3_module_flow_monitor') + ns3_module_flow_monitor.register_types(module) + + try: + import ns3_module_flow_monitor__local + except ImportError: + pass + else: + ns3_module_flow_monitor__local.register_types(module) + + root_module.end_section('ns3_module_flow_monitor') root_module.begin_section('ns3_module_wifi') ns3_module_wifi.register_types(module) @@ -257,17 +280,6 @@ ns3_module_click__local.register_types(module) root_module.end_section('ns3_module_click') - root_module.begin_section('ns3_module_flow_monitor') - ns3_module_flow_monitor.register_types(module) - - try: - import ns3_module_flow_monitor__local - except ImportError: - pass - else: - ns3_module_flow_monitor__local.register_types(module) - - root_module.end_section('ns3_module_flow_monitor') root_module.begin_section('ns3_module_nix_vector_routing') ns3_module_nix_vector_routing.register_types(module) @@ -656,17 +668,17 @@ ns3_module_bridge__local.register_methods(root_module) root_module.end_section('ns3_module_bridge') - root_module.begin_section('ns3_module_contrib') - ns3_module_contrib.register_methods(root_module) + root_module.begin_section('ns3_module_config_store') + ns3_module_config_store.register_methods(root_module) try: - import ns3_module_contrib__local + import ns3_module_config_store__local except ImportError: pass else: - ns3_module_contrib__local.register_methods(root_module) + ns3_module_config_store__local.register_methods(root_module) - root_module.end_section('ns3_module_contrib') + root_module.end_section('ns3_module_config_store') root_module.begin_section('ns3_module_emu') ns3_module_emu.register_methods(root_module) @@ -722,6 +734,17 @@ ns3_module_stats__local.register_methods(root_module) root_module.end_section('ns3_module_stats') + root_module.begin_section('ns3_module_tools') + ns3_module_tools.register_methods(root_module) + + try: + import ns3_module_tools__local + except ImportError: + pass + else: + ns3_module_tools__local.register_methods(root_module) + + root_module.end_section('ns3_module_tools') root_module.begin_section('ns3_module_topology_read') ns3_module_topology_read.register_methods(root_module) @@ -766,6 +789,17 @@ ns3_module_point_to_point__local.register_methods(root_module) root_module.end_section('ns3_module_point_to_point') + root_module.begin_section('ns3_module_flow_monitor') + ns3_module_flow_monitor.register_methods(root_module) + + try: + import ns3_module_flow_monitor__local + except ImportError: + pass + else: + ns3_module_flow_monitor__local.register_methods(root_module) + + root_module.end_section('ns3_module_flow_monitor') root_module.begin_section('ns3_module_wifi') ns3_module_wifi.register_methods(root_module) @@ -799,17 +833,6 @@ ns3_module_click__local.register_methods(root_module) root_module.end_section('ns3_module_click') - root_module.begin_section('ns3_module_flow_monitor') - ns3_module_flow_monitor.register_methods(root_module) - - try: - import ns3_module_flow_monitor__local - except ImportError: - pass - else: - ns3_module_flow_monitor__local.register_methods(root_module) - - root_module.end_section('ns3_module_flow_monitor') root_module.begin_section('ns3_module_nix_vector_routing') ns3_module_nix_vector_routing.register_methods(root_module) @@ -1089,17 +1112,17 @@ ns3_module_bridge__local.register_functions(root_module) root_module.end_section('ns3_module_bridge') - root_module.begin_section('ns3_module_contrib') - ns3_module_contrib.register_functions(root_module) + root_module.begin_section('ns3_module_config_store') + ns3_module_config_store.register_functions(root_module) try: - import ns3_module_contrib__local + import ns3_module_config_store__local except ImportError: pass else: - ns3_module_contrib__local.register_functions(root_module) + ns3_module_config_store__local.register_functions(root_module) - root_module.end_section('ns3_module_contrib') + root_module.end_section('ns3_module_config_store') root_module.begin_section('ns3_module_emu') ns3_module_emu.register_functions(root_module) @@ -1155,6 +1178,17 @@ ns3_module_stats__local.register_functions(root_module) root_module.end_section('ns3_module_stats') + root_module.begin_section('ns3_module_tools') + ns3_module_tools.register_functions(root_module) + + try: + import ns3_module_tools__local + except ImportError: + pass + else: + ns3_module_tools__local.register_functions(root_module) + + root_module.end_section('ns3_module_tools') root_module.begin_section('ns3_module_topology_read') ns3_module_topology_read.register_functions(root_module) @@ -1199,6 +1233,17 @@ ns3_module_point_to_point__local.register_functions(root_module) root_module.end_section('ns3_module_point_to_point') + root_module.begin_section('ns3_module_flow_monitor') + ns3_module_flow_monitor.register_functions(root_module) + + try: + import ns3_module_flow_monitor__local + except ImportError: + pass + else: + ns3_module_flow_monitor__local.register_functions(root_module) + + root_module.end_section('ns3_module_flow_monitor') root_module.begin_section('ns3_module_wifi') ns3_module_wifi.register_functions(root_module) @@ -1232,17 +1277,6 @@ ns3_module_click__local.register_functions(root_module) root_module.end_section('ns3_module_click') - root_module.begin_section('ns3_module_flow_monitor') - ns3_module_flow_monitor.register_functions(root_module) - - try: - import ns3_module_flow_monitor__local - except ImportError: - pass - else: - ns3_module_flow_monitor__local.register_functions(root_module) - - root_module.end_section('ns3_module_flow_monitor') root_module.begin_section('ns3_module_nix_vector_routing') ns3_module_nix_vector_routing.register_functions(root_module) diff -r afe2960e58b7 -r 9d2c79c992d7 bindings/python/apidefs/gcc-LP64/ns3_module_config_store.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bindings/python/apidefs/gcc-LP64/ns3_module_config_store.py Thu Mar 24 09:23:44 2011 -0700 @@ -0,0 +1,261 @@ +from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers + +def register_types(module): + root_module = module.get_root() + + ## file-config.h: ns3::FileConfig [class] + module.add_class('FileConfig', allow_subclassing=True) + ## gtk-config-store.h: ns3::GtkConfigStore [class] + module.add_class('GtkConfigStore') + ## file-config.h: ns3::NoneFileConfig [class] + module.add_class('NoneFileConfig', parent=root_module['ns3::FileConfig']) + ## config-store.h: ns3::ConfigStore [class] + module.add_class('ConfigStore', parent=root_module['ns3::ObjectBase']) + ## config-store.h: ns3::ConfigStore::Mode [enumeration] + module.add_enum('Mode', ['LOAD', 'SAVE', 'NONE'], outer_class=root_module['ns3::ConfigStore']) + ## config-store.h: ns3::ConfigStore::FileFormat [enumeration] + module.add_enum('FileFormat', ['XML', 'RAW_TEXT'], outer_class=root_module['ns3::ConfigStore']) + + ## Register a nested module for the namespace Config + + nested_module = module.add_cpp_namespace('Config') + register_types_ns3_Config(nested_module) + + + ## Register a nested module for the namespace FatalImpl + + nested_module = module.add_cpp_namespace('FatalImpl') + register_types_ns3_FatalImpl(nested_module) + + + ## Register a nested module for the namespace addressUtils + + nested_module = module.add_cpp_namespace('addressUtils') + register_types_ns3_addressUtils(nested_module) + + + ## Register a nested module for the namespace aodv + + nested_module = module.add_cpp_namespace('aodv') + register_types_ns3_aodv(nested_module) + + + ## Register a nested module for the namespace dot11s + + nested_module = module.add_cpp_namespace('dot11s') + register_types_ns3_dot11s(nested_module) + + + ## Register a nested module for the namespace dsdv + + nested_module = module.add_cpp_namespace('dsdv') + register_types_ns3_dsdv(nested_module) + + + ## Register a nested module for the namespace flame + + nested_module = module.add_cpp_namespace('flame') + register_types_ns3_flame(nested_module) + + + ## Register a nested module for the namespace internal + + nested_module = module.add_cpp_namespace('internal') + register_types_ns3_internal(nested_module) + + + ## Register a nested module for the namespace olsr + + nested_module = module.add_cpp_namespace('olsr') + register_types_ns3_olsr(nested_module) + + +def register_types_ns3_Config(module): + root_module = module.get_root() + + +def register_types_ns3_FatalImpl(module): + root_module = module.get_root() + + +def register_types_ns3_addressUtils(module): + root_module = module.get_root() + + +def register_types_ns3_aodv(module): + root_module = module.get_root() + + +def register_types_ns3_dot11s(module): + root_module = module.get_root() + + +def register_types_ns3_dsdv(module): + root_module = module.get_root() + + +def register_types_ns3_flame(module): + root_module = module.get_root() + + +def register_types_ns3_internal(module): + root_module = module.get_root() + + +def register_types_ns3_olsr(module): + root_module = module.get_root() + + +def register_methods(root_module): + register_Ns3FileConfig_methods(root_module, root_module['ns3::FileConfig']) + register_Ns3GtkConfigStore_methods(root_module, root_module['ns3::GtkConfigStore']) + register_Ns3NoneFileConfig_methods(root_module, root_module['ns3::NoneFileConfig']) + register_Ns3ConfigStore_methods(root_module, root_module['ns3::ConfigStore']) + return + +def register_Ns3FileConfig_methods(root_module, cls): + ## file-config.h: ns3::FileConfig::FileConfig() [constructor] + cls.add_constructor([]) + ## file-config.h: ns3::FileConfig::FileConfig(ns3::FileConfig const & arg0) [copy constructor] + cls.add_constructor([param('ns3::FileConfig const &', 'arg0')]) + ## file-config.h: void ns3::FileConfig::Attributes() [member function] + cls.add_method('Attributes', + 'void', + [], + is_pure_virtual=True, is_virtual=True) + ## file-config.h: void ns3::FileConfig::Default() [member function] + cls.add_method('Default', + 'void', + [], + is_pure_virtual=True, is_virtual=True) + ## file-config.h: void ns3::FileConfig::Global() [member function] + cls.add_method('Global', + 'void', + [], + is_pure_virtual=True, is_virtual=True) + ## file-config.h: void ns3::FileConfig::SetFilename(std::string filename) [member function] + cls.add_method('SetFilename', + 'void', + [param('std::string', 'filename')], + is_pure_virtual=True, is_virtual=True) + return + +def register_Ns3GtkConfigStore_methods(root_module, cls): + ## gtk-config-store.h: ns3::GtkConfigStore::GtkConfigStore(ns3::GtkConfigStore const & arg0) [copy constructor] + cls.add_constructor([param('ns3::GtkConfigStore const &', 'arg0')]) + ## gtk-config-store.h: ns3::GtkConfigStore::GtkConfigStore() [constructor] + cls.add_constructor([]) + ## gtk-config-store.h: void ns3::GtkConfigStore::ConfigureAttributes() [member function] + cls.add_method('ConfigureAttributes', + 'void', + []) + ## gtk-config-store.h: void ns3::GtkConfigStore::ConfigureDefaults() [member function] + cls.add_method('ConfigureDefaults', + 'void', + []) + return + +def register_Ns3NoneFileConfig_methods(root_module, cls): + ## file-config.h: ns3::NoneFileConfig::NoneFileConfig(ns3::NoneFileConfig const & arg0) [copy constructor] + cls.add_constructor([param('ns3::NoneFileConfig const &', 'arg0')]) + ## file-config.h: ns3::NoneFileConfig::NoneFileConfig() [constructor] + cls.add_constructor([]) + ## file-config.h: void ns3::NoneFileConfig::Attributes() [member function] + cls.add_method('Attributes', + 'void', + [], + is_virtual=True) + ## file-config.h: void ns3::NoneFileConfig::Default() [member function] + cls.add_method('Default', + 'void', + [], + is_virtual=True) + ## file-config.h: void ns3::NoneFileConfig::Global() [member function] + cls.add_method('Global', + 'void', + [], + is_virtual=True) + ## file-config.h: void ns3::NoneFileConfig::SetFilename(std::string filename) [member function] + cls.add_method('SetFilename', + 'void', + [param('std::string', 'filename')], + is_virtual=True) + return + +def register_Ns3ConfigStore_methods(root_module, cls): + ## config-store.h: ns3::ConfigStore::ConfigStore(ns3::ConfigStore const & arg0) [copy constructor] + cls.add_constructor([param('ns3::ConfigStore const &', 'arg0')]) + ## config-store.h: ns3::ConfigStore::ConfigStore() [constructor] + cls.add_constructor([]) + ## config-store.h: void ns3::ConfigStore::ConfigureAttributes() [member function] + cls.add_method('ConfigureAttributes', + 'void', + []) + ## config-store.h: void ns3::ConfigStore::ConfigureDefaults() [member function] + cls.add_method('ConfigureDefaults', + 'void', + []) + ## config-store.h: ns3::TypeId ns3::ConfigStore::GetInstanceTypeId() const [member function] + cls.add_method('GetInstanceTypeId', + 'ns3::TypeId', + [], + is_const=True, is_virtual=True) + ## config-store.h: static ns3::TypeId ns3::ConfigStore::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## config-store.h: void ns3::ConfigStore::SetFileFormat(ns3::ConfigStore::FileFormat format) [member function] + cls.add_method('SetFileFormat', + 'void', + [param('ns3::ConfigStore::FileFormat', 'format')]) + ## config-store.h: void ns3::ConfigStore::SetFilename(std::string filename) [member function] + cls.add_method('SetFilename', + 'void', + [param('std::string', 'filename')]) + ## config-store.h: void ns3::ConfigStore::SetMode(ns3::ConfigStore::Mode mode) [member function] + cls.add_method('SetMode', + 'void', + [param('ns3::ConfigStore::Mode', 'mode')]) + return + +def register_functions(root_module): + module = root_module + register_functions_ns3_Config(module.get_submodule('Config'), root_module) + register_functions_ns3_FatalImpl(module.get_submodule('FatalImpl'), root_module) + register_functions_ns3_addressUtils(module.get_submodule('addressUtils'), root_module) + register_functions_ns3_aodv(module.get_submodule('aodv'), root_module) + register_functions_ns3_dot11s(module.get_submodule('dot11s'), root_module) + register_functions_ns3_dsdv(module.get_submodule('dsdv'), root_module) + register_functions_ns3_flame(module.get_submodule('flame'), root_module) + register_functions_ns3_internal(module.get_submodule('internal'), root_module) + register_functions_ns3_olsr(module.get_submodule('olsr'), root_module) + return + +def register_functions_ns3_Config(module, root_module): + return + +def register_functions_ns3_FatalImpl(module, root_module): + return + +def register_functions_ns3_addressUtils(module, root_module): + return + +def register_functions_ns3_aodv(module, root_module): + return + +def register_functions_ns3_dot11s(module, root_module): + return + +def register_functions_ns3_dsdv(module, root_module): + return + +def register_functions_ns3_flame(module, root_module): + return + +def register_functions_ns3_internal(module, root_module): + return + +def register_functions_ns3_olsr(module, root_module): + return + diff -r afe2960e58b7 -r 9d2c79c992d7 bindings/python/apidefs/gcc-LP64/ns3_module_contrib.py --- a/bindings/python/apidefs/gcc-LP64/ns3_module_contrib.py Thu Mar 24 15:11:56 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,626 +0,0 @@ -from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers - -def register_types(module): - root_module = module.get_root() - - ## average.h: ns3::Average [class] - module.add_class('Average', template_parameters=['double']) - ## delay-jitter-estimation.h: ns3::DelayJitterEstimation [class] - module.add_class('DelayJitterEstimation') - ## event-garbage-collector.h: ns3::EventGarbageCollector [class] - module.add_class('EventGarbageCollector') - ## file-config.h: ns3::FileConfig [class] - module.add_class('FileConfig', allow_subclassing=True) - ## gnuplot.h: ns3::Gnuplot [class] - module.add_class('Gnuplot') - ## gnuplot.h: ns3::GnuplotCollection [class] - module.add_class('GnuplotCollection') - ## gnuplot.h: ns3::GnuplotDataset [class] - module.add_class('GnuplotDataset') - ## gtk-config-store.h: ns3::GtkConfigStore [class] - module.add_class('GtkConfigStore') - ## file-config.h: ns3::NoneFileConfig [class] - module.add_class('NoneFileConfig', parent=root_module['ns3::FileConfig']) - ## config-store.h: ns3::ConfigStore [class] - module.add_class('ConfigStore', parent=root_module['ns3::ObjectBase']) - ## config-store.h: ns3::ConfigStore::Mode [enumeration] - module.add_enum('Mode', ['LOAD', 'SAVE', 'NONE'], outer_class=root_module['ns3::ConfigStore']) - ## config-store.h: ns3::ConfigStore::FileFormat [enumeration] - module.add_enum('FileFormat', ['XML', 'RAW_TEXT'], outer_class=root_module['ns3::ConfigStore']) - ## flow-id-tag.h: ns3::FlowIdTag [class] - module.add_class('FlowIdTag', parent=root_module['ns3::Tag']) - ## gnuplot.h: ns3::Gnuplot2dDataset [class] - module.add_class('Gnuplot2dDataset', parent=root_module['ns3::GnuplotDataset']) - ## gnuplot.h: ns3::Gnuplot2dDataset::Style [enumeration] - module.add_enum('Style', ['LINES', 'POINTS', 'LINES_POINTS', 'DOTS', 'IMPULSES', 'STEPS', 'FSTEPS', 'HISTEPS'], outer_class=root_module['ns3::Gnuplot2dDataset']) - ## gnuplot.h: ns3::Gnuplot2dDataset::ErrorBars [enumeration] - module.add_enum('ErrorBars', ['NONE', 'X', 'Y', 'XY'], outer_class=root_module['ns3::Gnuplot2dDataset']) - ## gnuplot.h: ns3::Gnuplot2dFunction [class] - module.add_class('Gnuplot2dFunction', parent=root_module['ns3::GnuplotDataset']) - ## gnuplot.h: ns3::Gnuplot3dDataset [class] - module.add_class('Gnuplot3dDataset', parent=root_module['ns3::GnuplotDataset']) - ## gnuplot.h: ns3::Gnuplot3dFunction [class] - module.add_class('Gnuplot3dFunction', parent=root_module['ns3::GnuplotDataset']) - - ## Register a nested module for the namespace Config - - nested_module = module.add_cpp_namespace('Config') - register_types_ns3_Config(nested_module) - - - ## Register a nested module for the namespace FatalImpl - - nested_module = module.add_cpp_namespace('FatalImpl') - register_types_ns3_FatalImpl(nested_module) - - - ## Register a nested module for the namespace addressUtils - - nested_module = module.add_cpp_namespace('addressUtils') - register_types_ns3_addressUtils(nested_module) - - - ## Register a nested module for the namespace aodv - - nested_module = module.add_cpp_namespace('aodv') - register_types_ns3_aodv(nested_module) - - - ## Register a nested module for the namespace dot11s - - nested_module = module.add_cpp_namespace('dot11s') - register_types_ns3_dot11s(nested_module) - - - ## Register a nested module for the namespace dsdv - - nested_module = module.add_cpp_namespace('dsdv') - register_types_ns3_dsdv(nested_module) - - - ## Register a nested module for the namespace flame - - nested_module = module.add_cpp_namespace('flame') - register_types_ns3_flame(nested_module) - - - ## Register a nested module for the namespace internal - - nested_module = module.add_cpp_namespace('internal') - register_types_ns3_internal(nested_module) - - - ## Register a nested module for the namespace olsr - - nested_module = module.add_cpp_namespace('olsr') - register_types_ns3_olsr(nested_module) - - -def register_types_ns3_Config(module): - root_module = module.get_root() - - -def register_types_ns3_FatalImpl(module): - root_module = module.get_root() - - -def register_types_ns3_addressUtils(module): - root_module = module.get_root() - - -def register_types_ns3_aodv(module): - root_module = module.get_root() - - -def register_types_ns3_dot11s(module): - root_module = module.get_root() - - -def register_types_ns3_dsdv(module): - root_module = module.get_root() - - -def register_types_ns3_flame(module): - root_module = module.get_root() - - -def register_types_ns3_internal(module): - root_module = module.get_root() - - -def register_types_ns3_olsr(module): - root_module = module.get_root() - - -def register_methods(root_module): - register_Ns3Average__Double_methods(root_module, root_module['ns3::Average< double >']) - register_Ns3DelayJitterEstimation_methods(root_module, root_module['ns3::DelayJitterEstimation']) - register_Ns3EventGarbageCollector_methods(root_module, root_module['ns3::EventGarbageCollector']) - register_Ns3FileConfig_methods(root_module, root_module['ns3::FileConfig']) - register_Ns3Gnuplot_methods(root_module, root_module['ns3::Gnuplot']) - register_Ns3GnuplotCollection_methods(root_module, root_module['ns3::GnuplotCollection']) - register_Ns3GnuplotDataset_methods(root_module, root_module['ns3::GnuplotDataset']) - register_Ns3GtkConfigStore_methods(root_module, root_module['ns3::GtkConfigStore']) - register_Ns3NoneFileConfig_methods(root_module, root_module['ns3::NoneFileConfig']) - register_Ns3ConfigStore_methods(root_module, root_module['ns3::ConfigStore']) - register_Ns3FlowIdTag_methods(root_module, root_module['ns3::FlowIdTag']) - register_Ns3Gnuplot2dDataset_methods(root_module, root_module['ns3::Gnuplot2dDataset']) - register_Ns3Gnuplot2dFunction_methods(root_module, root_module['ns3::Gnuplot2dFunction']) - register_Ns3Gnuplot3dDataset_methods(root_module, root_module['ns3::Gnuplot3dDataset']) - register_Ns3Gnuplot3dFunction_methods(root_module, root_module['ns3::Gnuplot3dFunction']) - return - -def register_Ns3Average__Double_methods(root_module, cls): - ## average.h: ns3::Average::Average(ns3::Average const & arg0) [copy constructor] - cls.add_constructor([param('ns3::Average< double > const &', 'arg0')]) - ## average.h: ns3::Average::Average() [constructor] - cls.add_constructor([]) - ## average.h: double ns3::Average::Avg() const [member function] - cls.add_method('Avg', - 'double', - [], - is_const=True) - ## average.h: uint32_t ns3::Average::Count() const [member function] - cls.add_method('Count', - 'uint32_t', - [], - is_const=True) - ## average.h: double ns3::Average::Error90() const [member function] - cls.add_method('Error90', - 'double', - [], - is_const=True) - ## average.h: double ns3::Average::Error95() const [member function] - cls.add_method('Error95', - 'double', - [], - is_const=True) - ## average.h: double ns3::Average::Error99() const [member function] - cls.add_method('Error99', - 'double', - [], - is_const=True) - ## average.h: double ns3::Average::Max() const [member function] - cls.add_method('Max', - 'double', - [], - is_const=True) - ## average.h: double ns3::Average::Mean() const [member function] - cls.add_method('Mean', - 'double', - [], - is_const=True) - ## average.h: double ns3::Average::Min() const [member function] - cls.add_method('Min', - 'double', - [], - is_const=True) - ## average.h: void ns3::Average::Reset() [member function] - cls.add_method('Reset', - 'void', - []) - ## average.h: double ns3::Average::Stddev() const [member function] - cls.add_method('Stddev', - 'double', - [], - is_const=True) - ## average.h: void ns3::Average::Update(double const & x) [member function] - cls.add_method('Update', - 'void', - [param('double const &', 'x')]) - ## average.h: double ns3::Average::Var() const [member function] - cls.add_method('Var', - 'double', - [], - is_const=True) - return - -def register_Ns3DelayJitterEstimation_methods(root_module, cls): - ## delay-jitter-estimation.h: ns3::DelayJitterEstimation::DelayJitterEstimation(ns3::DelayJitterEstimation const & arg0) [copy constructor] - cls.add_constructor([param('ns3::DelayJitterEstimation const &', 'arg0')]) - ## delay-jitter-estimation.h: ns3::DelayJitterEstimation::DelayJitterEstimation() [constructor] - cls.add_constructor([]) - ## delay-jitter-estimation.h: ns3::Time ns3::DelayJitterEstimation::GetLastDelay() const [member function] - cls.add_method('GetLastDelay', - 'ns3::Time', - [], - is_const=True) - ## delay-jitter-estimation.h: ns3::Time ns3::DelayJitterEstimation::GetLastJitter() const [member function] - cls.add_method('GetLastJitter', - 'ns3::Time', - [], - is_const=True) - ## delay-jitter-estimation.h: static void ns3::DelayJitterEstimation::PrepareTx(ns3::Ptr packet) [member function] - cls.add_method('PrepareTx', - 'void', - [param('ns3::Ptr< ns3::Packet const >', 'packet')], - is_static=True) - ## delay-jitter-estimation.h: void ns3::DelayJitterEstimation::RecordRx(ns3::Ptr packet) [member function] - cls.add_method('RecordRx', - 'void', - [param('ns3::Ptr< ns3::Packet const >', 'packet')]) - return - -def register_Ns3EventGarbageCollector_methods(root_module, cls): - ## event-garbage-collector.h: ns3::EventGarbageCollector::EventGarbageCollector(ns3::EventGarbageCollector const & arg0) [copy constructor] - cls.add_constructor([param('ns3::EventGarbageCollector const &', 'arg0')]) - ## event-garbage-collector.h: ns3::EventGarbageCollector::EventGarbageCollector() [constructor] - cls.add_constructor([]) - ## event-garbage-collector.h: void ns3::EventGarbageCollector::Track(ns3::EventId event) [member function] - cls.add_method('Track', - 'void', - [param('ns3::EventId', 'event')]) - return - -def register_Ns3FileConfig_methods(root_module, cls): - ## file-config.h: ns3::FileConfig::FileConfig() [constructor] - cls.add_constructor([]) - ## file-config.h: ns3::FileConfig::FileConfig(ns3::FileConfig const & arg0) [copy constructor] - cls.add_constructor([param('ns3::FileConfig const &', 'arg0')]) - ## file-config.h: void ns3::FileConfig::Attributes() [member function] - cls.add_method('Attributes', - 'void', - [], - is_pure_virtual=True, is_virtual=True) - ## file-config.h: void ns3::FileConfig::Default() [member function] - cls.add_method('Default', - 'void', - [], - is_pure_virtual=True, is_virtual=True) - ## file-config.h: void ns3::FileConfig::Global() [member function] - cls.add_method('Global', - 'void', - [], - is_pure_virtual=True, is_virtual=True) - ## file-config.h: void ns3::FileConfig::SetFilename(std::string filename) [member function] - cls.add_method('SetFilename', - 'void', - [param('std::string', 'filename')], - is_pure_virtual=True, is_virtual=True) - return - -def register_Ns3Gnuplot_methods(root_module, cls): - ## gnuplot.h: ns3::Gnuplot::Gnuplot(ns3::Gnuplot const & arg0) [copy constructor] - cls.add_constructor([param('ns3::Gnuplot const &', 'arg0')]) - ## gnuplot.h: ns3::Gnuplot::Gnuplot(std::string const & outputFilename="", std::string const & title="") [constructor] - cls.add_constructor([param('std::string const &', 'outputFilename', default_value='""'), param('std::string const &', 'title', default_value='""')]) - ## gnuplot.h: void ns3::Gnuplot::AddDataset(ns3::GnuplotDataset const & dataset) [member function] - cls.add_method('AddDataset', - 'void', - [param('ns3::GnuplotDataset const &', 'dataset')]) - ## gnuplot.h: void ns3::Gnuplot::AppendExtra(std::string const & extra) [member function] - cls.add_method('AppendExtra', - 'void', - [param('std::string const &', 'extra')]) - ## gnuplot.h: static std::string ns3::Gnuplot::DetectTerminal(std::string const & filename) [member function] - cls.add_method('DetectTerminal', - 'std::string', - [param('std::string const &', 'filename')], - is_static=True) - ## gnuplot.h: void ns3::Gnuplot::GenerateOutput(std::ostream & os) const [member function] - cls.add_method('GenerateOutput', - 'void', - [param('std::ostream &', 'os')], - is_const=True) - ## gnuplot.h: void ns3::Gnuplot::SetExtra(std::string const & extra) [member function] - cls.add_method('SetExtra', - 'void', - [param('std::string const &', 'extra')]) - ## gnuplot.h: void ns3::Gnuplot::SetLegend(std::string const & xLegend, std::string const & yLegend) [member function] - cls.add_method('SetLegend', - 'void', - [param('std::string const &', 'xLegend'), param('std::string const &', 'yLegend')]) - ## gnuplot.h: void ns3::Gnuplot::SetTerminal(std::string const & terminal) [member function] - cls.add_method('SetTerminal', - 'void', - [param('std::string const &', 'terminal')]) - ## gnuplot.h: void ns3::Gnuplot::SetTitle(std::string const & title) [member function] - cls.add_method('SetTitle', - 'void', - [param('std::string const &', 'title')]) - return - -def register_Ns3GnuplotCollection_methods(root_module, cls): - ## gnuplot.h: ns3::GnuplotCollection::GnuplotCollection(ns3::GnuplotCollection const & arg0) [copy constructor] - cls.add_constructor([param('ns3::GnuplotCollection const &', 'arg0')]) - ## gnuplot.h: ns3::GnuplotCollection::GnuplotCollection(std::string const & outputFilename) [constructor] - cls.add_constructor([param('std::string const &', 'outputFilename')]) - ## gnuplot.h: void ns3::GnuplotCollection::AddPlot(ns3::Gnuplot const & plot) [member function] - cls.add_method('AddPlot', - 'void', - [param('ns3::Gnuplot const &', 'plot')]) - ## gnuplot.h: void ns3::GnuplotCollection::GenerateOutput(std::ostream & os) const [member function] - cls.add_method('GenerateOutput', - 'void', - [param('std::ostream &', 'os')], - is_const=True) - ## gnuplot.h: ns3::Gnuplot & ns3::GnuplotCollection::GetPlot(unsigned int id) [member function] - cls.add_method('GetPlot', - 'ns3::Gnuplot &', - [param('unsigned int', 'id')]) - ## gnuplot.h: void ns3::GnuplotCollection::SetTerminal(std::string const & terminal) [member function] - cls.add_method('SetTerminal', - 'void', - [param('std::string const &', 'terminal')]) - return - -def register_Ns3GnuplotDataset_methods(root_module, cls): - ## gnuplot.h: ns3::GnuplotDataset::GnuplotDataset(ns3::GnuplotDataset const & original) [copy constructor] - cls.add_constructor([param('ns3::GnuplotDataset const &', 'original')]) - ## gnuplot.h: static void ns3::GnuplotDataset::SetDefaultExtra(std::string const & extra) [member function] - cls.add_method('SetDefaultExtra', - 'void', - [param('std::string const &', 'extra')], - is_static=True) - ## gnuplot.h: void ns3::GnuplotDataset::SetExtra(std::string const & extra) [member function] - cls.add_method('SetExtra', - 'void', - [param('std::string const &', 'extra')]) - ## gnuplot.h: void ns3::GnuplotDataset::SetTitle(std::string const & title) [member function] - cls.add_method('SetTitle', - 'void', - [param('std::string const &', 'title')]) - ## gnuplot.h: ns3::GnuplotDataset::GnuplotDataset(ns3::GnuplotDataset::Data * data) [constructor] - cls.add_constructor([param('ns3::GnuplotDataset::Data *', 'data')], - visibility='protected') - return - -def register_Ns3GtkConfigStore_methods(root_module, cls): - ## gtk-config-store.h: ns3::GtkConfigStore::GtkConfigStore(ns3::GtkConfigStore const & arg0) [copy constructor] - cls.add_constructor([param('ns3::GtkConfigStore const &', 'arg0')]) - ## gtk-config-store.h: ns3::GtkConfigStore::GtkConfigStore() [constructor] - cls.add_constructor([]) - ## gtk-config-store.h: void ns3::GtkConfigStore::ConfigureAttributes() [member function] - cls.add_method('ConfigureAttributes', - 'void', - []) - ## gtk-config-store.h: void ns3::GtkConfigStore::ConfigureDefaults() [member function] - cls.add_method('ConfigureDefaults', - 'void', - []) - return - -def register_Ns3NoneFileConfig_methods(root_module, cls): - ## file-config.h: ns3::NoneFileConfig::NoneFileConfig(ns3::NoneFileConfig const & arg0) [copy constructor] - cls.add_constructor([param('ns3::NoneFileConfig const &', 'arg0')]) - ## file-config.h: ns3::NoneFileConfig::NoneFileConfig() [constructor] - cls.add_constructor([]) - ## file-config.h: void ns3::NoneFileConfig::Attributes() [member function] - cls.add_method('Attributes', - 'void', - [], - is_virtual=True) - ## file-config.h: void ns3::NoneFileConfig::Default() [member function] - cls.add_method('Default', - 'void', - [], - is_virtual=True) - ## file-config.h: void ns3::NoneFileConfig::Global() [member function] - cls.add_method('Global', - 'void', - [], - is_virtual=True) - ## file-config.h: void ns3::NoneFileConfig::SetFilename(std::string filename) [member function] - cls.add_method('SetFilename', - 'void', - [param('std::string', 'filename')], - is_virtual=True) - return - -def register_Ns3ConfigStore_methods(root_module, cls): - ## config-store.h: ns3::ConfigStore::ConfigStore(ns3::ConfigStore const & arg0) [copy constructor] - cls.add_constructor([param('ns3::ConfigStore const &', 'arg0')]) - ## config-store.h: ns3::ConfigStore::ConfigStore() [constructor] - cls.add_constructor([]) - ## config-store.h: void ns3::ConfigStore::ConfigureAttributes() [member function] - cls.add_method('ConfigureAttributes', - 'void', - []) - ## config-store.h: void ns3::ConfigStore::ConfigureDefaults() [member function] - cls.add_method('ConfigureDefaults', - 'void', - []) - ## config-store.h: ns3::TypeId ns3::ConfigStore::GetInstanceTypeId() const [member function] - cls.add_method('GetInstanceTypeId', - 'ns3::TypeId', - [], - is_const=True, is_virtual=True) - ## config-store.h: static ns3::TypeId ns3::ConfigStore::GetTypeId() [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_static=True) - ## config-store.h: void ns3::ConfigStore::SetFileFormat(ns3::ConfigStore::FileFormat format) [member function] - cls.add_method('SetFileFormat', - 'void', - [param('ns3::ConfigStore::FileFormat', 'format')]) - ## config-store.h: void ns3::ConfigStore::SetFilename(std::string filename) [member function] - cls.add_method('SetFilename', - 'void', - [param('std::string', 'filename')]) - ## config-store.h: void ns3::ConfigStore::SetMode(ns3::ConfigStore::Mode mode) [member function] - cls.add_method('SetMode', - 'void', - [param('ns3::ConfigStore::Mode', 'mode')]) - return - -def register_Ns3FlowIdTag_methods(root_module, cls): - ## flow-id-tag.h: ns3::FlowIdTag::FlowIdTag(ns3::FlowIdTag const & arg0) [copy constructor] - cls.add_constructor([param('ns3::FlowIdTag const &', 'arg0')]) - ## flow-id-tag.h: ns3::FlowIdTag::FlowIdTag() [constructor] - cls.add_constructor([]) - ## flow-id-tag.h: ns3::FlowIdTag::FlowIdTag(uint32_t flowId) [constructor] - cls.add_constructor([param('uint32_t', 'flowId')]) - ## flow-id-tag.h: static uint32_t ns3::FlowIdTag::AllocateFlowId() [member function] - cls.add_method('AllocateFlowId', - 'uint32_t', - [], - is_static=True) - ## flow-id-tag.h: void ns3::FlowIdTag::Deserialize(ns3::TagBuffer buf) [member function] - cls.add_method('Deserialize', - 'void', - [param('ns3::TagBuffer', 'buf')], - is_virtual=True) - ## flow-id-tag.h: uint32_t ns3::FlowIdTag::GetFlowId() const [member function] - cls.add_method('GetFlowId', - 'uint32_t', - [], - is_const=True) - ## flow-id-tag.h: ns3::TypeId ns3::FlowIdTag::GetInstanceTypeId() const [member function] - cls.add_method('GetInstanceTypeId', - 'ns3::TypeId', - [], - is_const=True, is_virtual=True) - ## flow-id-tag.h: uint32_t ns3::FlowIdTag::GetSerializedSize() const [member function] - cls.add_method('GetSerializedSize', - 'uint32_t', - [], - is_const=True, is_virtual=True) - ## flow-id-tag.h: static ns3::TypeId ns3::FlowIdTag::GetTypeId() [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_static=True) - ## flow-id-tag.h: void ns3::FlowIdTag::Print(std::ostream & os) const [member function] - cls.add_method('Print', - 'void', - [param('std::ostream &', 'os')], - is_const=True, is_virtual=True) - ## flow-id-tag.h: void ns3::FlowIdTag::Serialize(ns3::TagBuffer buf) const [member function] - cls.add_method('Serialize', - 'void', - [param('ns3::TagBuffer', 'buf')], - is_const=True, is_virtual=True) - ## flow-id-tag.h: void ns3::FlowIdTag::SetFlowId(uint32_t flowId) [member function] - cls.add_method('SetFlowId', - 'void', - [param('uint32_t', 'flowId')]) - return - -def register_Ns3Gnuplot2dDataset_methods(root_module, cls): - ## gnuplot.h: ns3::Gnuplot2dDataset::Gnuplot2dDataset(ns3::Gnuplot2dDataset const & arg0) [copy constructor] - cls.add_constructor([param('ns3::Gnuplot2dDataset const &', 'arg0')]) - ## gnuplot.h: ns3::Gnuplot2dDataset::Gnuplot2dDataset(std::string const & title="Untitled") [constructor] - cls.add_constructor([param('std::string const &', 'title', default_value='"Untitled"')]) - ## gnuplot.h: void ns3::Gnuplot2dDataset::Add(double x, double y) [member function] - cls.add_method('Add', - 'void', - [param('double', 'x'), param('double', 'y')]) - ## gnuplot.h: void ns3::Gnuplot2dDataset::Add(double x, double y, double errorDelta) [member function] - cls.add_method('Add', - 'void', - [param('double', 'x'), param('double', 'y'), param('double', 'errorDelta')]) - ## gnuplot.h: void ns3::Gnuplot2dDataset::Add(double x, double y, double minY, double maxY) [member function] - cls.add_method('Add', - 'void', - [param('double', 'x'), param('double', 'y'), param('double', 'minY'), param('double', 'maxY')]) - ## gnuplot.h: void ns3::Gnuplot2dDataset::AddEmptyLine() [member function] - cls.add_method('AddEmptyLine', - 'void', - []) - ## gnuplot.h: static void ns3::Gnuplot2dDataset::SetDefaultErrorBars(ns3::Gnuplot2dDataset::ErrorBars errorBars) [member function] - cls.add_method('SetDefaultErrorBars', - 'void', - [param('ns3::Gnuplot2dDataset::ErrorBars', 'errorBars')], - is_static=True) - ## gnuplot.h: static void ns3::Gnuplot2dDataset::SetDefaultStyle(ns3::Gnuplot2dDataset::Style style) [member function] - cls.add_method('SetDefaultStyle', - 'void', - [param('ns3::Gnuplot2dDataset::Style', 'style')], - is_static=True) - ## gnuplot.h: void ns3::Gnuplot2dDataset::SetErrorBars(ns3::Gnuplot2dDataset::ErrorBars errorBars) [member function] - cls.add_method('SetErrorBars', - 'void', - [param('ns3::Gnuplot2dDataset::ErrorBars', 'errorBars')]) - ## gnuplot.h: void ns3::Gnuplot2dDataset::SetStyle(ns3::Gnuplot2dDataset::Style style) [member function] - cls.add_method('SetStyle', - 'void', - [param('ns3::Gnuplot2dDataset::Style', 'style')]) - return - -def register_Ns3Gnuplot2dFunction_methods(root_module, cls): - ## gnuplot.h: ns3::Gnuplot2dFunction::Gnuplot2dFunction(ns3::Gnuplot2dFunction const & arg0) [copy constructor] - cls.add_constructor([param('ns3::Gnuplot2dFunction const &', 'arg0')]) - ## gnuplot.h: ns3::Gnuplot2dFunction::Gnuplot2dFunction(std::string const & title="Untitled", std::string const & function="") [constructor] - cls.add_constructor([param('std::string const &', 'title', default_value='"Untitled"'), param('std::string const &', 'function', default_value='""')]) - ## gnuplot.h: void ns3::Gnuplot2dFunction::SetFunction(std::string const & function) [member function] - cls.add_method('SetFunction', - 'void', - [param('std::string const &', 'function')]) - return - -def register_Ns3Gnuplot3dDataset_methods(root_module, cls): - ## gnuplot.h: ns3::Gnuplot3dDataset::Gnuplot3dDataset(ns3::Gnuplot3dDataset const & arg0) [copy constructor] - cls.add_constructor([param('ns3::Gnuplot3dDataset const &', 'arg0')]) - ## gnuplot.h: ns3::Gnuplot3dDataset::Gnuplot3dDataset(std::string const & title="Untitled") [constructor] - cls.add_constructor([param('std::string const &', 'title', default_value='"Untitled"')]) - ## gnuplot.h: void ns3::Gnuplot3dDataset::Add(double x, double y, double z) [member function] - cls.add_method('Add', - 'void', - [param('double', 'x'), param('double', 'y'), param('double', 'z')]) - ## gnuplot.h: void ns3::Gnuplot3dDataset::AddEmptyLine() [member function] - cls.add_method('AddEmptyLine', - 'void', - []) - ## gnuplot.h: static void ns3::Gnuplot3dDataset::SetDefaultStyle(std::string const & style) [member function] - cls.add_method('SetDefaultStyle', - 'void', - [param('std::string const &', 'style')], - is_static=True) - ## gnuplot.h: void ns3::Gnuplot3dDataset::SetStyle(std::string const & style) [member function] - cls.add_method('SetStyle', - 'void', - [param('std::string const &', 'style')]) - return - -def register_Ns3Gnuplot3dFunction_methods(root_module, cls): - ## gnuplot.h: ns3::Gnuplot3dFunction::Gnuplot3dFunction(ns3::Gnuplot3dFunction const & arg0) [copy constructor] - cls.add_constructor([param('ns3::Gnuplot3dFunction const &', 'arg0')]) - ## gnuplot.h: ns3::Gnuplot3dFunction::Gnuplot3dFunction(std::string const & title="Untitled", std::string const & function="") [constructor] - cls.add_constructor([param('std::string const &', 'title', default_value='"Untitled"'), param('std::string const &', 'function', default_value='""')]) - ## gnuplot.h: void ns3::Gnuplot3dFunction::SetFunction(std::string const & function) [member function] - cls.add_method('SetFunction', - 'void', - [param('std::string const &', 'function')]) - return - -def register_functions(root_module): - module = root_module - register_functions_ns3_Config(module.get_submodule('Config'), root_module) - register_functions_ns3_FatalImpl(module.get_submodule('FatalImpl'), root_module) - register_functions_ns3_addressUtils(module.get_submodule('addressUtils'), root_module) - register_functions_ns3_aodv(module.get_submodule('aodv'), root_module) - register_functions_ns3_dot11s(module.get_submodule('dot11s'), root_module) - register_functions_ns3_dsdv(module.get_submodule('dsdv'), root_module) - register_functions_ns3_flame(module.get_submodule('flame'), root_module) - register_functions_ns3_internal(module.get_submodule('internal'), root_module) - register_functions_ns3_olsr(module.get_submodule('olsr'), root_module) - return - -def register_functions_ns3_Config(module, root_module): - return - -def register_functions_ns3_FatalImpl(module, root_module): - return - -def register_functions_ns3_addressUtils(module, root_module): - return - -def register_functions_ns3_aodv(module, root_module): - return - -def register_functions_ns3_dot11s(module, root_module): - return - -def register_functions_ns3_dsdv(module, root_module): - return - -def register_functions_ns3_flame(module, root_module): - return - -def register_functions_ns3_internal(module, root_module): - return - -def register_functions_ns3_olsr(module, root_module): - return - diff -r afe2960e58b7 -r 9d2c79c992d7 bindings/python/apidefs/gcc-LP64/ns3_module_network.py --- a/bindings/python/apidefs/gcc-LP64/ns3_module_network.py Thu Mar 24 15:11:56 2011 +0100 +++ b/bindings/python/apidefs/gcc-LP64/ns3_module_network.py Thu Mar 24 09:23:44 2011 -0700 @@ -113,6 +113,8 @@ module.add_class('TagBuffer') ## chunk.h: ns3::Chunk [class] module.add_class('Chunk', parent=root_module['ns3::ObjectBase']) + ## flow-id-tag.h: ns3::FlowIdTag [class] + module.add_class('FlowIdTag', parent=root_module['ns3::Tag']) ## header.h: ns3::Header [class] module.add_class('Header', parent=root_module['ns3::Chunk']) ## llc-snap-header.h: ns3::LlcSnapHeader [class] @@ -404,6 +406,7 @@ register_Ns3Tag_methods(root_module, root_module['ns3::Tag']) register_Ns3TagBuffer_methods(root_module, root_module['ns3::TagBuffer']) register_Ns3Chunk_methods(root_module, root_module['ns3::Chunk']) + register_Ns3FlowIdTag_methods(root_module, root_module['ns3::FlowIdTag']) register_Ns3Header_methods(root_module, root_module['ns3::Header']) register_Ns3LlcSnapHeader_methods(root_module, root_module['ns3::LlcSnapHeader']) register_Ns3PacketBurst_methods(root_module, root_module['ns3::PacketBurst']) @@ -2579,6 +2582,59 @@ is_pure_virtual=True, is_const=True, is_virtual=True) return +def register_Ns3FlowIdTag_methods(root_module, cls): + ## flow-id-tag.h: ns3::FlowIdTag::FlowIdTag(ns3::FlowIdTag const & arg0) [copy constructor] + cls.add_constructor([param('ns3::FlowIdTag const &', 'arg0')]) + ## flow-id-tag.h: ns3::FlowIdTag::FlowIdTag() [constructor] + cls.add_constructor([]) + ## flow-id-tag.h: ns3::FlowIdTag::FlowIdTag(uint32_t flowId) [constructor] + cls.add_constructor([param('uint32_t', 'flowId')]) + ## flow-id-tag.h: static uint32_t ns3::FlowIdTag::AllocateFlowId() [member function] + cls.add_method('AllocateFlowId', + 'uint32_t', + [], + is_static=True) + ## flow-id-tag.h: void ns3::FlowIdTag::Deserialize(ns3::TagBuffer buf) [member function] + cls.add_method('Deserialize', + 'void', + [param('ns3::TagBuffer', 'buf')], + is_virtual=True) + ## flow-id-tag.h: uint32_t ns3::FlowIdTag::GetFlowId() const [member function] + cls.add_method('GetFlowId', + 'uint32_t', + [], + is_const=True) + ## flow-id-tag.h: ns3::TypeId ns3::FlowIdTag::GetInstanceTypeId() const [member function] + cls.add_method('GetInstanceTypeId', + 'ns3::TypeId', + [], + is_const=True, is_virtual=True) + ## flow-id-tag.h: uint32_t ns3::FlowIdTag::GetSerializedSize() const [member function] + cls.add_method('GetSerializedSize', + 'uint32_t', + [], + is_const=True, is_virtual=True) + ## flow-id-tag.h: static ns3::TypeId ns3::FlowIdTag::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## flow-id-tag.h: void ns3::FlowIdTag::Print(std::ostream & os) const [member function] + cls.add_method('Print', + 'void', + [param('std::ostream &', 'os')], + is_const=True, is_virtual=True) + ## flow-id-tag.h: void ns3::FlowIdTag::Serialize(ns3::TagBuffer buf) const [member function] + cls.add_method('Serialize', + 'void', + [param('ns3::TagBuffer', 'buf')], + is_const=True, is_virtual=True) + ## flow-id-tag.h: void ns3::FlowIdTag::SetFlowId(uint32_t flowId) [member function] + cls.add_method('SetFlowId', + 'void', + [param('uint32_t', 'flowId')]) + return + def register_Ns3Header_methods(root_module, cls): cls.add_output_stream_operator() ## header.h: ns3::Header::Header() [constructor] diff -r afe2960e58b7 -r 9d2c79c992d7 bindings/python/apidefs/gcc-LP64/ns3_module_tools.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bindings/python/apidefs/gcc-LP64/ns3_module_tools.py Thu Mar 24 09:23:44 2011 -0700 @@ -0,0 +1,448 @@ +from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers + +def register_types(module): + root_module = module.get_root() + + ## average.h: ns3::Average [class] + module.add_class('Average', template_parameters=['double']) + ## delay-jitter-estimation.h: ns3::DelayJitterEstimation [class] + module.add_class('DelayJitterEstimation') + ## event-garbage-collector.h: ns3::EventGarbageCollector [class] + module.add_class('EventGarbageCollector') + ## gnuplot.h: ns3::Gnuplot [class] + module.add_class('Gnuplot') + ## gnuplot.h: ns3::GnuplotCollection [class] + module.add_class('GnuplotCollection') + ## gnuplot.h: ns3::GnuplotDataset [class] + module.add_class('GnuplotDataset') + ## gnuplot.h: ns3::Gnuplot2dDataset [class] + module.add_class('Gnuplot2dDataset', parent=root_module['ns3::GnuplotDataset']) + ## gnuplot.h: ns3::Gnuplot2dDataset::Style [enumeration] + module.add_enum('Style', ['LINES', 'POINTS', 'LINES_POINTS', 'DOTS', 'IMPULSES', 'STEPS', 'FSTEPS', 'HISTEPS'], outer_class=root_module['ns3::Gnuplot2dDataset']) + ## gnuplot.h: ns3::Gnuplot2dDataset::ErrorBars [enumeration] + module.add_enum('ErrorBars', ['NONE', 'X', 'Y', 'XY'], outer_class=root_module['ns3::Gnuplot2dDataset']) + ## gnuplot.h: ns3::Gnuplot2dFunction [class] + module.add_class('Gnuplot2dFunction', parent=root_module['ns3::GnuplotDataset']) + ## gnuplot.h: ns3::Gnuplot3dDataset [class] + module.add_class('Gnuplot3dDataset', parent=root_module['ns3::GnuplotDataset']) + ## gnuplot.h: ns3::Gnuplot3dFunction [class] + module.add_class('Gnuplot3dFunction', parent=root_module['ns3::GnuplotDataset']) + + ## Register a nested module for the namespace Config + + nested_module = module.add_cpp_namespace('Config') + register_types_ns3_Config(nested_module) + + + ## Register a nested module for the namespace FatalImpl + + nested_module = module.add_cpp_namespace('FatalImpl') + register_types_ns3_FatalImpl(nested_module) + + + ## Register a nested module for the namespace addressUtils + + nested_module = module.add_cpp_namespace('addressUtils') + register_types_ns3_addressUtils(nested_module) + + + ## Register a nested module for the namespace aodv + + nested_module = module.add_cpp_namespace('aodv') + register_types_ns3_aodv(nested_module) + + + ## Register a nested module for the namespace dot11s + + nested_module = module.add_cpp_namespace('dot11s') + register_types_ns3_dot11s(nested_module) + + + ## Register a nested module for the namespace dsdv + + nested_module = module.add_cpp_namespace('dsdv') + register_types_ns3_dsdv(nested_module) + + + ## Register a nested module for the namespace flame + + nested_module = module.add_cpp_namespace('flame') + register_types_ns3_flame(nested_module) + + + ## Register a nested module for the namespace internal + + nested_module = module.add_cpp_namespace('internal') + register_types_ns3_internal(nested_module) + + + ## Register a nested module for the namespace olsr + + nested_module = module.add_cpp_namespace('olsr') + register_types_ns3_olsr(nested_module) + + +def register_types_ns3_Config(module): + root_module = module.get_root() + + +def register_types_ns3_FatalImpl(module): + root_module = module.get_root() + + +def register_types_ns3_addressUtils(module): + root_module = module.get_root() + + +def register_types_ns3_aodv(module): + root_module = module.get_root() + + +def register_types_ns3_dot11s(module): + root_module = module.get_root() + + +def register_types_ns3_dsdv(module): + root_module = module.get_root() + + +def register_types_ns3_flame(module): + root_module = module.get_root() + + +def register_types_ns3_internal(module): + root_module = module.get_root() + + +def register_types_ns3_olsr(module): + root_module = module.get_root() + + +def register_methods(root_module): + register_Ns3Average__Double_methods(root_module, root_module['ns3::Average< double >']) + register_Ns3DelayJitterEstimation_methods(root_module, root_module['ns3::DelayJitterEstimation']) + register_Ns3EventGarbageCollector_methods(root_module, root_module['ns3::EventGarbageCollector']) + register_Ns3Gnuplot_methods(root_module, root_module['ns3::Gnuplot']) + register_Ns3GnuplotCollection_methods(root_module, root_module['ns3::GnuplotCollection']) + register_Ns3GnuplotDataset_methods(root_module, root_module['ns3::GnuplotDataset']) + register_Ns3Gnuplot2dDataset_methods(root_module, root_module['ns3::Gnuplot2dDataset']) + register_Ns3Gnuplot2dFunction_methods(root_module, root_module['ns3::Gnuplot2dFunction']) + register_Ns3Gnuplot3dDataset_methods(root_module, root_module['ns3::Gnuplot3dDataset']) + register_Ns3Gnuplot3dFunction_methods(root_module, root_module['ns3::Gnuplot3dFunction']) + return + +def register_Ns3Average__Double_methods(root_module, cls): + ## average.h: ns3::Average::Average(ns3::Average const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Average< double > const &', 'arg0')]) + ## average.h: ns3::Average::Average() [constructor] + cls.add_constructor([]) + ## average.h: double ns3::Average::Avg() const [member function] + cls.add_method('Avg', + 'double', + [], + is_const=True) + ## average.h: uint32_t ns3::Average::Count() const [member function] + cls.add_method('Count', + 'uint32_t', + [], + is_const=True) + ## average.h: double ns3::Average::Error90() const [member function] + cls.add_method('Error90', + 'double', + [], + is_const=True) + ## average.h: double ns3::Average::Error95() const [member function] + cls.add_method('Error95', + 'double', + [], + is_const=True) + ## average.h: double ns3::Average::Error99() const [member function] + cls.add_method('Error99', + 'double', + [], + is_const=True) + ## average.h: double ns3::Average::Max() const [member function] + cls.add_method('Max', + 'double', + [], + is_const=True) + ## average.h: double ns3::Average::Mean() const [member function] + cls.add_method('Mean', + 'double', + [], + is_const=True) + ## average.h: double ns3::Average::Min() const [member function] + cls.add_method('Min', + 'double', + [], + is_const=True) + ## average.h: void ns3::Average::Reset() [member function] + cls.add_method('Reset', + 'void', + []) + ## average.h: double ns3::Average::Stddev() const [member function] + cls.add_method('Stddev', + 'double', + [], + is_const=True) + ## average.h: void ns3::Average::Update(double const & x) [member function] + cls.add_method('Update', + 'void', + [param('double const &', 'x')]) + ## average.h: double ns3::Average::Var() const [member function] + cls.add_method('Var', + 'double', + [], + is_const=True) + return + +def register_Ns3DelayJitterEstimation_methods(root_module, cls): + ## delay-jitter-estimation.h: ns3::DelayJitterEstimation::DelayJitterEstimation(ns3::DelayJitterEstimation const & arg0) [copy constructor] + cls.add_constructor([param('ns3::DelayJitterEstimation const &', 'arg0')]) + ## delay-jitter-estimation.h: ns3::DelayJitterEstimation::DelayJitterEstimation() [constructor] + cls.add_constructor([]) + ## delay-jitter-estimation.h: ns3::Time ns3::DelayJitterEstimation::GetLastDelay() const [member function] + cls.add_method('GetLastDelay', + 'ns3::Time', + [], + is_const=True) + ## delay-jitter-estimation.h: ns3::Time ns3::DelayJitterEstimation::GetLastJitter() const [member function] + cls.add_method('GetLastJitter', + 'ns3::Time', + [], + is_const=True) + ## delay-jitter-estimation.h: static void ns3::DelayJitterEstimation::PrepareTx(ns3::Ptr packet) [member function] + cls.add_method('PrepareTx', + 'void', + [param('ns3::Ptr< ns3::Packet const >', 'packet')], + is_static=True) + ## delay-jitter-estimation.h: void ns3::DelayJitterEstimation::RecordRx(ns3::Ptr packet) [member function] + cls.add_method('RecordRx', + 'void', + [param('ns3::Ptr< ns3::Packet const >', 'packet')]) + return + +def register_Ns3EventGarbageCollector_methods(root_module, cls): + ## event-garbage-collector.h: ns3::EventGarbageCollector::EventGarbageCollector(ns3::EventGarbageCollector const & arg0) [copy constructor] + cls.add_constructor([param('ns3::EventGarbageCollector const &', 'arg0')]) + ## event-garbage-collector.h: ns3::EventGarbageCollector::EventGarbageCollector() [constructor] + cls.add_constructor([]) + ## event-garbage-collector.h: void ns3::EventGarbageCollector::Track(ns3::EventId event) [member function] + cls.add_method('Track', + 'void', + [param('ns3::EventId', 'event')]) + return + +def register_Ns3Gnuplot_methods(root_module, cls): + ## gnuplot.h: ns3::Gnuplot::Gnuplot(ns3::Gnuplot const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Gnuplot const &', 'arg0')]) + ## gnuplot.h: ns3::Gnuplot::Gnuplot(std::string const & outputFilename="", std::string const & title="") [constructor] + cls.add_constructor([param('std::string const &', 'outputFilename', default_value='""'), param('std::string const &', 'title', default_value='""')]) + ## gnuplot.h: void ns3::Gnuplot::AddDataset(ns3::GnuplotDataset const & dataset) [member function] + cls.add_method('AddDataset', + 'void', + [param('ns3::GnuplotDataset const &', 'dataset')]) + ## gnuplot.h: void ns3::Gnuplot::AppendExtra(std::string const & extra) [member function] + cls.add_method('AppendExtra', + 'void', + [param('std::string const &', 'extra')]) + ## gnuplot.h: static std::string ns3::Gnuplot::DetectTerminal(std::string const & filename) [member function] + cls.add_method('DetectTerminal', + 'std::string', + [param('std::string const &', 'filename')], + is_static=True) + ## gnuplot.h: void ns3::Gnuplot::GenerateOutput(std::ostream & os) const [member function] + cls.add_method('GenerateOutput', + 'void', + [param('std::ostream &', 'os')], + is_const=True) + ## gnuplot.h: void ns3::Gnuplot::SetExtra(std::string const & extra) [member function] + cls.add_method('SetExtra', + 'void', + [param('std::string const &', 'extra')]) + ## gnuplot.h: void ns3::Gnuplot::SetLegend(std::string const & xLegend, std::string const & yLegend) [member function] + cls.add_method('SetLegend', + 'void', + [param('std::string const &', 'xLegend'), param('std::string const &', 'yLegend')]) + ## gnuplot.h: void ns3::Gnuplot::SetTerminal(std::string const & terminal) [member function] + cls.add_method('SetTerminal', + 'void', + [param('std::string const &', 'terminal')]) + ## gnuplot.h: void ns3::Gnuplot::SetTitle(std::string const & title) [member function] + cls.add_method('SetTitle', + 'void', + [param('std::string const &', 'title')]) + return + +def register_Ns3GnuplotCollection_methods(root_module, cls): + ## gnuplot.h: ns3::GnuplotCollection::GnuplotCollection(ns3::GnuplotCollection const & arg0) [copy constructor] + cls.add_constructor([param('ns3::GnuplotCollection const &', 'arg0')]) + ## gnuplot.h: ns3::GnuplotCollection::GnuplotCollection(std::string const & outputFilename) [constructor] + cls.add_constructor([param('std::string const &', 'outputFilename')]) + ## gnuplot.h: void ns3::GnuplotCollection::AddPlot(ns3::Gnuplot const & plot) [member function] + cls.add_method('AddPlot', + 'void', + [param('ns3::Gnuplot const &', 'plot')]) + ## gnuplot.h: void ns3::GnuplotCollection::GenerateOutput(std::ostream & os) const [member function] + cls.add_method('GenerateOutput', + 'void', + [param('std::ostream &', 'os')], + is_const=True) + ## gnuplot.h: ns3::Gnuplot & ns3::GnuplotCollection::GetPlot(unsigned int id) [member function] + cls.add_method('GetPlot', + 'ns3::Gnuplot &', + [param('unsigned int', 'id')]) + ## gnuplot.h: void ns3::GnuplotCollection::SetTerminal(std::string const & terminal) [member function] + cls.add_method('SetTerminal', + 'void', + [param('std::string const &', 'terminal')]) + return + +def register_Ns3GnuplotDataset_methods(root_module, cls): + ## gnuplot.h: ns3::GnuplotDataset::GnuplotDataset(ns3::GnuplotDataset const & original) [copy constructor] + cls.add_constructor([param('ns3::GnuplotDataset const &', 'original')]) + ## gnuplot.h: static void ns3::GnuplotDataset::SetDefaultExtra(std::string const & extra) [member function] + cls.add_method('SetDefaultExtra', + 'void', + [param('std::string const &', 'extra')], + is_static=True) + ## gnuplot.h: void ns3::GnuplotDataset::SetExtra(std::string const & extra) [member function] + cls.add_method('SetExtra', + 'void', + [param('std::string const &', 'extra')]) + ## gnuplot.h: void ns3::GnuplotDataset::SetTitle(std::string const & title) [member function] + cls.add_method('SetTitle', + 'void', + [param('std::string const &', 'title')]) + ## gnuplot.h: ns3::GnuplotDataset::GnuplotDataset(ns3::GnuplotDataset::Data * data) [constructor] + cls.add_constructor([param('ns3::GnuplotDataset::Data *', 'data')], + visibility='protected') + return + +def register_Ns3Gnuplot2dDataset_methods(root_module, cls): + ## gnuplot.h: ns3::Gnuplot2dDataset::Gnuplot2dDataset(ns3::Gnuplot2dDataset const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Gnuplot2dDataset const &', 'arg0')]) + ## gnuplot.h: ns3::Gnuplot2dDataset::Gnuplot2dDataset(std::string const & title="Untitled") [constructor] + cls.add_constructor([param('std::string const &', 'title', default_value='"Untitled"')]) + ## gnuplot.h: void ns3::Gnuplot2dDataset::Add(double x, double y) [member function] + cls.add_method('Add', + 'void', + [param('double', 'x'), param('double', 'y')]) + ## gnuplot.h: void ns3::Gnuplot2dDataset::Add(double x, double y, double errorDelta) [member function] + cls.add_method('Add', + 'void', + [param('double', 'x'), param('double', 'y'), param('double', 'errorDelta')]) + ## gnuplot.h: void ns3::Gnuplot2dDataset::Add(double x, double y, double minY, double maxY) [member function] + cls.add_method('Add', + 'void', + [param('double', 'x'), param('double', 'y'), param('double', 'minY'), param('double', 'maxY')]) + ## gnuplot.h: void ns3::Gnuplot2dDataset::AddEmptyLine() [member function] + cls.add_method('AddEmptyLine', + 'void', + []) + ## gnuplot.h: static void ns3::Gnuplot2dDataset::SetDefaultErrorBars(ns3::Gnuplot2dDataset::ErrorBars errorBars) [member function] + cls.add_method('SetDefaultErrorBars', + 'void', + [param('ns3::Gnuplot2dDataset::ErrorBars', 'errorBars')], + is_static=True) + ## gnuplot.h: static void ns3::Gnuplot2dDataset::SetDefaultStyle(ns3::Gnuplot2dDataset::Style style) [member function] + cls.add_method('SetDefaultStyle', + 'void', + [param('ns3::Gnuplot2dDataset::Style', 'style')], + is_static=True) + ## gnuplot.h: void ns3::Gnuplot2dDataset::SetErrorBars(ns3::Gnuplot2dDataset::ErrorBars errorBars) [member function] + cls.add_method('SetErrorBars', + 'void', + [param('ns3::Gnuplot2dDataset::ErrorBars', 'errorBars')]) + ## gnuplot.h: void ns3::Gnuplot2dDataset::SetStyle(ns3::Gnuplot2dDataset::Style style) [member function] + cls.add_method('SetStyle', + 'void', + [param('ns3::Gnuplot2dDataset::Style', 'style')]) + return + +def register_Ns3Gnuplot2dFunction_methods(root_module, cls): + ## gnuplot.h: ns3::Gnuplot2dFunction::Gnuplot2dFunction(ns3::Gnuplot2dFunction const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Gnuplot2dFunction const &', 'arg0')]) + ## gnuplot.h: ns3::Gnuplot2dFunction::Gnuplot2dFunction(std::string const & title="Untitled", std::string const & function="") [constructor] + cls.add_constructor([param('std::string const &', 'title', default_value='"Untitled"'), param('std::string const &', 'function', default_value='""')]) + ## gnuplot.h: void ns3::Gnuplot2dFunction::SetFunction(std::string const & function) [member function] + cls.add_method('SetFunction', + 'void', + [param('std::string const &', 'function')]) + return + +def register_Ns3Gnuplot3dDataset_methods(root_module, cls): + ## gnuplot.h: ns3::Gnuplot3dDataset::Gnuplot3dDataset(ns3::Gnuplot3dDataset const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Gnuplot3dDataset const &', 'arg0')]) + ## gnuplot.h: ns3::Gnuplot3dDataset::Gnuplot3dDataset(std::string const & title="Untitled") [constructor] + cls.add_constructor([param('std::string const &', 'title', default_value='"Untitled"')]) + ## gnuplot.h: void ns3::Gnuplot3dDataset::Add(double x, double y, double z) [member function] + cls.add_method('Add', + 'void', + [param('double', 'x'), param('double', 'y'), param('double', 'z')]) + ## gnuplot.h: void ns3::Gnuplot3dDataset::AddEmptyLine() [member function] + cls.add_method('AddEmptyLine', + 'void', + []) + ## gnuplot.h: static void ns3::Gnuplot3dDataset::SetDefaultStyle(std::string const & style) [member function] + cls.add_method('SetDefaultStyle', + 'void', + [param('std::string const &', 'style')], + is_static=True) + ## gnuplot.h: void ns3::Gnuplot3dDataset::SetStyle(std::string const & style) [member function] + cls.add_method('SetStyle', + 'void', + [param('std::string const &', 'style')]) + return + +def register_Ns3Gnuplot3dFunction_methods(root_module, cls): + ## gnuplot.h: ns3::Gnuplot3dFunction::Gnuplot3dFunction(ns3::Gnuplot3dFunction const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Gnuplot3dFunction const &', 'arg0')]) + ## gnuplot.h: ns3::Gnuplot3dFunction::Gnuplot3dFunction(std::string const & title="Untitled", std::string const & function="") [constructor] + cls.add_constructor([param('std::string const &', 'title', default_value='"Untitled"'), param('std::string const &', 'function', default_value='""')]) + ## gnuplot.h: void ns3::Gnuplot3dFunction::SetFunction(std::string const & function) [member function] + cls.add_method('SetFunction', + 'void', + [param('std::string const &', 'function')]) + return + +def register_functions(root_module): + module = root_module + register_functions_ns3_Config(module.get_submodule('Config'), root_module) + register_functions_ns3_FatalImpl(module.get_submodule('FatalImpl'), root_module) + register_functions_ns3_addressUtils(module.get_submodule('addressUtils'), root_module) + register_functions_ns3_aodv(module.get_submodule('aodv'), root_module) + register_functions_ns3_dot11s(module.get_submodule('dot11s'), root_module) + register_functions_ns3_dsdv(module.get_submodule('dsdv'), root_module) + register_functions_ns3_flame(module.get_submodule('flame'), root_module) + register_functions_ns3_internal(module.get_submodule('internal'), root_module) + register_functions_ns3_olsr(module.get_submodule('olsr'), root_module) + return + +def register_functions_ns3_Config(module, root_module): + return + +def register_functions_ns3_FatalImpl(module, root_module): + return + +def register_functions_ns3_addressUtils(module, root_module): + return + +def register_functions_ns3_aodv(module, root_module): + return + +def register_functions_ns3_dot11s(module, root_module): + return + +def register_functions_ns3_dsdv(module, root_module): + return + +def register_functions_ns3_flame(module, root_module): + return + +def register_functions_ns3_internal(module, root_module): + return + +def register_functions_ns3_olsr(module, root_module): + return + diff -r afe2960e58b7 -r 9d2c79c992d7 bindings/python/apidefs/gcc-LP64/ns3modulegen_generated.py --- a/bindings/python/apidefs/gcc-LP64/ns3modulegen_generated.py Thu Mar 24 15:11:56 2011 +0100 +++ b/bindings/python/apidefs/gcc-LP64/ns3modulegen_generated.py Thu Mar 24 09:23:44 2011 -0700 @@ -17,20 +17,21 @@ import ns3_module_network import ns3_module_visualizer import ns3_module_bridge -import ns3_module_contrib +import ns3_module_config_store import ns3_module_emu import ns3_module_mobility import ns3_module_mpi import ns3_module_network_test import ns3_module_stats +import ns3_module_tools import ns3_module_topology_read import ns3_module_propagation import ns3_module_internet import ns3_module_point_to_point +import ns3_module_flow_monitor import ns3_module_wifi import ns3_module_applications import ns3_module_click -import ns3_module_flow_monitor import ns3_module_nix_vector_routing import ns3_module_openflow import ns3_module_tap_bridge @@ -114,17 +115,17 @@ ns3_module_bridge__local.register_types(module) root_module.end_section('ns3_module_bridge') - root_module.begin_section('ns3_module_contrib') - ns3_module_contrib.register_types(module) + root_module.begin_section('ns3_module_config_store') + ns3_module_config_store.register_types(module) try: - import ns3_module_contrib__local + import ns3_module_config_store__local except ImportError: pass else: - ns3_module_contrib__local.register_types(module) + ns3_module_config_store__local.register_types(module) - root_module.end_section('ns3_module_contrib') + root_module.end_section('ns3_module_config_store') root_module.begin_section('ns3_module_emu') ns3_module_emu.register_types(module) @@ -180,6 +181,17 @@ ns3_module_stats__local.register_types(module) root_module.end_section('ns3_module_stats') + root_module.begin_section('ns3_module_tools') + ns3_module_tools.register_types(module) + + try: + import ns3_module_tools__local + except ImportError: + pass + else: + ns3_module_tools__local.register_types(module) + + root_module.end_section('ns3_module_tools') root_module.begin_section('ns3_module_topology_read') ns3_module_topology_read.register_types(module) @@ -224,6 +236,17 @@ ns3_module_point_to_point__local.register_types(module) root_module.end_section('ns3_module_point_to_point') + root_module.begin_section('ns3_module_flow_monitor') + ns3_module_flow_monitor.register_types(module) + + try: + import ns3_module_flow_monitor__local + except ImportError: + pass + else: + ns3_module_flow_monitor__local.register_types(module) + + root_module.end_section('ns3_module_flow_monitor') root_module.begin_section('ns3_module_wifi') ns3_module_wifi.register_types(module) @@ -257,17 +280,6 @@ ns3_module_click__local.register_types(module) root_module.end_section('ns3_module_click') - root_module.begin_section('ns3_module_flow_monitor') - ns3_module_flow_monitor.register_types(module) - - try: - import ns3_module_flow_monitor__local - except ImportError: - pass - else: - ns3_module_flow_monitor__local.register_types(module) - - root_module.end_section('ns3_module_flow_monitor') root_module.begin_section('ns3_module_nix_vector_routing') ns3_module_nix_vector_routing.register_types(module) @@ -656,17 +668,17 @@ ns3_module_bridge__local.register_methods(root_module) root_module.end_section('ns3_module_bridge') - root_module.begin_section('ns3_module_contrib') - ns3_module_contrib.register_methods(root_module) + root_module.begin_section('ns3_module_config_store') + ns3_module_config_store.register_methods(root_module) try: - import ns3_module_contrib__local + import ns3_module_config_store__local except ImportError: pass else: - ns3_module_contrib__local.register_methods(root_module) + ns3_module_config_store__local.register_methods(root_module) - root_module.end_section('ns3_module_contrib') + root_module.end_section('ns3_module_config_store') root_module.begin_section('ns3_module_emu') ns3_module_emu.register_methods(root_module) @@ -722,6 +734,17 @@ ns3_module_stats__local.register_methods(root_module) root_module.end_section('ns3_module_stats') + root_module.begin_section('ns3_module_tools') + ns3_module_tools.register_methods(root_module) + + try: + import ns3_module_tools__local + except ImportError: + pass + else: + ns3_module_tools__local.register_methods(root_module) + + root_module.end_section('ns3_module_tools') root_module.begin_section('ns3_module_topology_read') ns3_module_topology_read.register_methods(root_module) @@ -766,6 +789,17 @@ ns3_module_point_to_point__local.register_methods(root_module) root_module.end_section('ns3_module_point_to_point') + root_module.begin_section('ns3_module_flow_monitor') + ns3_module_flow_monitor.register_methods(root_module) + + try: + import ns3_module_flow_monitor__local + except ImportError: + pass + else: + ns3_module_flow_monitor__local.register_methods(root_module) + + root_module.end_section('ns3_module_flow_monitor') root_module.begin_section('ns3_module_wifi') ns3_module_wifi.register_methods(root_module) @@ -799,17 +833,6 @@ ns3_module_click__local.register_methods(root_module) root_module.end_section('ns3_module_click') - root_module.begin_section('ns3_module_flow_monitor') - ns3_module_flow_monitor.register_methods(root_module) - - try: - import ns3_module_flow_monitor__local - except ImportError: - pass - else: - ns3_module_flow_monitor__local.register_methods(root_module) - - root_module.end_section('ns3_module_flow_monitor') root_module.begin_section('ns3_module_nix_vector_routing') ns3_module_nix_vector_routing.register_methods(root_module) @@ -1089,17 +1112,17 @@ ns3_module_bridge__local.register_functions(root_module) root_module.end_section('ns3_module_bridge') - root_module.begin_section('ns3_module_contrib') - ns3_module_contrib.register_functions(root_module) + root_module.begin_section('ns3_module_config_store') + ns3_module_config_store.register_functions(root_module) try: - import ns3_module_contrib__local + import ns3_module_config_store__local except ImportError: pass else: - ns3_module_contrib__local.register_functions(root_module) + ns3_module_config_store__local.register_functions(root_module) - root_module.end_section('ns3_module_contrib') + root_module.end_section('ns3_module_config_store') root_module.begin_section('ns3_module_emu') ns3_module_emu.register_functions(root_module) @@ -1155,6 +1178,17 @@ ns3_module_stats__local.register_functions(root_module) root_module.end_section('ns3_module_stats') + root_module.begin_section('ns3_module_tools') + ns3_module_tools.register_functions(root_module) + + try: + import ns3_module_tools__local + except ImportError: + pass + else: + ns3_module_tools__local.register_functions(root_module) + + root_module.end_section('ns3_module_tools') root_module.begin_section('ns3_module_topology_read') ns3_module_topology_read.register_functions(root_module) @@ -1199,6 +1233,17 @@ ns3_module_point_to_point__local.register_functions(root_module) root_module.end_section('ns3_module_point_to_point') + root_module.begin_section('ns3_module_flow_monitor') + ns3_module_flow_monitor.register_functions(root_module) + + try: + import ns3_module_flow_monitor__local + except ImportError: + pass + else: + ns3_module_flow_monitor__local.register_functions(root_module) + + root_module.end_section('ns3_module_flow_monitor') root_module.begin_section('ns3_module_wifi') ns3_module_wifi.register_functions(root_module) @@ -1232,17 +1277,6 @@ ns3_module_click__local.register_functions(root_module) root_module.end_section('ns3_module_click') - root_module.begin_section('ns3_module_flow_monitor') - ns3_module_flow_monitor.register_functions(root_module) - - try: - import ns3_module_flow_monitor__local - except ImportError: - pass - else: - ns3_module_flow_monitor__local.register_functions(root_module) - - root_module.end_section('ns3_module_flow_monitor') root_module.begin_section('ns3_module_nix_vector_routing') ns3_module_nix_vector_routing.register_functions(root_module) diff -r afe2960e58b7 -r 9d2c79c992d7 doc/manual/source/attributes.rst --- a/doc/manual/source/attributes.rst Thu Mar 24 15:11:56 2011 +0100 +++ b/doc/manual/source/attributes.rst Thu Mar 24 09:23:44 2011 -0700 @@ -659,7 +659,7 @@ Let's edit it to add the ConfigStore feature. First, add an include statement to include the contrib module, and then add these lines::: - #include "contrib-module.h" + #include "ns3/config-store-module.h" ... int main (...) { @@ -725,7 +725,7 @@ is sometimes helpful to run the program to generate an output xml file first, then hand-edit that file and re-input it for the next simulation run).:: - #include "contrib-module.h" + #include "ns3/config-store-module.h" ... int main (...) { diff -r afe2960e58b7 -r 9d2c79c992d7 examples/energy/energy-model-example.cc --- a/examples/energy/energy-model-example.cc Thu Mar 24 15:11:56 2011 +0100 +++ b/examples/energy/energy-model-example.cc Thu Mar 24 09:23:44 2011 -0700 @@ -21,7 +21,7 @@ #include "ns3/core-module.h" #include "ns3/network-module.h" #include "ns3/mobility-module.h" -#include "ns3/contrib-module.h" +#include "ns3/config-store-module.h" #include "ns3/wifi-module.h" #include "ns3/energy-module.h" #include "ns3/internet-module.h" diff -r afe2960e58b7 -r 9d2c79c992d7 examples/wireless/mixed-wireless.cc --- a/examples/wireless/mixed-wireless.cc Thu Mar 24 15:11:56 2011 +0100 +++ b/examples/wireless/mixed-wireless.cc Thu Mar 24 09:23:44 2011 -0700 @@ -64,7 +64,7 @@ #include "ns3/network-module.h" #include "ns3/applications-module.h" #include "ns3/mobility-module.h" -#include "ns3/contrib-module.h" +#include "ns3/config-store-module.h" #include "ns3/wifi-module.h" #include "ns3/csma-module.h" #include "ns3/olsr-helper.h" diff -r afe2960e58b7 -r 9d2c79c992d7 examples/wireless/multirate.cc --- a/examples/wireless/multirate.cc Thu Mar 24 15:11:56 2011 +0100 +++ b/examples/wireless/multirate.cc Thu Mar 24 09:23:44 2011 -0700 @@ -52,7 +52,7 @@ #include "ns3/network-module.h" #include "ns3/applications-module.h" #include "ns3/mobility-module.h" -#include "ns3/contrib-module.h" +#include "ns3/tools-module.h" #include "ns3/random-variable.h" #include "ns3/wifi-module.h" #include "ns3/internet-module.h" diff -r afe2960e58b7 -r 9d2c79c992d7 examples/wireless/wifi-adhoc.cc --- a/examples/wireless/wifi-adhoc.cc Thu Mar 24 15:11:56 2011 +0100 +++ b/examples/wireless/wifi-adhoc.cc Thu Mar 24 09:23:44 2011 -0700 @@ -22,7 +22,7 @@ #include "ns3/network-module.h" #include "ns3/applications-module.h" #include "ns3/mobility-module.h" -#include "ns3/contrib-module.h" +#include "ns3/tools-module.h" #include "ns3/wifi-module.h" #include diff -r afe2960e58b7 -r 9d2c79c992d7 examples/wireless/wifi-ap.cc --- a/examples/wireless/wifi-ap.cc Thu Mar 24 15:11:56 2011 +0100 +++ b/examples/wireless/wifi-ap.cc Thu Mar 24 09:23:44 2011 -0700 @@ -23,7 +23,7 @@ #include "ns3/network-module.h" #include "ns3/applications-module.h" #include "ns3/mobility-module.h" -#include "ns3/contrib-module.h" +#include "ns3/config-store-module.h" #include "ns3/wifi-module.h" #include "ns3/athstats-helper.h" diff -r afe2960e58b7 -r 9d2c79c992d7 examples/wireless/wifi-clear-channel-cmu.cc --- a/examples/wireless/wifi-clear-channel-cmu.cc Thu Mar 24 15:11:56 2011 +0100 +++ b/examples/wireless/wifi-clear-channel-cmu.cc Thu Mar 24 09:23:44 2011 -0700 @@ -21,7 +21,7 @@ #include "ns3/core-module.h" #include "ns3/network-module.h" #include "ns3/mobility-module.h" -#include "ns3/contrib-module.h" +#include "ns3/tools-module.h" #include "ns3/wifi-module.h" #include "ns3/internet-module.h" diff -r afe2960e58b7 -r 9d2c79c992d7 examples/wireless/wifi-simple-adhoc-grid.cc --- a/examples/wireless/wifi-simple-adhoc-grid.cc Thu Mar 24 15:11:56 2011 +0100 +++ b/examples/wireless/wifi-simple-adhoc-grid.cc Thu Mar 24 09:23:44 2011 -0700 @@ -72,7 +72,7 @@ #include "ns3/core-module.h" #include "ns3/network-module.h" #include "ns3/mobility-module.h" -#include "ns3/contrib-module.h" +#include "ns3/config-store-module.h" #include "ns3/wifi-module.h" #include "ns3/internet-module.h" #include "ns3/olsr-helper.h" diff -r afe2960e58b7 -r 9d2c79c992d7 examples/wireless/wifi-simple-adhoc.cc --- a/examples/wireless/wifi-simple-adhoc.cc Thu Mar 24 15:11:56 2011 +0100 +++ b/examples/wireless/wifi-simple-adhoc.cc Thu Mar 24 09:23:44 2011 -0700 @@ -54,7 +54,7 @@ #include "ns3/core-module.h" #include "ns3/network-module.h" #include "ns3/mobility-module.h" -#include "ns3/contrib-module.h" +#include "ns3/config-store-module.h" #include "ns3/wifi-module.h" #include "ns3/internet-module.h" diff -r afe2960e58b7 -r 9d2c79c992d7 examples/wireless/wifi-simple-infra.cc --- a/examples/wireless/wifi-simple-infra.cc Thu Mar 24 15:11:56 2011 +0100 +++ b/examples/wireless/wifi-simple-infra.cc Thu Mar 24 09:23:44 2011 -0700 @@ -55,7 +55,7 @@ #include "ns3/core-module.h" #include "ns3/network-module.h" #include "ns3/mobility-module.h" -#include "ns3/contrib-module.h" +#include "ns3/config-store-module.h" #include "ns3/wifi-module.h" #include "ns3/internet-module.h" diff -r afe2960e58b7 -r 9d2c79c992d7 examples/wireless/wifi-simple-interference.cc --- a/examples/wireless/wifi-simple-interference.cc Thu Mar 24 15:11:56 2011 +0100 +++ b/examples/wireless/wifi-simple-interference.cc Thu Mar 24 09:23:44 2011 -0700 @@ -83,7 +83,7 @@ #include "ns3/core-module.h" #include "ns3/network-module.h" #include "ns3/mobility-module.h" -#include "ns3/contrib-module.h" +#include "ns3/config-store-module.h" #include "ns3/wifi-module.h" #include "ns3/internet-module.h" diff -r afe2960e58b7 -r 9d2c79c992d7 examples/wireless/wscript --- a/examples/wireless/wscript Thu Mar 24 15:11:56 2011 +0100 +++ b/examples/wireless/wscript Thu Mar 24 09:23:44 2011 -0700 @@ -5,13 +5,13 @@ 'internet', 'csma', 'olsr']) obj.source = 'mixed-wireless.cc' - obj = bld.create_ns3_program('wifi-adhoc', ['core', 'mobility', 'wifi', 'applications', 'contrib']) + obj = bld.create_ns3_program('wifi-adhoc', ['core', 'mobility', 'wifi', 'applications', 'tools']) obj.source = 'wifi-adhoc.cc' - obj = bld.create_ns3_program('wifi-clear-channel-cmu', ['internet', 'mobility', 'wifi', 'contrib']) + obj = bld.create_ns3_program('wifi-clear-channel-cmu', ['internet', 'mobility', 'wifi', 'tools']) obj.source = 'wifi-clear-channel-cmu.cc' - obj = bld.create_ns3_program('wifi-ap', ['core', 'mobility', 'wifi', 'applications', 'contrib']) + obj = bld.create_ns3_program('wifi-ap', ['core', 'mobility', 'wifi', 'applications', 'config-store', 'tools']) obj.source = 'wifi-ap.cc' obj = bld.create_ns3_program('wifi-wired-bridging', ['internet', 'mobility', 'wifi', 'csma', 'bridge', 'applications']) @@ -20,25 +20,25 @@ obj = bld.create_ns3_program('simple-wifi-frame-aggregation', ['internet', 'mobility', 'wifi', 'applications']) obj.source = 'simple-wifi-frame-aggregation.cc' - obj = bld.create_ns3_program('multirate', ['internet', 'mobility', 'wifi', 'contrib', 'flow-monitor', 'olsr', 'applications', 'point-to-point']) + obj = bld.create_ns3_program('multirate', ['internet', 'mobility', 'wifi', 'tools', 'flow-monitor', 'olsr', 'applications', 'point-to-point']) obj.source = 'multirate.cc' - obj = bld.create_ns3_program('wifi-simple-adhoc', ['internet', 'mobility', 'wifi', 'contrib']) + obj = bld.create_ns3_program('wifi-simple-adhoc', ['internet', 'mobility', 'wifi', 'config-store', 'tools']) obj.source = 'wifi-simple-adhoc.cc' - obj = bld.create_ns3_program('wifi-simple-adhoc-grid', ['internet', 'mobility', 'wifi', 'olsr', 'contrib', 'point-to-point']) + obj = bld.create_ns3_program('wifi-simple-adhoc-grid', ['internet', 'mobility', 'wifi', 'olsr', 'config-store', 'tools', 'point-to-point']) obj.source = 'wifi-simple-adhoc-grid.cc' obj = bld.create_ns3_program('wifi-simple-infra', ['internet', 'mobility', 'wifi']) obj.source = 'wifi-simple-infra.cc' - obj = bld.create_ns3_program('wifi-simple-interference', ['internet', 'mobility', 'wifi', 'contrib']) + obj = bld.create_ns3_program('wifi-simple-interference', ['internet', 'mobility', 'wifi', 'config-store', 'tools']) obj.source = 'wifi-simple-interference.cc' obj = bld.create_ns3_program('wifi-blockack', ['internet', 'mobility', 'wifi', 'applications']) obj.source = 'wifi-blockack.cc' - obj = bld.create_ns3_program('ofdm-validation', ['core', 'mobility', 'wifi', 'contrib']) + obj = bld.create_ns3_program('ofdm-validation', ['core', 'mobility', 'wifi', 'config-store', 'tools']) obj.source = 'ofdm-validation.cc' obj = bld.create_ns3_program('wifi-hidden-terminal', ['internet', 'mobility', 'wifi', 'applications', 'propagation', 'flow-monitor']) diff -r afe2960e58b7 -r 9d2c79c992d7 samples/wscript --- a/samples/wscript Thu Mar 24 15:11:56 2011 +0100 +++ b/samples/wscript Thu Mar 24 09:23:44 2011 -0700 @@ -17,7 +17,7 @@ obj = bld.create_ns3_program('main-ptr', ['core'] ) obj.source = 'main-ptr.cc' - obj = bld.create_ns3_program('main-random-variable', ['core', 'contrib']) + obj = bld.create_ns3_program('main-random-variable', ['core', 'config-store', 'tools']) obj.source = 'main-random-variable.cc' obj = bld.create_ns3_program('main-packet-header', ['common', 'core']) @@ -47,7 +47,7 @@ obj.source = 'main-random-walk.cc' obj = bld.create_ns3_program('main-propagation-loss', - ['core', 'mobility', 'contrib', 'propagation']) + ['core', 'mobility', 'config-store', 'tools', 'propagation']) obj.source = 'main-propagation-loss.cc' obj = bld.create_ns3_program('sample-random-variable', diff -r afe2960e58b7 -r 9d2c79c992d7 src/applications/wscript --- a/src/applications/wscript Thu Mar 24 15:11:56 2011 +0100 +++ b/src/applications/wscript Thu Mar 24 09:23:44 2011 -0700 @@ -1,7 +1,7 @@ ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- def build(bld): - module = bld.create_ns3_module('applications', ['internet', 'contrib']) + module = bld.create_ns3_module('applications', ['internet', 'config-store', 'tools']) module.source = [ 'model/bulk-send-application.cc', 'model/onoff-application.cc', diff -r afe2960e58b7 -r 9d2c79c992d7 src/config-store/model/attribute-default-iterator.cc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/config-store/model/attribute-default-iterator.cc Thu Mar 24 09:23:44 2011 -0700 @@ -0,0 +1,123 @@ +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation; + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Authors: Faker Moatamri + * Mathieu Lacage + */ + +#include "attribute-default-iterator.h" +#include "ns3/attribute.h" +#include "ns3/object-vector.h" +#include "ns3/pointer.h" +#include "ns3/global-value.h" +#include "ns3/string.h" + +namespace ns3 +{ + +AttributeDefaultIterator::~AttributeDefaultIterator () +{ +} +void +AttributeDefaultIterator::Iterate (void) +{ + for (uint32_t i = 0; i < TypeId::GetRegisteredN (); i++) + { + TypeId tid = TypeId::GetRegistered (i); + if (tid.MustHideFromDocumentation ()) + { + continue; + } + bool calledStart = false; + for (uint32_t j = 0; j < tid.GetAttributeN (); j++) + { + uint32_t flags = tid.GetAttributeFlags (j); + if (!(flags & TypeId::ATTR_CONSTRUCT)) + { + // we can't construct the attribute, so, there is no + // initial value for the attribute + continue; + } + Ptr accessor = tid.GetAttributeAccessor (j); + //No accessor, go to next attribute + if (accessor == 0) + { + continue; + } + if (!accessor->HasSetter ()) + { + //skip this attribute it doesn't have an setter + continue; + } + Ptr checker = tid.GetAttributeChecker (j); + if (checker == 0) + { + //skip, it doesn't have a checker + continue; + } + Ptr value = tid.GetAttributeInitialValue (j); + if (value == 0) + { + //No value, check next attribute + continue; + } + Ptr vector = DynamicCast (value); + if (vector != 0) + { + //a vector value, won't take it + continue; + } + Ptr pointer = DynamicCast (value); + if (pointer != 0) + { + //pointer value, won't take it + continue; + } + //We take only values, no pointers or vectors + if (!calledStart) + { + StartVisitTypeId (tid.GetName ()); + } + VisitAttribute (tid, tid.GetAttributeName (j), value->SerializeToString (checker), j); + calledStart = true; + } + if (calledStart) + { + EndVisitTypeId (); + } + } +} + +void +AttributeDefaultIterator::StartVisitTypeId (std::string name) +{ +} +void +AttributeDefaultIterator::EndVisitTypeId (void) +{ +} + +void +AttributeDefaultIterator::DoVisitAttribute (std::string name, std::string defaultValue) +{ +} + +void +AttributeDefaultIterator::VisitAttribute (TypeId tid, std::string name, std::string defaultValue, uint32_t index) +{ + DoVisitAttribute (name, defaultValue); +} + +} // namespace ns3 diff -r afe2960e58b7 -r 9d2c79c992d7 src/config-store/model/attribute-default-iterator.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/config-store/model/attribute-default-iterator.h Thu Mar 24 09:23:44 2011 -0700 @@ -0,0 +1,60 @@ +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation; + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Authors: Faker Moatamri + * Mathieu Lacage + */ + +#ifndef ATTRIBUTE_DEFAULT_ITERATOR_H +#define ATTRIBUTE_DEFAULT_ITERATOR_H + +#include "ns3/type-id.h" +#include + +namespace ns3 { + +class AttributeDefaultIterator +{ +public: + virtual ~AttributeDefaultIterator () = 0; + /** + * \brief This function will go through all the TypeIds and get only the attributes which are + * explicit values (not vectors or pointer or arrays) and apply StartVisitTypeId + * and VisitAttribute on the attributes in one TypeId. At the end of each TypeId + * EndVisitTypeId is called. + */ + void Iterate (void); +private: + /** + * \brief Just an interface that needs to be implemented + */ + virtual void StartVisitTypeId (std::string name); + /** + * \brief Just an interface that needs to be implemented + */ + virtual void EndVisitTypeId (void); + /** + * \brief This method can be implemented, otherwise, it will call DoVisitAttribute + */ + virtual void VisitAttribute (TypeId tid, std::string name, std::string defaultValue, uint32_t index); + /** + * \brief This method is just an interface and needs to be implemented + */ + virtual void DoVisitAttribute (std::string name, std::string defaultValue); +}; + +} // namespace ns3 + +#endif /* ATTRIBUTE_DEFAULT_ITERATOR_H */ diff -r afe2960e58b7 -r 9d2c79c992d7 src/config-store/model/attribute-iterator.cc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/config-store/model/attribute-iterator.cc Thu Mar 24 09:23:44 2011 -0700 @@ -0,0 +1,285 @@ +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation; + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Author: Mathieu Lacage + */ + +#include "attribute-iterator.h" +#include "ns3/config.h" +#include "ns3/log.h" +#include "ns3/pointer.h" +#include "ns3/object-vector.h" +#include "ns3/string.h" +#include + + +NS_LOG_COMPONENT_DEFINE ("AttributeIterator"); + +namespace ns3 { + + +AttributeIterator::AttributeIterator () +{ +} + +AttributeIterator::~AttributeIterator () +{ +} + +void +AttributeIterator::Iterate (void) +{ + for (uint32_t i = 0; i < Config::GetRootNamespaceObjectN (); ++i) + { + Ptr object = Config::GetRootNamespaceObject (i); + StartVisitObject (object); + DoIterate (object); + EndVisitObject (); + } + NS_ASSERT (m_currentPath.empty ()); + NS_ASSERT (m_examined.empty ()); +} + +bool +AttributeIterator::IsExamined (Ptr object) +{ + for (uint32_t i = 0; i < m_examined.size (); ++i) + { + if (object == m_examined[i]) + { + return true; + } + } + return false; +} + + +std::string +AttributeIterator::GetCurrentPath (std::string attr) const +{ + std::ostringstream oss; + for (uint32_t i = 0; i < m_currentPath.size (); ++i) + { + oss << "/" << m_currentPath[i]; + } + if (attr != "") + { + oss << "/" << attr; + } + return oss.str (); +} + +std::string +AttributeIterator::GetCurrentPath (void) const +{ + std::ostringstream oss; + for (uint32_t i = 0; i < m_currentPath.size (); ++i) + { + oss << "/" << m_currentPath[i]; + } + return oss.str (); +} + +void +AttributeIterator::DoStartVisitObject (Ptr object) +{ +} +void +AttributeIterator::DoEndVisitObject (void) +{ +} +void +AttributeIterator::DoStartVisitPointerAttribute (Ptr object, std::string name, Ptr item) +{ +} +void +AttributeIterator::DoEndVisitPointerAttribute (void) +{ +} +void +AttributeIterator::DoStartVisitArrayAttribute (Ptr object, std::string name, const ObjectVectorValue &vector) +{ +} +void +AttributeIterator::DoEndVisitArrayAttribute (void) +{ +} +void +AttributeIterator::DoStartVisitArrayItem (const ObjectVectorValue &vector, uint32_t index, Ptr item) +{ +} +void +AttributeIterator::DoEndVisitArrayItem (void) +{ +} + +void +AttributeIterator::VisitAttribute (Ptr object, std::string name) +{ + m_currentPath.push_back (name); + DoVisitAttribute (object, name); + m_currentPath.pop_back (); +} + +void +AttributeIterator::StartVisitObject (Ptr object) +{ + m_currentPath.push_back ("$" + object->GetInstanceTypeId ().GetName ()); + DoStartVisitObject (object); +} +void +AttributeIterator::EndVisitObject (void) +{ + m_currentPath.pop_back (); + DoEndVisitObject (); +} +void +AttributeIterator::StartVisitPointerAttribute (Ptr object, std::string name, Ptr value) +{ + m_currentPath.push_back (name); + m_currentPath.push_back ("$" + value->GetInstanceTypeId ().GetName ()); + DoStartVisitPointerAttribute (object, name, value); +} +void +AttributeIterator::EndVisitPointerAttribute (void) +{ + m_currentPath.pop_back (); + m_currentPath.pop_back (); + DoEndVisitPointerAttribute (); +} +void +AttributeIterator::StartVisitArrayAttribute (Ptr object, std::string name, const ObjectVectorValue &vector) +{ + m_currentPath.push_back (name); + DoStartVisitArrayAttribute (object, name, vector); +} +void +AttributeIterator::EndVisitArrayAttribute (void) +{ + m_currentPath.pop_back (); + DoEndVisitArrayAttribute (); +} + +void +AttributeIterator::StartVisitArrayItem (const ObjectVectorValue &vector, uint32_t index, Ptr item) +{ + std::ostringstream oss; + oss << index; + m_currentPath.push_back (oss.str ()); + m_currentPath.push_back ("$" + item->GetInstanceTypeId ().GetName ()); + DoStartVisitArrayItem (vector, index, item); +} +void +AttributeIterator::EndVisitArrayItem (void) +{ + m_currentPath.pop_back (); + m_currentPath.pop_back (); + DoEndVisitArrayItem (); +} + + +void +AttributeIterator::DoIterate (Ptr object) +{ + if (IsExamined (object)) + { + return; + } + TypeId tid; + for (tid = object->GetInstanceTypeId (); tid.HasParent (); tid = tid.GetParent ()) + { + NS_LOG_DEBUG ("store " << tid.GetName ()); + for (uint32_t i = 0; i < tid.GetAttributeN (); ++i) + { + Ptr checker = tid.GetAttributeChecker (i); + const PointerChecker *ptrChecker = dynamic_cast (PeekPointer (checker)); + if (ptrChecker != 0) + { + NS_LOG_DEBUG ("pointer attribute " << tid.GetAttributeName (i)); + PointerValue ptr; + object->GetAttribute (tid.GetAttributeName (i), ptr); + Ptr tmp = ptr.Get (); + if (tmp != 0) + { + StartVisitPointerAttribute (object, tid.GetAttributeName (i), + tmp); + m_examined.push_back (object); + DoIterate (tmp); + m_examined.pop_back (); + EndVisitPointerAttribute (); + } + continue; + } + // attempt to cast to an object vector. + const ObjectVectorChecker *vectorChecker = dynamic_cast (PeekPointer (checker)); + if (vectorChecker != 0) + { + NS_LOG_DEBUG ("vector attribute " << tid.GetAttributeName (i)); + ObjectVectorValue vector; + object->GetAttribute (tid.GetAttributeName (i), vector); + StartVisitArrayAttribute (object, tid.GetAttributeName (i), vector); + for (uint32_t j = 0; j < vector.GetN (); ++j) + { + NS_LOG_DEBUG ("vector attribute item " << j); + Ptr tmp = vector.Get (j); + StartVisitArrayItem (vector, j, tmp); + m_examined.push_back (object); + DoIterate (tmp); + m_examined.pop_back (); + EndVisitArrayItem (); + } + EndVisitArrayAttribute (); + continue; + } + uint32_t flags = tid.GetAttributeFlags (i); + Ptr accessor = tid.GetAttributeAccessor (i); + if ((flags & TypeId::ATTR_GET) && accessor->HasGetter () && + (flags & TypeId::ATTR_SET) && accessor->HasSetter ()) + { + VisitAttribute (object, tid.GetAttributeName (i)); + } + else + { + NS_LOG_DEBUG ("could not store " << tid.GetAttributeName (i)); + } + } + } + Object::AggregateIterator iter = object->GetAggregateIterator (); + bool recursiveAggregate = false; + while (iter.HasNext ()) + { + Ptr tmp = iter.Next (); + if (IsExamined (tmp)) + { + recursiveAggregate = true; + } + } + if (!recursiveAggregate) + { + iter = object->GetAggregateIterator (); + while (iter.HasNext ()) + { + Ptr tmp = const_cast (PeekPointer (iter.Next ())); + StartVisitObject (tmp); + m_examined.push_back (object); + DoIterate (tmp); + m_examined.pop_back (); + EndVisitObject (); + } + } +} + + +} // namespace ns3 diff -r afe2960e58b7 -r 9d2c79c992d7 src/config-store/model/attribute-iterator.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/config-store/model/attribute-iterator.h Thu Mar 24 09:23:44 2011 -0700 @@ -0,0 +1,72 @@ +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation; + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Author: Mathieu Lacage + */ + +#ifndef ATTRIBUTE_ITERATOR_H +#define ATTRIBUTE_ITERATOR_H + +#include "ns3/ptr.h" +#include "ns3/object.h" +#include + +namespace ns3 { + +class ObjectVectorValue; + +// This class is used internally by ConfigStore and GtkConfigStore. +class AttributeIterator +{ +public: + AttributeIterator (); + virtual ~AttributeIterator (); + + void Iterate (void); +protected: + std::string GetCurrentPath (void) const; +private: + virtual void DoVisitAttribute (Ptr object, std::string name) = 0; + virtual void DoStartVisitObject (Ptr object); + virtual void DoEndVisitObject (void); + virtual void DoStartVisitPointerAttribute (Ptr object, std::string name, Ptr value); + virtual void DoEndVisitPointerAttribute (void); + virtual void DoStartVisitArrayAttribute (Ptr object, std::string name, const ObjectVectorValue &vector); + virtual void DoEndVisitArrayAttribute (void); + virtual void DoStartVisitArrayItem (const ObjectVectorValue &vector, uint32_t index, Ptr item); + virtual void DoEndVisitArrayItem (void); + + void DoIterate (Ptr object); + bool IsExamined (Ptr object); + std::string GetCurrentPath (std::string attr) const; + + void VisitAttribute (Ptr object, std::string name); + void StartVisitObject (Ptr object); + void EndVisitObject (void); + void StartVisitPointerAttribute (Ptr object, std::string name, Ptr value); + void EndVisitPointerAttribute (void); + void StartVisitArrayAttribute (Ptr object, std::string name, const ObjectVectorValue &vector); + void EndVisitArrayAttribute (void); + void StartVisitArrayItem (const ObjectVectorValue &vector, uint32_t index, Ptr item); + void EndVisitArrayItem (void); + + + std::vector > m_examined; + std::vector m_currentPath; +}; + +} // namespace ns3 + +#endif /* ATTRIBUTE_ITERATOR_H */ diff -r afe2960e58b7 -r 9d2c79c992d7 src/config-store/model/config-store.cc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/config-store/model/config-store.cc Thu Mar 24 09:23:44 2011 -0700 @@ -0,0 +1,135 @@ +#include "config-store.h" +#include "raw-text-config.h" +#include "ns3/string.h" +#include "ns3/log.h" +#include "ns3/simulator.h" +#include "ns3/enum.h" +#include "ns3/attribute-list.h" +#include "ns3/config-store-config.h" +#ifdef HAVE_LIBXML2 +#include "xml-config.h" +#endif + +#include +#include +#include +#include +#include + + +NS_LOG_COMPONENT_DEFINE ("ConfigStore"); + +namespace ns3 { + + +NS_OBJECT_ENSURE_REGISTERED (ConfigStore); + +TypeId +ConfigStore::GetTypeId (void) +{ + static TypeId tid = TypeId ("ns3::ConfigStore") + .SetParent () + .AddAttribute ("Mode", + "Configuration mode", + EnumValue (ConfigStore::NONE), + MakeEnumAccessor (&ConfigStore::SetMode), + MakeEnumChecker (ConfigStore::NONE, "None", + ConfigStore::LOAD, "Load", + ConfigStore::SAVE, "Save")) + .AddAttribute ("Filename", + "The file where the configuration should be saved to or loaded from.", + StringValue (""), + MakeStringAccessor (&ConfigStore::SetFilename), + MakeStringChecker ()) + .AddAttribute ("FileFormat", + "Type of file format", + EnumValue (ConfigStore::RAW_TEXT), + MakeEnumAccessor (&ConfigStore::SetFileFormat), + MakeEnumChecker (ConfigStore::RAW_TEXT, "RawText", + ConfigStore::XML, "Xml")) + ; + return tid; +} +TypeId +ConfigStore::GetInstanceTypeId (void) const +{ + return GetTypeId (); +} + + +ConfigStore::ConfigStore () +{ + ObjectBase::ConstructSelf (AttributeList ()); + +#ifdef HAVE_LIBXML2 + if (m_fileFormat == ConfigStore::XML) + { + if (m_mode == ConfigStore::SAVE) + { + m_file = new XmlConfigSave (); + } + else if (m_mode == ConfigStore::LOAD) + { + m_file = new XmlConfigLoad (); + } + else + { + m_file = new NoneFileConfig (); + } + } + else +#endif /* HAVE_LIBXML2 */ + if (m_fileFormat == ConfigStore::RAW_TEXT) + { + if (m_mode == ConfigStore::SAVE) + { + m_file = new RawTextConfigSave (); + } + else if (m_mode == ConfigStore::LOAD) + { + m_file = new RawTextConfigLoad (); + } + else + { + m_file = new NoneFileConfig (); + } + } + m_file->SetFilename (m_filename); +} + +ConfigStore::~ConfigStore () +{ + delete m_file; + m_file = 0; +} + +void +ConfigStore::SetMode (enum Mode mode) +{ + m_mode = mode; +} +void +ConfigStore::SetFileFormat (enum FileFormat format) +{ + m_fileFormat = format; +} +void +ConfigStore::SetFilename (std::string filename) +{ + m_filename = filename; +} + +void +ConfigStore::ConfigureAttributes (void) +{ + m_file->Attributes (); +} + +void +ConfigStore::ConfigureDefaults (void) +{ + m_file->Default (); + m_file->Global (); +} + +} // namespace ns3 diff -r afe2960e58b7 -r 9d2c79c992d7 src/config-store/model/config-store.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/config-store/model/config-store.h Thu Mar 24 09:23:44 2011 -0700 @@ -0,0 +1,61 @@ +#ifndef CONFIG_STORE_H +#define CONFIG_STORE_H + +#include "ns3/object-base.h" +#include "file-config.h" + +namespace ns3 { + +/** + * \brief Store and load simulation attribute configuration + * + * While it is possible to generate a sample config file and lightly + * edit it to change a couple of values, there are cases where this + * process will not work because the same value on the same object + * can appear multiple times in the same automatically-generated + * configuration file under different configuration paths. + * + * As such, the best way to use this class is to use it to generate + * an initial configuration file, extract from that configuration + * file only the strictly necessary elements, and move these minimal + * elements to a new configuration file which can then safely + * be edited. Another option is to use the ns3::GtkConfigStore class + * which will allow you to edit the parameters and will generate + * configuration files where all the instances of the same parameter + * are changed. + */ +class ConfigStore : public ObjectBase +{ +public: + enum Mode { + LOAD, + SAVE, + NONE + }; + enum FileFormat { + XML, + RAW_TEXT + }; + static TypeId GetTypeId (void); + virtual TypeId GetInstanceTypeId (void) const; + + ConfigStore (); + ~ConfigStore (); + + void SetMode (enum Mode mode); + void SetFileFormat (enum FileFormat format); + void SetFilename (std::string filename); + + void ConfigureDefaults (void); + void ConfigureAttributes (void); + +private: + enum Mode m_mode; + enum FileFormat m_fileFormat; + std::string m_filename; + FileConfig *m_file; +}; + +} // namespace ns3 + +#endif /* CONFIG_STORE_H */ diff -r afe2960e58b7 -r 9d2c79c992d7 src/config-store/model/display-functions.cc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/config-store/model/display-functions.cc Thu Mar 24 09:23:44 2011 -0700 @@ -0,0 +1,594 @@ +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation; + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Authors: Faker Moatamri + * Mathieu Lacage + */ +#include "display-functions.h" +#include "raw-text-config.h" +#include "ns3/config.h" +#include "ns3/string.h" +#include "ns3/pointer.h" + +namespace ns3 { +/** + * This function includes the name of the attribute or the editable value + * in the second column + */ +void +cell_data_function_col_1 (GtkTreeViewColumn *col, GtkCellRenderer *renderer, + GtkTreeModel *model, GtkTreeIter *iter, gpointer user_data) +{ + ModelNode *node; + gtk_tree_model_get (model, iter, COL_NODE, &node, -1); + if (node->type == ModelNode::NODE_ATTRIBUTE) + { + StringValue str; + node->object->GetAttribute (node->name, str); + g_object_set (renderer, "text", str.Get ().c_str (), (char*) 0); + g_object_set (renderer, "editable", TRUE, (char*) 0); + } + else + { + g_object_set (renderer, "text", "", (char*) 0); + g_object_set (renderer, "editable", FALSE, (char*) 0); + } +} +/** + * This function includes the name of the object, pointer, vector or vector item + * in the first column + */ +void +cell_data_function_col_0 (GtkTreeViewColumn *col, GtkCellRenderer *renderer, GtkTreeModel *model, + GtkTreeIter *iter, gpointer user_data) +{ + ModelNode *node; + gtk_tree_model_get (model, iter, COL_NODE, &node, -1); + g_object_set (renderer, "editable", FALSE, (char*) 0); + switch (node->type) + { + case ModelNode::NODE_OBJECT: + g_object_set (renderer, "text", node->object->GetInstanceTypeId ().GetName ().c_str (), (char*) 0); + break; + case ModelNode::NODE_POINTER: + g_object_set (renderer, "text", node->name.c_str (), (char*) 0); + break; + case ModelNode::NODE_VECTOR: + g_object_set (renderer, "text", node->name.c_str (), (char*) 0); + break; + case ModelNode::NODE_VECTOR_ITEM: + { + std::stringstream oss; + oss << node->index; + g_object_set (renderer, "text", oss.str ().c_str (), (char*) 0); + } + break; + case ModelNode::NODE_ATTRIBUTE: + g_object_set (renderer, "text", node->name.c_str (), (char*) 0); + break; + } +} + +/** + * This is the callback called when the value of an attribute is changed + */ +void +cell_edited_callback (GtkCellRendererText *cell, gchar *path_string, + gchar *new_text, gpointer user_data) +{ + GtkTreeModel *model = GTK_TREE_MODEL (user_data); + GtkTreeIter iter; + gtk_tree_model_get_iter_from_string (model, &iter, path_string); + ModelNode *node; + gtk_tree_model_get (model, &iter, COL_NODE, &node, -1); + NS_ASSERT (node->type == ModelNode::NODE_ATTRIBUTE); + node->object->SetAttribute (node->name, StringValue (new_text)); +} + +/** + * This function gets the column number 0 or 1 from the mouse + * click + */ +int +get_col_number_from_tree_view_column (GtkTreeViewColumn *col) +{ + GList *cols; + int num; + g_return_val_if_fail (col != 0, -1); + g_return_val_if_fail (col->tree_view != 0, -1); + cols = gtk_tree_view_get_columns (GTK_TREE_VIEW (col->tree_view)); + num = g_list_index (cols, (gpointer) col); + g_list_free (cols); + return num; +} + +/** + * This function displays the tooltip for an object, pointer, vector + * item or an attribute + */ +gboolean +cell_tooltip_callback (GtkWidget *widget, gint x, gint y, gboolean keyboard_tip, + GtkTooltip *tooltip, gpointer user_data) +{ + GtkTreeModel *model; + GtkTreeIter iter; + GtkTreeViewColumn * column; + if (!gtk_tree_view_get_tooltip_context (GTK_TREE_VIEW (widget), &x, &y, + keyboard_tip, &model, 0, &iter)) + { + return FALSE; + } + if (!gtk_tree_view_get_path_at_pos (GTK_TREE_VIEW (widget), x, y, 0, &column, 0, 0)) + { + return FALSE; + } + int col = get_col_number_from_tree_view_column (column); + + ModelNode *node; + gtk_tree_model_get (model, &iter, COL_NODE, &node, -1); + + switch (node->type) + { + case ModelNode::NODE_OBJECT: + if (col == 0) + { + std::string tip = "This object is of type " + + node->object->GetInstanceTypeId ().GetName (); + gtk_tooltip_set_text (tooltip, tip.c_str ()); + return TRUE; + } + break; + case ModelNode::NODE_POINTER: + if (col == 0) + { + PointerValue ptr; + node->object->GetAttribute (node->name, ptr); + std::string tip = "This object is of type " + + ptr.GetObject ()->GetInstanceTypeId ().GetName (); + gtk_tooltip_set_text (tooltip, tip.c_str ()); + return TRUE; + } + break; + case ModelNode::NODE_VECTOR: + break; + case ModelNode::NODE_VECTOR_ITEM: + if (col == 0) + { + std::string tip = "This object is of type " + + node->object->GetInstanceTypeId ().GetName (); + gtk_tooltip_set_text (tooltip, tip.c_str ()); + return TRUE; + } + break; + case ModelNode::NODE_ATTRIBUTE: + { + uint32_t attrIndex = 0; + TypeId tid; + for (tid = node->object->GetInstanceTypeId (); tid.HasParent (); tid + = tid.GetParent ()) + { + for (uint32_t i = 0; i < tid.GetAttributeN (); ++i) + { + if (tid.GetAttributeName (i) == node->name) + { + attrIndex = i; + goto out; + } + } + } +out: if (col == 0) + { + std::string tip = tid.GetAttributeHelp (attrIndex); + gtk_tooltip_set_text (tooltip, tip.c_str ()); + } + else + { + Ptr checker = tid.GetAttributeChecker ( + attrIndex); + std::string tip; + tip = "This attribute is of type " + checker->GetValueTypeName (); + if (checker->HasUnderlyingTypeInformation ()) + { + tip += " " + checker->GetUnderlyingTypeInformation (); + } + gtk_tooltip_set_text (tooltip, tip.c_str ()); + } + return TRUE; + } + break; + } + return FALSE; +} + +/** + * This is the main view opening the widget, getting tooltips and drawing the + * tree of attributes... + */ +GtkWidget * +create_view (GtkTreeStore *model) +{ + GtkTreeViewColumn *col; + GtkCellRenderer *renderer; + GtkWidget *view; + + view = gtk_tree_view_new (); + g_object_set (view, "has-tooltip", TRUE, (char*) 0); + g_signal_connect (view, "query-tooltip", (GCallback) cell_tooltip_callback, 0); + + gtk_tree_view_set_grid_lines (GTK_TREE_VIEW (view), GTK_TREE_VIEW_GRID_LINES_BOTH); + gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (view), TRUE); + + col = gtk_tree_view_column_new (); + gtk_tree_view_column_set_title (col, "Object Attributes"); + gtk_tree_view_append_column (GTK_TREE_VIEW (view), col); + renderer = gtk_cell_renderer_text_new (); + gtk_tree_view_column_pack_start (col, renderer, TRUE); + gtk_tree_view_column_set_cell_data_func (col, renderer, cell_data_function_col_0, 0, 0); + g_object_set (renderer, "editable", FALSE, (char*) 0); + + col = gtk_tree_view_column_new (); + gtk_tree_view_column_set_title (col, "Attribute Value"); + gtk_tree_view_append_column (GTK_TREE_VIEW (view), col); + renderer = gtk_cell_renderer_text_new (); + g_signal_connect (renderer, "edited", (GCallback) cell_edited_callback, model); + gtk_tree_view_column_pack_start (col, renderer, TRUE); + gtk_tree_view_column_set_cell_data_func (col, renderer, cell_data_function_col_1, 0, 0); + + gtk_tree_view_set_model (GTK_TREE_VIEW (view), GTK_TREE_MODEL (model)); + + g_object_unref (model); /* destroy model automatically with view */ + + return view; +} + +/** + * This is the action done when the user presses on the save button. + * It will save the config to a file. + */ +void +save_clicked (GtkButton *button, gpointer user_data) +{ + GtkWidget *parent_window = GTK_WIDGET (user_data); + GtkWidget *dialog; + + dialog = gtk_file_chooser_dialog_new ("Save File", GTK_WINDOW (parent_window), GTK_FILE_CHOOSER_ACTION_SAVE, + GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_SAVE, + GTK_RESPONSE_ACCEPT, (char *) 0); + gtk_file_chooser_set_do_overwrite_confirmation (GTK_FILE_CHOOSER (dialog), + TRUE); + + gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (dialog), "config.txt"); + + if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT) + { + char *filename; + + filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog)); + RawTextConfigSave config; + config.SetFilename (filename); + config.Attributes (); + g_free (filename); + } + + gtk_widget_destroy (dialog); +} + +/** + * If the user presses the button load, it will load the config file into memory. + */ +void +load_clicked (GtkButton *button, gpointer user_data) +{ + GtkWidget *parent_window = GTK_WIDGET (user_data); + GtkWidget *dialog; + + dialog = gtk_file_chooser_dialog_new ("Open File", GTK_WINDOW (parent_window), GTK_FILE_CHOOSER_ACTION_OPEN, + GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OPEN, + GTK_RESPONSE_ACCEPT, (char *) 0); + + if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT) + { + char *filename; + + filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog)); + RawTextConfigLoad config; + config.SetFilename (filename); + config.Attributes (); + } + + gtk_widget_destroy (dialog); +} + +/** + * Exit the window when exit button is pressed + */ +void +exit_clicked_callback (GtkButton *button, gpointer user_data) +{ + gtk_main_quit (); + gtk_widget_hide (GTK_WIDGET (user_data)); +} + +/** + * Exit the application + */ +gboolean +delete_event_callback (GtkWidget *widget, GdkEvent *event, gpointer user_data) +{ + gtk_main_quit (); + gtk_widget_hide (GTK_WIDGET (user_data)); + return TRUE; +} + +/** + * Delete the tree model contents + */ +gboolean +clean_model_callback (GtkTreeModel *model, GtkTreePath *path, + GtkTreeIter *iter, gpointer data) +{ + ModelNode *node; + gtk_tree_model_get (GTK_TREE_MODEL (model), iter, COL_NODE, &node, -1); + delete node; + gtk_tree_store_set (GTK_TREE_STORE (model), iter, COL_NODE, (ModelNode*) 0, + -1); + return FALSE; +} + +/************************** display functions used by default configurator **********************/ +/** + * This function writes data in the second column, this data is going to be editable + * if it is a NODE_ATTRIBUTE + */ +void +cell_data_function_col_1_config_default (GtkTreeViewColumn *col, GtkCellRenderer *renderer, + GtkTreeModel *model, GtkTreeIter *iter, + gpointer user_data) +{ + ModelTypeid *node; + gtk_tree_model_get (model, iter, COL_TYPEID, &node, -1); + if (node->type == ModelTypeid::NODE_ATTRIBUTE) + { + g_object_set (renderer, "text", node->defaultValue.c_str (), (char*) 0); + g_object_set (renderer, "editable", TRUE, (char*) 0); + } + else + { + g_object_set (renderer, "text", "", (char*) 0); + g_object_set (renderer, "editable", FALSE, (char*) 0); + } +} +/** + * This function writes the attribute or typeid name in the column 0 + */ +void +cell_data_function_col_0_config_default (GtkTreeViewColumn *col, GtkCellRenderer *renderer, GtkTreeModel *model, + GtkTreeIter *iter, gpointer user_data) +{ + ModelTypeid *node; + gtk_tree_model_get (model, iter, COL_NODE, &node, -1); + g_object_set (renderer, "editable", FALSE, (char*) 0); + switch (node->type) + { + case ModelTypeid::NODE_TYPEID: + g_object_set (renderer, "text", node->tid.GetName ().c_str (), (char*) 0); + break; + case ModelTypeid::NODE_ATTRIBUTE: + g_object_set (renderer, "text", node->name.c_str (), (char*) 0); + break; + } +} + + +/** + * This functions is called whenever there is a change in the value of an attribute + * If the input value is ok, it will be updated in the default value and in the + * gui, otherwise, it won't be updated in both. + */ +void +cell_edited_callback_config_default (GtkCellRendererText *cell, gchar *path_string, + gchar *new_text, gpointer user_data) +{ + GtkTreeModel *model = GTK_TREE_MODEL (user_data); + GtkTreeIter iter; + gtk_tree_model_get_iter_from_string (model, &iter, path_string); + ModelTypeid *node; + gtk_tree_model_get (model, &iter, COL_NODE, &node, -1); + NS_ASSERT (node->type == ModelTypeid::NODE_ATTRIBUTE); + if (Config::SetDefaultFailSafe (node->tid.GetAttributeFullName (node->index),StringValue (new_text))) + { + node->defaultValue = new_text; + } +} + +/** + * This function is used to display a tooltip whenever the user puts the mouse + * over a type ID or an attribute. It will give the type and the possible values of + * an attribute value and the type of the object for an attribute object or a + * typeID object + */ +gboolean +cell_tooltip_callback_config_default (GtkWidget *widget, gint x, gint y, + gboolean keyboard_tip, GtkTooltip *tooltip, gpointer user_data) +{ + GtkTreeModel *model; + GtkTreeIter iter; + GtkTreeViewColumn * column; + if (!gtk_tree_view_get_tooltip_context (GTK_TREE_VIEW (widget), &x, &y, + keyboard_tip, &model, 0, &iter)) + { + return FALSE; + } + if (!gtk_tree_view_get_path_at_pos (GTK_TREE_VIEW (widget), x, y, 0, &column, 0, 0)) + { + return FALSE; + } + int col = get_col_number_from_tree_view_column (column); + + ModelTypeid *node; + gtk_tree_model_get (model, &iter, COL_NODE, &node, -1); + + switch (node->type) + { + case ModelTypeid::NODE_TYPEID: + if (col == 0) + { + std::string tip = "This object is of type " + node->tid.GetName (); + gtk_tooltip_set_text (tooltip, tip.c_str ()); + return TRUE; + } + break; + case ModelTypeid::NODE_ATTRIBUTE: + { + uint32_t attrIndex = node->index; + if (col == 0) + { + std::string tip = node->tid.GetAttributeHelp (attrIndex); + gtk_tooltip_set_text (tooltip, tip.c_str ()); + } + else + { + Ptr checker = node->tid.GetAttributeChecker (attrIndex); + std::string tip; + tip = "This attribute is of type " + checker->GetValueTypeName (); + if (checker->HasUnderlyingTypeInformation ()) + { + tip += " " + checker->GetUnderlyingTypeInformation (); + } + gtk_tooltip_set_text (tooltip, tip.c_str ()); + } + return TRUE; + } + break; + } + return FALSE; +} + +/** + * This is the action done when the user presses on the save button. + * It will save the config to a file. + */ +void +save_clicked_default (GtkButton *button, gpointer user_data) +{ + GtkWidget *parent_window = GTK_WIDGET (user_data); + GtkWidget *dialog; + + dialog = gtk_file_chooser_dialog_new ("Save File", GTK_WINDOW (parent_window), GTK_FILE_CHOOSER_ACTION_SAVE, + GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_SAVE, + GTK_RESPONSE_ACCEPT, (char *) 0); + gtk_file_chooser_set_do_overwrite_confirmation (GTK_FILE_CHOOSER (dialog), + TRUE); + + gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (dialog), "config.txt"); + + if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT) + { + char *filename; + + filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog)); + RawTextConfigSave config; + config.SetFilename (filename); + config.Default (); + g_free (filename); + } + + gtk_widget_destroy (dialog); +} + +/** + * If the user presses the button load, it will load the config file into memory. + */ +void +load_clicked_default (GtkButton *button, gpointer user_data) +{ + GtkWidget *parent_window = GTK_WIDGET (user_data); + GtkWidget *dialog; + + dialog = gtk_file_chooser_dialog_new ("Open File", GTK_WINDOW (parent_window), GTK_FILE_CHOOSER_ACTION_OPEN, + GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OPEN, + GTK_RESPONSE_ACCEPT, (char *) 0); + + if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT) + { + char *filename; + + filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog)); + RawTextConfigLoad config; + config.SetFilename (filename); + config.Default (); + } + + gtk_widget_destroy (dialog); +} + +/** + * This is the main view opening the widget, getting tooltips and drawing the + * tree of attributes + */ +GtkWidget * +create_view_config_default (GtkTreeStore *model) +{ + GtkTreeViewColumn *col; + GtkCellRenderer *renderer; + GtkWidget *view; + + view = gtk_tree_view_new (); + g_object_set (view, "has-tooltip", TRUE, (char*) 0); + g_signal_connect (view, "query-tooltip", (GCallback) cell_tooltip_callback_config_default, 0); + + gtk_tree_view_set_grid_lines (GTK_TREE_VIEW (view), GTK_TREE_VIEW_GRID_LINES_BOTH); + gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (view), TRUE); + + col = gtk_tree_view_column_new (); + gtk_tree_view_column_set_title (col, "Object Attributes"); + gtk_tree_view_append_column (GTK_TREE_VIEW (view), col); + renderer = gtk_cell_renderer_text_new (); + gtk_tree_view_column_pack_start (col, renderer, TRUE); + gtk_tree_view_column_set_cell_data_func (col, renderer, cell_data_function_col_0_config_default, 0, 0); + g_object_set (renderer, "editable", FALSE, (char*) 0); + + col = gtk_tree_view_column_new (); + gtk_tree_view_column_set_title (col, "Attribute Value"); + gtk_tree_view_append_column (GTK_TREE_VIEW (view), col); + renderer = gtk_cell_renderer_text_new (); + g_signal_connect (renderer, "edited", (GCallback) cell_edited_callback_config_default, model); + gtk_tree_view_column_pack_start (col, renderer, TRUE); + gtk_tree_view_column_set_cell_data_func (col, renderer, cell_data_function_col_1_config_default, 0, 0); + + gtk_tree_view_set_model (GTK_TREE_VIEW (view), GTK_TREE_MODEL (model)); + + g_object_unref (model); /* destroy model automatically with view */ + + return view; +} + +/** + * Delete the tree model contents + */ +gboolean +clean_model_callback_config_default (GtkTreeModel *model, GtkTreePath *path, + GtkTreeIter *iter, gpointer data) +{ + ModelTypeid *node; + gtk_tree_model_get (GTK_TREE_MODEL (model), iter, COL_TYPEID, &node, -1); + delete node; + gtk_tree_store_set (GTK_TREE_STORE (model), iter, COL_TYPEID, (ModelTypeid*) 0, -1); + return FALSE; +} + + +}//end ns3 namespace + diff -r afe2960e58b7 -r 9d2c79c992d7 src/config-store/model/display-functions.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/config-store/model/display-functions.h Thu Mar 24 09:23:44 2011 -0700 @@ -0,0 +1,150 @@ +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation; + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Authors: Faker Moatamri + * Mathieu Lacage + */ +#ifndef DISPLAY_FUNCTIONS_H +#define DISPLAY_FUNCTIONS_H + +#include "model-node-creator.h" +#include "model-typeid-creator.h" +#include + +namespace ns3 { +/** + * This function includes the name of the attribute or the editable value + * in the second column + */ +void +cell_data_function_col_1 (GtkTreeViewColumn *col, GtkCellRenderer *renderer, + GtkTreeModel *model, GtkTreeIter *iter, gpointer user_data); +/** + * This function includes the name of the object, pointer, vector or vector item + * in the first column + */ +void +cell_data_function_col_0 (GtkTreeViewColumn *col, GtkCellRenderer *renderer, GtkTreeModel *model, + GtkTreeIter *iter, gpointer user_data); +/** + * This is the callback called when the value of an attribute is changed + */ +void +cell_edited_callback (GtkCellRendererText *cell, gchar *path_string, + gchar *new_text, gpointer user_data); +/** + * This function gets the column number 0 or 1 from the mouse + * click + */ +int +get_col_number_from_tree_view_column (GtkTreeViewColumn *col); +/** + * This function displays the tooltip for an object, pointer, vector + * item or an attribute + */ +gboolean +cell_tooltip_callback (GtkWidget *widget, gint x, gint y, gboolean keyboard_tip, + GtkTooltip *tooltip, gpointer user_data); +/** + * This is the main view opening the widget, getting tooltips and drawing the + * tree of attributes... + */ +GtkWidget * +create_view (GtkTreeStore *model); +/** + * This is the action done when the user presses on the save button. + * It will save the config to a file. + */ +void +save_clicked (GtkButton *button, gpointer user_data); +/** + * If the user presses the button load, it will load the config file into memory. + */ +void +load_clicked (GtkButton *button, gpointer user_data); +/** + * Exit the window when exit button is pressed + */ +void +exit_clicked_callback (GtkButton *button, gpointer user_data); +/** + * Exit the application + */ +gboolean +delete_event_callback (GtkWidget *widget, GdkEvent *event, gpointer user_data); +/** + * Delete the tree model contents + */ +gboolean +clean_model_callback (GtkTreeModel *model, GtkTreePath *path, + GtkTreeIter *iter, gpointer data); +/************************** display functions used by default configurator **********************/ +/** + * This function writes data in the second column, this data is going to be editable + * if it is a NODE_ATTRIBUTE + */ +void +cell_data_function_col_1_config_default (GtkTreeViewColumn *col, GtkCellRenderer *renderer, + GtkTreeModel *model, GtkTreeIter *iter, + gpointer user_data); +/** + * This function writes the attribute or typeid name in the column 0 + */ +void +cell_data_function_col_0_config_default (GtkTreeViewColumn *col, GtkCellRenderer *renderer, GtkTreeModel *model, + GtkTreeIter *iter, gpointer user_data); +/** + * This is the action done when the user presses on the save button. + * It will save the config to a file. + */ +void +save_clicked_default (GtkButton *button, gpointer user_data); +/** + * If the user presses the button load, it will load the config file into memory. + */ +void +load_clicked_default (GtkButton *button, gpointer user_data); +/** + * This functions is called whenever there is a change in the value of an attribute + * If the input value is ok, it will be updated in the default value and in the + * gui, otherwise, it won't be updated in both. + */ +void +cell_edited_callback_config_default (GtkCellRendererText *cell, gchar *path_string, + gchar *new_text, gpointer user_data); +/** + * This function is used to display a tooltip whenever the user puts the mouse + * over a type ID or an attribute. It will give the type and the possible values of + * an attribute value and the type of the object for an attribute object or a + * typeID object + */ +gboolean +cell_tooltip_callback_config_default (GtkWidget *widget, gint x, gint y, + gboolean keyboard_tip, GtkTooltip *tooltip, gpointer user_data); +/** + * This is the main view opening the widget, getting tooltips and drawing the + * tree of attributes + */ +GtkWidget * +create_view_config_default (GtkTreeStore *model); +/** + * Delete the tree model contents + */ +gboolean +clean_model_callback_config_default (GtkTreeModel *model, GtkTreePath *path, + GtkTreeIter *iter, gpointer data); +}//end namespace ns3 + +#endif diff -r afe2960e58b7 -r 9d2c79c992d7 src/config-store/model/file-config.cc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/config-store/model/file-config.cc Thu Mar 24 09:23:44 2011 -0700 @@ -0,0 +1,25 @@ +#include "file-config.h" + +namespace ns3 { + +FileConfig::~FileConfig () +{} + +NoneFileConfig::NoneFileConfig () +{} +NoneFileConfig::~NoneFileConfig () +{} +void +NoneFileConfig::SetFilename (std::string filename) +{} +void +NoneFileConfig::Default (void) +{} +void +NoneFileConfig::Global (void) +{} +void +NoneFileConfig::Attributes (void) +{} + +} // namespace ns3 diff -r afe2960e58b7 -r 9d2c79c992d7 src/config-store/model/file-config.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/config-store/model/file-config.h Thu Mar 24 09:23:44 2011 -0700 @@ -0,0 +1,31 @@ +#ifndef FILE_CONFIG_H +#define FILE_CONFIG_H + +#include + +namespace ns3 { + +class FileConfig +{ +public: + virtual ~FileConfig (); + virtual void SetFilename (std::string filename) = 0; + virtual void Default (void) = 0; + virtual void Global (void) = 0; + virtual void Attributes (void) = 0; +}; + +class NoneFileConfig : public FileConfig +{ +public: + NoneFileConfig (); + virtual ~NoneFileConfig (); + virtual void SetFilename (std::string filename); + virtual void Default (void); + virtual void Global (void); + virtual void Attributes (void); +}; + +} // namespace ns3 + +#endif /* FILE_CONFIG_H */ diff -r afe2960e58b7 -r 9d2c79c992d7 src/config-store/model/gtk-config-store.cc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/config-store/model/gtk-config-store.cc Thu Mar 24 09:23:44 2011 -0700 @@ -0,0 +1,139 @@ +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation; + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Authors: Faker Moatamri + * Mathieu Lacage + */ + +#include "gtk-config-store.h" +#include "raw-text-config.h" +#include "display-functions.h" +#include "ns3/log.h" +#include + + +namespace ns3 { + +NS_LOG_COMPONENT_DEFINE ("GtkconfigStore"); + + +GtkConfigStore::GtkConfigStore () +{ +} + +void +GtkConfigStore::ConfigureDefaults (void) +{ + //this function should be called before running the script to enable the user + //to configure the default values for the objects he wants to use + GtkWidget *window; + GtkWidget *view; + GtkWidget *scroll; + + gtk_init (0, 0); + window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + gtk_window_set_title (GTK_WINDOW (window), "ns-3 Default attributes."); + gtk_window_set_default_size (GTK_WINDOW (window), 600, 600); + + g_signal_connect (window, "delete_event", (GCallback)delete_event_callback, window); + GtkTreeStore *model = gtk_tree_store_new (COL_LAST, G_TYPE_POINTER); + ModelTypeidCreator creator; + creator.Build (model); + + view = create_view_config_default (model); + scroll = gtk_scrolled_window_new (0, 0); + gtk_container_add (GTK_CONTAINER (scroll), view); + + GtkWidget *vbox = gtk_vbox_new (FALSE, 5); + gtk_box_pack_start (GTK_BOX (vbox), scroll, TRUE, TRUE, 0); + gtk_box_pack_end (GTK_BOX (vbox), gtk_hseparator_new (), FALSE, FALSE, 0); + GtkWidget *hbox = gtk_hbox_new (FALSE, 5); + gtk_box_pack_end (GTK_BOX (vbox), hbox, FALSE, FALSE, 0); + GtkWidget *save = gtk_button_new_with_label ("Save"); + g_signal_connect (save, "clicked", (GCallback) save_clicked_default, window); + gtk_box_pack_end (GTK_BOX (hbox), save, FALSE, FALSE, 0); + GtkWidget *load = gtk_button_new_with_label ("Load"); + g_signal_connect (load, "clicked", (GCallback) load_clicked_default, window); + gtk_box_pack_end (GTK_BOX (hbox), load, FALSE, FALSE, 0); + GtkWidget *exit = gtk_button_new_with_label ("Run Simulation"); + g_signal_connect (exit, "clicked", (GCallback) exit_clicked_callback, window); + gtk_box_pack_end (GTK_BOX (hbox), exit, FALSE, FALSE, 0); + + gtk_container_add (GTK_CONTAINER (window), vbox); + + gtk_widget_show_all (window); + + gtk_main (); + + gtk_tree_model_foreach (GTK_TREE_MODEL (model), + clean_model_callback_config_default, + 0); + + gtk_widget_destroy (window); +} + +void +GtkConfigStore::ConfigureAttributes (void) +{ + GtkWidget *window; + GtkWidget *view; + GtkWidget *scroll; + + gtk_init (0, 0); + + window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + gtk_window_set_title (GTK_WINDOW (window), "ns-3 Object attributes."); + gtk_window_set_default_size (GTK_WINDOW (window), 600, 600); + + g_signal_connect (window, "delete_event", (GCallback)delete_event_callback, window); + + + GtkTreeStore *model = gtk_tree_store_new (COL_LAST, G_TYPE_POINTER); + ModelCreator creator; + creator.Build (model); + + view = create_view (model); + scroll = gtk_scrolled_window_new (0, 0); + gtk_container_add (GTK_CONTAINER (scroll), view); + + GtkWidget *vbox = gtk_vbox_new (FALSE, 5); + gtk_box_pack_start (GTK_BOX (vbox), scroll, TRUE, TRUE, 0); + gtk_box_pack_end (GTK_BOX (vbox), gtk_hseparator_new (), FALSE, FALSE, 0); + GtkWidget *hbox = gtk_hbox_new (FALSE, 5); + gtk_box_pack_end (GTK_BOX (vbox), hbox, FALSE, FALSE, 0); + GtkWidget *save = gtk_button_new_with_label ("Save"); + g_signal_connect (save, "clicked", (GCallback) save_clicked, window); + gtk_box_pack_end (GTK_BOX (hbox), save, FALSE, FALSE, 0); + GtkWidget *load = gtk_button_new_with_label ("Load"); + g_signal_connect (load, "clicked", (GCallback) load_clicked, window); + gtk_box_pack_end (GTK_BOX (hbox), load, FALSE, FALSE, 0); + GtkWidget *exit = gtk_button_new_with_label ("Run Simulation"); + g_signal_connect (exit, "clicked", (GCallback) exit_clicked_callback, window); + gtk_box_pack_end (GTK_BOX (hbox), exit, FALSE, FALSE, 0); + + gtk_container_add (GTK_CONTAINER (window), vbox); + + gtk_widget_show_all (window); + + gtk_main (); + + gtk_tree_model_foreach (GTK_TREE_MODEL (model), + clean_model_callback, + 0); + + gtk_widget_destroy (window); +} + +} // namespace ns3 diff -r afe2960e58b7 -r 9d2c79c992d7 src/config-store/model/gtk-config-store.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/config-store/model/gtk-config-store.h Thu Mar 24 09:23:44 2011 -0700 @@ -0,0 +1,40 @@ +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation; + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Authors: Faker Moatamri + * Mathieu Lacage + */ + +#ifndef GTK_CONFIG_STORE_H +#define GTK_CONFIG_STORE_H + +namespace ns3 { + +/** + * \brief A class that provides a GTK-based front end to ns3::ConfigStore + */ +class GtkConfigStore +{ +public: + GtkConfigStore (); + + void ConfigureDefaults (void); + void ConfigureAttributes (void); +}; + + +} // namespace ns3 + +#endif /* GTK_CONFIG_STORE_H */ diff -r afe2960e58b7 -r 9d2c79c992d7 src/config-store/model/model-node-creator.cc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/config-store/model/model-node-creator.cc Thu Mar 24 09:23:44 2011 -0700 @@ -0,0 +1,130 @@ +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation; + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Authors: Faker Moatamri + * Mathieu Lacage + */ + +#include "model-node-creator.h" +namespace ns3 { + +ModelCreator::ModelCreator () +{ +} +void + +ModelCreator::Build (GtkTreeStore *treestore) +{ + m_treestore = treestore; + m_iters.push_back (0); + //this function will go through all the objects and call on them + //DoStartVisitObject, DoIterate and DoEndVisitObject + Iterate (); + NS_ASSERT (m_iters.size () == 1); +} + + +void +ModelCreator::Add (ModelNode *node) +{ + GtkTreeIter *parent = m_iters.back (); + GtkTreeIter *current = g_new (GtkTreeIter, 1); + gtk_tree_store_append (m_treestore, current, parent); + gtk_tree_store_set (m_treestore, current, + COL_NODE, node, -1); + m_iters.push_back (current); +} +void +ModelCreator::Remove (void) +{ + GtkTreeIter *iter = m_iters.back (); + g_free (iter); + m_iters.pop_back (); +} + +void +ModelCreator::DoVisitAttribute (Ptr object, std::string name) +{ + ModelNode *node = new ModelNode (); + node->type = ModelNode::NODE_ATTRIBUTE; + node->object = object; + node->name = name; + Add (node); + Remove (); +} +void +ModelCreator::DoStartVisitObject (Ptr object) +{ + ModelNode *node = new ModelNode (); + node->type = ModelNode::NODE_OBJECT; + node->object = object; + Add (node); +} +void +ModelCreator::DoEndVisitObject (void) +{ + Remove (); +} +void +ModelCreator::DoStartVisitPointerAttribute (Ptr object, std::string name, Ptr value) +{ + ModelNode *node = new ModelNode (); + node->type = ModelNode::NODE_POINTER; + node->object = object; + node->name = name; + Add (node); +} +void +ModelCreator::DoEndVisitPointerAttribute (void) +{ + Remove (); +} +void +ModelCreator::DoStartVisitArrayAttribute (Ptr object, std::string name, const ObjectVectorValue &vector) +{ + ModelNode *node = new ModelNode (); + node->type = ModelNode::NODE_VECTOR; + node->object = object; + node->name = name; + Add (node); +} +void +ModelCreator::DoEndVisitArrayAttribute (void) +{ + Remove (); +} +void +ModelCreator::DoStartVisitArrayItem (const ObjectVectorValue &vector, uint32_t index, Ptr item) +{ + GtkTreeIter *parent = m_iters.back (); + GtkTreeIter *current = g_new (GtkTreeIter, 1); + ModelNode *node = new ModelNode (); + node->type = ModelNode::NODE_VECTOR_ITEM; + node->object = item; + node->index = index; + gtk_tree_store_append (m_treestore, current, parent); + gtk_tree_store_set (m_treestore, current, + COL_NODE, node, + -1); + m_iters.push_back (current); +} +void +ModelCreator::DoEndVisitArrayItem (void) +{ + GtkTreeIter *iter = m_iters.back (); + g_free (iter); + m_iters.pop_back (); +} +}//end namespace ns3 diff -r afe2960e58b7 -r 9d2c79c992d7 src/config-store/model/model-node-creator.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/config-store/model/model-node-creator.h Thu Mar 24 09:23:44 2011 -0700 @@ -0,0 +1,73 @@ +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation; + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Authors: Faker Moatamri + * Mathieu Lacage + */ + +#include "attribute-iterator.h" +#include + +namespace ns3 +{ + +enum +{ + COL_NODE = 0, COL_LAST +}; + +struct ModelNode +{ + enum + { + // store object + attribute name + NODE_ATTRIBUTE, + // store object + attribute name + NODE_POINTER, + // store object + attribute name + NODE_VECTOR, + // store index + value (object) + NODE_VECTOR_ITEM, + // store object + NODE_OBJECT + } type; + std::string name; + Ptr object; + uint32_t index; +}; +class ModelCreator : public AttributeIterator +{ +public: + ModelCreator (); + + void Build (GtkTreeStore *treestore); +private: + virtual void DoVisitAttribute (Ptr object, std::string name); + virtual void DoStartVisitObject (Ptr object); + virtual void DoEndVisitObject (void); + virtual void DoStartVisitPointerAttribute (Ptr object, std::string name, Ptr value); + virtual void DoEndVisitPointerAttribute (void); + virtual void DoStartVisitArrayAttribute (Ptr object, std::string name, const ObjectVectorValue &vector); + virtual void DoEndVisitArrayAttribute (void); + virtual void DoStartVisitArrayItem (const ObjectVectorValue &vector, + uint32_t index, Ptr item); + virtual void DoEndVisitArrayItem (void); + void Add (ModelNode *node); + void Remove (void); + + GtkTreeStore *m_treestore; + std::vector m_iters; +}; +} diff -r afe2960e58b7 -r 9d2c79c992d7 src/config-store/model/model-typeid-creator.cc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/config-store/model/model-typeid-creator.cc Thu Mar 24 09:23:44 2011 -0700 @@ -0,0 +1,81 @@ +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation; + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Author: Faker Moatamri + */ + +#include "model-typeid-creator.h" + +namespace ns3 { + +ModelTypeidCreator::ModelTypeidCreator () +{ +} +void + +ModelTypeidCreator::Build (GtkTreeStore *treestore) +{ + m_treestore = treestore; + m_iters.push_back (0); + Iterate (); + NS_ASSERT (m_iters.size () == 1); +} + +void +ModelTypeidCreator::Add (ModelTypeid *node) +{ + GtkTreeIter *parent = m_iters.back (); + GtkTreeIter *current = g_new (GtkTreeIter, 1); + gtk_tree_store_append (m_treestore, current, parent); + gtk_tree_store_set (m_treestore, current, COL_TYPEID, node, -1); + m_iters.push_back (current); +} + +void +ModelTypeidCreator::Remove (void) +{ + GtkTreeIter *iter = m_iters.back (); + g_free (iter); + m_iters.pop_back (); +} + +void +ModelTypeidCreator::VisitAttribute (TypeId tid, std::string name, std::string defaultValue, uint32_t index) +{ + ModelTypeid *node = new ModelTypeid (); + node->type = ModelTypeid::NODE_ATTRIBUTE; + node->tid = tid; + node->name = name; + node->defaultValue = defaultValue; + node->index = index; + Add (node); + Remove (); +} + +void +ModelTypeidCreator::StartVisitTypeId (std::string name) +{ + ModelTypeid *node = new ModelTypeid (); + node->type = ModelTypeid::NODE_TYPEID; + node->tid = TypeId::LookupByName (name); + Add (node); +} + +void +ModelTypeidCreator::EndVisitTypeId (void) +{ + Remove (); +} +}//end namespace ns3 diff -r afe2960e58b7 -r 9d2c79c992d7 src/config-store/model/model-typeid-creator.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/config-store/model/model-typeid-creator.h Thu Mar 24 09:23:44 2011 -0700 @@ -0,0 +1,82 @@ +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation; + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Author: Moatamri Faker + */ + +#include "attribute-default-iterator.h" +#include "ns3/type-id.h" +#include +#include + +namespace ns3 { + +enum +{ + COL_TYPEID = 0, COL_LASTID +}; + +struct ModelTypeid +{ + enum + { + // store TypeId + attribute name +defaultValue and index + NODE_ATTRIBUTE, + // store TypeId + NODE_TYPEID + } type; + std::string name; + std::string defaultValue; + //The TypeId object and if it is an attribute, it's the TypeId object of the attribute + TypeId tid; + //stores the index of the attribute in list of attributes for a given TypeId + uint32_t index; +}; +class ModelTypeidCreator : public AttributeDefaultIterator +{ +public: + ModelTypeidCreator (); + /** + * \brief This method will iterate on typeIds having default attributes and create a model + * for them, this model will be used by the view. + */ + void Build (GtkTreeStore *treestore); +private: + /** + * \brief This method will add a ModelTypeid to the GtkTreeIterator + */ + virtual void VisitAttribute (TypeId tid, std::string name, std::string defaultValue, uint32_t index); + /** + * \brief Add a node for the new TypeId object + */ + virtual void StartVisitTypeId (std::string name); + /** + * \brief Remove the last gtk tree iterator + */ + virtual void EndVisitTypeId (void); + /** + * \brief Adds a treestore iterator to m_treestore model + */ + void Add (ModelTypeid *node); + /** + * Removes the last GtkTreeIterator from m_iters + */ + void Remove (void); + //this is the TreeStore model corresponding to the view + GtkTreeStore *m_treestore; + //This contains a vector of iterators used to build the TreeStore + std::vector m_iters; +}; +} diff -r afe2960e58b7 -r 9d2c79c992d7 src/config-store/model/raw-text-config.cc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/config-store/model/raw-text-config.cc Thu Mar 24 09:23:44 2011 -0700 @@ -0,0 +1,166 @@ +#include "raw-text-config.h" +#include "attribute-iterator.h" +#include "attribute-default-iterator.h" +#include "ns3/global-value.h" +#include "ns3/string.h" +#include "ns3/log.h" +#include "ns3/config.h" + +NS_LOG_COMPONENT_DEFINE ("RawTextConfig"); + +namespace ns3 { + +RawTextConfigSave::RawTextConfigSave () + : m_os (0) +{} +RawTextConfigSave::~RawTextConfigSave () +{ + if (m_os != 0) + { + m_os->close (); + } + delete m_os; + m_os = 0; +} +void +RawTextConfigSave::SetFilename (std::string filename) +{ + m_os = new std::ofstream (); + m_os->open (filename.c_str (), std::ios::out); +} +void +RawTextConfigSave::Default (void) +{ + class RawTextDefaultIterator : public AttributeDefaultIterator + { + public: + RawTextDefaultIterator (std::ostream *os) { + m_os = os; + } + private: + virtual void StartVisitTypeId (std::string name) { + m_typeId = name; + } + virtual void DoVisitAttribute (std::string name, std::string defaultValue) { + *m_os << "default " << m_typeId << "::" << name << " \"" << defaultValue << "\"" << std::endl; + } + std::string m_typeId; + std::ostream *m_os; + }; + + RawTextDefaultIterator iterator = RawTextDefaultIterator (m_os); + iterator.Iterate (); +} +void +RawTextConfigSave::Global (void) +{ + for (GlobalValue::Iterator i = GlobalValue::Begin (); i != GlobalValue::End (); ++i) + { + StringValue value; + (*i)->GetValue (value); + *m_os << "global " << (*i)->GetName () << " \"" << value.Get () << "\"" << std::endl; + } +} +void +RawTextConfigSave::Attributes (void) +{ + class RawTextAttributeIterator : public AttributeIterator + { + public: + RawTextAttributeIterator (std::ostream *os) + : m_os (os) {} + private: + virtual void DoVisitAttribute (Ptr object, std::string name) { + StringValue str; + object->GetAttribute (name, str); + *m_os << "value " << GetCurrentPath () << " \"" << str.Get () << "\"" << std::endl; + } + std::ostream *m_os; + }; + + RawTextAttributeIterator iter = RawTextAttributeIterator (m_os); + iter.Iterate (); +} + +RawTextConfigLoad::RawTextConfigLoad () + : m_is (0) +{} +RawTextConfigLoad::~RawTextConfigLoad () +{ + if (m_is != 0) + { + m_is->close (); + delete m_is; + m_is = 0; + } +} +void +RawTextConfigLoad::SetFilename (std::string filename) +{ + m_is = new std::ifstream (); + m_is->open (filename.c_str (), std::ios::in); +} +std::string +RawTextConfigLoad::Strip (std::string value) +{ + std::string::size_type start = value.find ("\""); + std::string::size_type end = value.find ("\"", 1); + NS_ASSERT (start == 0); + NS_ASSERT (end == value.size () - 1); + return value.substr (start+1, end-start-1); +} + +void +RawTextConfigLoad::Default (void) +{ + m_is->seekg (0); + std::string type, name, value; + *m_is >> type >> name >> value; + while (m_is->good()) + { + NS_LOG_DEBUG ("type=" << type << ", name=" << name << ", value=" << value); + value = Strip (value); + if (type == "default") + { + Config::SetDefault (name, StringValue (value)); + } + *m_is >> type >> name >> value; + } +} +void +RawTextConfigLoad::Global (void) +{ + m_is->seekg (0); + std::string type, name, value; + *m_is >> type >> name >> value; + while (m_is->good()) + { + NS_LOG_DEBUG ("type=" << type << ", name=" << name << ", value=" << value); + value = Strip (value); + if (type == "global") + { + Config::SetGlobal (name, StringValue (value)); + } + *m_is >> type >> name >> value; + } +} +void +RawTextConfigLoad::Attributes (void) +{ + m_is->seekg (0); + std::string type, path, value; + *m_is >> type >> path >> value; + while (m_is->good()) + { + NS_LOG_DEBUG ("type=" << type << ", path=" << path << ", value=" << value); + value = Strip (value); + if (type == "value") + { + Config::Set (path, StringValue (value)); + } + *m_is >> type >> path >> value; + } +} + + +} // namespace ns3 diff -r afe2960e58b7 -r 9d2c79c992d7 src/config-store/model/raw-text-config.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/config-store/model/raw-text-config.h Thu Mar 24 09:23:44 2011 -0700 @@ -0,0 +1,39 @@ +#ifndef RAW_TEXT_CONFIG_H +#define RAW_TEXT_CONFIG_H + +#include +#include +#include "file-config.h" + +namespace ns3 { + +class RawTextConfigSave : public FileConfig +{ +public: + RawTextConfigSave (); + virtual ~RawTextConfigSave (); + virtual void SetFilename (std::string filename); + virtual void Default (void); + virtual void Global (void); + virtual void Attributes (void); +private: + std::ofstream *m_os; +}; + +class RawTextConfigLoad : public FileConfig +{ +public: + RawTextConfigLoad (); + virtual ~RawTextConfigLoad (); + virtual void SetFilename (std::string filename); + virtual void Default (void); + virtual void Global (void); + virtual void Attributes (void); +private: + std::string Strip (std::string value); + std::ifstream *m_is; +}; + +} // namespace ns3 + +#endif /* RAW_TEXT_CONFIG_H */ diff -r afe2960e58b7 -r 9d2c79c992d7 src/config-store/model/xml-config.cc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/config-store/model/xml-config.cc Thu Mar 24 09:23:44 2011 -0700 @@ -0,0 +1,335 @@ +#include "xml-config.h" +#include "attribute-default-iterator.h" +#include "attribute-iterator.h" +#include "ns3/fatal-error.h" +#include "ns3/log.h" +#include "ns3/global-value.h" +#include "ns3/string.h" +#include "ns3/config.h" +#include +#include + +NS_LOG_COMPONENT_DEFINE ("XmlConfig"); + +namespace ns3 { + +XmlConfigSave::XmlConfigSave () + : m_writer (0) +{ + NS_LOG_FUNCTION (this); +} +void +XmlConfigSave::SetFilename (std::string filename) +{ + NS_LOG_FUNCTION (filename); + if (filename == "") + { + return; + } + int rc; + + /* Create a new XmlWriter for uri, with no compression. */ + m_writer = xmlNewTextWriterFilename(filename.c_str (), 0); + if (m_writer == NULL) + { + NS_FATAL_ERROR ("Error creating the xml writer"); + } + rc = xmlTextWriterSetIndent (m_writer, 1); + if (rc < 0) + { + NS_FATAL_ERROR ("Error at xmlTextWriterSetIndent"); + } + /* Start the document with the xml default for the version, + * encoding utf-8 and the default for the standalone + * declaration. */ + rc = xmlTextWriterStartDocument(m_writer, NULL, "utf-8", NULL); + if (rc < 0) + { + NS_FATAL_ERROR ("Error at xmlTextWriterStartDocument"); + } + + /* Start an element named "ns3". Since thist is the first + * element, this will be the root element of the document. */ + rc = xmlTextWriterStartElement(m_writer, BAD_CAST "ns3"); + if (rc < 0) + { + NS_FATAL_ERROR ("Error at xmlTextWriterStartElement\n"); + } +} +XmlConfigSave::~XmlConfigSave () +{ + NS_LOG_FUNCTION (this); + if (m_writer == 0) + { + return; + } + int rc; + /* Here we could close the remaining elements using the + * function xmlTextWriterEndElement, but since we do not want to + * write any other elements, we simply call xmlTextWriterEndDocument, + * which will do all the work. */ + rc = xmlTextWriterEndDocument(m_writer); + if (rc < 0) + { + NS_FATAL_ERROR ("Error at xmlTextWriterEndDocument\n"); + } + + xmlFreeTextWriter(m_writer); + m_writer = 0; +} +void +XmlConfigSave::Default (void) +{ + class XmlDefaultIterator : public AttributeDefaultIterator + { + public: + XmlDefaultIterator (xmlTextWriterPtr writer) { + m_writer = writer; + } + private: + virtual void StartVisitTypeId (std::string name) { + m_typeid = name; + } + virtual void DoVisitAttribute (std::string name, std::string defaultValue) { + int rc; + rc = xmlTextWriterStartElement(m_writer, BAD_CAST "default"); + if (rc < 0) + { + NS_FATAL_ERROR ("Error at xmlTextWriterStartElement"); + } + std::string fullname = m_typeid + "::" + name; + rc = xmlTextWriterWriteAttribute(m_writer, BAD_CAST "name", + BAD_CAST fullname.c_str ()); + if (rc < 0) + { + NS_FATAL_ERROR ("Error at xmlTextWriterWriteAttribute"); + } + rc = xmlTextWriterWriteAttribute(m_writer, BAD_CAST "value", + BAD_CAST defaultValue.c_str ()); + if (rc < 0) + { + NS_FATAL_ERROR ("Error at xmlTextWriterWriteAttribute"); + } + rc = xmlTextWriterEndElement(m_writer); + if (rc < 0) + { + NS_FATAL_ERROR ("Error at xmlTextWriterEndElement"); + } + } + xmlTextWriterPtr m_writer; + std::string m_typeid; + }; + XmlDefaultIterator iterator = XmlDefaultIterator (m_writer); + iterator.Iterate (); +} + +void +XmlConfigSave::Attributes (void) +{ + class XmlTextAttributeIterator : public AttributeIterator + { + public: + XmlTextAttributeIterator (xmlTextWriterPtr writer) + : m_writer (writer) {} + private: + virtual void DoVisitAttribute (Ptr object, std::string name) { + StringValue str; + object->GetAttribute (name, str); + int rc; + rc = xmlTextWriterStartElement(m_writer, BAD_CAST "value"); + if (rc < 0) + { + NS_FATAL_ERROR ("Error at xmlTextWriterStartElement"); + } + rc = xmlTextWriterWriteAttribute(m_writer, BAD_CAST "path", + BAD_CAST GetCurrentPath ().c_str ()); + if (rc < 0) + { + NS_FATAL_ERROR ("Error at xmlTextWriterWriteAttribute"); + } + rc = xmlTextWriterWriteAttribute(m_writer, BAD_CAST "value", + BAD_CAST str.Get ().c_str ()); + if (rc < 0) + { + NS_FATAL_ERROR ("Error at xmlTextWriterWriteAttribute"); + } + rc = xmlTextWriterEndElement(m_writer); + if (rc < 0) + { + NS_FATAL_ERROR ("Error at xmlTextWriterEndElement"); + } + } + xmlTextWriterPtr m_writer; + }; + + XmlTextAttributeIterator iter = XmlTextAttributeIterator (m_writer); + iter.Iterate (); +} + +void +XmlConfigSave::Global (void) +{ + int rc; + for (GlobalValue::Iterator i = GlobalValue::Begin (); i != GlobalValue::End (); ++i) + { + StringValue value; + (*i)->GetValue (value); + + rc = xmlTextWriterStartElement(m_writer, BAD_CAST "global"); + if (rc < 0) + { + NS_FATAL_ERROR ("Error at xmlTextWriterStartElement"); + } + rc = xmlTextWriterWriteAttribute(m_writer, BAD_CAST "name", + BAD_CAST (*i)->GetName ().c_str ()); + if (rc < 0) + { + NS_FATAL_ERROR ("Error at xmlTextWriterWriteAttribute"); + } + rc = xmlTextWriterWriteAttribute(m_writer, BAD_CAST "value", + BAD_CAST value.Get ().c_str ()); + if (rc < 0) + { + NS_FATAL_ERROR ("Error at xmlTextWriterWriteAttribute"); + } + rc = xmlTextWriterEndElement(m_writer); + if (rc < 0) + { + NS_FATAL_ERROR ("Error at xmlTextWriterEndElement"); + } + } +} + +XmlConfigLoad::XmlConfigLoad () +{ + NS_LOG_FUNCTION (this); +} +XmlConfigLoad::~XmlConfigLoad () +{ + NS_LOG_FUNCTION (this); +} + +void +XmlConfigLoad::SetFilename (std::string filename) +{ + NS_LOG_FUNCTION (filename); + m_filename = filename; +} +void +XmlConfigLoad::Default (void) +{ + xmlTextReaderPtr reader = xmlNewTextReaderFilename(m_filename.c_str ()); + if (reader == NULL) + { + NS_FATAL_ERROR ("Error at xmlReaderForFile"); + } + int rc; + rc = xmlTextReaderRead (reader); + while (rc > 0) + { + const xmlChar *type = xmlTextReaderConstName(reader); + if (type == 0) + { + NS_FATAL_ERROR ("Invalid value"); + } + if (std::string ((char*)type) == "default") + { + xmlChar *name = xmlTextReaderGetAttribute (reader, BAD_CAST "name"); + if (name == 0) + { + NS_FATAL_ERROR ("Error getting attribute 'name'"); + } + xmlChar *value = xmlTextReaderGetAttribute (reader, BAD_CAST "value"); + if (value == 0) + { + NS_FATAL_ERROR ("Error getting attribute 'value'"); + } + NS_LOG_DEBUG ("default="<<(char*)name<<", value=" < 0) + { + const xmlChar *type = xmlTextReaderConstName(reader); + if (type == 0) + { + NS_FATAL_ERROR ("Invalid value"); + } + if (std::string ((char*)type) == "global") + { + xmlChar *name = xmlTextReaderGetAttribute (reader, BAD_CAST "name"); + if (name == 0) + { + NS_FATAL_ERROR ("Error getting attribute 'name'"); + } + xmlChar *value = xmlTextReaderGetAttribute (reader, BAD_CAST "value"); + if (value == 0) + { + NS_FATAL_ERROR ("Error getting attribute 'value'"); + } + NS_LOG_DEBUG ("global="<<(char*)name<<", value=" < 0) + { + const xmlChar *type = xmlTextReaderConstName(reader); + if (type == 0) + { + NS_FATAL_ERROR ("Invalid value"); + } + if (std::string ((char*)type) == "value") + { + xmlChar *path = xmlTextReaderGetAttribute (reader, BAD_CAST "path"); + if (path == 0) + { + NS_FATAL_ERROR ("Error getting attribute 'path'"); + } + xmlChar *value = xmlTextReaderGetAttribute (reader, BAD_CAST "value"); + if (value == 0) + { + NS_FATAL_ERROR ("Error getting attribute 'value'"); + } + NS_LOG_DEBUG ("path="<<(char*)path << ", value=" << (char*)value); + Config::Set ((char*)path, StringValue ((char*)value)); + xmlFree (path); + xmlFree (value); + } + rc = xmlTextReaderRead (reader); + } + xmlFreeTextReader (reader); +} + + + +} // namespace ns3 diff -r afe2960e58b7 -r 9d2c79c992d7 src/config-store/model/xml-config.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/config-store/model/xml-config.h Thu Mar 24 09:23:44 2011 -0700 @@ -0,0 +1,41 @@ +#ifndef XML_CONFIG_STORE_H +#define XML_CONFIG_STORE_H + +#include +#include +#include +#include "file-config.h" + +namespace ns3 { + +class XmlConfigSave : public FileConfig +{ +public: + XmlConfigSave (); + virtual ~XmlConfigSave (); + + virtual void SetFilename (std::string filename); + virtual void Default (void); + virtual void Global (void); + virtual void Attributes (void); +private: + xmlTextWriterPtr m_writer; +}; + +class XmlConfigLoad : public FileConfig +{ +public: + XmlConfigLoad (); + virtual ~XmlConfigLoad (); + + virtual void SetFilename (std::string filename); + virtual void Default (void); + virtual void Global (void); + virtual void Attributes (void); +private: + std::string m_filename; +}; + +} // namespace ns3 + +#endif /* XML_CONFIG_STORE_H */ diff -r afe2960e58b7 -r 9d2c79c992d7 src/config-store/wscript --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/config-store/wscript Thu Mar 24 09:23:44 2011 -0700 @@ -0,0 +1,53 @@ +## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- + +def configure(conf): + have_gtk = conf.pkg_check_modules('GTK_CONFIG_STORE', 'gtk+-2.0 >= 2.12', mandatory=False) + conf.env['ENABLE_GTK_CONFIG_STORE'] = have_gtk + conf.report_optional_feature("GtkConfigStore", "GtkConfigStore", + conf.env['ENABLE_GTK_CONFIG_STORE'], + "library 'gtk+-2.0 >= 2.12' not found") + have_libxml2 = conf.pkg_check_modules('LIBXML2', 'libxml-2.0 >= 2.6', mandatory=False) + if have_libxml2: + conf.define('HAVE_LIBXML2', 1) + + conf.env['ENABLE_LIBXML2'] = have_libxml2 + conf.report_optional_feature("XmlIo", "XmlIo", + conf.env['ENABLE_LIBXML2'], + "library 'libxml-2.0 >= 2.7' not found") + conf.write_config_header('ns3/config-store-config.h', top=True) + + +def build(bld): + module = bld.create_ns3_module('config-store', ['core', 'network']) + module.source = [ + 'model/attribute-iterator.cc', + 'model/config-store.cc', + 'model/attribute-default-iterator.cc', + 'model/file-config.cc', + 'model/raw-text-config.cc', + ] + + headers = bld.new_task_gen('ns3header') + headers.module = 'config-store' + headers.source = [ + 'model/file-config.h', + 'model/config-store.h', + ] + + if bld.env['ENABLE_GTK_CONFIG_STORE']: + headers.source.append ('model/gtk-config-store.h') + module.source.extend (['model/gtk-config-store.cc', + 'model/model-node-creator.cc', + 'model/model-typeid-creator.cc', + 'model/display-functions.cc', + ]) + module.uselib = 'GTK_CONFIG_STORE' + + if bld.env['ENABLE_LIBXML2']: + module.source.append ('model/xml-config.cc') + if bld.env['ENABLE_GTK_CONFIG_STORE']: + module.uselib = module.uselib + ' LIBXML2' + else: + module.uselib = 'LIBXML2' + + bld.ns3_python_bindings() diff -r afe2960e58b7 -r 9d2c79c992d7 src/contrib/attribute-default-iterator.cc --- a/src/contrib/attribute-default-iterator.cc Thu Mar 24 15:11:56 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,123 +0,0 @@ -/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ -/* - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation; - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * Authors: Faker Moatamri - * Mathieu Lacage - */ - -#include "attribute-default-iterator.h" -#include "ns3/attribute.h" -#include "ns3/object-vector.h" -#include "ns3/pointer.h" -#include "ns3/global-value.h" -#include "ns3/string.h" - -namespace ns3 -{ - -AttributeDefaultIterator::~AttributeDefaultIterator () -{ -} -void -AttributeDefaultIterator::Iterate (void) -{ - for (uint32_t i = 0; i < TypeId::GetRegisteredN (); i++) - { - TypeId tid = TypeId::GetRegistered (i); - if (tid.MustHideFromDocumentation ()) - { - continue; - } - bool calledStart = false; - for (uint32_t j = 0; j < tid.GetAttributeN (); j++) - { - uint32_t flags = tid.GetAttributeFlags (j); - if (!(flags & TypeId::ATTR_CONSTRUCT)) - { - // we can't construct the attribute, so, there is no - // initial value for the attribute - continue; - } - Ptr accessor = tid.GetAttributeAccessor (j); - //No accessor, go to next attribute - if (accessor == 0) - { - continue; - } - if (!accessor->HasSetter ()) - { - //skip this attribute it doesn't have an setter - continue; - } - Ptr checker = tid.GetAttributeChecker (j); - if (checker == 0) - { - //skip, it doesn't have a checker - continue; - } - Ptr value = tid.GetAttributeInitialValue (j); - if (value == 0) - { - //No value, check next attribute - continue; - } - Ptr vector = DynamicCast (value); - if (vector != 0) - { - //a vector value, won't take it - continue; - } - Ptr pointer = DynamicCast (value); - if (pointer != 0) - { - //pointer value, won't take it - continue; - } - //We take only values, no pointers or vectors - if (!calledStart) - { - StartVisitTypeId (tid.GetName ()); - } - VisitAttribute (tid, tid.GetAttributeName (j), value->SerializeToString (checker), j); - calledStart = true; - } - if (calledStart) - { - EndVisitTypeId (); - } - } -} - -void -AttributeDefaultIterator::StartVisitTypeId (std::string name) -{ -} -void -AttributeDefaultIterator::EndVisitTypeId (void) -{ -} - -void -AttributeDefaultIterator::DoVisitAttribute (std::string name, std::string defaultValue) -{ -} - -void -AttributeDefaultIterator::VisitAttribute (TypeId tid, std::string name, std::string defaultValue, uint32_t index) -{ - DoVisitAttribute (name, defaultValue); -} - -} // namespace ns3 diff -r afe2960e58b7 -r 9d2c79c992d7 src/contrib/attribute-default-iterator.h --- a/src/contrib/attribute-default-iterator.h Thu Mar 24 15:11:56 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,60 +0,0 @@ -/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ -/* - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation; - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * Authors: Faker Moatamri - * Mathieu Lacage - */ - -#ifndef ATTRIBUTE_DEFAULT_ITERATOR_H -#define ATTRIBUTE_DEFAULT_ITERATOR_H - -#include "ns3/type-id.h" -#include - -namespace ns3 { - -class AttributeDefaultIterator -{ -public: - virtual ~AttributeDefaultIterator () = 0; - /** - * \brief This function will go through all the TypeIds and get only the attributes which are - * explicit values (not vectors or pointer or arrays) and apply StartVisitTypeId - * and VisitAttribute on the attributes in one TypeId. At the end of each TypeId - * EndVisitTypeId is called. - */ - void Iterate (void); -private: - /** - * \brief Just an interface that needs to be implemented - */ - virtual void StartVisitTypeId (std::string name); - /** - * \brief Just an interface that needs to be implemented - */ - virtual void EndVisitTypeId (void); - /** - * \brief This method can be implemented, otherwise, it will call DoVisitAttribute - */ - virtual void VisitAttribute (TypeId tid, std::string name, std::string defaultValue, uint32_t index); - /** - * \brief This method is just an interface and needs to be implemented - */ - virtual void DoVisitAttribute (std::string name, std::string defaultValue); -}; - -} // namespace ns3 - -#endif /* ATTRIBUTE_DEFAULT_ITERATOR_H */ diff -r afe2960e58b7 -r 9d2c79c992d7 src/contrib/attribute-iterator.cc --- a/src/contrib/attribute-iterator.cc Thu Mar 24 15:11:56 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,285 +0,0 @@ -/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ -/* - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation; - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * Author: Mathieu Lacage - */ - -#include "attribute-iterator.h" -#include "ns3/config.h" -#include "ns3/log.h" -#include "ns3/pointer.h" -#include "ns3/object-vector.h" -#include "ns3/string.h" -#include - - -NS_LOG_COMPONENT_DEFINE ("AttributeIterator"); - -namespace ns3 { - - -AttributeIterator::AttributeIterator () -{ -} - -AttributeIterator::~AttributeIterator () -{ -} - -void -AttributeIterator::Iterate (void) -{ - for (uint32_t i = 0; i < Config::GetRootNamespaceObjectN (); ++i) - { - Ptr object = Config::GetRootNamespaceObject (i); - StartVisitObject (object); - DoIterate (object); - EndVisitObject (); - } - NS_ASSERT (m_currentPath.empty ()); - NS_ASSERT (m_examined.empty ()); -} - -bool -AttributeIterator::IsExamined (Ptr object) -{ - for (uint32_t i = 0; i < m_examined.size (); ++i) - { - if (object == m_examined[i]) - { - return true; - } - } - return false; -} - - -std::string -AttributeIterator::GetCurrentPath (std::string attr) const -{ - std::ostringstream oss; - for (uint32_t i = 0; i < m_currentPath.size (); ++i) - { - oss << "/" << m_currentPath[i]; - } - if (attr != "") - { - oss << "/" << attr; - } - return oss.str (); -} - -std::string -AttributeIterator::GetCurrentPath (void) const -{ - std::ostringstream oss; - for (uint32_t i = 0; i < m_currentPath.size (); ++i) - { - oss << "/" << m_currentPath[i]; - } - return oss.str (); -} - -void -AttributeIterator::DoStartVisitObject (Ptr object) -{ -} -void -AttributeIterator::DoEndVisitObject (void) -{ -} -void -AttributeIterator::DoStartVisitPointerAttribute (Ptr object, std::string name, Ptr item) -{ -} -void -AttributeIterator::DoEndVisitPointerAttribute (void) -{ -} -void -AttributeIterator::DoStartVisitArrayAttribute (Ptr object, std::string name, const ObjectVectorValue &vector) -{ -} -void -AttributeIterator::DoEndVisitArrayAttribute (void) -{ -} -void -AttributeIterator::DoStartVisitArrayItem (const ObjectVectorValue &vector, uint32_t index, Ptr item) -{ -} -void -AttributeIterator::DoEndVisitArrayItem (void) -{ -} - -void -AttributeIterator::VisitAttribute (Ptr object, std::string name) -{ - m_currentPath.push_back (name); - DoVisitAttribute (object, name); - m_currentPath.pop_back (); -} - -void -AttributeIterator::StartVisitObject (Ptr object) -{ - m_currentPath.push_back ("$" + object->GetInstanceTypeId ().GetName ()); - DoStartVisitObject (object); -} -void -AttributeIterator::EndVisitObject (void) -{ - m_currentPath.pop_back (); - DoEndVisitObject (); -} -void -AttributeIterator::StartVisitPointerAttribute (Ptr object, std::string name, Ptr value) -{ - m_currentPath.push_back (name); - m_currentPath.push_back ("$" + value->GetInstanceTypeId ().GetName ()); - DoStartVisitPointerAttribute (object, name, value); -} -void -AttributeIterator::EndVisitPointerAttribute (void) -{ - m_currentPath.pop_back (); - m_currentPath.pop_back (); - DoEndVisitPointerAttribute (); -} -void -AttributeIterator::StartVisitArrayAttribute (Ptr object, std::string name, const ObjectVectorValue &vector) -{ - m_currentPath.push_back (name); - DoStartVisitArrayAttribute (object, name, vector); -} -void -AttributeIterator::EndVisitArrayAttribute (void) -{ - m_currentPath.pop_back (); - DoEndVisitArrayAttribute (); -} - -void -AttributeIterator::StartVisitArrayItem (const ObjectVectorValue &vector, uint32_t index, Ptr item) -{ - std::ostringstream oss; - oss << index; - m_currentPath.push_back (oss.str ()); - m_currentPath.push_back ("$" + item->GetInstanceTypeId ().GetName ()); - DoStartVisitArrayItem (vector, index, item); -} -void -AttributeIterator::EndVisitArrayItem (void) -{ - m_currentPath.pop_back (); - m_currentPath.pop_back (); - DoEndVisitArrayItem (); -} - - -void -AttributeIterator::DoIterate (Ptr object) -{ - if (IsExamined (object)) - { - return; - } - TypeId tid; - for (tid = object->GetInstanceTypeId (); tid.HasParent (); tid = tid.GetParent ()) - { - NS_LOG_DEBUG ("store " << tid.GetName ()); - for (uint32_t i = 0; i < tid.GetAttributeN (); ++i) - { - Ptr checker = tid.GetAttributeChecker (i); - const PointerChecker *ptrChecker = dynamic_cast (PeekPointer (checker)); - if (ptrChecker != 0) - { - NS_LOG_DEBUG ("pointer attribute " << tid.GetAttributeName (i)); - PointerValue ptr; - object->GetAttribute (tid.GetAttributeName (i), ptr); - Ptr tmp = ptr.Get (); - if (tmp != 0) - { - StartVisitPointerAttribute (object, tid.GetAttributeName (i), - tmp); - m_examined.push_back (object); - DoIterate (tmp); - m_examined.pop_back (); - EndVisitPointerAttribute (); - } - continue; - } - // attempt to cast to an object vector. - const ObjectVectorChecker *vectorChecker = dynamic_cast (PeekPointer (checker)); - if (vectorChecker != 0) - { - NS_LOG_DEBUG ("vector attribute " << tid.GetAttributeName (i)); - ObjectVectorValue vector; - object->GetAttribute (tid.GetAttributeName (i), vector); - StartVisitArrayAttribute (object, tid.GetAttributeName (i), vector); - for (uint32_t j = 0; j < vector.GetN (); ++j) - { - NS_LOG_DEBUG ("vector attribute item " << j); - Ptr tmp = vector.Get (j); - StartVisitArrayItem (vector, j, tmp); - m_examined.push_back (object); - DoIterate (tmp); - m_examined.pop_back (); - EndVisitArrayItem (); - } - EndVisitArrayAttribute (); - continue; - } - uint32_t flags = tid.GetAttributeFlags (i); - Ptr accessor = tid.GetAttributeAccessor (i); - if ((flags & TypeId::ATTR_GET) && accessor->HasGetter () && - (flags & TypeId::ATTR_SET) && accessor->HasSetter ()) - { - VisitAttribute (object, tid.GetAttributeName (i)); - } - else - { - NS_LOG_DEBUG ("could not store " << tid.GetAttributeName (i)); - } - } - } - Object::AggregateIterator iter = object->GetAggregateIterator (); - bool recursiveAggregate = false; - while (iter.HasNext ()) - { - Ptr tmp = iter.Next (); - if (IsExamined (tmp)) - { - recursiveAggregate = true; - } - } - if (!recursiveAggregate) - { - iter = object->GetAggregateIterator (); - while (iter.HasNext ()) - { - Ptr tmp = const_cast (PeekPointer (iter.Next ())); - StartVisitObject (tmp); - m_examined.push_back (object); - DoIterate (tmp); - m_examined.pop_back (); - EndVisitObject (); - } - } -} - - -} // namespace ns3 diff -r afe2960e58b7 -r 9d2c79c992d7 src/contrib/attribute-iterator.h --- a/src/contrib/attribute-iterator.h Thu Mar 24 15:11:56 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,72 +0,0 @@ -/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ -/* - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation; - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * Author: Mathieu Lacage - */ - -#ifndef ATTRIBUTE_ITERATOR_H -#define ATTRIBUTE_ITERATOR_H - -#include "ns3/ptr.h" -#include "ns3/object.h" -#include - -namespace ns3 { - -class ObjectVectorValue; - -// This class is used internally by ConfigStore and GtkConfigStore. -class AttributeIterator -{ -public: - AttributeIterator (); - virtual ~AttributeIterator (); - - void Iterate (void); -protected: - std::string GetCurrentPath (void) const; -private: - virtual void DoVisitAttribute (Ptr object, std::string name) = 0; - virtual void DoStartVisitObject (Ptr object); - virtual void DoEndVisitObject (void); - virtual void DoStartVisitPointerAttribute (Ptr object, std::string name, Ptr value); - virtual void DoEndVisitPointerAttribute (void); - virtual void DoStartVisitArrayAttribute (Ptr object, std::string name, const ObjectVectorValue &vector); - virtual void DoEndVisitArrayAttribute (void); - virtual void DoStartVisitArrayItem (const ObjectVectorValue &vector, uint32_t index, Ptr item); - virtual void DoEndVisitArrayItem (void); - - void DoIterate (Ptr object); - bool IsExamined (Ptr object); - std::string GetCurrentPath (std::string attr) const; - - void VisitAttribute (Ptr object, std::string name); - void StartVisitObject (Ptr object); - void EndVisitObject (void); - void StartVisitPointerAttribute (Ptr object, std::string name, Ptr value); - void EndVisitPointerAttribute (void); - void StartVisitArrayAttribute (Ptr object, std::string name, const ObjectVectorValue &vector); - void EndVisitArrayAttribute (void); - void StartVisitArrayItem (const ObjectVectorValue &vector, uint32_t index, Ptr item); - void EndVisitArrayItem (void); - - - std::vector > m_examined; - std::vector m_currentPath; -}; - -} // namespace ns3 - -#endif /* ATTRIBUTE_ITERATOR_H */ diff -r afe2960e58b7 -r 9d2c79c992d7 src/contrib/average.h --- a/src/contrib/average.h Thu Mar 24 15:11:56 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,113 +0,0 @@ -/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ -/* - * Copyright (c) 2009 IITP RAS - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation; - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * Authors: Pavel Boyko - * Corrections and extensions: Timo Bingmann - */ - -#ifndef AVERAGE_H -#define AVERAGE_H -#include -#include -#include -#include - -namespace ns3 { - -/// Simple average, min, max and std. deviation calculator -template -class Average -{ -public: - Average () - : m_size (0), m_min (std::numeric_limits::max ()), m_max (0), - m_avg (0), m_avg2 (0) - { - } - - /// Add new sample - void Update (T const & x) - { - m_min = std::min (x, m_min); - m_max = std::max (x, m_max); - m_avg = (m_size * m_avg + x) / (m_size + 1); - m_avg2 = (m_size * m_avg2 + x * x) / (m_size + 1); - m_size++; - } - /// Reset statistics - void Reset () - { - m_size = 0; - m_min = std::numeric_limits::max (); - m_max = 0; - m_avg = 0; - m_avg2 = 0; - } - - ///\name Sample statistics - //\{ - /// Sample size - uint32_t Count () const { return m_size; } - /// Minimum - T Min () const { return m_min; } - /// Maximum - T Max () const { return m_max; } - /// Sample average - double Avg () const { return m_avg; } - /// Estimate of mean, alias to Avg - double Mean () const { return Avg (); } - /// Unbiased estimate of variance - double Var () const { return Count() / (double)(Count() - 1) * (m_avg2 - m_avg*m_avg); } - /// Standard deviation - double Stddev () const { return sqrt (Var ());} - //\} - - /** - * \name Error of the mean estimates - * - * Note that estimates are valid for - * - uncorrelated measurements, - * - normal distribution and - * - large enough sample size. - */ - //\{ - /// Margin of error of the mean for 90% confidence level - double Error90() const { return 1.645 * sqrt (Var () / Count ()); } - /// Margin of error of the mean for 95% confidence level - double Error95() const { return 1.960 * sqrt (Var () / Count ()); } - /// Margin of error of the mean for 99% confidence level - double Error99() const { return 2.576 * sqrt (Var () / Count ()); } - //\} - -private: - uint32_t m_size; - T m_min, m_max; - double m_avg, m_avg2; -}; - -/// Print avg (err) [min, max] -template -std::ostream & operator<< (std::ostream & os, Average const & x) -{ - if (x.Count () != 0) - os << x.Avg () << " (" << x.Stddev () << ") [" << x.Min () << ", " << x.Max () << "]"; - else - os << "NA"; // not available - return os; -} -} -#endif /* AVERAGE_H */ diff -r afe2960e58b7 -r 9d2c79c992d7 src/contrib/bindings/callbacks_list.py --- a/src/contrib/bindings/callbacks_list.py Thu Mar 24 15:11:56 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,2 +0,0 @@ -callback_classes = [ -] diff -r afe2960e58b7 -r 9d2c79c992d7 src/contrib/bindings/modulegen__gcc_ILP32.py --- a/src/contrib/bindings/modulegen__gcc_ILP32.py Thu Mar 24 15:11:56 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,2794 +0,0 @@ -from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers - - -import pybindgen.settings -import warnings - -class ErrorHandler(pybindgen.settings.ErrorHandler): - def handle_error(self, wrapper, exception, traceback_): - warnings.warn("exception %r in wrapper %s" % (exception, wrapper)) - return True -pybindgen.settings.error_handler = ErrorHandler() - - -import sys - -def module_init(): - root_module = Module('ns.contrib', cpp_namespace='::ns3') - return root_module - -def register_types(module): - root_module = module.get_root() - - ## attribute-list.h (module 'core'): ns3::AttributeList [class] - module.add_class('AttributeList', import_from_module='ns.core') - ## buffer.h (module 'network'): ns3::Buffer [class] - module.add_class('Buffer', import_from_module='ns.network') - ## buffer.h (module 'network'): ns3::Buffer::Iterator [class] - module.add_class('Iterator', import_from_module='ns.network', outer_class=root_module['ns3::Buffer']) - ## packet.h (module 'network'): ns3::ByteTagIterator [class] - module.add_class('ByteTagIterator', import_from_module='ns.network') - ## packet.h (module 'network'): ns3::ByteTagIterator::Item [class] - module.add_class('Item', import_from_module='ns.network', outer_class=root_module['ns3::ByteTagIterator']) - ## byte-tag-list.h (module 'network'): ns3::ByteTagList [class] - module.add_class('ByteTagList', import_from_module='ns.network') - ## byte-tag-list.h (module 'network'): ns3::ByteTagList::Iterator [class] - module.add_class('Iterator', import_from_module='ns.network', outer_class=root_module['ns3::ByteTagList']) - ## byte-tag-list.h (module 'network'): ns3::ByteTagList::Iterator::Item [struct] - module.add_class('Item', import_from_module='ns.network', outer_class=root_module['ns3::ByteTagList::Iterator']) - ## callback.h (module 'core'): ns3::CallbackBase [class] - module.add_class('CallbackBase', import_from_module='ns.core') - ## delay-jitter-estimation.h (module 'contrib'): ns3::DelayJitterEstimation [class] - module.add_class('DelayJitterEstimation') - ## event-garbage-collector.h (module 'contrib'): ns3::EventGarbageCollector [class] - module.add_class('EventGarbageCollector') - ## event-id.h (module 'core'): ns3::EventId [class] - module.add_class('EventId', import_from_module='ns.core') - ## file-config.h (module 'contrib'): ns3::FileConfig [class] - module.add_class('FileConfig', allow_subclassing=True) - ## gnuplot.h (module 'contrib'): ns3::Gnuplot [class] - module.add_class('Gnuplot') - ## gnuplot.h (module 'contrib'): ns3::GnuplotCollection [class] - module.add_class('GnuplotCollection') - ## gnuplot.h (module 'contrib'): ns3::GnuplotDataset [class] - module.add_class('GnuplotDataset') - ## high-precision-128.h (module 'core'): ns3::HighPrecision [class] - module.add_class('HighPrecision', import_from_module='ns.core') - ## file-config.h (module 'contrib'): ns3::NoneFileConfig [class] - module.add_class('NoneFileConfig', parent=root_module['ns3::FileConfig']) - ## object-base.h (module 'core'): ns3::ObjectBase [class] - module.add_class('ObjectBase', allow_subclassing=True, import_from_module='ns.core') - ## object.h (module 'core'): ns3::ObjectDeleter [struct] - module.add_class('ObjectDeleter', import_from_module='ns.core') - ## object-factory.h (module 'core'): ns3::ObjectFactory [class] - module.add_class('ObjectFactory', import_from_module='ns.core') - ## packet-metadata.h (module 'network'): ns3::PacketMetadata [class] - module.add_class('PacketMetadata', import_from_module='ns.network') - ## packet-metadata.h (module 'network'): ns3::PacketMetadata::Item [struct] - module.add_class('Item', import_from_module='ns.network', outer_class=root_module['ns3::PacketMetadata']) - ## packet-metadata.h (module 'network'): ns3::PacketMetadata::Item [enumeration] - module.add_enum('', ['PAYLOAD', 'HEADER', 'TRAILER'], outer_class=root_module['ns3::PacketMetadata::Item'], import_from_module='ns.network') - ## packet-metadata.h (module 'network'): ns3::PacketMetadata::ItemIterator [class] - module.add_class('ItemIterator', import_from_module='ns.network', outer_class=root_module['ns3::PacketMetadata']) - ## packet.h (module 'network'): ns3::PacketTagIterator [class] - module.add_class('PacketTagIterator', import_from_module='ns.network') - ## packet.h (module 'network'): ns3::PacketTagIterator::Item [class] - module.add_class('Item', import_from_module='ns.network', outer_class=root_module['ns3::PacketTagIterator']) - ## packet-tag-list.h (module 'network'): ns3::PacketTagList [class] - module.add_class('PacketTagList', import_from_module='ns.network') - ## packet-tag-list.h (module 'network'): ns3::PacketTagList::TagData [struct] - module.add_class('TagData', import_from_module='ns.network', outer_class=root_module['ns3::PacketTagList']) - ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount [class] - module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::Object', 'ns3::ObjectBase', 'ns3::ObjectDeleter'], parent=root_module['ns3::ObjectBase'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) - ## simulator.h (module 'core'): ns3::Simulator [class] - module.add_class('Simulator', is_singleton=True, import_from_module='ns.core') - ## tag.h (module 'network'): ns3::Tag [class] - module.add_class('Tag', import_from_module='ns.network', parent=root_module['ns3::ObjectBase']) - ## tag-buffer.h (module 'network'): ns3::TagBuffer [class] - module.add_class('TagBuffer', import_from_module='ns.network') - ## nstime.h (module 'core'): ns3::Time [class] - module.add_class('Time', import_from_module='ns.core') - ## nstime.h (module 'core'): ns3::Time::Unit [enumeration] - module.add_enum('Unit', ['S', 'MS', 'US', 'NS', 'PS', 'FS', 'LAST'], outer_class=root_module['ns3::Time'], import_from_module='ns.core') - ## type-id.h (module 'core'): ns3::TypeId [class] - module.add_class('TypeId', import_from_module='ns.core') - ## type-id.h (module 'core'): ns3::TypeId::AttributeFlag [enumeration] - module.add_enum('AttributeFlag', ['ATTR_GET', 'ATTR_SET', 'ATTR_CONSTRUCT', 'ATTR_SGC'], outer_class=root_module['ns3::TypeId'], import_from_module='ns.core') - ## type-id.h (module 'core'): ns3::TypeId::AttributeInfo [struct] - module.add_class('AttributeInfo', import_from_module='ns.core', outer_class=root_module['ns3::TypeId']) - ## attribute-list.h (module 'core'): ns3::UnsafeAttributeList [class] - module.add_class('UnsafeAttributeList', import_from_module='ns.core') - ## empty.h (module 'core'): ns3::empty [class] - module.add_class('empty', import_from_module='ns.core') - ## chunk.h (module 'network'): ns3::Chunk [class] - module.add_class('Chunk', import_from_module='ns.network', parent=root_module['ns3::ObjectBase']) - ## config-store.h (module 'contrib'): ns3::ConfigStore [class] - module.add_class('ConfigStore', parent=root_module['ns3::ObjectBase']) - ## config-store.h (module 'contrib'): ns3::ConfigStore::Mode [enumeration] - module.add_enum('Mode', ['LOAD', 'SAVE', 'NONE'], outer_class=root_module['ns3::ConfigStore']) - ## config-store.h (module 'contrib'): ns3::ConfigStore::FileFormat [enumeration] - module.add_enum('FileFormat', ['XML', 'RAW_TEXT'], outer_class=root_module['ns3::ConfigStore']) - ## flow-id-tag.h (module 'contrib'): ns3::FlowIdTag [class] - module.add_class('FlowIdTag', parent=root_module['ns3::Tag']) - ## gnuplot.h (module 'contrib'): ns3::Gnuplot2dDataset [class] - module.add_class('Gnuplot2dDataset', parent=root_module['ns3::GnuplotDataset']) - ## gnuplot.h (module 'contrib'): ns3::Gnuplot2dDataset::Style [enumeration] - module.add_enum('Style', ['LINES', 'POINTS', 'LINES_POINTS', 'DOTS', 'IMPULSES', 'STEPS', 'FSTEPS', 'HISTEPS'], outer_class=root_module['ns3::Gnuplot2dDataset']) - ## gnuplot.h (module 'contrib'): ns3::Gnuplot2dDataset::ErrorBars [enumeration] - module.add_enum('ErrorBars', ['NONE', 'X', 'Y', 'XY'], outer_class=root_module['ns3::Gnuplot2dDataset']) - ## gnuplot.h (module 'contrib'): ns3::Gnuplot2dFunction [class] - module.add_class('Gnuplot2dFunction', parent=root_module['ns3::GnuplotDataset']) - ## gnuplot.h (module 'contrib'): ns3::Gnuplot3dDataset [class] - module.add_class('Gnuplot3dDataset', parent=root_module['ns3::GnuplotDataset']) - ## gnuplot.h (module 'contrib'): ns3::Gnuplot3dFunction [class] - module.add_class('Gnuplot3dFunction', parent=root_module['ns3::GnuplotDataset']) - ## header.h (module 'network'): ns3::Header [class] - module.add_class('Header', import_from_module='ns.network', parent=root_module['ns3::Chunk']) - ## object.h (module 'core'): ns3::Object [class] - module.add_class('Object', import_from_module='ns.core', parent=root_module['ns3::SimpleRefCount< ns3::Object, ns3::ObjectBase, ns3::ObjectDeleter >']) - ## object.h (module 'core'): ns3::Object::AggregateIterator [class] - module.add_class('AggregateIterator', import_from_module='ns.core', outer_class=root_module['ns3::Object']) - ## nstime.h (module 'core'): ns3::Scalar [class] - module.add_class('Scalar', import_from_module='ns.core') - ## nstime.h (module 'core'): ns3::Scalar [class] - root_module['ns3::Scalar'].implicitly_converts_to(root_module['ns3::Time']) - ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount > [class] - module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::AttributeAccessor', 'ns3::empty', 'ns3::DefaultDeleter'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) - ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount > [class] - module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::AttributeChecker', 'ns3::empty', 'ns3::DefaultDeleter'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) - ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount > [class] - module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::AttributeValue', 'ns3::empty', 'ns3::DefaultDeleter'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) - ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount > [class] - module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::CallbackImplBase', 'ns3::empty', 'ns3::DefaultDeleter'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) - ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount > [class] - module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::EventImpl', 'ns3::empty', 'ns3::DefaultDeleter'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) - ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount > [class] - module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::NixVector', 'ns3::empty', 'ns3::DefaultDeleter'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) - ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount > [class] - module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::Packet', 'ns3::empty', 'ns3::DefaultDeleter'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) - ## trailer.h (module 'network'): ns3::Trailer [class] - module.add_class('Trailer', import_from_module='ns.network', parent=root_module['ns3::Chunk']) - ## attribute.h (module 'core'): ns3::AttributeAccessor [class] - module.add_class('AttributeAccessor', import_from_module='ns.core', parent=root_module['ns3::SimpleRefCount< ns3::AttributeAccessor, ns3::empty, ns3::DefaultDeleter >']) - ## attribute.h (module 'core'): ns3::AttributeChecker [class] - module.add_class('AttributeChecker', allow_subclassing=False, automatic_type_narrowing=True, import_from_module='ns.core', parent=root_module['ns3::SimpleRefCount< ns3::AttributeChecker, ns3::empty, ns3::DefaultDeleter >']) - ## attribute.h (module 'core'): ns3::AttributeValue [class] - module.add_class('AttributeValue', allow_subclassing=False, automatic_type_narrowing=True, import_from_module='ns.core', parent=root_module['ns3::SimpleRefCount< ns3::AttributeValue, ns3::empty, ns3::DefaultDeleter >']) - ## callback.h (module 'core'): ns3::CallbackChecker [class] - module.add_class('CallbackChecker', import_from_module='ns.core', parent=root_module['ns3::AttributeChecker']) - ## callback.h (module 'core'): ns3::CallbackImplBase [class] - module.add_class('CallbackImplBase', import_from_module='ns.core', parent=root_module['ns3::SimpleRefCount< ns3::CallbackImplBase, ns3::empty, ns3::DefaultDeleter >']) - ## callback.h (module 'core'): ns3::CallbackValue [class] - module.add_class('CallbackValue', import_from_module='ns.core', parent=root_module['ns3::AttributeValue']) - ## attribute.h (module 'core'): ns3::EmptyAttributeValue [class] - module.add_class('EmptyAttributeValue', import_from_module='ns.core', parent=root_module['ns3::AttributeValue']) - ## event-impl.h (module 'core'): ns3::EventImpl [class] - module.add_class('EventImpl', import_from_module='ns.core', parent=root_module['ns3::SimpleRefCount< ns3::EventImpl, ns3::empty, ns3::DefaultDeleter >']) - ## nix-vector.h (module 'network'): ns3::NixVector [class] - module.add_class('NixVector', import_from_module='ns.network', parent=root_module['ns3::SimpleRefCount< ns3::NixVector, ns3::empty, ns3::DefaultDeleter >']) - ## object-factory.h (module 'core'): ns3::ObjectFactoryChecker [class] - module.add_class('ObjectFactoryChecker', import_from_module='ns.core', parent=root_module['ns3::AttributeChecker']) - ## object-factory.h (module 'core'): ns3::ObjectFactoryValue [class] - module.add_class('ObjectFactoryValue', import_from_module='ns.core', parent=root_module['ns3::AttributeValue']) - ## packet.h (module 'network'): ns3::Packet [class] - module.add_class('Packet', import_from_module='ns.network', parent=root_module['ns3::SimpleRefCount< ns3::Packet, ns3::empty, ns3::DefaultDeleter >']) - ## nstime.h (module 'core'): ns3::TimeChecker [class] - module.add_class('TimeChecker', import_from_module='ns.core', parent=root_module['ns3::AttributeChecker']) - ## nstime.h (module 'core'): ns3::TimeValue [class] - module.add_class('TimeValue', import_from_module='ns.core', parent=root_module['ns3::AttributeValue']) - ## type-id.h (module 'core'): ns3::TypeIdChecker [class] - module.add_class('TypeIdChecker', import_from_module='ns.core', parent=root_module['ns3::AttributeChecker']) - ## type-id.h (module 'core'): ns3::TypeIdValue [class] - module.add_class('TypeIdValue', import_from_module='ns.core', parent=root_module['ns3::AttributeValue']) - typehandlers.add_type_alias('ns3::Time', 'ns3::TimeSquare') - typehandlers.add_type_alias('ns3::Time*', 'ns3::TimeSquare*') - typehandlers.add_type_alias('ns3::Time&', 'ns3::TimeSquare&') - module.add_typedef(root_module['ns3::Time'], 'TimeSquare') - typehandlers.add_type_alias('ns3::Time', 'ns3::TimeInvert') - typehandlers.add_type_alias('ns3::Time*', 'ns3::TimeInvert*') - typehandlers.add_type_alias('ns3::Time&', 'ns3::TimeInvert&') - module.add_typedef(root_module['ns3::Time'], 'TimeInvert') - - ## Register a nested module for the namespace FatalImpl - - nested_module = module.add_cpp_namespace('FatalImpl') - register_types_ns3_FatalImpl(nested_module) - - -def register_types_ns3_FatalImpl(module): - root_module = module.get_root() - - -def register_methods(root_module): - register_Ns3AttributeList_methods(root_module, root_module['ns3::AttributeList']) - register_Ns3Buffer_methods(root_module, root_module['ns3::Buffer']) - register_Ns3BufferIterator_methods(root_module, root_module['ns3::Buffer::Iterator']) - register_Ns3ByteTagIterator_methods(root_module, root_module['ns3::ByteTagIterator']) - register_Ns3ByteTagIteratorItem_methods(root_module, root_module['ns3::ByteTagIterator::Item']) - register_Ns3ByteTagList_methods(root_module, root_module['ns3::ByteTagList']) - register_Ns3ByteTagListIterator_methods(root_module, root_module['ns3::ByteTagList::Iterator']) - register_Ns3ByteTagListIteratorItem_methods(root_module, root_module['ns3::ByteTagList::Iterator::Item']) - register_Ns3CallbackBase_methods(root_module, root_module['ns3::CallbackBase']) - register_Ns3DelayJitterEstimation_methods(root_module, root_module['ns3::DelayJitterEstimation']) - register_Ns3EventGarbageCollector_methods(root_module, root_module['ns3::EventGarbageCollector']) - register_Ns3EventId_methods(root_module, root_module['ns3::EventId']) - register_Ns3FileConfig_methods(root_module, root_module['ns3::FileConfig']) - register_Ns3Gnuplot_methods(root_module, root_module['ns3::Gnuplot']) - register_Ns3GnuplotCollection_methods(root_module, root_module['ns3::GnuplotCollection']) - register_Ns3GnuplotDataset_methods(root_module, root_module['ns3::GnuplotDataset']) - register_Ns3HighPrecision_methods(root_module, root_module['ns3::HighPrecision']) - register_Ns3NoneFileConfig_methods(root_module, root_module['ns3::NoneFileConfig']) - register_Ns3ObjectBase_methods(root_module, root_module['ns3::ObjectBase']) - register_Ns3ObjectDeleter_methods(root_module, root_module['ns3::ObjectDeleter']) - register_Ns3ObjectFactory_methods(root_module, root_module['ns3::ObjectFactory']) - register_Ns3PacketMetadata_methods(root_module, root_module['ns3::PacketMetadata']) - register_Ns3PacketMetadataItem_methods(root_module, root_module['ns3::PacketMetadata::Item']) - register_Ns3PacketMetadataItemIterator_methods(root_module, root_module['ns3::PacketMetadata::ItemIterator']) - register_Ns3PacketTagIterator_methods(root_module, root_module['ns3::PacketTagIterator']) - register_Ns3PacketTagIteratorItem_methods(root_module, root_module['ns3::PacketTagIterator::Item']) - register_Ns3PacketTagList_methods(root_module, root_module['ns3::PacketTagList']) - register_Ns3PacketTagListTagData_methods(root_module, root_module['ns3::PacketTagList::TagData']) - register_Ns3SimpleRefCount__Ns3Object_Ns3ObjectBase_Ns3ObjectDeleter_methods(root_module, root_module['ns3::SimpleRefCount< ns3::Object, ns3::ObjectBase, ns3::ObjectDeleter >']) - register_Ns3Simulator_methods(root_module, root_module['ns3::Simulator']) - register_Ns3Tag_methods(root_module, root_module['ns3::Tag']) - register_Ns3TagBuffer_methods(root_module, root_module['ns3::TagBuffer']) - register_Ns3Time_methods(root_module, root_module['ns3::Time']) - register_Ns3TypeId_methods(root_module, root_module['ns3::TypeId']) - register_Ns3TypeIdAttributeInfo_methods(root_module, root_module['ns3::TypeId::AttributeInfo']) - register_Ns3UnsafeAttributeList_methods(root_module, root_module['ns3::UnsafeAttributeList']) - register_Ns3Empty_methods(root_module, root_module['ns3::empty']) - register_Ns3Chunk_methods(root_module, root_module['ns3::Chunk']) - register_Ns3ConfigStore_methods(root_module, root_module['ns3::ConfigStore']) - register_Ns3FlowIdTag_methods(root_module, root_module['ns3::FlowIdTag']) - register_Ns3Gnuplot2dDataset_methods(root_module, root_module['ns3::Gnuplot2dDataset']) - register_Ns3Gnuplot2dFunction_methods(root_module, root_module['ns3::Gnuplot2dFunction']) - register_Ns3Gnuplot3dDataset_methods(root_module, root_module['ns3::Gnuplot3dDataset']) - register_Ns3Gnuplot3dFunction_methods(root_module, root_module['ns3::Gnuplot3dFunction']) - register_Ns3Header_methods(root_module, root_module['ns3::Header']) - register_Ns3Object_methods(root_module, root_module['ns3::Object']) - register_Ns3ObjectAggregateIterator_methods(root_module, root_module['ns3::Object::AggregateIterator']) - register_Ns3Scalar_methods(root_module, root_module['ns3::Scalar']) - register_Ns3SimpleRefCount__Ns3AttributeAccessor_Ns3Empty_Ns3DefaultDeleter__lt__ns3AttributeAccessor__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::AttributeAccessor, ns3::empty, ns3::DefaultDeleter >']) - register_Ns3SimpleRefCount__Ns3AttributeChecker_Ns3Empty_Ns3DefaultDeleter__lt__ns3AttributeChecker__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::AttributeChecker, ns3::empty, ns3::DefaultDeleter >']) - register_Ns3SimpleRefCount__Ns3AttributeValue_Ns3Empty_Ns3DefaultDeleter__lt__ns3AttributeValue__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::AttributeValue, ns3::empty, ns3::DefaultDeleter >']) - register_Ns3SimpleRefCount__Ns3CallbackImplBase_Ns3Empty_Ns3DefaultDeleter__lt__ns3CallbackImplBase__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::CallbackImplBase, ns3::empty, ns3::DefaultDeleter >']) - register_Ns3SimpleRefCount__Ns3EventImpl_Ns3Empty_Ns3DefaultDeleter__lt__ns3EventImpl__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::EventImpl, ns3::empty, ns3::DefaultDeleter >']) - register_Ns3SimpleRefCount__Ns3NixVector_Ns3Empty_Ns3DefaultDeleter__lt__ns3NixVector__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::NixVector, ns3::empty, ns3::DefaultDeleter >']) - register_Ns3SimpleRefCount__Ns3Packet_Ns3Empty_Ns3DefaultDeleter__lt__ns3Packet__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::Packet, ns3::empty, ns3::DefaultDeleter >']) - register_Ns3Trailer_methods(root_module, root_module['ns3::Trailer']) - register_Ns3AttributeAccessor_methods(root_module, root_module['ns3::AttributeAccessor']) - register_Ns3AttributeChecker_methods(root_module, root_module['ns3::AttributeChecker']) - register_Ns3AttributeValue_methods(root_module, root_module['ns3::AttributeValue']) - register_Ns3CallbackChecker_methods(root_module, root_module['ns3::CallbackChecker']) - register_Ns3CallbackImplBase_methods(root_module, root_module['ns3::CallbackImplBase']) - register_Ns3CallbackValue_methods(root_module, root_module['ns3::CallbackValue']) - register_Ns3EmptyAttributeValue_methods(root_module, root_module['ns3::EmptyAttributeValue']) - register_Ns3EventImpl_methods(root_module, root_module['ns3::EventImpl']) - register_Ns3NixVector_methods(root_module, root_module['ns3::NixVector']) - register_Ns3ObjectFactoryChecker_methods(root_module, root_module['ns3::ObjectFactoryChecker']) - register_Ns3ObjectFactoryValue_methods(root_module, root_module['ns3::ObjectFactoryValue']) - register_Ns3Packet_methods(root_module, root_module['ns3::Packet']) - register_Ns3TimeChecker_methods(root_module, root_module['ns3::TimeChecker']) - register_Ns3TimeValue_methods(root_module, root_module['ns3::TimeValue']) - register_Ns3TypeIdChecker_methods(root_module, root_module['ns3::TypeIdChecker']) - register_Ns3TypeIdValue_methods(root_module, root_module['ns3::TypeIdValue']) - return - -def register_Ns3AttributeList_methods(root_module, cls): - ## attribute-list.h (module 'core'): ns3::AttributeList::AttributeList() [constructor] - cls.add_constructor([]) - ## attribute-list.h (module 'core'): ns3::AttributeList::AttributeList(ns3::AttributeList const & o) [copy constructor] - cls.add_constructor([param('ns3::AttributeList const &', 'o')]) - ## attribute-list.h (module 'core'): bool ns3::AttributeList::DeserializeFromString(std::string value) [member function] - cls.add_method('DeserializeFromString', - 'bool', - [param('std::string', 'value')]) - ## attribute-list.h (module 'core'): static ns3::AttributeList * ns3::AttributeList::GetGlobal() [member function] - cls.add_method('GetGlobal', - 'ns3::AttributeList *', - [], - is_static=True) - ## attribute-list.h (module 'core'): void ns3::AttributeList::Reset() [member function] - cls.add_method('Reset', - 'void', - []) - ## attribute-list.h (module 'core'): std::string ns3::AttributeList::SerializeToString() const [member function] - cls.add_method('SerializeToString', - 'std::string', - [], - is_const=True) - ## attribute-list.h (module 'core'): void ns3::AttributeList::Set(std::string name, ns3::AttributeValue const & value) [member function] - cls.add_method('Set', - 'void', - [param('std::string', 'name'), param('ns3::AttributeValue const &', 'value')]) - ## attribute-list.h (module 'core'): bool ns3::AttributeList::SetFailSafe(std::string name, ns3::AttributeValue const & value) [member function] - cls.add_method('SetFailSafe', - 'bool', - [param('std::string', 'name'), param('ns3::AttributeValue const &', 'value')]) - ## attribute-list.h (module 'core'): void ns3::AttributeList::SetWithTid(ns3::TypeId tid, std::string name, ns3::AttributeValue const & value) [member function] - cls.add_method('SetWithTid', - 'void', - [param('ns3::TypeId', 'tid'), param('std::string', 'name'), param('ns3::AttributeValue const &', 'value')]) - return - -def register_Ns3Buffer_methods(root_module, cls): - ## buffer.h (module 'network'): ns3::Buffer::Buffer() [constructor] - cls.add_constructor([]) - ## buffer.h (module 'network'): ns3::Buffer::Buffer(uint32_t dataSize) [constructor] - cls.add_constructor([param('uint32_t', 'dataSize')]) - ## buffer.h (module 'network'): ns3::Buffer::Buffer(uint32_t dataSize, bool initialize) [constructor] - cls.add_constructor([param('uint32_t', 'dataSize'), param('bool', 'initialize')]) - ## buffer.h (module 'network'): ns3::Buffer::Buffer(ns3::Buffer const & o) [copy constructor] - cls.add_constructor([param('ns3::Buffer const &', 'o')]) - ## buffer.h (module 'network'): bool ns3::Buffer::AddAtEnd(uint32_t end) [member function] - cls.add_method('AddAtEnd', - 'bool', - [param('uint32_t', 'end')]) - ## buffer.h (module 'network'): void ns3::Buffer::AddAtEnd(ns3::Buffer const & o) [member function] - cls.add_method('AddAtEnd', - 'void', - [param('ns3::Buffer const &', 'o')]) - ## buffer.h (module 'network'): bool ns3::Buffer::AddAtStart(uint32_t start) [member function] - cls.add_method('AddAtStart', - 'bool', - [param('uint32_t', 'start')]) - ## buffer.h (module 'network'): ns3::Buffer::Iterator ns3::Buffer::Begin() const [member function] - cls.add_method('Begin', - 'ns3::Buffer::Iterator', - [], - is_const=True) - ## buffer.h (module 'network'): void ns3::Buffer::CopyData(std::ostream * os, uint32_t size) const [member function] - cls.add_method('CopyData', - 'void', - [param('std::ostream *', 'os'), param('uint32_t', 'size')], - is_const=True) - ## buffer.h (module 'network'): uint32_t ns3::Buffer::CopyData(uint8_t * buffer, uint32_t size) const [member function] - cls.add_method('CopyData', - 'uint32_t', - [param('uint8_t *', 'buffer'), param('uint32_t', 'size')], - is_const=True) - ## buffer.h (module 'network'): ns3::Buffer ns3::Buffer::CreateFragment(uint32_t start, uint32_t length) const [member function] - cls.add_method('CreateFragment', - 'ns3::Buffer', - [param('uint32_t', 'start'), param('uint32_t', 'length')], - is_const=True) - ## buffer.h (module 'network'): ns3::Buffer ns3::Buffer::CreateFullCopy() const [member function] - cls.add_method('CreateFullCopy', - 'ns3::Buffer', - [], - is_const=True) - ## buffer.h (module 'network'): uint32_t ns3::Buffer::Deserialize(uint8_t const * buffer, uint32_t size) [member function] - cls.add_method('Deserialize', - 'uint32_t', - [param('uint8_t const *', 'buffer'), param('uint32_t', 'size')]) - ## buffer.h (module 'network'): ns3::Buffer::Iterator ns3::Buffer::End() const [member function] - cls.add_method('End', - 'ns3::Buffer::Iterator', - [], - is_const=True) - ## buffer.h (module 'network'): int32_t ns3::Buffer::GetCurrentEndOffset() const [member function] - cls.add_method('GetCurrentEndOffset', - 'int32_t', - [], - is_const=True) - ## buffer.h (module 'network'): int32_t ns3::Buffer::GetCurrentStartOffset() const [member function] - cls.add_method('GetCurrentStartOffset', - 'int32_t', - [], - is_const=True) - ## buffer.h (module 'network'): uint32_t ns3::Buffer::GetSerializedSize() const [member function] - cls.add_method('GetSerializedSize', - 'uint32_t', - [], - is_const=True) - ## buffer.h (module 'network'): uint32_t ns3::Buffer::GetSize() const [member function] - cls.add_method('GetSize', - 'uint32_t', - [], - is_const=True) - ## buffer.h (module 'network'): uint8_t const * ns3::Buffer::PeekData() const [member function] - cls.add_method('PeekData', - 'uint8_t const *', - [], - is_const=True) - ## buffer.h (module 'network'): void ns3::Buffer::RemoveAtEnd(uint32_t end) [member function] - cls.add_method('RemoveAtEnd', - 'void', - [param('uint32_t', 'end')]) - ## buffer.h (module 'network'): void ns3::Buffer::RemoveAtStart(uint32_t start) [member function] - cls.add_method('RemoveAtStart', - 'void', - [param('uint32_t', 'start')]) - ## buffer.h (module 'network'): uint32_t ns3::Buffer::Serialize(uint8_t * buffer, uint32_t maxSize) const [member function] - cls.add_method('Serialize', - 'uint32_t', - [param('uint8_t *', 'buffer'), param('uint32_t', 'maxSize')], - is_const=True) - return - -def register_Ns3BufferIterator_methods(root_module, cls): - ## buffer.h (module 'network'): ns3::Buffer::Iterator::Iterator(ns3::Buffer::Iterator const & arg0) [copy constructor] - cls.add_constructor([param('ns3::Buffer::Iterator const &', 'arg0')]) - ## buffer.h (module 'network'): ns3::Buffer::Iterator::Iterator() [constructor] - cls.add_constructor([]) - ## buffer.h (module 'network'): uint16_t ns3::Buffer::Iterator::CalculateIpChecksum(uint16_t size) [member function] - cls.add_method('CalculateIpChecksum', - 'uint16_t', - [param('uint16_t', 'size')]) - ## buffer.h (module 'network'): uint16_t ns3::Buffer::Iterator::CalculateIpChecksum(uint16_t size, uint32_t initialChecksum) [member function] - cls.add_method('CalculateIpChecksum', - 'uint16_t', - [param('uint16_t', 'size'), param('uint32_t', 'initialChecksum')]) - ## buffer.h (module 'network'): uint32_t ns3::Buffer::Iterator::GetDistanceFrom(ns3::Buffer::Iterator const & o) const [member function] - cls.add_method('GetDistanceFrom', - 'uint32_t', - [param('ns3::Buffer::Iterator const &', 'o')], - is_const=True) - ## buffer.h (module 'network'): uint32_t ns3::Buffer::Iterator::GetSize() const [member function] - cls.add_method('GetSize', - 'uint32_t', - [], - is_const=True) - ## buffer.h (module 'network'): bool ns3::Buffer::Iterator::IsEnd() const [member function] - cls.add_method('IsEnd', - 'bool', - [], - is_const=True) - ## buffer.h (module 'network'): bool ns3::Buffer::Iterator::IsStart() const [member function] - cls.add_method('IsStart', - 'bool', - [], - is_const=True) - ## buffer.h (module 'network'): void ns3::Buffer::Iterator::Next() [member function] - cls.add_method('Next', - 'void', - []) - ## buffer.h (module 'network'): void ns3::Buffer::Iterator::Next(uint32_t delta) [member function] - cls.add_method('Next', - 'void', - [param('uint32_t', 'delta')]) - ## buffer.h (module 'network'): void ns3::Buffer::Iterator::Prev() [member function] - cls.add_method('Prev', - 'void', - []) - ## buffer.h (module 'network'): void ns3::Buffer::Iterator::Prev(uint32_t delta) [member function] - cls.add_method('Prev', - 'void', - [param('uint32_t', 'delta')]) - ## buffer.h (module 'network'): void ns3::Buffer::Iterator::Read(uint8_t * buffer, uint32_t size) [member function] - cls.add_method('Read', - 'void', - [param('uint8_t *', 'buffer'), param('uint32_t', 'size')]) - ## buffer.h (module 'network'): uint16_t ns3::Buffer::Iterator::ReadLsbtohU16() [member function] - cls.add_method('ReadLsbtohU16', - 'uint16_t', - []) - ## buffer.h (module 'network'): uint32_t ns3::Buffer::Iterator::ReadLsbtohU32() [member function] - cls.add_method('ReadLsbtohU32', - 'uint32_t', - []) - ## buffer.h (module 'network'): uint64_t ns3::Buffer::Iterator::ReadLsbtohU64() [member function] - cls.add_method('ReadLsbtohU64', - 'uint64_t', - []) - ## buffer.h (module 'network'): uint16_t ns3::Buffer::Iterator::ReadNtohU16() [member function] - cls.add_method('ReadNtohU16', - 'uint16_t', - []) - ## buffer.h (module 'network'): uint32_t ns3::Buffer::Iterator::ReadNtohU32() [member function] - cls.add_method('ReadNtohU32', - 'uint32_t', - []) - ## buffer.h (module 'network'): uint64_t ns3::Buffer::Iterator::ReadNtohU64() [member function] - cls.add_method('ReadNtohU64', - 'uint64_t', - []) - ## buffer.h (module 'network'): uint16_t ns3::Buffer::Iterator::ReadU16() [member function] - cls.add_method('ReadU16', - 'uint16_t', - []) - ## buffer.h (module 'network'): uint32_t ns3::Buffer::Iterator::ReadU32() [member function] - cls.add_method('ReadU32', - 'uint32_t', - []) - ## buffer.h (module 'network'): uint64_t ns3::Buffer::Iterator::ReadU64() [member function] - cls.add_method('ReadU64', - 'uint64_t', - []) - ## buffer.h (module 'network'): uint8_t ns3::Buffer::Iterator::ReadU8() [member function] - cls.add_method('ReadU8', - 'uint8_t', - []) - ## buffer.h (module 'network'): void ns3::Buffer::Iterator::Write(uint8_t const * buffer, uint32_t size) [member function] - cls.add_method('Write', - 'void', - [param('uint8_t const *', 'buffer'), param('uint32_t', 'size')]) - ## buffer.h (module 'network'): void ns3::Buffer::Iterator::Write(ns3::Buffer::Iterator start, ns3::Buffer::Iterator end) [member function] - cls.add_method('Write', - 'void', - [param('ns3::Buffer::Iterator', 'start'), param('ns3::Buffer::Iterator', 'end')]) - ## buffer.h (module 'network'): void ns3::Buffer::Iterator::WriteHtolsbU16(uint16_t data) [member function] - cls.add_method('WriteHtolsbU16', - 'void', - [param('uint16_t', 'data')]) - ## buffer.h (module 'network'): void ns3::Buffer::Iterator::WriteHtolsbU32(uint32_t data) [member function] - cls.add_method('WriteHtolsbU32', - 'void', - [param('uint32_t', 'data')]) - ## buffer.h (module 'network'): void ns3::Buffer::Iterator::WriteHtolsbU64(uint64_t data) [member function] - cls.add_method('WriteHtolsbU64', - 'void', - [param('uint64_t', 'data')]) - ## buffer.h (module 'network'): void ns3::Buffer::Iterator::WriteHtonU16(uint16_t data) [member function] - cls.add_method('WriteHtonU16', - 'void', - [param('uint16_t', 'data')]) - ## buffer.h (module 'network'): void ns3::Buffer::Iterator::WriteHtonU32(uint32_t data) [member function] - cls.add_method('WriteHtonU32', - 'void', - [param('uint32_t', 'data')]) - ## buffer.h (module 'network'): void ns3::Buffer::Iterator::WriteHtonU64(uint64_t data) [member function] - cls.add_method('WriteHtonU64', - 'void', - [param('uint64_t', 'data')]) - ## buffer.h (module 'network'): void ns3::Buffer::Iterator::WriteU16(uint16_t data) [member function] - cls.add_method('WriteU16', - 'void', - [param('uint16_t', 'data')]) - ## buffer.h (module 'network'): void ns3::Buffer::Iterator::WriteU32(uint32_t data) [member function] - cls.add_method('WriteU32', - 'void', - [param('uint32_t', 'data')]) - ## buffer.h (module 'network'): void ns3::Buffer::Iterator::WriteU64(uint64_t data) [member function] - cls.add_method('WriteU64', - 'void', - [param('uint64_t', 'data')]) - ## buffer.h (module 'network'): void ns3::Buffer::Iterator::WriteU8(uint8_t data) [member function] - cls.add_method('WriteU8', - 'void', - [param('uint8_t', 'data')]) - ## buffer.h (module 'network'): void ns3::Buffer::Iterator::WriteU8(uint8_t data, uint32_t len) [member function] - cls.add_method('WriteU8', - 'void', - [param('uint8_t', 'data'), param('uint32_t', 'len')]) - return - -def register_Ns3ByteTagIterator_methods(root_module, cls): - ## packet.h (module 'network'): ns3::ByteTagIterator::ByteTagIterator(ns3::ByteTagIterator const & arg0) [copy constructor] - cls.add_constructor([param('ns3::ByteTagIterator const &', 'arg0')]) - ## packet.h (module 'network'): bool ns3::ByteTagIterator::HasNext() const [member function] - cls.add_method('HasNext', - 'bool', - [], - is_const=True) - ## packet.h (module 'network'): ns3::ByteTagIterator::Item ns3::ByteTagIterator::Next() [member function] - cls.add_method('Next', - 'ns3::ByteTagIterator::Item', - []) - return - -def register_Ns3ByteTagIteratorItem_methods(root_module, cls): - ## packet.h (module 'network'): ns3::ByteTagIterator::Item::Item(ns3::ByteTagIterator::Item const & arg0) [copy constructor] - cls.add_constructor([param('ns3::ByteTagIterator::Item const &', 'arg0')]) - ## packet.h (module 'network'): uint32_t ns3::ByteTagIterator::Item::GetEnd() const [member function] - cls.add_method('GetEnd', - 'uint32_t', - [], - is_const=True) - ## packet.h (module 'network'): uint32_t ns3::ByteTagIterator::Item::GetStart() const [member function] - cls.add_method('GetStart', - 'uint32_t', - [], - is_const=True) - ## packet.h (module 'network'): void ns3::ByteTagIterator::Item::GetTag(ns3::Tag & tag) const [member function] - cls.add_method('GetTag', - 'void', - [param('ns3::Tag &', 'tag')], - is_const=True) - ## packet.h (module 'network'): ns3::TypeId ns3::ByteTagIterator::Item::GetTypeId() const [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_const=True) - return - -def register_Ns3ByteTagList_methods(root_module, cls): - ## byte-tag-list.h (module 'network'): ns3::ByteTagList::ByteTagList() [constructor] - cls.add_constructor([]) - ## byte-tag-list.h (module 'network'): ns3::ByteTagList::ByteTagList(ns3::ByteTagList const & o) [copy constructor] - cls.add_constructor([param('ns3::ByteTagList const &', 'o')]) - ## byte-tag-list.h (module 'network'): ns3::TagBuffer ns3::ByteTagList::Add(ns3::TypeId tid, uint32_t bufferSize, int32_t start, int32_t end) [member function] - cls.add_method('Add', - 'ns3::TagBuffer', - [param('ns3::TypeId', 'tid'), param('uint32_t', 'bufferSize'), param('int32_t', 'start'), param('int32_t', 'end')]) - ## byte-tag-list.h (module 'network'): void ns3::ByteTagList::Add(ns3::ByteTagList const & o) [member function] - cls.add_method('Add', - 'void', - [param('ns3::ByteTagList const &', 'o')]) - ## byte-tag-list.h (module 'network'): void ns3::ByteTagList::AddAtEnd(int32_t adjustment, int32_t appendOffset) [member function] - cls.add_method('AddAtEnd', - 'void', - [param('int32_t', 'adjustment'), param('int32_t', 'appendOffset')]) - ## byte-tag-list.h (module 'network'): void ns3::ByteTagList::AddAtStart(int32_t adjustment, int32_t prependOffset) [member function] - cls.add_method('AddAtStart', - 'void', - [param('int32_t', 'adjustment'), param('int32_t', 'prependOffset')]) - ## byte-tag-list.h (module 'network'): ns3::ByteTagList::Iterator ns3::ByteTagList::Begin(int32_t offsetStart, int32_t offsetEnd) const [member function] - cls.add_method('Begin', - 'ns3::ByteTagList::Iterator', - [param('int32_t', 'offsetStart'), param('int32_t', 'offsetEnd')], - is_const=True) - ## byte-tag-list.h (module 'network'): void ns3::ByteTagList::RemoveAll() [member function] - cls.add_method('RemoveAll', - 'void', - []) - return - -def register_Ns3ByteTagListIterator_methods(root_module, cls): - ## byte-tag-list.h (module 'network'): ns3::ByteTagList::Iterator::Iterator(ns3::ByteTagList::Iterator const & arg0) [copy constructor] - cls.add_constructor([param('ns3::ByteTagList::Iterator const &', 'arg0')]) - ## byte-tag-list.h (module 'network'): uint32_t ns3::ByteTagList::Iterator::GetOffsetStart() const [member function] - cls.add_method('GetOffsetStart', - 'uint32_t', - [], - is_const=True) - ## byte-tag-list.h (module 'network'): bool ns3::ByteTagList::Iterator::HasNext() const [member function] - cls.add_method('HasNext', - 'bool', - [], - is_const=True) - ## byte-tag-list.h (module 'network'): ns3::ByteTagList::Iterator::Item ns3::ByteTagList::Iterator::Next() [member function] - cls.add_method('Next', - 'ns3::ByteTagList::Iterator::Item', - []) - return - -def register_Ns3ByteTagListIteratorItem_methods(root_module, cls): - ## byte-tag-list.h (module 'network'): ns3::ByteTagList::Iterator::Item::Item(ns3::ByteTagList::Iterator::Item const & arg0) [copy constructor] - cls.add_constructor([param('ns3::ByteTagList::Iterator::Item const &', 'arg0')]) - ## byte-tag-list.h (module 'network'): ns3::ByteTagList::Iterator::Item::Item(ns3::TagBuffer buf) [constructor] - cls.add_constructor([param('ns3::TagBuffer', 'buf')]) - ## byte-tag-list.h (module 'network'): ns3::ByteTagList::Iterator::Item::buf [variable] - cls.add_instance_attribute('buf', 'ns3::TagBuffer', is_const=False) - ## byte-tag-list.h (module 'network'): ns3::ByteTagList::Iterator::Item::end [variable] - cls.add_instance_attribute('end', 'int32_t', is_const=False) - ## byte-tag-list.h (module 'network'): ns3::ByteTagList::Iterator::Item::size [variable] - cls.add_instance_attribute('size', 'uint32_t', is_const=False) - ## byte-tag-list.h (module 'network'): ns3::ByteTagList::Iterator::Item::start [variable] - cls.add_instance_attribute('start', 'int32_t', is_const=False) - ## byte-tag-list.h (module 'network'): ns3::ByteTagList::Iterator::Item::tid [variable] - cls.add_instance_attribute('tid', 'ns3::TypeId', is_const=False) - return - -def register_Ns3CallbackBase_methods(root_module, cls): - ## callback.h (module 'core'): ns3::CallbackBase::CallbackBase(ns3::CallbackBase const & arg0) [copy constructor] - cls.add_constructor([param('ns3::CallbackBase const &', 'arg0')]) - ## callback.h (module 'core'): ns3::CallbackBase::CallbackBase() [constructor] - cls.add_constructor([]) - ## callback.h (module 'core'): ns3::Ptr ns3::CallbackBase::GetImpl() const [member function] - cls.add_method('GetImpl', - 'ns3::Ptr< ns3::CallbackImplBase >', - [], - is_const=True) - ## callback.h (module 'core'): ns3::CallbackBase::CallbackBase(ns3::Ptr impl) [constructor] - cls.add_constructor([param('ns3::Ptr< ns3::CallbackImplBase >', 'impl')], - visibility='protected') - ## callback.h (module 'core'): static std::string ns3::CallbackBase::Demangle(std::string const & mangled) [member function] - cls.add_method('Demangle', - 'std::string', - [param('std::string const &', 'mangled')], - is_static=True, visibility='protected') - return - -def register_Ns3DelayJitterEstimation_methods(root_module, cls): - ## delay-jitter-estimation.h (module 'contrib'): ns3::DelayJitterEstimation::DelayJitterEstimation(ns3::DelayJitterEstimation const & arg0) [copy constructor] - cls.add_constructor([param('ns3::DelayJitterEstimation const &', 'arg0')]) - ## delay-jitter-estimation.h (module 'contrib'): ns3::DelayJitterEstimation::DelayJitterEstimation() [constructor] - cls.add_constructor([]) - ## delay-jitter-estimation.h (module 'contrib'): ns3::Time ns3::DelayJitterEstimation::GetLastDelay() const [member function] - cls.add_method('GetLastDelay', - 'ns3::Time', - [], - is_const=True) - ## delay-jitter-estimation.h (module 'contrib'): ns3::Time ns3::DelayJitterEstimation::GetLastJitter() const [member function] - cls.add_method('GetLastJitter', - 'ns3::Time', - [], - is_const=True) - ## delay-jitter-estimation.h (module 'contrib'): static void ns3::DelayJitterEstimation::PrepareTx(ns3::Ptr packet) [member function] - cls.add_method('PrepareTx', - 'void', - [param('ns3::Ptr< ns3::Packet const >', 'packet')], - is_static=True) - ## delay-jitter-estimation.h (module 'contrib'): void ns3::DelayJitterEstimation::RecordRx(ns3::Ptr packet) [member function] - cls.add_method('RecordRx', - 'void', - [param('ns3::Ptr< ns3::Packet const >', 'packet')]) - return - -def register_Ns3EventGarbageCollector_methods(root_module, cls): - ## event-garbage-collector.h (module 'contrib'): ns3::EventGarbageCollector::EventGarbageCollector(ns3::EventGarbageCollector const & arg0) [copy constructor] - cls.add_constructor([param('ns3::EventGarbageCollector const &', 'arg0')]) - ## event-garbage-collector.h (module 'contrib'): ns3::EventGarbageCollector::EventGarbageCollector() [constructor] - cls.add_constructor([]) - ## event-garbage-collector.h (module 'contrib'): void ns3::EventGarbageCollector::Track(ns3::EventId event) [member function] - cls.add_method('Track', - 'void', - [param('ns3::EventId', 'event')]) - return - -def register_Ns3EventId_methods(root_module, cls): - cls.add_binary_comparison_operator('!=') - cls.add_binary_comparison_operator('==') - ## event-id.h (module 'core'): ns3::EventId::EventId(ns3::EventId const & arg0) [copy constructor] - cls.add_constructor([param('ns3::EventId const &', 'arg0')]) - ## event-id.h (module 'core'): ns3::EventId::EventId() [constructor] - cls.add_constructor([]) - ## event-id.h (module 'core'): ns3::EventId::EventId(ns3::Ptr const & impl, uint64_t ts, uint32_t context, uint32_t uid) [constructor] - cls.add_constructor([param('ns3::Ptr< ns3::EventImpl > const &', 'impl'), param('uint64_t', 'ts'), param('uint32_t', 'context'), param('uint32_t', 'uid')]) - ## event-id.h (module 'core'): void ns3::EventId::Cancel() [member function] - cls.add_method('Cancel', - 'void', - []) - ## event-id.h (module 'core'): uint32_t ns3::EventId::GetContext() const [member function] - cls.add_method('GetContext', - 'uint32_t', - [], - is_const=True) - ## event-id.h (module 'core'): uint64_t ns3::EventId::GetTs() const [member function] - cls.add_method('GetTs', - 'uint64_t', - [], - is_const=True) - ## event-id.h (module 'core'): uint32_t ns3::EventId::GetUid() const [member function] - cls.add_method('GetUid', - 'uint32_t', - [], - is_const=True) - ## event-id.h (module 'core'): bool ns3::EventId::IsExpired() const [member function] - cls.add_method('IsExpired', - 'bool', - [], - is_const=True) - ## event-id.h (module 'core'): bool ns3::EventId::IsRunning() const [member function] - cls.add_method('IsRunning', - 'bool', - [], - is_const=True) - ## event-id.h (module 'core'): ns3::EventImpl * ns3::EventId::PeekEventImpl() const [member function] - cls.add_method('PeekEventImpl', - 'ns3::EventImpl *', - [], - is_const=True) - return - -def register_Ns3FileConfig_methods(root_module, cls): - ## file-config.h (module 'contrib'): ns3::FileConfig::FileConfig() [constructor] - cls.add_constructor([]) - ## file-config.h (module 'contrib'): ns3::FileConfig::FileConfig(ns3::FileConfig const & arg0) [copy constructor] - cls.add_constructor([param('ns3::FileConfig const &', 'arg0')]) - ## file-config.h (module 'contrib'): void ns3::FileConfig::Attributes() [member function] - cls.add_method('Attributes', - 'void', - [], - is_pure_virtual=True, is_virtual=True) - ## file-config.h (module 'contrib'): void ns3::FileConfig::Default() [member function] - cls.add_method('Default', - 'void', - [], - is_pure_virtual=True, is_virtual=True) - ## file-config.h (module 'contrib'): void ns3::FileConfig::Global() [member function] - cls.add_method('Global', - 'void', - [], - is_pure_virtual=True, is_virtual=True) - ## file-config.h (module 'contrib'): void ns3::FileConfig::SetFilename(std::string filename) [member function] - cls.add_method('SetFilename', - 'void', - [param('std::string', 'filename')], - is_pure_virtual=True, is_virtual=True) - return - -def register_Ns3Gnuplot_methods(root_module, cls): - ## gnuplot.h (module 'contrib'): ns3::Gnuplot::Gnuplot(ns3::Gnuplot const & arg0) [copy constructor] - cls.add_constructor([param('ns3::Gnuplot const &', 'arg0')]) - ## gnuplot.h (module 'contrib'): ns3::Gnuplot::Gnuplot(std::string const & outputFilename="", std::string const & title="") [constructor] - cls.add_constructor([param('std::string const &', 'outputFilename', default_value='""'), param('std::string const &', 'title', default_value='""')]) - ## gnuplot.h (module 'contrib'): void ns3::Gnuplot::AddDataset(ns3::GnuplotDataset const & dataset) [member function] - cls.add_method('AddDataset', - 'void', - [param('ns3::GnuplotDataset const &', 'dataset')]) - ## gnuplot.h (module 'contrib'): void ns3::Gnuplot::AppendExtra(std::string const & extra) [member function] - cls.add_method('AppendExtra', - 'void', - [param('std::string const &', 'extra')]) - ## gnuplot.h (module 'contrib'): static std::string ns3::Gnuplot::DetectTerminal(std::string const & filename) [member function] - cls.add_method('DetectTerminal', - 'std::string', - [param('std::string const &', 'filename')], - is_static=True) - ## gnuplot.h (module 'contrib'): void ns3::Gnuplot::GenerateOutput(std::ostream & os) const [member function] - cls.add_method('GenerateOutput', - 'void', - [param('std::ostream &', 'os')], - is_const=True) - ## gnuplot.h (module 'contrib'): void ns3::Gnuplot::SetExtra(std::string const & extra) [member function] - cls.add_method('SetExtra', - 'void', - [param('std::string const &', 'extra')]) - ## gnuplot.h (module 'contrib'): void ns3::Gnuplot::SetLegend(std::string const & xLegend, std::string const & yLegend) [member function] - cls.add_method('SetLegend', - 'void', - [param('std::string const &', 'xLegend'), param('std::string const &', 'yLegend')]) - ## gnuplot.h (module 'contrib'): void ns3::Gnuplot::SetTerminal(std::string const & terminal) [member function] - cls.add_method('SetTerminal', - 'void', - [param('std::string const &', 'terminal')]) - ## gnuplot.h (module 'contrib'): void ns3::Gnuplot::SetTitle(std::string const & title) [member function] - cls.add_method('SetTitle', - 'void', - [param('std::string const &', 'title')]) - return - -def register_Ns3GnuplotCollection_methods(root_module, cls): - ## gnuplot.h (module 'contrib'): ns3::GnuplotCollection::GnuplotCollection(ns3::GnuplotCollection const & arg0) [copy constructor] - cls.add_constructor([param('ns3::GnuplotCollection const &', 'arg0')]) - ## gnuplot.h (module 'contrib'): ns3::GnuplotCollection::GnuplotCollection(std::string const & outputFilename) [constructor] - cls.add_constructor([param('std::string const &', 'outputFilename')]) - ## gnuplot.h (module 'contrib'): void ns3::GnuplotCollection::AddPlot(ns3::Gnuplot const & plot) [member function] - cls.add_method('AddPlot', - 'void', - [param('ns3::Gnuplot const &', 'plot')]) - ## gnuplot.h (module 'contrib'): void ns3::GnuplotCollection::GenerateOutput(std::ostream & os) const [member function] - cls.add_method('GenerateOutput', - 'void', - [param('std::ostream &', 'os')], - is_const=True) - ## gnuplot.h (module 'contrib'): ns3::Gnuplot & ns3::GnuplotCollection::GetPlot(unsigned int id) [member function] - cls.add_method('GetPlot', - 'ns3::Gnuplot &', - [param('unsigned int', 'id')]) - ## gnuplot.h (module 'contrib'): void ns3::GnuplotCollection::SetTerminal(std::string const & terminal) [member function] - cls.add_method('SetTerminal', - 'void', - [param('std::string const &', 'terminal')]) - return - -def register_Ns3GnuplotDataset_methods(root_module, cls): - ## gnuplot.h (module 'contrib'): ns3::GnuplotDataset::GnuplotDataset(ns3::GnuplotDataset const & original) [copy constructor] - cls.add_constructor([param('ns3::GnuplotDataset const &', 'original')]) - ## gnuplot.h (module 'contrib'): static void ns3::GnuplotDataset::SetDefaultExtra(std::string const & extra) [member function] - cls.add_method('SetDefaultExtra', - 'void', - [param('std::string const &', 'extra')], - is_static=True) - ## gnuplot.h (module 'contrib'): void ns3::GnuplotDataset::SetExtra(std::string const & extra) [member function] - cls.add_method('SetExtra', - 'void', - [param('std::string const &', 'extra')]) - ## gnuplot.h (module 'contrib'): void ns3::GnuplotDataset::SetTitle(std::string const & title) [member function] - cls.add_method('SetTitle', - 'void', - [param('std::string const &', 'title')]) - ## gnuplot.h (module 'contrib'): ns3::GnuplotDataset::GnuplotDataset(ns3::GnuplotDataset::Data * data) [constructor] - cls.add_constructor([param('ns3::GnuplotDataset::Data *', 'data')], - visibility='protected') - return - -def register_Ns3HighPrecision_methods(root_module, cls): - cls.add_output_stream_operator() - ## high-precision-128.h (module 'core'): ns3::HighPrecision::HighPrecision(ns3::HighPrecision const & arg0) [copy constructor] - cls.add_constructor([param('ns3::HighPrecision const &', 'arg0')]) - ## high-precision-128.h (module 'core'): ns3::HighPrecision::HighPrecision(int64_t high, uint64_t low) [constructor] - cls.add_constructor([param('int64_t', 'high'), param('uint64_t', 'low')]) - ## high-precision-128.h (module 'core'): ns3::HighPrecision::HighPrecision() [constructor] - cls.add_constructor([]) - ## high-precision-128.h (module 'core'): ns3::HighPrecision::HighPrecision(int64_t value, bool dummy) [constructor] - cls.add_constructor([param('int64_t', 'value'), param('bool', 'dummy')]) - ## high-precision-128.h (module 'core'): ns3::HighPrecision::HighPrecision(double value) [constructor] - cls.add_constructor([param('double', 'value')]) - ## high-precision-128.h (module 'core'): void ns3::HighPrecision::Add(ns3::HighPrecision const & o) [member function] - cls.add_method('Add', - 'void', - [param('ns3::HighPrecision const &', 'o')]) - ## high-precision-128.h (module 'core'): int ns3::HighPrecision::Compare(ns3::HighPrecision const & o) const [member function] - cls.add_method('Compare', - 'int', - [param('ns3::HighPrecision const &', 'o')], - is_const=True) - ## high-precision-128.h (module 'core'): void ns3::HighPrecision::Div(ns3::HighPrecision const & o) [member function] - cls.add_method('Div', - 'void', - [param('ns3::HighPrecision const &', 'o')]) - ## high-precision-128.h (module 'core'): double ns3::HighPrecision::GetDouble() const [member function] - cls.add_method('GetDouble', - 'double', - [], - is_const=True) - ## high-precision-128.h (module 'core'): int64_t ns3::HighPrecision::GetHigh() const [member function] - cls.add_method('GetHigh', - 'int64_t', - [], - is_const=True) - ## high-precision-128.h (module 'core'): int64_t ns3::HighPrecision::GetInteger() const [member function] - cls.add_method('GetInteger', - 'int64_t', - [], - is_const=True) - ## high-precision-128.h (module 'core'): uint64_t ns3::HighPrecision::GetLow() const [member function] - cls.add_method('GetLow', - 'uint64_t', - [], - is_const=True) - ## high-precision-128.h (module 'core'): static ns3::HighPrecision ns3::HighPrecision::Invert(uint64_t v) [member function] - cls.add_method('Invert', - 'ns3::HighPrecision', - [param('uint64_t', 'v')], - is_static=True) - ## high-precision-128.h (module 'core'): void ns3::HighPrecision::Mul(ns3::HighPrecision const & o) [member function] - cls.add_method('Mul', - 'void', - [param('ns3::HighPrecision const &', 'o')]) - ## high-precision-128.h (module 'core'): void ns3::HighPrecision::MulByInvert(ns3::HighPrecision const & o) [member function] - cls.add_method('MulByInvert', - 'void', - [param('ns3::HighPrecision const &', 'o')]) - ## high-precision-128.h (module 'core'): void ns3::HighPrecision::Sub(ns3::HighPrecision const & o) [member function] - cls.add_method('Sub', - 'void', - [param('ns3::HighPrecision const &', 'o')]) - ## high-precision-128.h (module 'core'): static ns3::HighPrecision ns3::HighPrecision::Zero() [member function] - cls.add_method('Zero', - 'ns3::HighPrecision', - [], - is_static=True) - return - -def register_Ns3NoneFileConfig_methods(root_module, cls): - ## file-config.h (module 'contrib'): ns3::NoneFileConfig::NoneFileConfig(ns3::NoneFileConfig const & arg0) [copy constructor] - cls.add_constructor([param('ns3::NoneFileConfig const &', 'arg0')]) - ## file-config.h (module 'contrib'): ns3::NoneFileConfig::NoneFileConfig() [constructor] - cls.add_constructor([]) - ## file-config.h (module 'contrib'): void ns3::NoneFileConfig::Attributes() [member function] - cls.add_method('Attributes', - 'void', - [], - is_virtual=True) - ## file-config.h (module 'contrib'): void ns3::NoneFileConfig::Default() [member function] - cls.add_method('Default', - 'void', - [], - is_virtual=True) - ## file-config.h (module 'contrib'): void ns3::NoneFileConfig::Global() [member function] - cls.add_method('Global', - 'void', - [], - is_virtual=True) - ## file-config.h (module 'contrib'): void ns3::NoneFileConfig::SetFilename(std::string filename) [member function] - cls.add_method('SetFilename', - 'void', - [param('std::string', 'filename')], - is_virtual=True) - return - -def register_Ns3ObjectBase_methods(root_module, cls): - ## object-base.h (module 'core'): ns3::ObjectBase::ObjectBase() [constructor] - cls.add_constructor([]) - ## object-base.h (module 'core'): ns3::ObjectBase::ObjectBase(ns3::ObjectBase const & arg0) [copy constructor] - cls.add_constructor([param('ns3::ObjectBase const &', 'arg0')]) - ## object-base.h (module 'core'): void ns3::ObjectBase::GetAttribute(std::string name, ns3::AttributeValue & value) const [member function] - cls.add_method('GetAttribute', - 'void', - [param('std::string', 'name'), param('ns3::AttributeValue &', 'value')], - is_const=True) - ## object-base.h (module 'core'): bool ns3::ObjectBase::GetAttributeFailSafe(std::string name, ns3::AttributeValue & attribute) const [member function] - cls.add_method('GetAttributeFailSafe', - 'bool', - [param('std::string', 'name'), param('ns3::AttributeValue &', 'attribute')], - is_const=True) - ## object-base.h (module 'core'): ns3::TypeId ns3::ObjectBase::GetInstanceTypeId() const [member function] - cls.add_method('GetInstanceTypeId', - 'ns3::TypeId', - [], - is_pure_virtual=True, is_const=True, is_virtual=True) - ## object-base.h (module 'core'): static ns3::TypeId ns3::ObjectBase::GetTypeId() [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_static=True) - ## object-base.h (module 'core'): void ns3::ObjectBase::SetAttribute(std::string name, ns3::AttributeValue const & value) [member function] - cls.add_method('SetAttribute', - 'void', - [param('std::string', 'name'), param('ns3::AttributeValue const &', 'value')]) - ## object-base.h (module 'core'): bool ns3::ObjectBase::SetAttributeFailSafe(std::string name, ns3::AttributeValue const & value) [member function] - cls.add_method('SetAttributeFailSafe', - 'bool', - [param('std::string', 'name'), param('ns3::AttributeValue const &', 'value')]) - ## object-base.h (module 'core'): bool ns3::ObjectBase::TraceConnect(std::string name, std::string context, ns3::CallbackBase const & cb) [member function] - cls.add_method('TraceConnect', - 'bool', - [param('std::string', 'name'), param('std::string', 'context'), param('ns3::CallbackBase const &', 'cb')]) - ## object-base.h (module 'core'): bool ns3::ObjectBase::TraceConnectWithoutContext(std::string name, ns3::CallbackBase const & cb) [member function] - cls.add_method('TraceConnectWithoutContext', - 'bool', - [param('std::string', 'name'), param('ns3::CallbackBase const &', 'cb')]) - ## object-base.h (module 'core'): bool ns3::ObjectBase::TraceDisconnect(std::string name, std::string context, ns3::CallbackBase const & cb) [member function] - cls.add_method('TraceDisconnect', - 'bool', - [param('std::string', 'name'), param('std::string', 'context'), param('ns3::CallbackBase const &', 'cb')]) - ## object-base.h (module 'core'): bool ns3::ObjectBase::TraceDisconnectWithoutContext(std::string name, ns3::CallbackBase const & cb) [member function] - cls.add_method('TraceDisconnectWithoutContext', - 'bool', - [param('std::string', 'name'), param('ns3::CallbackBase const &', 'cb')]) - ## object-base.h (module 'core'): void ns3::ObjectBase::ConstructSelf(ns3::AttributeList const & attributes) [member function] - cls.add_method('ConstructSelf', - 'void', - [param('ns3::AttributeList const &', 'attributes')], - visibility='protected') - ## object-base.h (module 'core'): void ns3::ObjectBase::NotifyConstructionCompleted() [member function] - cls.add_method('NotifyConstructionCompleted', - 'void', - [], - visibility='protected', is_virtual=True) - return - -def register_Ns3ObjectDeleter_methods(root_module, cls): - ## object.h (module 'core'): ns3::ObjectDeleter::ObjectDeleter() [constructor] - cls.add_constructor([]) - ## object.h (module 'core'): ns3::ObjectDeleter::ObjectDeleter(ns3::ObjectDeleter const & arg0) [copy constructor] - cls.add_constructor([param('ns3::ObjectDeleter const &', 'arg0')]) - ## object.h (module 'core'): static void ns3::ObjectDeleter::Delete(ns3::Object * object) [member function] - cls.add_method('Delete', - 'void', - [param('ns3::Object *', 'object')], - is_static=True) - return - -def register_Ns3ObjectFactory_methods(root_module, cls): - cls.add_output_stream_operator() - ## object-factory.h (module 'core'): ns3::ObjectFactory::ObjectFactory(ns3::ObjectFactory const & arg0) [copy constructor] - cls.add_constructor([param('ns3::ObjectFactory const &', 'arg0')]) - ## object-factory.h (module 'core'): ns3::ObjectFactory::ObjectFactory() [constructor] - cls.add_constructor([]) - ## object-factory.h (module 'core'): ns3::Ptr ns3::ObjectFactory::Create() const [member function] - cls.add_method('Create', - 'ns3::Ptr< ns3::Object >', - [], - is_const=True) - ## object-factory.h (module 'core'): ns3::TypeId ns3::ObjectFactory::GetTypeId() const [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_const=True) - ## object-factory.h (module 'core'): void ns3::ObjectFactory::Set(std::string name, ns3::AttributeValue const & value) [member function] - cls.add_method('Set', - 'void', - [param('std::string', 'name'), param('ns3::AttributeValue const &', 'value')]) - ## object-factory.h (module 'core'): void ns3::ObjectFactory::Set(ns3::AttributeList const & list) [member function] - cls.add_method('Set', - 'void', - [param('ns3::AttributeList const &', 'list')]) - ## object-factory.h (module 'core'): void ns3::ObjectFactory::SetTypeId(ns3::TypeId tid) [member function] - cls.add_method('SetTypeId', - 'void', - [param('ns3::TypeId', 'tid')]) - ## object-factory.h (module 'core'): void ns3::ObjectFactory::SetTypeId(char const * tid) [member function] - cls.add_method('SetTypeId', - 'void', - [param('char const *', 'tid')]) - ## object-factory.h (module 'core'): void ns3::ObjectFactory::SetTypeId(std::string tid) [member function] - cls.add_method('SetTypeId', - 'void', - [param('std::string', 'tid')]) - return - -def register_Ns3PacketMetadata_methods(root_module, cls): - ## packet-metadata.h (module 'network'): ns3::PacketMetadata::PacketMetadata(uint64_t uid, uint32_t size) [constructor] - cls.add_constructor([param('uint64_t', 'uid'), param('uint32_t', 'size')]) - ## packet-metadata.h (module 'network'): ns3::PacketMetadata::PacketMetadata(ns3::PacketMetadata const & o) [copy constructor] - cls.add_constructor([param('ns3::PacketMetadata const &', 'o')]) - ## packet-metadata.h (module 'network'): void ns3::PacketMetadata::AddAtEnd(ns3::PacketMetadata const & o) [member function] - cls.add_method('AddAtEnd', - 'void', - [param('ns3::PacketMetadata const &', 'o')]) - ## packet-metadata.h (module 'network'): void ns3::PacketMetadata::AddHeader(ns3::Header const & header, uint32_t size) [member function] - cls.add_method('AddHeader', - 'void', - [param('ns3::Header const &', 'header'), param('uint32_t', 'size')]) - ## packet-metadata.h (module 'network'): void ns3::PacketMetadata::AddPaddingAtEnd(uint32_t end) [member function] - cls.add_method('AddPaddingAtEnd', - 'void', - [param('uint32_t', 'end')]) - ## packet-metadata.h (module 'network'): void ns3::PacketMetadata::AddTrailer(ns3::Trailer const & trailer, uint32_t size) [member function] - cls.add_method('AddTrailer', - 'void', - [param('ns3::Trailer const &', 'trailer'), param('uint32_t', 'size')]) - ## packet-metadata.h (module 'network'): ns3::PacketMetadata::ItemIterator ns3::PacketMetadata::BeginItem(ns3::Buffer buffer) const [member function] - cls.add_method('BeginItem', - 'ns3::PacketMetadata::ItemIterator', - [param('ns3::Buffer', 'buffer')], - is_const=True) - ## packet-metadata.h (module 'network'): ns3::PacketMetadata ns3::PacketMetadata::CreateFragment(uint32_t start, uint32_t end) const [member function] - cls.add_method('CreateFragment', - 'ns3::PacketMetadata', - [param('uint32_t', 'start'), param('uint32_t', 'end')], - is_const=True) - ## packet-metadata.h (module 'network'): uint32_t ns3::PacketMetadata::Deserialize(uint8_t const * buffer, uint32_t size) [member function] - cls.add_method('Deserialize', - 'uint32_t', - [param('uint8_t const *', 'buffer'), param('uint32_t', 'size')]) - ## packet-metadata.h (module 'network'): static void ns3::PacketMetadata::Enable() [member function] - cls.add_method('Enable', - 'void', - [], - is_static=True) - ## packet-metadata.h (module 'network'): static void ns3::PacketMetadata::EnableChecking() [member function] - cls.add_method('EnableChecking', - 'void', - [], - is_static=True) - ## packet-metadata.h (module 'network'): uint32_t ns3::PacketMetadata::GetSerializedSize() const [member function] - cls.add_method('GetSerializedSize', - 'uint32_t', - [], - is_const=True) - ## packet-metadata.h (module 'network'): uint64_t ns3::PacketMetadata::GetUid() const [member function] - cls.add_method('GetUid', - 'uint64_t', - [], - is_const=True) - ## packet-metadata.h (module 'network'): void ns3::PacketMetadata::RemoveAtEnd(uint32_t end) [member function] - cls.add_method('RemoveAtEnd', - 'void', - [param('uint32_t', 'end')]) - ## packet-metadata.h (module 'network'): void ns3::PacketMetadata::RemoveAtStart(uint32_t start) [member function] - cls.add_method('RemoveAtStart', - 'void', - [param('uint32_t', 'start')]) - ## packet-metadata.h (module 'network'): void ns3::PacketMetadata::RemoveHeader(ns3::Header const & header, uint32_t size) [member function] - cls.add_method('RemoveHeader', - 'void', - [param('ns3::Header const &', 'header'), param('uint32_t', 'size')]) - ## packet-metadata.h (module 'network'): void ns3::PacketMetadata::RemoveTrailer(ns3::Trailer const & trailer, uint32_t size) [member function] - cls.add_method('RemoveTrailer', - 'void', - [param('ns3::Trailer const &', 'trailer'), param('uint32_t', 'size')]) - ## packet-metadata.h (module 'network'): uint32_t ns3::PacketMetadata::Serialize(uint8_t * buffer, uint32_t maxSize) const [member function] - cls.add_method('Serialize', - 'uint32_t', - [param('uint8_t *', 'buffer'), param('uint32_t', 'maxSize')], - is_const=True) - return - -def register_Ns3PacketMetadataItem_methods(root_module, cls): - ## packet-metadata.h (module 'network'): ns3::PacketMetadata::Item::Item() [constructor] - cls.add_constructor([]) - ## packet-metadata.h (module 'network'): ns3::PacketMetadata::Item::Item(ns3::PacketMetadata::Item const & arg0) [copy constructor] - cls.add_constructor([param('ns3::PacketMetadata::Item const &', 'arg0')]) - ## packet-metadata.h (module 'network'): ns3::PacketMetadata::Item::current [variable] - cls.add_instance_attribute('current', 'ns3::Buffer::Iterator', is_const=False) - ## packet-metadata.h (module 'network'): ns3::PacketMetadata::Item::currentSize [variable] - cls.add_instance_attribute('currentSize', 'uint32_t', is_const=False) - ## packet-metadata.h (module 'network'): ns3::PacketMetadata::Item::currentTrimedFromEnd [variable] - cls.add_instance_attribute('currentTrimedFromEnd', 'uint32_t', is_const=False) - ## packet-metadata.h (module 'network'): ns3::PacketMetadata::Item::currentTrimedFromStart [variable] - cls.add_instance_attribute('currentTrimedFromStart', 'uint32_t', is_const=False) - ## packet-metadata.h (module 'network'): ns3::PacketMetadata::Item::isFragment [variable] - cls.add_instance_attribute('isFragment', 'bool', is_const=False) - ## packet-metadata.h (module 'network'): ns3::PacketMetadata::Item::tid [variable] - cls.add_instance_attribute('tid', 'ns3::TypeId', is_const=False) - return - -def register_Ns3PacketMetadataItemIterator_methods(root_module, cls): - ## packet-metadata.h (module 'network'): ns3::PacketMetadata::ItemIterator::ItemIterator(ns3::PacketMetadata::ItemIterator const & arg0) [copy constructor] - cls.add_constructor([param('ns3::PacketMetadata::ItemIterator const &', 'arg0')]) - ## packet-metadata.h (module 'network'): ns3::PacketMetadata::ItemIterator::ItemIterator(ns3::PacketMetadata const * metadata, ns3::Buffer buffer) [constructor] - cls.add_constructor([param('ns3::PacketMetadata const *', 'metadata'), param('ns3::Buffer', 'buffer')]) - ## packet-metadata.h (module 'network'): bool ns3::PacketMetadata::ItemIterator::HasNext() const [member function] - cls.add_method('HasNext', - 'bool', - [], - is_const=True) - ## packet-metadata.h (module 'network'): ns3::PacketMetadata::Item ns3::PacketMetadata::ItemIterator::Next() [member function] - cls.add_method('Next', - 'ns3::PacketMetadata::Item', - []) - return - -def register_Ns3PacketTagIterator_methods(root_module, cls): - ## packet.h (module 'network'): ns3::PacketTagIterator::PacketTagIterator(ns3::PacketTagIterator const & arg0) [copy constructor] - cls.add_constructor([param('ns3::PacketTagIterator const &', 'arg0')]) - ## packet.h (module 'network'): bool ns3::PacketTagIterator::HasNext() const [member function] - cls.add_method('HasNext', - 'bool', - [], - is_const=True) - ## packet.h (module 'network'): ns3::PacketTagIterator::Item ns3::PacketTagIterator::Next() [member function] - cls.add_method('Next', - 'ns3::PacketTagIterator::Item', - []) - return - -def register_Ns3PacketTagIteratorItem_methods(root_module, cls): - ## packet.h (module 'network'): ns3::PacketTagIterator::Item::Item(ns3::PacketTagIterator::Item const & arg0) [copy constructor] - cls.add_constructor([param('ns3::PacketTagIterator::Item const &', 'arg0')]) - ## packet.h (module 'network'): void ns3::PacketTagIterator::Item::GetTag(ns3::Tag & tag) const [member function] - cls.add_method('GetTag', - 'void', - [param('ns3::Tag &', 'tag')], - is_const=True) - ## packet.h (module 'network'): ns3::TypeId ns3::PacketTagIterator::Item::GetTypeId() const [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_const=True) - return - -def register_Ns3PacketTagList_methods(root_module, cls): - ## packet-tag-list.h (module 'network'): ns3::PacketTagList::PacketTagList() [constructor] - cls.add_constructor([]) - ## packet-tag-list.h (module 'network'): ns3::PacketTagList::PacketTagList(ns3::PacketTagList const & o) [copy constructor] - cls.add_constructor([param('ns3::PacketTagList const &', 'o')]) - ## packet-tag-list.h (module 'network'): void ns3::PacketTagList::Add(ns3::Tag const & tag) const [member function] - cls.add_method('Add', - 'void', - [param('ns3::Tag const &', 'tag')], - is_const=True) - ## packet-tag-list.h (module 'network'): ns3::PacketTagList::TagData const * ns3::PacketTagList::Head() const [member function] - cls.add_method('Head', - 'ns3::PacketTagList::TagData const *', - [], - is_const=True) - ## packet-tag-list.h (module 'network'): bool ns3::PacketTagList::Peek(ns3::Tag & tag) const [member function] - cls.add_method('Peek', - 'bool', - [param('ns3::Tag &', 'tag')], - is_const=True) - ## packet-tag-list.h (module 'network'): bool ns3::PacketTagList::Remove(ns3::Tag & tag) [member function] - cls.add_method('Remove', - 'bool', - [param('ns3::Tag &', 'tag')]) - ## packet-tag-list.h (module 'network'): void ns3::PacketTagList::RemoveAll() [member function] - cls.add_method('RemoveAll', - 'void', - []) - return - -def register_Ns3PacketTagListTagData_methods(root_module, cls): - ## packet-tag-list.h (module 'network'): ns3::PacketTagList::TagData::TagData() [constructor] - cls.add_constructor([]) - ## packet-tag-list.h (module 'network'): ns3::PacketTagList::TagData::TagData(ns3::PacketTagList::TagData const & arg0) [copy constructor] - cls.add_constructor([param('ns3::PacketTagList::TagData const &', 'arg0')]) - ## packet-tag-list.h (module 'network'): ns3::PacketTagList::TagData::count [variable] - cls.add_instance_attribute('count', 'uint32_t', is_const=False) - ## packet-tag-list.h (module 'network'): ns3::PacketTagList::TagData::data [variable] - cls.add_instance_attribute('data', 'uint8_t [ 20 ]', is_const=False) - ## packet-tag-list.h (module 'network'): ns3::PacketTagList::TagData::next [variable] - cls.add_instance_attribute('next', 'ns3::PacketTagList::TagData *', is_const=False) - ## packet-tag-list.h (module 'network'): ns3::PacketTagList::TagData::tid [variable] - cls.add_instance_attribute('tid', 'ns3::TypeId', is_const=False) - return - -def register_Ns3SimpleRefCount__Ns3Object_Ns3ObjectBase_Ns3ObjectDeleter_methods(root_module, cls): - ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount::SimpleRefCount() [constructor] - cls.add_constructor([]) - ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount::SimpleRefCount(ns3::SimpleRefCount const & o) [copy constructor] - cls.add_constructor([param('ns3::SimpleRefCount< ns3::Object, ns3::ObjectBase, ns3::ObjectDeleter > const &', 'o')]) - ## simple-ref-count.h (module 'core'): static void ns3::SimpleRefCount::Cleanup() [member function] - cls.add_method('Cleanup', - 'void', - [], - is_static=True) - return - -def register_Ns3Simulator_methods(root_module, cls): - ## simulator.h (module 'core'): ns3::Simulator::Simulator(ns3::Simulator const & arg0) [copy constructor] - cls.add_constructor([param('ns3::Simulator const &', 'arg0')]) - ## simulator.h (module 'core'): static void ns3::Simulator::Cancel(ns3::EventId const & id) [member function] - cls.add_method('Cancel', - 'void', - [param('ns3::EventId const &', 'id')], - is_static=True) - ## simulator.h (module 'core'): static void ns3::Simulator::Destroy() [member function] - cls.add_method('Destroy', - 'void', - [], - is_static=True) - ## simulator.h (module 'core'): static uint32_t ns3::Simulator::GetContext() [member function] - cls.add_method('GetContext', - 'uint32_t', - [], - is_static=True) - ## simulator.h (module 'core'): static ns3::Time ns3::Simulator::GetDelayLeft(ns3::EventId const & id) [member function] - cls.add_method('GetDelayLeft', - 'ns3::Time', - [param('ns3::EventId const &', 'id')], - is_static=True) - ## simulator.h (module 'core'): static ns3::Ptr ns3::Simulator::GetImplementation() [member function] - cls.add_method('GetImplementation', - 'ns3::Ptr< ns3::SimulatorImpl >', - [], - is_static=True) - ## simulator.h (module 'core'): static ns3::Time ns3::Simulator::GetMaximumSimulationTime() [member function] - cls.add_method('GetMaximumSimulationTime', - 'ns3::Time', - [], - is_static=True) - ## simulator.h (module 'core'): static uint32_t ns3::Simulator::GetSystemId() [member function] - cls.add_method('GetSystemId', - 'uint32_t', - [], - is_static=True) - ## simulator.h (module 'core'): static bool ns3::Simulator::IsExpired(ns3::EventId const & id) [member function] - cls.add_method('IsExpired', - 'bool', - [param('ns3::EventId const &', 'id')], - is_static=True) - ## simulator.h (module 'core'): static bool ns3::Simulator::IsFinished() [member function] - cls.add_method('IsFinished', - 'bool', - [], - is_static=True) - ## simulator.h (module 'core'): static ns3::Time ns3::Simulator::Next() [member function] - cls.add_method('Next', - 'ns3::Time', - [], - is_static=True, deprecated=True) - ## simulator.h (module 'core'): static ns3::Time ns3::Simulator::Now() [member function] - cls.add_method('Now', - 'ns3::Time', - [], - is_static=True) - ## simulator.h (module 'core'): static void ns3::Simulator::Remove(ns3::EventId const & id) [member function] - cls.add_method('Remove', - 'void', - [param('ns3::EventId const &', 'id')], - is_static=True) - ## simulator.h (module 'core'): static void ns3::Simulator::RunOneEvent() [member function] - cls.add_method('RunOneEvent', - 'void', - [], - is_static=True, deprecated=True) - ## simulator.h (module 'core'): static void ns3::Simulator::SetImplementation(ns3::Ptr impl) [member function] - cls.add_method('SetImplementation', - 'void', - [param('ns3::Ptr< ns3::SimulatorImpl >', 'impl')], - is_static=True) - ## simulator.h (module 'core'): static void ns3::Simulator::SetScheduler(ns3::ObjectFactory schedulerFactory) [member function] - cls.add_method('SetScheduler', - 'void', - [param('ns3::ObjectFactory', 'schedulerFactory')], - is_static=True) - ## simulator.h (module 'core'): static void ns3::Simulator::Stop() [member function] - cls.add_method('Stop', - 'void', - [], - is_static=True) - ## simulator.h (module 'core'): static void ns3::Simulator::Stop(ns3::Time const & time) [member function] - cls.add_method('Stop', - 'void', - [param('ns3::Time const &', 'time')], - is_static=True) - return - -def register_Ns3Tag_methods(root_module, cls): - ## tag.h (module 'network'): ns3::Tag::Tag() [constructor] - cls.add_constructor([]) - ## tag.h (module 'network'): ns3::Tag::Tag(ns3::Tag const & arg0) [copy constructor] - cls.add_constructor([param('ns3::Tag const &', 'arg0')]) - ## tag.h (module 'network'): void ns3::Tag::Deserialize(ns3::TagBuffer i) [member function] - cls.add_method('Deserialize', - 'void', - [param('ns3::TagBuffer', 'i')], - is_pure_virtual=True, is_virtual=True) - ## tag.h (module 'network'): uint32_t ns3::Tag::GetSerializedSize() const [member function] - cls.add_method('GetSerializedSize', - 'uint32_t', - [], - is_pure_virtual=True, is_const=True, is_virtual=True) - ## tag.h (module 'network'): static ns3::TypeId ns3::Tag::GetTypeId() [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_static=True) - ## tag.h (module 'network'): void ns3::Tag::Print(std::ostream & os) const [member function] - cls.add_method('Print', - 'void', - [param('std::ostream &', 'os')], - is_pure_virtual=True, is_const=True, is_virtual=True) - ## tag.h (module 'network'): void ns3::Tag::Serialize(ns3::TagBuffer i) const [member function] - cls.add_method('Serialize', - 'void', - [param('ns3::TagBuffer', 'i')], - is_pure_virtual=True, is_const=True, is_virtual=True) - return - -def register_Ns3TagBuffer_methods(root_module, cls): - ## tag-buffer.h (module 'network'): ns3::TagBuffer::TagBuffer(ns3::TagBuffer const & arg0) [copy constructor] - cls.add_constructor([param('ns3::TagBuffer const &', 'arg0')]) - ## tag-buffer.h (module 'network'): ns3::TagBuffer::TagBuffer(uint8_t * start, uint8_t * end) [constructor] - cls.add_constructor([param('uint8_t *', 'start'), param('uint8_t *', 'end')]) - ## tag-buffer.h (module 'network'): void ns3::TagBuffer::CopyFrom(ns3::TagBuffer o) [member function] - cls.add_method('CopyFrom', - 'void', - [param('ns3::TagBuffer', 'o')]) - ## tag-buffer.h (module 'network'): void ns3::TagBuffer::Read(uint8_t * buffer, uint32_t size) [member function] - cls.add_method('Read', - 'void', - [param('uint8_t *', 'buffer'), param('uint32_t', 'size')]) - ## tag-buffer.h (module 'network'): double ns3::TagBuffer::ReadDouble() [member function] - cls.add_method('ReadDouble', - 'double', - []) - ## tag-buffer.h (module 'network'): uint16_t ns3::TagBuffer::ReadU16() [member function] - cls.add_method('ReadU16', - 'uint16_t', - []) - ## tag-buffer.h (module 'network'): uint32_t ns3::TagBuffer::ReadU32() [member function] - cls.add_method('ReadU32', - 'uint32_t', - []) - ## tag-buffer.h (module 'network'): uint64_t ns3::TagBuffer::ReadU64() [member function] - cls.add_method('ReadU64', - 'uint64_t', - []) - ## tag-buffer.h (module 'network'): uint8_t ns3::TagBuffer::ReadU8() [member function] - cls.add_method('ReadU8', - 'uint8_t', - []) - ## tag-buffer.h (module 'network'): void ns3::TagBuffer::TrimAtEnd(uint32_t trim) [member function] - cls.add_method('TrimAtEnd', - 'void', - [param('uint32_t', 'trim')]) - ## tag-buffer.h (module 'network'): void ns3::TagBuffer::Write(uint8_t const * buffer, uint32_t size) [member function] - cls.add_method('Write', - 'void', - [param('uint8_t const *', 'buffer'), param('uint32_t', 'size')]) - ## tag-buffer.h (module 'network'): void ns3::TagBuffer::WriteDouble(double v) [member function] - cls.add_method('WriteDouble', - 'void', - [param('double', 'v')]) - ## tag-buffer.h (module 'network'): void ns3::TagBuffer::WriteU16(uint16_t data) [member function] - cls.add_method('WriteU16', - 'void', - [param('uint16_t', 'data')]) - ## tag-buffer.h (module 'network'): void ns3::TagBuffer::WriteU32(uint32_t data) [member function] - cls.add_method('WriteU32', - 'void', - [param('uint32_t', 'data')]) - ## tag-buffer.h (module 'network'): void ns3::TagBuffer::WriteU64(uint64_t v) [member function] - cls.add_method('WriteU64', - 'void', - [param('uint64_t', 'v')]) - ## tag-buffer.h (module 'network'): void ns3::TagBuffer::WriteU8(uint8_t v) [member function] - cls.add_method('WriteU8', - 'void', - [param('uint8_t', 'v')]) - return - -def register_Ns3Time_methods(root_module, cls): - cls.add_binary_numeric_operator('*', root_module['ns3::Time'], root_module['ns3::Time'], param('ns3::Time const &', 'right')) - cls.add_binary_numeric_operator('+', root_module['ns3::Time'], root_module['ns3::Time'], param('ns3::Time const &', 'right')) - cls.add_binary_numeric_operator('-', root_module['ns3::Time'], root_module['ns3::Time'], param('ns3::Time const &', 'right')) - cls.add_binary_numeric_operator('/', root_module['ns3::Time'], root_module['ns3::Time'], param('ns3::Time const &', 'right')) - cls.add_binary_comparison_operator('<') - cls.add_binary_comparison_operator('>') - cls.add_binary_comparison_operator('!=') - cls.add_inplace_numeric_operator('*=', param('ns3::Time const &', 'right')) - cls.add_inplace_numeric_operator('+=', param('ns3::Time const &', 'right')) - cls.add_inplace_numeric_operator('-=', param('ns3::Time const &', 'right')) - cls.add_inplace_numeric_operator('/=', param('ns3::Time const &', 'right')) - cls.add_output_stream_operator() - cls.add_binary_comparison_operator('<=') - cls.add_binary_comparison_operator('==') - cls.add_binary_comparison_operator('>=') - ## nstime.h (module 'core'): ns3::Time::Time() [constructor] - cls.add_constructor([]) - ## nstime.h (module 'core'): ns3::Time::Time(ns3::Time const & o) [copy constructor] - cls.add_constructor([param('ns3::Time const &', 'o')]) - ## nstime.h (module 'core'): ns3::Time::Time(ns3::HighPrecision const & data) [constructor] - cls.add_constructor([param('ns3::HighPrecision const &', 'data')]) - ## nstime.h (module 'core'): ns3::Time::Time(std::string const & s) [constructor] - cls.add_constructor([param('std::string const &', 's')]) - ## nstime.h (module 'core'): int ns3::Time::Compare(ns3::Time const & o) const [member function] - cls.add_method('Compare', - 'int', - [param('ns3::Time const &', 'o')], - is_const=True) - ## nstime.h (module 'core'): static ns3::Time ns3::Time::FromDouble(double value, ns3::Time::Unit timeUnit) [member function] - cls.add_method('FromDouble', - 'ns3::Time', - [param('double', 'value'), param('ns3::Time::Unit', 'timeUnit')], - is_static=True) - ## nstime.h (module 'core'): static ns3::Time ns3::Time::FromInteger(uint64_t value, ns3::Time::Unit timeUnit) [member function] - cls.add_method('FromInteger', - 'ns3::Time', - [param('uint64_t', 'value'), param('ns3::Time::Unit', 'timeUnit')], - is_static=True) - ## nstime.h (module 'core'): int64_t ns3::Time::GetFemtoSeconds() const [member function] - cls.add_method('GetFemtoSeconds', - 'int64_t', - [], - is_const=True) - ## nstime.h (module 'core'): ns3::HighPrecision const & ns3::Time::GetHighPrecision() const [member function] - cls.add_method('GetHighPrecision', - 'ns3::HighPrecision const &', - [], - is_const=True) - ## nstime.h (module 'core'): int64_t ns3::Time::GetMicroSeconds() const [member function] - cls.add_method('GetMicroSeconds', - 'int64_t', - [], - is_const=True) - ## nstime.h (module 'core'): int64_t ns3::Time::GetMilliSeconds() const [member function] - cls.add_method('GetMilliSeconds', - 'int64_t', - [], - is_const=True) - ## nstime.h (module 'core'): int64_t ns3::Time::GetNanoSeconds() const [member function] - cls.add_method('GetNanoSeconds', - 'int64_t', - [], - is_const=True) - ## nstime.h (module 'core'): int64_t ns3::Time::GetPicoSeconds() const [member function] - cls.add_method('GetPicoSeconds', - 'int64_t', - [], - is_const=True) - ## nstime.h (module 'core'): static ns3::Time::Unit ns3::Time::GetResolution() [member function] - cls.add_method('GetResolution', - 'ns3::Time::Unit', - [], - is_static=True) - ## nstime.h (module 'core'): double ns3::Time::GetSeconds() const [member function] - cls.add_method('GetSeconds', - 'double', - [], - is_const=True) - ## nstime.h (module 'core'): int64_t ns3::Time::GetTimeStep() const [member function] - cls.add_method('GetTimeStep', - 'int64_t', - [], - is_const=True) - ## nstime.h (module 'core'): bool ns3::Time::IsNegative() const [member function] - cls.add_method('IsNegative', - 'bool', - [], - is_const=True) - ## nstime.h (module 'core'): bool ns3::Time::IsPositive() const [member function] - cls.add_method('IsPositive', - 'bool', - [], - is_const=True) - ## nstime.h (module 'core'): bool ns3::Time::IsStrictlyNegative() const [member function] - cls.add_method('IsStrictlyNegative', - 'bool', - [], - is_const=True) - ## nstime.h (module 'core'): bool ns3::Time::IsStrictlyPositive() const [member function] - cls.add_method('IsStrictlyPositive', - 'bool', - [], - is_const=True) - ## nstime.h (module 'core'): bool ns3::Time::IsZero() const [member function] - cls.add_method('IsZero', - 'bool', - [], - is_const=True) - ## nstime.h (module 'core'): ns3::HighPrecision * ns3::Time::PeekHighPrecision() [member function] - cls.add_method('PeekHighPrecision', - 'ns3::HighPrecision *', - []) - ## nstime.h (module 'core'): static void ns3::Time::SetResolution(ns3::Time::Unit resolution) [member function] - cls.add_method('SetResolution', - 'void', - [param('ns3::Time::Unit', 'resolution')], - is_static=True) - ## nstime.h (module 'core'): static double ns3::Time::ToDouble(ns3::Time const & time, ns3::Time::Unit timeUnit) [member function] - cls.add_method('ToDouble', - 'double', - [param('ns3::Time const &', 'time'), param('ns3::Time::Unit', 'timeUnit')], - is_static=True) - ## nstime.h (module 'core'): static uint64_t ns3::Time::ToInteger(ns3::Time const & time, ns3::Time::Unit timeUnit) [member function] - cls.add_method('ToInteger', - 'uint64_t', - [param('ns3::Time const &', 'time'), param('ns3::Time::Unit', 'timeUnit')], - is_static=True) - return - -def register_Ns3TypeId_methods(root_module, cls): - cls.add_binary_comparison_operator('<') - cls.add_binary_comparison_operator('!=') - cls.add_output_stream_operator() - cls.add_binary_comparison_operator('==') - ## type-id.h (module 'core'): ns3::TypeId::TypeId(char const * name) [constructor] - cls.add_constructor([param('char const *', 'name')]) - ## type-id.h (module 'core'): ns3::TypeId::TypeId() [constructor] - cls.add_constructor([]) - ## type-id.h (module 'core'): ns3::TypeId::TypeId(ns3::TypeId const & o) [copy constructor] - cls.add_constructor([param('ns3::TypeId const &', 'o')]) - ## type-id.h (module 'core'): ns3::TypeId ns3::TypeId::AddAttribute(std::string name, std::string help, ns3::AttributeValue const & initialValue, ns3::Ptr accessor, ns3::Ptr checker) [member function] - cls.add_method('AddAttribute', - 'ns3::TypeId', - [param('std::string', 'name'), param('std::string', 'help'), param('ns3::AttributeValue const &', 'initialValue'), param('ns3::Ptr< ns3::AttributeAccessor const >', 'accessor'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')]) - ## type-id.h (module 'core'): ns3::TypeId ns3::TypeId::AddAttribute(std::string name, std::string help, uint32_t flags, ns3::AttributeValue const & initialValue, ns3::Ptr accessor, ns3::Ptr checker) [member function] - cls.add_method('AddAttribute', - 'ns3::TypeId', - [param('std::string', 'name'), param('std::string', 'help'), param('uint32_t', 'flags'), param('ns3::AttributeValue const &', 'initialValue'), param('ns3::Ptr< ns3::AttributeAccessor const >', 'accessor'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')]) - ## type-id.h (module 'core'): ns3::TypeId ns3::TypeId::AddTraceSource(std::string name, std::string help, ns3::Ptr accessor) [member function] - cls.add_method('AddTraceSource', - 'ns3::TypeId', - [param('std::string', 'name'), param('std::string', 'help'), param('ns3::Ptr< ns3::TraceSourceAccessor const >', 'accessor')]) - ## type-id.h (module 'core'): ns3::Ptr ns3::TypeId::GetAttributeAccessor(uint32_t i) const [member function] - cls.add_method('GetAttributeAccessor', - 'ns3::Ptr< ns3::AttributeAccessor const >', - [param('uint32_t', 'i')], - is_const=True) - ## type-id.h (module 'core'): ns3::Ptr ns3::TypeId::GetAttributeChecker(uint32_t i) const [member function] - cls.add_method('GetAttributeChecker', - 'ns3::Ptr< ns3::AttributeChecker const >', - [param('uint32_t', 'i')], - is_const=True) - ## type-id.h (module 'core'): uint32_t ns3::TypeId::GetAttributeFlags(uint32_t i) const [member function] - cls.add_method('GetAttributeFlags', - 'uint32_t', - [param('uint32_t', 'i')], - is_const=True) - ## type-id.h (module 'core'): std::string ns3::TypeId::GetAttributeFullName(uint32_t i) const [member function] - cls.add_method('GetAttributeFullName', - 'std::string', - [param('uint32_t', 'i')], - is_const=True) - ## type-id.h (module 'core'): std::string ns3::TypeId::GetAttributeHelp(uint32_t i) const [member function] - cls.add_method('GetAttributeHelp', - 'std::string', - [param('uint32_t', 'i')], - is_const=True) - ## type-id.h (module 'core'): ns3::Ptr ns3::TypeId::GetAttributeInitialValue(uint32_t i) const [member function] - cls.add_method('GetAttributeInitialValue', - 'ns3::Ptr< ns3::AttributeValue const >', - [param('uint32_t', 'i')], - is_const=True) - ## type-id.h (module 'core'): uint32_t ns3::TypeId::GetAttributeN() const [member function] - cls.add_method('GetAttributeN', - 'uint32_t', - [], - is_const=True) - ## type-id.h (module 'core'): std::string ns3::TypeId::GetAttributeName(uint32_t i) const [member function] - cls.add_method('GetAttributeName', - 'std::string', - [param('uint32_t', 'i')], - is_const=True) - ## type-id.h (module 'core'): ns3::Callback ns3::TypeId::GetConstructor() const [member function] - cls.add_method('GetConstructor', - 'ns3::Callback< ns3::ObjectBase *, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', - [], - is_const=True) - ## type-id.h (module 'core'): std::string ns3::TypeId::GetGroupName() const [member function] - cls.add_method('GetGroupName', - 'std::string', - [], - is_const=True) - ## type-id.h (module 'core'): std::string ns3::TypeId::GetName() const [member function] - cls.add_method('GetName', - 'std::string', - [], - is_const=True) - ## type-id.h (module 'core'): ns3::TypeId ns3::TypeId::GetParent() const [member function] - cls.add_method('GetParent', - 'ns3::TypeId', - [], - is_const=True) - ## type-id.h (module 'core'): static ns3::TypeId ns3::TypeId::GetRegistered(uint32_t i) [member function] - cls.add_method('GetRegistered', - 'ns3::TypeId', - [param('uint32_t', 'i')], - is_static=True) - ## type-id.h (module 'core'): static uint32_t ns3::TypeId::GetRegisteredN() [member function] - cls.add_method('GetRegisteredN', - 'uint32_t', - [], - is_static=True) - ## type-id.h (module 'core'): ns3::Ptr ns3::TypeId::GetTraceSourceAccessor(uint32_t i) const [member function] - cls.add_method('GetTraceSourceAccessor', - 'ns3::Ptr< ns3::TraceSourceAccessor const >', - [param('uint32_t', 'i')], - is_const=True) - ## type-id.h (module 'core'): std::string ns3::TypeId::GetTraceSourceHelp(uint32_t i) const [member function] - cls.add_method('GetTraceSourceHelp', - 'std::string', - [param('uint32_t', 'i')], - is_const=True) - ## type-id.h (module 'core'): uint32_t ns3::TypeId::GetTraceSourceN() const [member function] - cls.add_method('GetTraceSourceN', - 'uint32_t', - [], - is_const=True) - ## type-id.h (module 'core'): std::string ns3::TypeId::GetTraceSourceName(uint32_t i) const [member function] - cls.add_method('GetTraceSourceName', - 'std::string', - [param('uint32_t', 'i')], - is_const=True) - ## type-id.h (module 'core'): uint16_t ns3::TypeId::GetUid() const [member function] - cls.add_method('GetUid', - 'uint16_t', - [], - is_const=True) - ## type-id.h (module 'core'): bool ns3::TypeId::HasConstructor() const [member function] - cls.add_method('HasConstructor', - 'bool', - [], - is_const=True) - ## type-id.h (module 'core'): bool ns3::TypeId::HasParent() const [member function] - cls.add_method('HasParent', - 'bool', - [], - is_const=True) - ## type-id.h (module 'core'): ns3::TypeId ns3::TypeId::HideFromDocumentation() [member function] - cls.add_method('HideFromDocumentation', - 'ns3::TypeId', - []) - ## type-id.h (module 'core'): bool ns3::TypeId::IsChildOf(ns3::TypeId other) const [member function] - cls.add_method('IsChildOf', - 'bool', - [param('ns3::TypeId', 'other')], - is_const=True) - ## type-id.h (module 'core'): static bool ns3::TypeId::LookupAttributeByFullName(std::string fullName, ns3::TypeId::AttributeInfo * info) [member function] - cls.add_method('LookupAttributeByFullName', - 'bool', - [param('std::string', 'fullName'), param('ns3::TypeId::AttributeInfo *', 'info')], - is_static=True) - ## type-id.h (module 'core'): bool ns3::TypeId::LookupAttributeByName(std::string name, ns3::TypeId::AttributeInfo * info) const [member function] - cls.add_method('LookupAttributeByName', - 'bool', - [param('std::string', 'name'), param('ns3::TypeId::AttributeInfo *', 'info', transfer_ownership=False)], - is_const=True) - ## type-id.h (module 'core'): static ns3::TypeId ns3::TypeId::LookupByName(std::string name) [member function] - cls.add_method('LookupByName', - 'ns3::TypeId', - [param('std::string', 'name')], - is_static=True) - ## type-id.h (module 'core'): ns3::Ptr ns3::TypeId::LookupTraceSourceByName(std::string name) const [member function] - cls.add_method('LookupTraceSourceByName', - 'ns3::Ptr< ns3::TraceSourceAccessor const >', - [param('std::string', 'name')], - is_const=True) - ## type-id.h (module 'core'): bool ns3::TypeId::MustHideFromDocumentation() const [member function] - cls.add_method('MustHideFromDocumentation', - 'bool', - [], - is_const=True) - ## type-id.h (module 'core'): ns3::TypeId ns3::TypeId::SetGroupName(std::string groupName) [member function] - cls.add_method('SetGroupName', - 'ns3::TypeId', - [param('std::string', 'groupName')]) - ## type-id.h (module 'core'): ns3::TypeId ns3::TypeId::SetParent(ns3::TypeId tid) [member function] - cls.add_method('SetParent', - 'ns3::TypeId', - [param('ns3::TypeId', 'tid')]) - ## type-id.h (module 'core'): void ns3::TypeId::SetUid(uint16_t tid) [member function] - cls.add_method('SetUid', - 'void', - [param('uint16_t', 'tid')]) - return - -def register_Ns3TypeIdAttributeInfo_methods(root_module, cls): - ## type-id.h (module 'core'): ns3::TypeId::AttributeInfo::AttributeInfo() [constructor] - cls.add_constructor([]) - ## type-id.h (module 'core'): ns3::TypeId::AttributeInfo::AttributeInfo(ns3::TypeId::AttributeInfo const & arg0) [copy constructor] - cls.add_constructor([param('ns3::TypeId::AttributeInfo const &', 'arg0')]) - ## type-id.h (module 'core'): ns3::TypeId::AttributeInfo::accessor [variable] - cls.add_instance_attribute('accessor', 'ns3::Ptr< ns3::AttributeAccessor const >', is_const=False) - ## type-id.h (module 'core'): ns3::TypeId::AttributeInfo::checker [variable] - cls.add_instance_attribute('checker', 'ns3::Ptr< ns3::AttributeChecker const >', is_const=False) - ## type-id.h (module 'core'): ns3::TypeId::AttributeInfo::flags [variable] - cls.add_instance_attribute('flags', 'uint32_t', is_const=False) - ## type-id.h (module 'core'): ns3::TypeId::AttributeInfo::initialValue [variable] - cls.add_instance_attribute('initialValue', 'ns3::Ptr< ns3::AttributeValue const >', is_const=False) - return - -def register_Ns3UnsafeAttributeList_methods(root_module, cls): - ## attribute-list.h (module 'core'): ns3::UnsafeAttributeList::UnsafeAttributeList() [constructor] - cls.add_constructor([]) - ## attribute-list.h (module 'core'): ns3::UnsafeAttributeList::UnsafeAttributeList(ns3::UnsafeAttributeList const & o) [copy constructor] - cls.add_constructor([param('ns3::UnsafeAttributeList const &', 'o')]) - ## attribute-list.h (module 'core'): ns3::AttributeList ns3::UnsafeAttributeList::GetSafe(std::string name) const [member function] - cls.add_method('GetSafe', - 'ns3::AttributeList', - [param('std::string', 'name')], - is_const=True) - ## attribute-list.h (module 'core'): void ns3::UnsafeAttributeList::Set(std::string name, ns3::AttributeValue const & param) [member function] - cls.add_method('Set', - 'void', - [param('std::string', 'name'), param('ns3::AttributeValue const &', 'param')]) - return - -def register_Ns3Empty_methods(root_module, cls): - ## empty.h (module 'core'): ns3::empty::empty() [constructor] - cls.add_constructor([]) - ## empty.h (module 'core'): ns3::empty::empty(ns3::empty const & arg0) [copy constructor] - cls.add_constructor([param('ns3::empty const &', 'arg0')]) - return - -def register_Ns3Chunk_methods(root_module, cls): - ## chunk.h (module 'network'): ns3::Chunk::Chunk() [constructor] - cls.add_constructor([]) - ## chunk.h (module 'network'): ns3::Chunk::Chunk(ns3::Chunk const & arg0) [copy constructor] - cls.add_constructor([param('ns3::Chunk const &', 'arg0')]) - ## chunk.h (module 'network'): uint32_t ns3::Chunk::Deserialize(ns3::Buffer::Iterator start) [member function] - cls.add_method('Deserialize', - 'uint32_t', - [param('ns3::Buffer::Iterator', 'start')], - is_pure_virtual=True, is_virtual=True) - ## chunk.h (module 'network'): static ns3::TypeId ns3::Chunk::GetTypeId() [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_static=True) - ## chunk.h (module 'network'): void ns3::Chunk::Print(std::ostream & os) const [member function] - cls.add_method('Print', - 'void', - [param('std::ostream &', 'os')], - is_pure_virtual=True, is_const=True, is_virtual=True) - return - -def register_Ns3ConfigStore_methods(root_module, cls): - ## config-store.h (module 'contrib'): ns3::ConfigStore::ConfigStore(ns3::ConfigStore const & arg0) [copy constructor] - cls.add_constructor([param('ns3::ConfigStore const &', 'arg0')]) - ## config-store.h (module 'contrib'): ns3::ConfigStore::ConfigStore() [constructor] - cls.add_constructor([]) - ## config-store.h (module 'contrib'): void ns3::ConfigStore::ConfigureAttributes() [member function] - cls.add_method('ConfigureAttributes', - 'void', - []) - ## config-store.h (module 'contrib'): void ns3::ConfigStore::ConfigureDefaults() [member function] - cls.add_method('ConfigureDefaults', - 'void', - []) - ## config-store.h (module 'contrib'): ns3::TypeId ns3::ConfigStore::GetInstanceTypeId() const [member function] - cls.add_method('GetInstanceTypeId', - 'ns3::TypeId', - [], - is_const=True, is_virtual=True) - ## config-store.h (module 'contrib'): static ns3::TypeId ns3::ConfigStore::GetTypeId() [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_static=True) - ## config-store.h (module 'contrib'): void ns3::ConfigStore::SetFileFormat(ns3::ConfigStore::FileFormat format) [member function] - cls.add_method('SetFileFormat', - 'void', - [param('ns3::ConfigStore::FileFormat', 'format')]) - ## config-store.h (module 'contrib'): void ns3::ConfigStore::SetFilename(std::string filename) [member function] - cls.add_method('SetFilename', - 'void', - [param('std::string', 'filename')]) - ## config-store.h (module 'contrib'): void ns3::ConfigStore::SetMode(ns3::ConfigStore::Mode mode) [member function] - cls.add_method('SetMode', - 'void', - [param('ns3::ConfigStore::Mode', 'mode')]) - return - -def register_Ns3FlowIdTag_methods(root_module, cls): - ## flow-id-tag.h (module 'contrib'): ns3::FlowIdTag::FlowIdTag(ns3::FlowIdTag const & arg0) [copy constructor] - cls.add_constructor([param('ns3::FlowIdTag const &', 'arg0')]) - ## flow-id-tag.h (module 'contrib'): ns3::FlowIdTag::FlowIdTag() [constructor] - cls.add_constructor([]) - ## flow-id-tag.h (module 'contrib'): ns3::FlowIdTag::FlowIdTag(uint32_t flowId) [constructor] - cls.add_constructor([param('uint32_t', 'flowId')]) - ## flow-id-tag.h (module 'contrib'): static uint32_t ns3::FlowIdTag::AllocateFlowId() [member function] - cls.add_method('AllocateFlowId', - 'uint32_t', - [], - is_static=True) - ## flow-id-tag.h (module 'contrib'): void ns3::FlowIdTag::Deserialize(ns3::TagBuffer buf) [member function] - cls.add_method('Deserialize', - 'void', - [param('ns3::TagBuffer', 'buf')], - is_virtual=True) - ## flow-id-tag.h (module 'contrib'): uint32_t ns3::FlowIdTag::GetFlowId() const [member function] - cls.add_method('GetFlowId', - 'uint32_t', - [], - is_const=True) - ## flow-id-tag.h (module 'contrib'): ns3::TypeId ns3::FlowIdTag::GetInstanceTypeId() const [member function] - cls.add_method('GetInstanceTypeId', - 'ns3::TypeId', - [], - is_const=True, is_virtual=True) - ## flow-id-tag.h (module 'contrib'): uint32_t ns3::FlowIdTag::GetSerializedSize() const [member function] - cls.add_method('GetSerializedSize', - 'uint32_t', - [], - is_const=True, is_virtual=True) - ## flow-id-tag.h (module 'contrib'): static ns3::TypeId ns3::FlowIdTag::GetTypeId() [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_static=True) - ## flow-id-tag.h (module 'contrib'): void ns3::FlowIdTag::Print(std::ostream & os) const [member function] - cls.add_method('Print', - 'void', - [param('std::ostream &', 'os')], - is_const=True, is_virtual=True) - ## flow-id-tag.h (module 'contrib'): void ns3::FlowIdTag::Serialize(ns3::TagBuffer buf) const [member function] - cls.add_method('Serialize', - 'void', - [param('ns3::TagBuffer', 'buf')], - is_const=True, is_virtual=True) - ## flow-id-tag.h (module 'contrib'): void ns3::FlowIdTag::SetFlowId(uint32_t flowId) [member function] - cls.add_method('SetFlowId', - 'void', - [param('uint32_t', 'flowId')]) - return - -def register_Ns3Gnuplot2dDataset_methods(root_module, cls): - ## gnuplot.h (module 'contrib'): ns3::Gnuplot2dDataset::Gnuplot2dDataset(ns3::Gnuplot2dDataset const & arg0) [copy constructor] - cls.add_constructor([param('ns3::Gnuplot2dDataset const &', 'arg0')]) - ## gnuplot.h (module 'contrib'): ns3::Gnuplot2dDataset::Gnuplot2dDataset(std::string const & title="Untitled") [constructor] - cls.add_constructor([param('std::string const &', 'title', default_value='"Untitled"')]) - ## gnuplot.h (module 'contrib'): void ns3::Gnuplot2dDataset::Add(double x, double y) [member function] - cls.add_method('Add', - 'void', - [param('double', 'x'), param('double', 'y')]) - ## gnuplot.h (module 'contrib'): void ns3::Gnuplot2dDataset::Add(double x, double y, double errorDelta) [member function] - cls.add_method('Add', - 'void', - [param('double', 'x'), param('double', 'y'), param('double', 'errorDelta')]) - ## gnuplot.h (module 'contrib'): void ns3::Gnuplot2dDataset::Add(double x, double y, double minY, double maxY) [member function] - cls.add_method('Add', - 'void', - [param('double', 'x'), param('double', 'y'), param('double', 'minY'), param('double', 'maxY')]) - ## gnuplot.h (module 'contrib'): void ns3::Gnuplot2dDataset::AddEmptyLine() [member function] - cls.add_method('AddEmptyLine', - 'void', - []) - ## gnuplot.h (module 'contrib'): static void ns3::Gnuplot2dDataset::SetDefaultErrorBars(ns3::Gnuplot2dDataset::ErrorBars errorBars) [member function] - cls.add_method('SetDefaultErrorBars', - 'void', - [param('ns3::Gnuplot2dDataset::ErrorBars', 'errorBars')], - is_static=True) - ## gnuplot.h (module 'contrib'): static void ns3::Gnuplot2dDataset::SetDefaultStyle(ns3::Gnuplot2dDataset::Style style) [member function] - cls.add_method('SetDefaultStyle', - 'void', - [param('ns3::Gnuplot2dDataset::Style', 'style')], - is_static=True) - ## gnuplot.h (module 'contrib'): void ns3::Gnuplot2dDataset::SetErrorBars(ns3::Gnuplot2dDataset::ErrorBars errorBars) [member function] - cls.add_method('SetErrorBars', - 'void', - [param('ns3::Gnuplot2dDataset::ErrorBars', 'errorBars')]) - ## gnuplot.h (module 'contrib'): void ns3::Gnuplot2dDataset::SetStyle(ns3::Gnuplot2dDataset::Style style) [member function] - cls.add_method('SetStyle', - 'void', - [param('ns3::Gnuplot2dDataset::Style', 'style')]) - return - -def register_Ns3Gnuplot2dFunction_methods(root_module, cls): - ## gnuplot.h (module 'contrib'): ns3::Gnuplot2dFunction::Gnuplot2dFunction(ns3::Gnuplot2dFunction const & arg0) [copy constructor] - cls.add_constructor([param('ns3::Gnuplot2dFunction const &', 'arg0')]) - ## gnuplot.h (module 'contrib'): ns3::Gnuplot2dFunction::Gnuplot2dFunction(std::string const & title="Untitled", std::string const & function="") [constructor] - cls.add_constructor([param('std::string const &', 'title', default_value='"Untitled"'), param('std::string const &', 'function', default_value='""')]) - ## gnuplot.h (module 'contrib'): void ns3::Gnuplot2dFunction::SetFunction(std::string const & function) [member function] - cls.add_method('SetFunction', - 'void', - [param('std::string const &', 'function')]) - return - -def register_Ns3Gnuplot3dDataset_methods(root_module, cls): - ## gnuplot.h (module 'contrib'): ns3::Gnuplot3dDataset::Gnuplot3dDataset(ns3::Gnuplot3dDataset const & arg0) [copy constructor] - cls.add_constructor([param('ns3::Gnuplot3dDataset const &', 'arg0')]) - ## gnuplot.h (module 'contrib'): ns3::Gnuplot3dDataset::Gnuplot3dDataset(std::string const & title="Untitled") [constructor] - cls.add_constructor([param('std::string const &', 'title', default_value='"Untitled"')]) - ## gnuplot.h (module 'contrib'): void ns3::Gnuplot3dDataset::Add(double x, double y, double z) [member function] - cls.add_method('Add', - 'void', - [param('double', 'x'), param('double', 'y'), param('double', 'z')]) - ## gnuplot.h (module 'contrib'): void ns3::Gnuplot3dDataset::AddEmptyLine() [member function] - cls.add_method('AddEmptyLine', - 'void', - []) - ## gnuplot.h (module 'contrib'): static void ns3::Gnuplot3dDataset::SetDefaultStyle(std::string const & style) [member function] - cls.add_method('SetDefaultStyle', - 'void', - [param('std::string const &', 'style')], - is_static=True) - ## gnuplot.h (module 'contrib'): void ns3::Gnuplot3dDataset::SetStyle(std::string const & style) [member function] - cls.add_method('SetStyle', - 'void', - [param('std::string const &', 'style')]) - return - -def register_Ns3Gnuplot3dFunction_methods(root_module, cls): - ## gnuplot.h (module 'contrib'): ns3::Gnuplot3dFunction::Gnuplot3dFunction(ns3::Gnuplot3dFunction const & arg0) [copy constructor] - cls.add_constructor([param('ns3::Gnuplot3dFunction const &', 'arg0')]) - ## gnuplot.h (module 'contrib'): ns3::Gnuplot3dFunction::Gnuplot3dFunction(std::string const & title="Untitled", std::string const & function="") [constructor] - cls.add_constructor([param('std::string const &', 'title', default_value='"Untitled"'), param('std::string const &', 'function', default_value='""')]) - ## gnuplot.h (module 'contrib'): void ns3::Gnuplot3dFunction::SetFunction(std::string const & function) [member function] - cls.add_method('SetFunction', - 'void', - [param('std::string const &', 'function')]) - return - -def register_Ns3Header_methods(root_module, cls): - cls.add_output_stream_operator() - ## header.h (module 'network'): ns3::Header::Header() [constructor] - cls.add_constructor([]) - ## header.h (module 'network'): ns3::Header::Header(ns3::Header const & arg0) [copy constructor] - cls.add_constructor([param('ns3::Header const &', 'arg0')]) - ## header.h (module 'network'): uint32_t ns3::Header::Deserialize(ns3::Buffer::Iterator start) [member function] - cls.add_method('Deserialize', - 'uint32_t', - [param('ns3::Buffer::Iterator', 'start')], - is_pure_virtual=True, is_virtual=True) - ## header.h (module 'network'): uint32_t ns3::Header::GetSerializedSize() const [member function] - cls.add_method('GetSerializedSize', - 'uint32_t', - [], - is_pure_virtual=True, is_const=True, is_virtual=True) - ## header.h (module 'network'): static ns3::TypeId ns3::Header::GetTypeId() [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_static=True) - ## header.h (module 'network'): void ns3::Header::Print(std::ostream & os) const [member function] - cls.add_method('Print', - 'void', - [param('std::ostream &', 'os')], - is_pure_virtual=True, is_const=True, is_virtual=True) - ## header.h (module 'network'): void ns3::Header::Serialize(ns3::Buffer::Iterator start) const [member function] - cls.add_method('Serialize', - 'void', - [param('ns3::Buffer::Iterator', 'start')], - is_pure_virtual=True, is_const=True, is_virtual=True) - return - -def register_Ns3Object_methods(root_module, cls): - ## object.h (module 'core'): ns3::Object::Object() [constructor] - cls.add_constructor([]) - ## object.h (module 'core'): void ns3::Object::AggregateObject(ns3::Ptr other) [member function] - cls.add_method('AggregateObject', - 'void', - [param('ns3::Ptr< ns3::Object >', 'other')]) - ## object.h (module 'core'): void ns3::Object::Dispose() [member function] - cls.add_method('Dispose', - 'void', - []) - ## object.h (module 'core'): ns3::Object::AggregateIterator ns3::Object::GetAggregateIterator() const [member function] - cls.add_method('GetAggregateIterator', - 'ns3::Object::AggregateIterator', - [], - is_const=True) - ## object.h (module 'core'): ns3::TypeId ns3::Object::GetInstanceTypeId() const [member function] - cls.add_method('GetInstanceTypeId', - 'ns3::TypeId', - [], - is_const=True, is_virtual=True) - ## object.h (module 'core'): static ns3::TypeId ns3::Object::GetTypeId() [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_static=True) - ## object.h (module 'core'): void ns3::Object::Start() [member function] - cls.add_method('Start', - 'void', - []) - ## object.h (module 'core'): ns3::Object::Object(ns3::Object const & o) [copy constructor] - cls.add_constructor([param('ns3::Object const &', 'o')], - visibility='protected') - ## object.h (module 'core'): void ns3::Object::DoDispose() [member function] - cls.add_method('DoDispose', - 'void', - [], - visibility='protected', is_virtual=True) - ## object.h (module 'core'): void ns3::Object::DoStart() [member function] - cls.add_method('DoStart', - 'void', - [], - visibility='protected', is_virtual=True) - ## object.h (module 'core'): void ns3::Object::NotifyNewAggregate() [member function] - cls.add_method('NotifyNewAggregate', - 'void', - [], - visibility='protected', is_virtual=True) - return - -def register_Ns3ObjectAggregateIterator_methods(root_module, cls): - ## object.h (module 'core'): ns3::Object::AggregateIterator::AggregateIterator(ns3::Object::AggregateIterator const & arg0) [copy constructor] - cls.add_constructor([param('ns3::Object::AggregateIterator const &', 'arg0')]) - ## object.h (module 'core'): ns3::Object::AggregateIterator::AggregateIterator() [constructor] - cls.add_constructor([]) - ## object.h (module 'core'): bool ns3::Object::AggregateIterator::HasNext() const [member function] - cls.add_method('HasNext', - 'bool', - [], - is_const=True) - ## object.h (module 'core'): ns3::Ptr ns3::Object::AggregateIterator::Next() [member function] - cls.add_method('Next', - 'ns3::Ptr< ns3::Object const >', - []) - return - -def register_Ns3Scalar_methods(root_module, cls): - ## nstime.h (module 'core'): ns3::Scalar::Scalar(ns3::Scalar const & arg0) [copy constructor] - cls.add_constructor([param('ns3::Scalar const &', 'arg0')]) - ## nstime.h (module 'core'): ns3::Scalar::Scalar() [constructor] - cls.add_constructor([]) - ## nstime.h (module 'core'): ns3::Scalar::Scalar(double v) [constructor] - cls.add_constructor([param('double', 'v')]) - ## nstime.h (module 'core'): ns3::Scalar::Scalar(uint32_t v) [constructor] - cls.add_constructor([param('uint32_t', 'v')]) - ## nstime.h (module 'core'): ns3::Scalar::Scalar(int32_t v) [constructor] - cls.add_constructor([param('int32_t', 'v')]) - ## nstime.h (module 'core'): ns3::Scalar::Scalar(uint64_t v) [constructor] - cls.add_constructor([param('uint64_t', 'v')]) - ## nstime.h (module 'core'): ns3::Scalar::Scalar(int64_t v) [constructor] - cls.add_constructor([param('int64_t', 'v')]) - ## nstime.h (module 'core'): ns3::Scalar::Scalar(ns3::Time t) [constructor] - cls.add_constructor([param('ns3::Time', 't')]) - ## nstime.h (module 'core'): double ns3::Scalar::GetDouble() const [member function] - cls.add_method('GetDouble', - 'double', - [], - is_const=True) - return - -def register_Ns3SimpleRefCount__Ns3AttributeAccessor_Ns3Empty_Ns3DefaultDeleter__lt__ns3AttributeAccessor__gt___methods(root_module, cls): - ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount() [constructor] - cls.add_constructor([]) - ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount(ns3::SimpleRefCount > const & o) [copy constructor] - cls.add_constructor([param('ns3::SimpleRefCount< ns3::AttributeAccessor, ns3::empty, ns3::DefaultDeleter< ns3::AttributeAccessor > > const &', 'o')]) - ## simple-ref-count.h (module 'core'): static void ns3::SimpleRefCount >::Cleanup() [member function] - cls.add_method('Cleanup', - 'void', - [], - is_static=True) - return - -def register_Ns3SimpleRefCount__Ns3AttributeChecker_Ns3Empty_Ns3DefaultDeleter__lt__ns3AttributeChecker__gt___methods(root_module, cls): - ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount() [constructor] - cls.add_constructor([]) - ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount(ns3::SimpleRefCount > const & o) [copy constructor] - cls.add_constructor([param('ns3::SimpleRefCount< ns3::AttributeChecker, ns3::empty, ns3::DefaultDeleter< ns3::AttributeChecker > > const &', 'o')]) - ## simple-ref-count.h (module 'core'): static void ns3::SimpleRefCount >::Cleanup() [member function] - cls.add_method('Cleanup', - 'void', - [], - is_static=True) - return - -def register_Ns3SimpleRefCount__Ns3AttributeValue_Ns3Empty_Ns3DefaultDeleter__lt__ns3AttributeValue__gt___methods(root_module, cls): - ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount() [constructor] - cls.add_constructor([]) - ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount(ns3::SimpleRefCount > const & o) [copy constructor] - cls.add_constructor([param('ns3::SimpleRefCount< ns3::AttributeValue, ns3::empty, ns3::DefaultDeleter< ns3::AttributeValue > > const &', 'o')]) - ## simple-ref-count.h (module 'core'): static void ns3::SimpleRefCount >::Cleanup() [member function] - cls.add_method('Cleanup', - 'void', - [], - is_static=True) - return - -def register_Ns3SimpleRefCount__Ns3CallbackImplBase_Ns3Empty_Ns3DefaultDeleter__lt__ns3CallbackImplBase__gt___methods(root_module, cls): - ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount() [constructor] - cls.add_constructor([]) - ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount(ns3::SimpleRefCount > const & o) [copy constructor] - cls.add_constructor([param('ns3::SimpleRefCount< ns3::CallbackImplBase, ns3::empty, ns3::DefaultDeleter< ns3::CallbackImplBase > > const &', 'o')]) - ## simple-ref-count.h (module 'core'): static void ns3::SimpleRefCount >::Cleanup() [member function] - cls.add_method('Cleanup', - 'void', - [], - is_static=True) - return - -def register_Ns3SimpleRefCount__Ns3EventImpl_Ns3Empty_Ns3DefaultDeleter__lt__ns3EventImpl__gt___methods(root_module, cls): - ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount() [constructor] - cls.add_constructor([]) - ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount(ns3::SimpleRefCount > const & o) [copy constructor] - cls.add_constructor([param('ns3::SimpleRefCount< ns3::EventImpl, ns3::empty, ns3::DefaultDeleter< ns3::EventImpl > > const &', 'o')]) - ## simple-ref-count.h (module 'core'): static void ns3::SimpleRefCount >::Cleanup() [member function] - cls.add_method('Cleanup', - 'void', - [], - is_static=True) - return - -def register_Ns3SimpleRefCount__Ns3NixVector_Ns3Empty_Ns3DefaultDeleter__lt__ns3NixVector__gt___methods(root_module, cls): - ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount() [constructor] - cls.add_constructor([]) - ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount(ns3::SimpleRefCount > const & o) [copy constructor] - cls.add_constructor([param('ns3::SimpleRefCount< ns3::NixVector, ns3::empty, ns3::DefaultDeleter< ns3::NixVector > > const &', 'o')]) - ## simple-ref-count.h (module 'core'): static void ns3::SimpleRefCount >::Cleanup() [member function] - cls.add_method('Cleanup', - 'void', - [], - is_static=True) - return - -def register_Ns3SimpleRefCount__Ns3Packet_Ns3Empty_Ns3DefaultDeleter__lt__ns3Packet__gt___methods(root_module, cls): - ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount() [constructor] - cls.add_constructor([]) - ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount(ns3::SimpleRefCount > const & o) [copy constructor] - cls.add_constructor([param('ns3::SimpleRefCount< ns3::Packet, ns3::empty, ns3::DefaultDeleter< ns3::Packet > > const &', 'o')]) - ## simple-ref-count.h (module 'core'): static void ns3::SimpleRefCount >::Cleanup() [member function] - cls.add_method('Cleanup', - 'void', - [], - is_static=True) - return - -def register_Ns3Trailer_methods(root_module, cls): - cls.add_output_stream_operator() - ## trailer.h (module 'network'): ns3::Trailer::Trailer() [constructor] - cls.add_constructor([]) - ## trailer.h (module 'network'): ns3::Trailer::Trailer(ns3::Trailer const & arg0) [copy constructor] - cls.add_constructor([param('ns3::Trailer const &', 'arg0')]) - ## trailer.h (module 'network'): uint32_t ns3::Trailer::Deserialize(ns3::Buffer::Iterator end) [member function] - cls.add_method('Deserialize', - 'uint32_t', - [param('ns3::Buffer::Iterator', 'end')], - is_pure_virtual=True, is_virtual=True) - ## trailer.h (module 'network'): uint32_t ns3::Trailer::GetSerializedSize() const [member function] - cls.add_method('GetSerializedSize', - 'uint32_t', - [], - is_pure_virtual=True, is_const=True, is_virtual=True) - ## trailer.h (module 'network'): static ns3::TypeId ns3::Trailer::GetTypeId() [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_static=True) - ## trailer.h (module 'network'): void ns3::Trailer::Print(std::ostream & os) const [member function] - cls.add_method('Print', - 'void', - [param('std::ostream &', 'os')], - is_pure_virtual=True, is_const=True, is_virtual=True) - ## trailer.h (module 'network'): void ns3::Trailer::Serialize(ns3::Buffer::Iterator start) const [member function] - cls.add_method('Serialize', - 'void', - [param('ns3::Buffer::Iterator', 'start')], - is_pure_virtual=True, is_const=True, is_virtual=True) - return - -def register_Ns3AttributeAccessor_methods(root_module, cls): - ## attribute.h (module 'core'): ns3::AttributeAccessor::AttributeAccessor(ns3::AttributeAccessor const & arg0) [copy constructor] - cls.add_constructor([param('ns3::AttributeAccessor const &', 'arg0')]) - ## attribute.h (module 'core'): ns3::AttributeAccessor::AttributeAccessor() [constructor] - cls.add_constructor([]) - ## attribute.h (module 'core'): bool ns3::AttributeAccessor::Get(ns3::ObjectBase const * object, ns3::AttributeValue & attribute) const [member function] - cls.add_method('Get', - 'bool', - [param('ns3::ObjectBase const *', 'object'), param('ns3::AttributeValue &', 'attribute')], - is_pure_virtual=True, is_const=True, is_virtual=True) - ## attribute.h (module 'core'): bool ns3::AttributeAccessor::HasGetter() const [member function] - cls.add_method('HasGetter', - 'bool', - [], - is_pure_virtual=True, is_const=True, is_virtual=True) - ## attribute.h (module 'core'): bool ns3::AttributeAccessor::HasSetter() const [member function] - cls.add_method('HasSetter', - 'bool', - [], - is_pure_virtual=True, is_const=True, is_virtual=True) - ## attribute.h (module 'core'): bool ns3::AttributeAccessor::Set(ns3::ObjectBase * object, ns3::AttributeValue const & value) const [member function] - cls.add_method('Set', - 'bool', - [param('ns3::ObjectBase *', 'object', transfer_ownership=False), param('ns3::AttributeValue const &', 'value')], - is_pure_virtual=True, is_const=True, is_virtual=True) - return - -def register_Ns3AttributeChecker_methods(root_module, cls): - ## attribute.h (module 'core'): ns3::AttributeChecker::AttributeChecker(ns3::AttributeChecker const & arg0) [copy constructor] - cls.add_constructor([param('ns3::AttributeChecker const &', 'arg0')]) - ## attribute.h (module 'core'): ns3::AttributeChecker::AttributeChecker() [constructor] - cls.add_constructor([]) - ## attribute.h (module 'core'): bool ns3::AttributeChecker::Check(ns3::AttributeValue const & value) const [member function] - cls.add_method('Check', - 'bool', - [param('ns3::AttributeValue const &', 'value')], - is_pure_virtual=True, is_const=True, is_virtual=True) - ## attribute.h (module 'core'): bool ns3::AttributeChecker::Copy(ns3::AttributeValue const & source, ns3::AttributeValue & destination) const [member function] - cls.add_method('Copy', - 'bool', - [param('ns3::AttributeValue const &', 'source'), param('ns3::AttributeValue &', 'destination')], - is_pure_virtual=True, is_const=True, is_virtual=True) - ## attribute.h (module 'core'): ns3::Ptr ns3::AttributeChecker::Create() const [member function] - cls.add_method('Create', - 'ns3::Ptr< ns3::AttributeValue >', - [], - is_pure_virtual=True, is_const=True, is_virtual=True) - ## attribute.h (module 'core'): std::string ns3::AttributeChecker::GetUnderlyingTypeInformation() const [member function] - cls.add_method('GetUnderlyingTypeInformation', - 'std::string', - [], - is_pure_virtual=True, is_const=True, is_virtual=True) - ## attribute.h (module 'core'): std::string ns3::AttributeChecker::GetValueTypeName() const [member function] - cls.add_method('GetValueTypeName', - 'std::string', - [], - is_pure_virtual=True, is_const=True, is_virtual=True) - ## attribute.h (module 'core'): bool ns3::AttributeChecker::HasUnderlyingTypeInformation() const [member function] - cls.add_method('HasUnderlyingTypeInformation', - 'bool', - [], - is_pure_virtual=True, is_const=True, is_virtual=True) - return - -def register_Ns3AttributeValue_methods(root_module, cls): - ## attribute.h (module 'core'): ns3::AttributeValue::AttributeValue(ns3::AttributeValue const & arg0) [copy constructor] - cls.add_constructor([param('ns3::AttributeValue const &', 'arg0')]) - ## attribute.h (module 'core'): ns3::AttributeValue::AttributeValue() [constructor] - cls.add_constructor([]) - ## attribute.h (module 'core'): ns3::Ptr ns3::AttributeValue::Copy() const [member function] - cls.add_method('Copy', - 'ns3::Ptr< ns3::AttributeValue >', - [], - is_pure_virtual=True, is_const=True, is_virtual=True) - ## attribute.h (module 'core'): bool ns3::AttributeValue::DeserializeFromString(std::string value, ns3::Ptr checker) [member function] - cls.add_method('DeserializeFromString', - 'bool', - [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], - is_pure_virtual=True, is_virtual=True) - ## attribute.h (module 'core'): std::string ns3::AttributeValue::SerializeToString(ns3::Ptr checker) const [member function] - cls.add_method('SerializeToString', - 'std::string', - [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], - is_pure_virtual=True, is_const=True, is_virtual=True) - return - -def register_Ns3CallbackChecker_methods(root_module, cls): - ## callback.h (module 'core'): ns3::CallbackChecker::CallbackChecker() [constructor] - cls.add_constructor([]) - ## callback.h (module 'core'): ns3::CallbackChecker::CallbackChecker(ns3::CallbackChecker const & arg0) [copy constructor] - cls.add_constructor([param('ns3::CallbackChecker const &', 'arg0')]) - return - -def register_Ns3CallbackImplBase_methods(root_module, cls): - ## callback.h (module 'core'): ns3::CallbackImplBase::CallbackImplBase() [constructor] - cls.add_constructor([]) - ## callback.h (module 'core'): ns3::CallbackImplBase::CallbackImplBase(ns3::CallbackImplBase const & arg0) [copy constructor] - cls.add_constructor([param('ns3::CallbackImplBase const &', 'arg0')]) - ## callback.h (module 'core'): bool ns3::CallbackImplBase::IsEqual(ns3::Ptr other) const [member function] - cls.add_method('IsEqual', - 'bool', - [param('ns3::Ptr< ns3::CallbackImplBase const >', 'other')], - is_pure_virtual=True, is_const=True, is_virtual=True) - return - -def register_Ns3CallbackValue_methods(root_module, cls): - ## callback.h (module 'core'): ns3::CallbackValue::CallbackValue(ns3::CallbackValue const & arg0) [copy constructor] - cls.add_constructor([param('ns3::CallbackValue const &', 'arg0')]) - ## callback.h (module 'core'): ns3::CallbackValue::CallbackValue() [constructor] - cls.add_constructor([]) - ## callback.h (module 'core'): ns3::CallbackValue::CallbackValue(ns3::CallbackBase const & base) [constructor] - cls.add_constructor([param('ns3::CallbackBase const &', 'base')]) - ## callback.h (module 'core'): ns3::Ptr ns3::CallbackValue::Copy() const [member function] - cls.add_method('Copy', - 'ns3::Ptr< ns3::AttributeValue >', - [], - is_const=True, is_virtual=True) - ## callback.h (module 'core'): bool ns3::CallbackValue::DeserializeFromString(std::string value, ns3::Ptr checker) [member function] - cls.add_method('DeserializeFromString', - 'bool', - [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], - is_virtual=True) - ## callback.h (module 'core'): std::string ns3::CallbackValue::SerializeToString(ns3::Ptr checker) const [member function] - cls.add_method('SerializeToString', - 'std::string', - [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], - is_const=True, is_virtual=True) - ## callback.h (module 'core'): void ns3::CallbackValue::Set(ns3::CallbackBase base) [member function] - cls.add_method('Set', - 'void', - [param('ns3::CallbackBase', 'base')]) - return - -def register_Ns3EmptyAttributeValue_methods(root_module, cls): - ## attribute.h (module 'core'): ns3::EmptyAttributeValue::EmptyAttributeValue(ns3::EmptyAttributeValue const & arg0) [copy constructor] - cls.add_constructor([param('ns3::EmptyAttributeValue const &', 'arg0')]) - ## attribute.h (module 'core'): ns3::EmptyAttributeValue::EmptyAttributeValue() [constructor] - cls.add_constructor([]) - ## attribute.h (module 'core'): ns3::Ptr ns3::EmptyAttributeValue::Copy() const [member function] - cls.add_method('Copy', - 'ns3::Ptr< ns3::AttributeValue >', - [], - is_const=True, visibility='private', is_virtual=True) - ## attribute.h (module 'core'): bool ns3::EmptyAttributeValue::DeserializeFromString(std::string value, ns3::Ptr checker) [member function] - cls.add_method('DeserializeFromString', - 'bool', - [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], - visibility='private', is_virtual=True) - ## attribute.h (module 'core'): std::string ns3::EmptyAttributeValue::SerializeToString(ns3::Ptr checker) const [member function] - cls.add_method('SerializeToString', - 'std::string', - [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], - is_const=True, visibility='private', is_virtual=True) - return - -def register_Ns3EventImpl_methods(root_module, cls): - ## event-impl.h (module 'core'): ns3::EventImpl::EventImpl(ns3::EventImpl const & arg0) [copy constructor] - cls.add_constructor([param('ns3::EventImpl const &', 'arg0')]) - ## event-impl.h (module 'core'): ns3::EventImpl::EventImpl() [constructor] - cls.add_constructor([]) - ## event-impl.h (module 'core'): void ns3::EventImpl::Cancel() [member function] - cls.add_method('Cancel', - 'void', - []) - ## event-impl.h (module 'core'): void ns3::EventImpl::Invoke() [member function] - cls.add_method('Invoke', - 'void', - []) - ## event-impl.h (module 'core'): bool ns3::EventImpl::IsCancelled() [member function] - cls.add_method('IsCancelled', - 'bool', - []) - ## event-impl.h (module 'core'): void ns3::EventImpl::Notify() [member function] - cls.add_method('Notify', - 'void', - [], - is_pure_virtual=True, visibility='protected', is_virtual=True) - return - -def register_Ns3NixVector_methods(root_module, cls): - cls.add_output_stream_operator() - ## nix-vector.h (module 'network'): ns3::NixVector::NixVector() [constructor] - cls.add_constructor([]) - ## nix-vector.h (module 'network'): ns3::NixVector::NixVector(ns3::NixVector const & o) [copy constructor] - cls.add_constructor([param('ns3::NixVector const &', 'o')]) - ## nix-vector.h (module 'network'): void ns3::NixVector::AddNeighborIndex(uint32_t newBits, uint32_t numberOfBits) [member function] - cls.add_method('AddNeighborIndex', - 'void', - [param('uint32_t', 'newBits'), param('uint32_t', 'numberOfBits')]) - ## nix-vector.h (module 'network'): uint32_t ns3::NixVector::BitCount(uint32_t numberOfNeighbors) const [member function] - cls.add_method('BitCount', - 'uint32_t', - [param('uint32_t', 'numberOfNeighbors')], - is_const=True) - ## nix-vector.h (module 'network'): ns3::Ptr ns3::NixVector::Copy() const [member function] - cls.add_method('Copy', - 'ns3::Ptr< ns3::NixVector >', - [], - is_const=True) - ## nix-vector.h (module 'network'): uint32_t ns3::NixVector::Deserialize(uint32_t const * buffer, uint32_t size) [member function] - cls.add_method('Deserialize', - 'uint32_t', - [param('uint32_t const *', 'buffer'), param('uint32_t', 'size')]) - ## nix-vector.h (module 'network'): uint32_t ns3::NixVector::ExtractNeighborIndex(uint32_t numberOfBits) [member function] - cls.add_method('ExtractNeighborIndex', - 'uint32_t', - [param('uint32_t', 'numberOfBits')]) - ## nix-vector.h (module 'network'): uint32_t ns3::NixVector::GetRemainingBits() [member function] - cls.add_method('GetRemainingBits', - 'uint32_t', - []) - ## nix-vector.h (module 'network'): uint32_t ns3::NixVector::GetSerializedSize() const [member function] - cls.add_method('GetSerializedSize', - 'uint32_t', - [], - is_const=True) - ## nix-vector.h (module 'network'): uint32_t ns3::NixVector::Serialize(uint32_t * buffer, uint32_t maxSize) const [member function] - cls.add_method('Serialize', - 'uint32_t', - [param('uint32_t *', 'buffer'), param('uint32_t', 'maxSize')], - is_const=True) - return - -def register_Ns3ObjectFactoryChecker_methods(root_module, cls): - ## object-factory.h (module 'core'): ns3::ObjectFactoryChecker::ObjectFactoryChecker() [constructor] - cls.add_constructor([]) - ## object-factory.h (module 'core'): ns3::ObjectFactoryChecker::ObjectFactoryChecker(ns3::ObjectFactoryChecker const & arg0) [copy constructor] - cls.add_constructor([param('ns3::ObjectFactoryChecker const &', 'arg0')]) - return - -def register_Ns3ObjectFactoryValue_methods(root_module, cls): - ## object-factory.h (module 'core'): ns3::ObjectFactoryValue::ObjectFactoryValue() [constructor] - cls.add_constructor([]) - ## object-factory.h (module 'core'): ns3::ObjectFactoryValue::ObjectFactoryValue(ns3::ObjectFactoryValue const & arg0) [copy constructor] - cls.add_constructor([param('ns3::ObjectFactoryValue const &', 'arg0')]) - ## object-factory.h (module 'core'): ns3::ObjectFactoryValue::ObjectFactoryValue(ns3::ObjectFactory const & value) [constructor] - cls.add_constructor([param('ns3::ObjectFactory const &', 'value')]) - ## object-factory.h (module 'core'): ns3::Ptr ns3::ObjectFactoryValue::Copy() const [member function] - cls.add_method('Copy', - 'ns3::Ptr< ns3::AttributeValue >', - [], - is_const=True, is_virtual=True) - ## object-factory.h (module 'core'): bool ns3::ObjectFactoryValue::DeserializeFromString(std::string value, ns3::Ptr checker) [member function] - cls.add_method('DeserializeFromString', - 'bool', - [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], - is_virtual=True) - ## object-factory.h (module 'core'): ns3::ObjectFactory ns3::ObjectFactoryValue::Get() const [member function] - cls.add_method('Get', - 'ns3::ObjectFactory', - [], - is_const=True) - ## object-factory.h (module 'core'): std::string ns3::ObjectFactoryValue::SerializeToString(ns3::Ptr checker) const [member function] - cls.add_method('SerializeToString', - 'std::string', - [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], - is_const=True, is_virtual=True) - ## object-factory.h (module 'core'): void ns3::ObjectFactoryValue::Set(ns3::ObjectFactory const & value) [member function] - cls.add_method('Set', - 'void', - [param('ns3::ObjectFactory const &', 'value')]) - return - -def register_Ns3Packet_methods(root_module, cls): - cls.add_output_stream_operator() - ## packet.h (module 'network'): ns3::Packet::Packet() [constructor] - cls.add_constructor([]) - ## packet.h (module 'network'): ns3::Packet::Packet(ns3::Packet const & o) [copy constructor] - cls.add_constructor([param('ns3::Packet const &', 'o')]) - ## packet.h (module 'network'): ns3::Packet::Packet(uint32_t size) [constructor] - cls.add_constructor([param('uint32_t', 'size')]) - ## packet.h (module 'network'): ns3::Packet::Packet(uint8_t const * buffer, uint32_t size, bool magic) [constructor] - cls.add_constructor([param('uint8_t const *', 'buffer'), param('uint32_t', 'size'), param('bool', 'magic')]) - ## packet.h (module 'network'): ns3::Packet::Packet(uint8_t const * buffer, uint32_t size) [constructor] - cls.add_constructor([param('uint8_t const *', 'buffer'), param('uint32_t', 'size')]) - ## packet.h (module 'network'): void ns3::Packet::AddAtEnd(ns3::Ptr packet) [member function] - cls.add_method('AddAtEnd', - 'void', - [param('ns3::Ptr< ns3::Packet const >', 'packet')]) - ## packet.h (module 'network'): void ns3::Packet::AddByteTag(ns3::Tag const & tag) const [member function] - cls.add_method('AddByteTag', - 'void', - [param('ns3::Tag const &', 'tag')], - is_const=True) - ## packet.h (module 'network'): void ns3::Packet::AddHeader(ns3::Header const & header) [member function] - cls.add_method('AddHeader', - 'void', - [param('ns3::Header const &', 'header')]) - ## packet.h (module 'network'): void ns3::Packet::AddPacketTag(ns3::Tag const & tag) const [member function] - cls.add_method('AddPacketTag', - 'void', - [param('ns3::Tag const &', 'tag')], - is_const=True) - ## packet.h (module 'network'): void ns3::Packet::AddPaddingAtEnd(uint32_t size) [member function] - cls.add_method('AddPaddingAtEnd', - 'void', - [param('uint32_t', 'size')]) - ## packet.h (module 'network'): void ns3::Packet::AddTrailer(ns3::Trailer const & trailer) [member function] - cls.add_method('AddTrailer', - 'void', - [param('ns3::Trailer const &', 'trailer')]) - ## packet.h (module 'network'): ns3::PacketMetadata::ItemIterator ns3::Packet::BeginItem() const [member function] - cls.add_method('BeginItem', - 'ns3::PacketMetadata::ItemIterator', - [], - is_const=True) - ## packet.h (module 'network'): ns3::Ptr ns3::Packet::Copy() const [member function] - cls.add_method('Copy', - 'ns3::Ptr< ns3::Packet >', - [], - is_const=True) - ## packet.h (module 'network'): uint32_t ns3::Packet::CopyData(uint8_t * buffer, uint32_t size) const [member function] - cls.add_method('CopyData', - 'uint32_t', - [param('uint8_t *', 'buffer'), param('uint32_t', 'size')], - is_const=True) - ## packet.h (module 'network'): void ns3::Packet::CopyData(std::ostream * os, uint32_t size) const [member function] - cls.add_method('CopyData', - 'void', - [param('std::ostream *', 'os'), param('uint32_t', 'size')], - is_const=True) - ## packet.h (module 'network'): ns3::Ptr ns3::Packet::CreateFragment(uint32_t start, uint32_t length) const [member function] - cls.add_method('CreateFragment', - 'ns3::Ptr< ns3::Packet >', - [param('uint32_t', 'start'), param('uint32_t', 'length')], - is_const=True) - ## packet.h (module 'network'): static void ns3::Packet::EnableChecking() [member function] - cls.add_method('EnableChecking', - 'void', - [], - is_static=True) - ## packet.h (module 'network'): static void ns3::Packet::EnablePrinting() [member function] - cls.add_method('EnablePrinting', - 'void', - [], - is_static=True) - ## packet.h (module 'network'): bool ns3::Packet::FindFirstMatchingByteTag(ns3::Tag & tag) const [member function] - cls.add_method('FindFirstMatchingByteTag', - 'bool', - [param('ns3::Tag &', 'tag')], - is_const=True) - ## packet.h (module 'network'): ns3::ByteTagIterator ns3::Packet::GetByteTagIterator() const [member function] - cls.add_method('GetByteTagIterator', - 'ns3::ByteTagIterator', - [], - is_const=True) - ## packet.h (module 'network'): ns3::Ptr ns3::Packet::GetNixVector() const [member function] - cls.add_method('GetNixVector', - 'ns3::Ptr< ns3::NixVector >', - [], - is_const=True) - ## packet.h (module 'network'): ns3::PacketTagIterator ns3::Packet::GetPacketTagIterator() const [member function] - cls.add_method('GetPacketTagIterator', - 'ns3::PacketTagIterator', - [], - is_const=True) - ## packet.h (module 'network'): uint32_t ns3::Packet::GetSerializedSize() const [member function] - cls.add_method('GetSerializedSize', - 'uint32_t', - [], - is_const=True) - ## packet.h (module 'network'): uint32_t ns3::Packet::GetSize() const [member function] - cls.add_method('GetSize', - 'uint32_t', - [], - is_const=True) - ## packet.h (module 'network'): uint64_t ns3::Packet::GetUid() const [member function] - cls.add_method('GetUid', - 'uint64_t', - [], - is_const=True) - ## packet.h (module 'network'): uint8_t const * ns3::Packet::PeekData() const [member function] - cls.add_method('PeekData', - 'uint8_t const *', - [], - deprecated=True, is_const=True) - ## packet.h (module 'network'): uint32_t ns3::Packet::PeekHeader(ns3::Header & header) const [member function] - cls.add_method('PeekHeader', - 'uint32_t', - [param('ns3::Header &', 'header')], - is_const=True) - ## packet.h (module 'network'): bool ns3::Packet::PeekPacketTag(ns3::Tag & tag) const [member function] - cls.add_method('PeekPacketTag', - 'bool', - [param('ns3::Tag &', 'tag')], - is_const=True) - ## packet.h (module 'network'): uint32_t ns3::Packet::PeekTrailer(ns3::Trailer & trailer) [member function] - cls.add_method('PeekTrailer', - 'uint32_t', - [param('ns3::Trailer &', 'trailer')]) - ## packet.h (module 'network'): void ns3::Packet::Print(std::ostream & os) const [member function] - cls.add_method('Print', - 'void', - [param('std::ostream &', 'os')], - is_const=True) - ## packet.h (module 'network'): void ns3::Packet::PrintByteTags(std::ostream & os) const [member function] - cls.add_method('PrintByteTags', - 'void', - [param('std::ostream &', 'os')], - is_const=True) - ## packet.h (module 'network'): void ns3::Packet::PrintPacketTags(std::ostream & os) const [member function] - cls.add_method('PrintPacketTags', - 'void', - [param('std::ostream &', 'os')], - is_const=True) - ## packet.h (module 'network'): void ns3::Packet::RemoveAllByteTags() [member function] - cls.add_method('RemoveAllByteTags', - 'void', - []) - ## packet.h (module 'network'): void ns3::Packet::RemoveAllPacketTags() [member function] - cls.add_method('RemoveAllPacketTags', - 'void', - []) - ## packet.h (module 'network'): void ns3::Packet::RemoveAtEnd(uint32_t size) [member function] - cls.add_method('RemoveAtEnd', - 'void', - [param('uint32_t', 'size')]) - ## packet.h (module 'network'): void ns3::Packet::RemoveAtStart(uint32_t size) [member function] - cls.add_method('RemoveAtStart', - 'void', - [param('uint32_t', 'size')]) - ## packet.h (module 'network'): uint32_t ns3::Packet::RemoveHeader(ns3::Header & header) [member function] - cls.add_method('RemoveHeader', - 'uint32_t', - [param('ns3::Header &', 'header')]) - ## packet.h (module 'network'): bool ns3::Packet::RemovePacketTag(ns3::Tag & tag) [member function] - cls.add_method('RemovePacketTag', - 'bool', - [param('ns3::Tag &', 'tag')]) - ## packet.h (module 'network'): uint32_t ns3::Packet::RemoveTrailer(ns3::Trailer & trailer) [member function] - cls.add_method('RemoveTrailer', - 'uint32_t', - [param('ns3::Trailer &', 'trailer')]) - ## packet.h (module 'network'): uint32_t ns3::Packet::Serialize(uint8_t * buffer, uint32_t maxSize) const [member function] - cls.add_method('Serialize', - 'uint32_t', - [param('uint8_t *', 'buffer'), param('uint32_t', 'maxSize')], - is_const=True) - ## packet.h (module 'network'): void ns3::Packet::SetNixVector(ns3::Ptr arg0) [member function] - cls.add_method('SetNixVector', - 'void', - [param('ns3::Ptr< ns3::NixVector >', 'arg0')]) - return - -def register_Ns3TimeChecker_methods(root_module, cls): - ## nstime.h (module 'core'): ns3::TimeChecker::TimeChecker() [constructor] - cls.add_constructor([]) - ## nstime.h (module 'core'): ns3::TimeChecker::TimeChecker(ns3::TimeChecker const & arg0) [copy constructor] - cls.add_constructor([param('ns3::TimeChecker const &', 'arg0')]) - return - -def register_Ns3TimeValue_methods(root_module, cls): - ## nstime.h (module 'core'): ns3::TimeValue::TimeValue() [constructor] - cls.add_constructor([]) - ## nstime.h (module 'core'): ns3::TimeValue::TimeValue(ns3::TimeValue const & arg0) [copy constructor] - cls.add_constructor([param('ns3::TimeValue const &', 'arg0')]) - ## nstime.h (module 'core'): ns3::TimeValue::TimeValue(ns3::Time const & value) [constructor] - cls.add_constructor([param('ns3::Time const &', 'value')]) - ## nstime.h (module 'core'): ns3::Ptr ns3::TimeValue::Copy() const [member function] - cls.add_method('Copy', - 'ns3::Ptr< ns3::AttributeValue >', - [], - is_const=True, is_virtual=True) - ## nstime.h (module 'core'): bool ns3::TimeValue::DeserializeFromString(std::string value, ns3::Ptr checker) [member function] - cls.add_method('DeserializeFromString', - 'bool', - [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], - is_virtual=True) - ## nstime.h (module 'core'): ns3::Time ns3::TimeValue::Get() const [member function] - cls.add_method('Get', - 'ns3::Time', - [], - is_const=True) - ## nstime.h (module 'core'): std::string ns3::TimeValue::SerializeToString(ns3::Ptr checker) const [member function] - cls.add_method('SerializeToString', - 'std::string', - [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], - is_const=True, is_virtual=True) - ## nstime.h (module 'core'): void ns3::TimeValue::Set(ns3::Time const & value) [member function] - cls.add_method('Set', - 'void', - [param('ns3::Time const &', 'value')]) - return - -def register_Ns3TypeIdChecker_methods(root_module, cls): - ## type-id.h (module 'core'): ns3::TypeIdChecker::TypeIdChecker() [constructor] - cls.add_constructor([]) - ## type-id.h (module 'core'): ns3::TypeIdChecker::TypeIdChecker(ns3::TypeIdChecker const & arg0) [copy constructor] - cls.add_constructor([param('ns3::TypeIdChecker const &', 'arg0')]) - return - -def register_Ns3TypeIdValue_methods(root_module, cls): - ## type-id.h (module 'core'): ns3::TypeIdValue::TypeIdValue() [constructor] - cls.add_constructor([]) - ## type-id.h (module 'core'): ns3::TypeIdValue::TypeIdValue(ns3::TypeIdValue const & arg0) [copy constructor] - cls.add_constructor([param('ns3::TypeIdValue const &', 'arg0')]) - ## type-id.h (module 'core'): ns3::TypeIdValue::TypeIdValue(ns3::TypeId const & value) [constructor] - cls.add_constructor([param('ns3::TypeId const &', 'value')]) - ## type-id.h (module 'core'): ns3::Ptr ns3::TypeIdValue::Copy() const [member function] - cls.add_method('Copy', - 'ns3::Ptr< ns3::AttributeValue >', - [], - is_const=True, is_virtual=True) - ## type-id.h (module 'core'): bool ns3::TypeIdValue::DeserializeFromString(std::string value, ns3::Ptr checker) [member function] - cls.add_method('DeserializeFromString', - 'bool', - [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], - is_virtual=True) - ## type-id.h (module 'core'): ns3::TypeId ns3::TypeIdValue::Get() const [member function] - cls.add_method('Get', - 'ns3::TypeId', - [], - is_const=True) - ## type-id.h (module 'core'): std::string ns3::TypeIdValue::SerializeToString(ns3::Ptr checker) const [member function] - cls.add_method('SerializeToString', - 'std::string', - [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], - is_const=True, is_virtual=True) - ## type-id.h (module 'core'): void ns3::TypeIdValue::Set(ns3::TypeId const & value) [member function] - cls.add_method('Set', - 'void', - [param('ns3::TypeId const &', 'value')]) - return - -def register_functions(root_module): - module = root_module - register_functions_ns3_FatalImpl(module.get_submodule('FatalImpl'), root_module) - return - -def register_functions_ns3_FatalImpl(module, root_module): - return - -def main(): - out = FileCodeSink(sys.stdout) - root_module = module_init() - register_types(root_module) - register_methods(root_module) - register_functions(root_module) - root_module.generate(out) - -if __name__ == '__main__': - main() - diff -r afe2960e58b7 -r 9d2c79c992d7 src/contrib/bindings/modulegen__gcc_LP64.py --- a/src/contrib/bindings/modulegen__gcc_LP64.py Thu Mar 24 15:11:56 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,2794 +0,0 @@ -from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers - - -import pybindgen.settings -import warnings - -class ErrorHandler(pybindgen.settings.ErrorHandler): - def handle_error(self, wrapper, exception, traceback_): - warnings.warn("exception %r in wrapper %s" % (exception, wrapper)) - return True -pybindgen.settings.error_handler = ErrorHandler() - - -import sys - -def module_init(): - root_module = Module('ns.contrib', cpp_namespace='::ns3') - return root_module - -def register_types(module): - root_module = module.get_root() - - ## attribute-list.h (module 'core'): ns3::AttributeList [class] - module.add_class('AttributeList', import_from_module='ns.core') - ## buffer.h (module 'network'): ns3::Buffer [class] - module.add_class('Buffer', import_from_module='ns.network') - ## buffer.h (module 'network'): ns3::Buffer::Iterator [class] - module.add_class('Iterator', import_from_module='ns.network', outer_class=root_module['ns3::Buffer']) - ## packet.h (module 'network'): ns3::ByteTagIterator [class] - module.add_class('ByteTagIterator', import_from_module='ns.network') - ## packet.h (module 'network'): ns3::ByteTagIterator::Item [class] - module.add_class('Item', import_from_module='ns.network', outer_class=root_module['ns3::ByteTagIterator']) - ## byte-tag-list.h (module 'network'): ns3::ByteTagList [class] - module.add_class('ByteTagList', import_from_module='ns.network') - ## byte-tag-list.h (module 'network'): ns3::ByteTagList::Iterator [class] - module.add_class('Iterator', import_from_module='ns.network', outer_class=root_module['ns3::ByteTagList']) - ## byte-tag-list.h (module 'network'): ns3::ByteTagList::Iterator::Item [struct] - module.add_class('Item', import_from_module='ns.network', outer_class=root_module['ns3::ByteTagList::Iterator']) - ## callback.h (module 'core'): ns3::CallbackBase [class] - module.add_class('CallbackBase', import_from_module='ns.core') - ## delay-jitter-estimation.h (module 'contrib'): ns3::DelayJitterEstimation [class] - module.add_class('DelayJitterEstimation') - ## event-garbage-collector.h (module 'contrib'): ns3::EventGarbageCollector [class] - module.add_class('EventGarbageCollector') - ## event-id.h (module 'core'): ns3::EventId [class] - module.add_class('EventId', import_from_module='ns.core') - ## file-config.h (module 'contrib'): ns3::FileConfig [class] - module.add_class('FileConfig', allow_subclassing=True) - ## gnuplot.h (module 'contrib'): ns3::Gnuplot [class] - module.add_class('Gnuplot') - ## gnuplot.h (module 'contrib'): ns3::GnuplotCollection [class] - module.add_class('GnuplotCollection') - ## gnuplot.h (module 'contrib'): ns3::GnuplotDataset [class] - module.add_class('GnuplotDataset') - ## high-precision-128.h (module 'core'): ns3::HighPrecision [class] - module.add_class('HighPrecision', import_from_module='ns.core') - ## file-config.h (module 'contrib'): ns3::NoneFileConfig [class] - module.add_class('NoneFileConfig', parent=root_module['ns3::FileConfig']) - ## object-base.h (module 'core'): ns3::ObjectBase [class] - module.add_class('ObjectBase', allow_subclassing=True, import_from_module='ns.core') - ## object.h (module 'core'): ns3::ObjectDeleter [struct] - module.add_class('ObjectDeleter', import_from_module='ns.core') - ## object-factory.h (module 'core'): ns3::ObjectFactory [class] - module.add_class('ObjectFactory', import_from_module='ns.core') - ## packet-metadata.h (module 'network'): ns3::PacketMetadata [class] - module.add_class('PacketMetadata', import_from_module='ns.network') - ## packet-metadata.h (module 'network'): ns3::PacketMetadata::Item [struct] - module.add_class('Item', import_from_module='ns.network', outer_class=root_module['ns3::PacketMetadata']) - ## packet-metadata.h (module 'network'): ns3::PacketMetadata::Item [enumeration] - module.add_enum('', ['PAYLOAD', 'HEADER', 'TRAILER'], outer_class=root_module['ns3::PacketMetadata::Item'], import_from_module='ns.network') - ## packet-metadata.h (module 'network'): ns3::PacketMetadata::ItemIterator [class] - module.add_class('ItemIterator', import_from_module='ns.network', outer_class=root_module['ns3::PacketMetadata']) - ## packet.h (module 'network'): ns3::PacketTagIterator [class] - module.add_class('PacketTagIterator', import_from_module='ns.network') - ## packet.h (module 'network'): ns3::PacketTagIterator::Item [class] - module.add_class('Item', import_from_module='ns.network', outer_class=root_module['ns3::PacketTagIterator']) - ## packet-tag-list.h (module 'network'): ns3::PacketTagList [class] - module.add_class('PacketTagList', import_from_module='ns.network') - ## packet-tag-list.h (module 'network'): ns3::PacketTagList::TagData [struct] - module.add_class('TagData', import_from_module='ns.network', outer_class=root_module['ns3::PacketTagList']) - ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount [class] - module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::Object', 'ns3::ObjectBase', 'ns3::ObjectDeleter'], parent=root_module['ns3::ObjectBase'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) - ## simulator.h (module 'core'): ns3::Simulator [class] - module.add_class('Simulator', is_singleton=True, import_from_module='ns.core') - ## tag.h (module 'network'): ns3::Tag [class] - module.add_class('Tag', import_from_module='ns.network', parent=root_module['ns3::ObjectBase']) - ## tag-buffer.h (module 'network'): ns3::TagBuffer [class] - module.add_class('TagBuffer', import_from_module='ns.network') - ## nstime.h (module 'core'): ns3::Time [class] - module.add_class('Time', import_from_module='ns.core') - ## nstime.h (module 'core'): ns3::Time::Unit [enumeration] - module.add_enum('Unit', ['S', 'MS', 'US', 'NS', 'PS', 'FS', 'LAST'], outer_class=root_module['ns3::Time'], import_from_module='ns.core') - ## type-id.h (module 'core'): ns3::TypeId [class] - module.add_class('TypeId', import_from_module='ns.core') - ## type-id.h (module 'core'): ns3::TypeId::AttributeFlag [enumeration] - module.add_enum('AttributeFlag', ['ATTR_GET', 'ATTR_SET', 'ATTR_CONSTRUCT', 'ATTR_SGC'], outer_class=root_module['ns3::TypeId'], import_from_module='ns.core') - ## type-id.h (module 'core'): ns3::TypeId::AttributeInfo [struct] - module.add_class('AttributeInfo', import_from_module='ns.core', outer_class=root_module['ns3::TypeId']) - ## attribute-list.h (module 'core'): ns3::UnsafeAttributeList [class] - module.add_class('UnsafeAttributeList', import_from_module='ns.core') - ## empty.h (module 'core'): ns3::empty [class] - module.add_class('empty', import_from_module='ns.core') - ## chunk.h (module 'network'): ns3::Chunk [class] - module.add_class('Chunk', import_from_module='ns.network', parent=root_module['ns3::ObjectBase']) - ## config-store.h (module 'contrib'): ns3::ConfigStore [class] - module.add_class('ConfigStore', parent=root_module['ns3::ObjectBase']) - ## config-store.h (module 'contrib'): ns3::ConfigStore::Mode [enumeration] - module.add_enum('Mode', ['LOAD', 'SAVE', 'NONE'], outer_class=root_module['ns3::ConfigStore']) - ## config-store.h (module 'contrib'): ns3::ConfigStore::FileFormat [enumeration] - module.add_enum('FileFormat', ['XML', 'RAW_TEXT'], outer_class=root_module['ns3::ConfigStore']) - ## flow-id-tag.h (module 'contrib'): ns3::FlowIdTag [class] - module.add_class('FlowIdTag', parent=root_module['ns3::Tag']) - ## gnuplot.h (module 'contrib'): ns3::Gnuplot2dDataset [class] - module.add_class('Gnuplot2dDataset', parent=root_module['ns3::GnuplotDataset']) - ## gnuplot.h (module 'contrib'): ns3::Gnuplot2dDataset::Style [enumeration] - module.add_enum('Style', ['LINES', 'POINTS', 'LINES_POINTS', 'DOTS', 'IMPULSES', 'STEPS', 'FSTEPS', 'HISTEPS'], outer_class=root_module['ns3::Gnuplot2dDataset']) - ## gnuplot.h (module 'contrib'): ns3::Gnuplot2dDataset::ErrorBars [enumeration] - module.add_enum('ErrorBars', ['NONE', 'X', 'Y', 'XY'], outer_class=root_module['ns3::Gnuplot2dDataset']) - ## gnuplot.h (module 'contrib'): ns3::Gnuplot2dFunction [class] - module.add_class('Gnuplot2dFunction', parent=root_module['ns3::GnuplotDataset']) - ## gnuplot.h (module 'contrib'): ns3::Gnuplot3dDataset [class] - module.add_class('Gnuplot3dDataset', parent=root_module['ns3::GnuplotDataset']) - ## gnuplot.h (module 'contrib'): ns3::Gnuplot3dFunction [class] - module.add_class('Gnuplot3dFunction', parent=root_module['ns3::GnuplotDataset']) - ## header.h (module 'network'): ns3::Header [class] - module.add_class('Header', import_from_module='ns.network', parent=root_module['ns3::Chunk']) - ## object.h (module 'core'): ns3::Object [class] - module.add_class('Object', import_from_module='ns.core', parent=root_module['ns3::SimpleRefCount< ns3::Object, ns3::ObjectBase, ns3::ObjectDeleter >']) - ## object.h (module 'core'): ns3::Object::AggregateIterator [class] - module.add_class('AggregateIterator', import_from_module='ns.core', outer_class=root_module['ns3::Object']) - ## nstime.h (module 'core'): ns3::Scalar [class] - module.add_class('Scalar', import_from_module='ns.core') - ## nstime.h (module 'core'): ns3::Scalar [class] - root_module['ns3::Scalar'].implicitly_converts_to(root_module['ns3::Time']) - ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount > [class] - module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::AttributeAccessor', 'ns3::empty', 'ns3::DefaultDeleter'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) - ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount > [class] - module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::AttributeChecker', 'ns3::empty', 'ns3::DefaultDeleter'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) - ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount > [class] - module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::AttributeValue', 'ns3::empty', 'ns3::DefaultDeleter'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) - ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount > [class] - module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::CallbackImplBase', 'ns3::empty', 'ns3::DefaultDeleter'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) - ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount > [class] - module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::EventImpl', 'ns3::empty', 'ns3::DefaultDeleter'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) - ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount > [class] - module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::NixVector', 'ns3::empty', 'ns3::DefaultDeleter'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) - ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount > [class] - module.add_class('SimpleRefCount', automatic_type_narrowing=True, import_from_module='ns.core', template_parameters=['ns3::Packet', 'ns3::empty', 'ns3::DefaultDeleter'], parent=root_module['ns3::empty'], memory_policy=cppclass.ReferenceCountingMethodsPolicy(incref_method='Ref', decref_method='Unref', peekref_method='GetReferenceCount')) - ## trailer.h (module 'network'): ns3::Trailer [class] - module.add_class('Trailer', import_from_module='ns.network', parent=root_module['ns3::Chunk']) - ## attribute.h (module 'core'): ns3::AttributeAccessor [class] - module.add_class('AttributeAccessor', import_from_module='ns.core', parent=root_module['ns3::SimpleRefCount< ns3::AttributeAccessor, ns3::empty, ns3::DefaultDeleter >']) - ## attribute.h (module 'core'): ns3::AttributeChecker [class] - module.add_class('AttributeChecker', allow_subclassing=False, automatic_type_narrowing=True, import_from_module='ns.core', parent=root_module['ns3::SimpleRefCount< ns3::AttributeChecker, ns3::empty, ns3::DefaultDeleter >']) - ## attribute.h (module 'core'): ns3::AttributeValue [class] - module.add_class('AttributeValue', allow_subclassing=False, automatic_type_narrowing=True, import_from_module='ns.core', parent=root_module['ns3::SimpleRefCount< ns3::AttributeValue, ns3::empty, ns3::DefaultDeleter >']) - ## callback.h (module 'core'): ns3::CallbackChecker [class] - module.add_class('CallbackChecker', import_from_module='ns.core', parent=root_module['ns3::AttributeChecker']) - ## callback.h (module 'core'): ns3::CallbackImplBase [class] - module.add_class('CallbackImplBase', import_from_module='ns.core', parent=root_module['ns3::SimpleRefCount< ns3::CallbackImplBase, ns3::empty, ns3::DefaultDeleter >']) - ## callback.h (module 'core'): ns3::CallbackValue [class] - module.add_class('CallbackValue', import_from_module='ns.core', parent=root_module['ns3::AttributeValue']) - ## attribute.h (module 'core'): ns3::EmptyAttributeValue [class] - module.add_class('EmptyAttributeValue', import_from_module='ns.core', parent=root_module['ns3::AttributeValue']) - ## event-impl.h (module 'core'): ns3::EventImpl [class] - module.add_class('EventImpl', import_from_module='ns.core', parent=root_module['ns3::SimpleRefCount< ns3::EventImpl, ns3::empty, ns3::DefaultDeleter >']) - ## nix-vector.h (module 'network'): ns3::NixVector [class] - module.add_class('NixVector', import_from_module='ns.network', parent=root_module['ns3::SimpleRefCount< ns3::NixVector, ns3::empty, ns3::DefaultDeleter >']) - ## object-factory.h (module 'core'): ns3::ObjectFactoryChecker [class] - module.add_class('ObjectFactoryChecker', import_from_module='ns.core', parent=root_module['ns3::AttributeChecker']) - ## object-factory.h (module 'core'): ns3::ObjectFactoryValue [class] - module.add_class('ObjectFactoryValue', import_from_module='ns.core', parent=root_module['ns3::AttributeValue']) - ## packet.h (module 'network'): ns3::Packet [class] - module.add_class('Packet', import_from_module='ns.network', parent=root_module['ns3::SimpleRefCount< ns3::Packet, ns3::empty, ns3::DefaultDeleter >']) - ## nstime.h (module 'core'): ns3::TimeChecker [class] - module.add_class('TimeChecker', import_from_module='ns.core', parent=root_module['ns3::AttributeChecker']) - ## nstime.h (module 'core'): ns3::TimeValue [class] - module.add_class('TimeValue', import_from_module='ns.core', parent=root_module['ns3::AttributeValue']) - ## type-id.h (module 'core'): ns3::TypeIdChecker [class] - module.add_class('TypeIdChecker', import_from_module='ns.core', parent=root_module['ns3::AttributeChecker']) - ## type-id.h (module 'core'): ns3::TypeIdValue [class] - module.add_class('TypeIdValue', import_from_module='ns.core', parent=root_module['ns3::AttributeValue']) - typehandlers.add_type_alias('ns3::Time', 'ns3::TimeSquare') - typehandlers.add_type_alias('ns3::Time*', 'ns3::TimeSquare*') - typehandlers.add_type_alias('ns3::Time&', 'ns3::TimeSquare&') - module.add_typedef(root_module['ns3::Time'], 'TimeSquare') - typehandlers.add_type_alias('ns3::Time', 'ns3::TimeInvert') - typehandlers.add_type_alias('ns3::Time*', 'ns3::TimeInvert*') - typehandlers.add_type_alias('ns3::Time&', 'ns3::TimeInvert&') - module.add_typedef(root_module['ns3::Time'], 'TimeInvert') - - ## Register a nested module for the namespace FatalImpl - - nested_module = module.add_cpp_namespace('FatalImpl') - register_types_ns3_FatalImpl(nested_module) - - -def register_types_ns3_FatalImpl(module): - root_module = module.get_root() - - -def register_methods(root_module): - register_Ns3AttributeList_methods(root_module, root_module['ns3::AttributeList']) - register_Ns3Buffer_methods(root_module, root_module['ns3::Buffer']) - register_Ns3BufferIterator_methods(root_module, root_module['ns3::Buffer::Iterator']) - register_Ns3ByteTagIterator_methods(root_module, root_module['ns3::ByteTagIterator']) - register_Ns3ByteTagIteratorItem_methods(root_module, root_module['ns3::ByteTagIterator::Item']) - register_Ns3ByteTagList_methods(root_module, root_module['ns3::ByteTagList']) - register_Ns3ByteTagListIterator_methods(root_module, root_module['ns3::ByteTagList::Iterator']) - register_Ns3ByteTagListIteratorItem_methods(root_module, root_module['ns3::ByteTagList::Iterator::Item']) - register_Ns3CallbackBase_methods(root_module, root_module['ns3::CallbackBase']) - register_Ns3DelayJitterEstimation_methods(root_module, root_module['ns3::DelayJitterEstimation']) - register_Ns3EventGarbageCollector_methods(root_module, root_module['ns3::EventGarbageCollector']) - register_Ns3EventId_methods(root_module, root_module['ns3::EventId']) - register_Ns3FileConfig_methods(root_module, root_module['ns3::FileConfig']) - register_Ns3Gnuplot_methods(root_module, root_module['ns3::Gnuplot']) - register_Ns3GnuplotCollection_methods(root_module, root_module['ns3::GnuplotCollection']) - register_Ns3GnuplotDataset_methods(root_module, root_module['ns3::GnuplotDataset']) - register_Ns3HighPrecision_methods(root_module, root_module['ns3::HighPrecision']) - register_Ns3NoneFileConfig_methods(root_module, root_module['ns3::NoneFileConfig']) - register_Ns3ObjectBase_methods(root_module, root_module['ns3::ObjectBase']) - register_Ns3ObjectDeleter_methods(root_module, root_module['ns3::ObjectDeleter']) - register_Ns3ObjectFactory_methods(root_module, root_module['ns3::ObjectFactory']) - register_Ns3PacketMetadata_methods(root_module, root_module['ns3::PacketMetadata']) - register_Ns3PacketMetadataItem_methods(root_module, root_module['ns3::PacketMetadata::Item']) - register_Ns3PacketMetadataItemIterator_methods(root_module, root_module['ns3::PacketMetadata::ItemIterator']) - register_Ns3PacketTagIterator_methods(root_module, root_module['ns3::PacketTagIterator']) - register_Ns3PacketTagIteratorItem_methods(root_module, root_module['ns3::PacketTagIterator::Item']) - register_Ns3PacketTagList_methods(root_module, root_module['ns3::PacketTagList']) - register_Ns3PacketTagListTagData_methods(root_module, root_module['ns3::PacketTagList::TagData']) - register_Ns3SimpleRefCount__Ns3Object_Ns3ObjectBase_Ns3ObjectDeleter_methods(root_module, root_module['ns3::SimpleRefCount< ns3::Object, ns3::ObjectBase, ns3::ObjectDeleter >']) - register_Ns3Simulator_methods(root_module, root_module['ns3::Simulator']) - register_Ns3Tag_methods(root_module, root_module['ns3::Tag']) - register_Ns3TagBuffer_methods(root_module, root_module['ns3::TagBuffer']) - register_Ns3Time_methods(root_module, root_module['ns3::Time']) - register_Ns3TypeId_methods(root_module, root_module['ns3::TypeId']) - register_Ns3TypeIdAttributeInfo_methods(root_module, root_module['ns3::TypeId::AttributeInfo']) - register_Ns3UnsafeAttributeList_methods(root_module, root_module['ns3::UnsafeAttributeList']) - register_Ns3Empty_methods(root_module, root_module['ns3::empty']) - register_Ns3Chunk_methods(root_module, root_module['ns3::Chunk']) - register_Ns3ConfigStore_methods(root_module, root_module['ns3::ConfigStore']) - register_Ns3FlowIdTag_methods(root_module, root_module['ns3::FlowIdTag']) - register_Ns3Gnuplot2dDataset_methods(root_module, root_module['ns3::Gnuplot2dDataset']) - register_Ns3Gnuplot2dFunction_methods(root_module, root_module['ns3::Gnuplot2dFunction']) - register_Ns3Gnuplot3dDataset_methods(root_module, root_module['ns3::Gnuplot3dDataset']) - register_Ns3Gnuplot3dFunction_methods(root_module, root_module['ns3::Gnuplot3dFunction']) - register_Ns3Header_methods(root_module, root_module['ns3::Header']) - register_Ns3Object_methods(root_module, root_module['ns3::Object']) - register_Ns3ObjectAggregateIterator_methods(root_module, root_module['ns3::Object::AggregateIterator']) - register_Ns3Scalar_methods(root_module, root_module['ns3::Scalar']) - register_Ns3SimpleRefCount__Ns3AttributeAccessor_Ns3Empty_Ns3DefaultDeleter__lt__ns3AttributeAccessor__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::AttributeAccessor, ns3::empty, ns3::DefaultDeleter >']) - register_Ns3SimpleRefCount__Ns3AttributeChecker_Ns3Empty_Ns3DefaultDeleter__lt__ns3AttributeChecker__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::AttributeChecker, ns3::empty, ns3::DefaultDeleter >']) - register_Ns3SimpleRefCount__Ns3AttributeValue_Ns3Empty_Ns3DefaultDeleter__lt__ns3AttributeValue__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::AttributeValue, ns3::empty, ns3::DefaultDeleter >']) - register_Ns3SimpleRefCount__Ns3CallbackImplBase_Ns3Empty_Ns3DefaultDeleter__lt__ns3CallbackImplBase__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::CallbackImplBase, ns3::empty, ns3::DefaultDeleter >']) - register_Ns3SimpleRefCount__Ns3EventImpl_Ns3Empty_Ns3DefaultDeleter__lt__ns3EventImpl__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::EventImpl, ns3::empty, ns3::DefaultDeleter >']) - register_Ns3SimpleRefCount__Ns3NixVector_Ns3Empty_Ns3DefaultDeleter__lt__ns3NixVector__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::NixVector, ns3::empty, ns3::DefaultDeleter >']) - register_Ns3SimpleRefCount__Ns3Packet_Ns3Empty_Ns3DefaultDeleter__lt__ns3Packet__gt___methods(root_module, root_module['ns3::SimpleRefCount< ns3::Packet, ns3::empty, ns3::DefaultDeleter >']) - register_Ns3Trailer_methods(root_module, root_module['ns3::Trailer']) - register_Ns3AttributeAccessor_methods(root_module, root_module['ns3::AttributeAccessor']) - register_Ns3AttributeChecker_methods(root_module, root_module['ns3::AttributeChecker']) - register_Ns3AttributeValue_methods(root_module, root_module['ns3::AttributeValue']) - register_Ns3CallbackChecker_methods(root_module, root_module['ns3::CallbackChecker']) - register_Ns3CallbackImplBase_methods(root_module, root_module['ns3::CallbackImplBase']) - register_Ns3CallbackValue_methods(root_module, root_module['ns3::CallbackValue']) - register_Ns3EmptyAttributeValue_methods(root_module, root_module['ns3::EmptyAttributeValue']) - register_Ns3EventImpl_methods(root_module, root_module['ns3::EventImpl']) - register_Ns3NixVector_methods(root_module, root_module['ns3::NixVector']) - register_Ns3ObjectFactoryChecker_methods(root_module, root_module['ns3::ObjectFactoryChecker']) - register_Ns3ObjectFactoryValue_methods(root_module, root_module['ns3::ObjectFactoryValue']) - register_Ns3Packet_methods(root_module, root_module['ns3::Packet']) - register_Ns3TimeChecker_methods(root_module, root_module['ns3::TimeChecker']) - register_Ns3TimeValue_methods(root_module, root_module['ns3::TimeValue']) - register_Ns3TypeIdChecker_methods(root_module, root_module['ns3::TypeIdChecker']) - register_Ns3TypeIdValue_methods(root_module, root_module['ns3::TypeIdValue']) - return - -def register_Ns3AttributeList_methods(root_module, cls): - ## attribute-list.h (module 'core'): ns3::AttributeList::AttributeList() [constructor] - cls.add_constructor([]) - ## attribute-list.h (module 'core'): ns3::AttributeList::AttributeList(ns3::AttributeList const & o) [copy constructor] - cls.add_constructor([param('ns3::AttributeList const &', 'o')]) - ## attribute-list.h (module 'core'): bool ns3::AttributeList::DeserializeFromString(std::string value) [member function] - cls.add_method('DeserializeFromString', - 'bool', - [param('std::string', 'value')]) - ## attribute-list.h (module 'core'): static ns3::AttributeList * ns3::AttributeList::GetGlobal() [member function] - cls.add_method('GetGlobal', - 'ns3::AttributeList *', - [], - is_static=True) - ## attribute-list.h (module 'core'): void ns3::AttributeList::Reset() [member function] - cls.add_method('Reset', - 'void', - []) - ## attribute-list.h (module 'core'): std::string ns3::AttributeList::SerializeToString() const [member function] - cls.add_method('SerializeToString', - 'std::string', - [], - is_const=True) - ## attribute-list.h (module 'core'): void ns3::AttributeList::Set(std::string name, ns3::AttributeValue const & value) [member function] - cls.add_method('Set', - 'void', - [param('std::string', 'name'), param('ns3::AttributeValue const &', 'value')]) - ## attribute-list.h (module 'core'): bool ns3::AttributeList::SetFailSafe(std::string name, ns3::AttributeValue const & value) [member function] - cls.add_method('SetFailSafe', - 'bool', - [param('std::string', 'name'), param('ns3::AttributeValue const &', 'value')]) - ## attribute-list.h (module 'core'): void ns3::AttributeList::SetWithTid(ns3::TypeId tid, std::string name, ns3::AttributeValue const & value) [member function] - cls.add_method('SetWithTid', - 'void', - [param('ns3::TypeId', 'tid'), param('std::string', 'name'), param('ns3::AttributeValue const &', 'value')]) - return - -def register_Ns3Buffer_methods(root_module, cls): - ## buffer.h (module 'network'): ns3::Buffer::Buffer() [constructor] - cls.add_constructor([]) - ## buffer.h (module 'network'): ns3::Buffer::Buffer(uint32_t dataSize) [constructor] - cls.add_constructor([param('uint32_t', 'dataSize')]) - ## buffer.h (module 'network'): ns3::Buffer::Buffer(uint32_t dataSize, bool initialize) [constructor] - cls.add_constructor([param('uint32_t', 'dataSize'), param('bool', 'initialize')]) - ## buffer.h (module 'network'): ns3::Buffer::Buffer(ns3::Buffer const & o) [copy constructor] - cls.add_constructor([param('ns3::Buffer const &', 'o')]) - ## buffer.h (module 'network'): bool ns3::Buffer::AddAtEnd(uint32_t end) [member function] - cls.add_method('AddAtEnd', - 'bool', - [param('uint32_t', 'end')]) - ## buffer.h (module 'network'): void ns3::Buffer::AddAtEnd(ns3::Buffer const & o) [member function] - cls.add_method('AddAtEnd', - 'void', - [param('ns3::Buffer const &', 'o')]) - ## buffer.h (module 'network'): bool ns3::Buffer::AddAtStart(uint32_t start) [member function] - cls.add_method('AddAtStart', - 'bool', - [param('uint32_t', 'start')]) - ## buffer.h (module 'network'): ns3::Buffer::Iterator ns3::Buffer::Begin() const [member function] - cls.add_method('Begin', - 'ns3::Buffer::Iterator', - [], - is_const=True) - ## buffer.h (module 'network'): void ns3::Buffer::CopyData(std::ostream * os, uint32_t size) const [member function] - cls.add_method('CopyData', - 'void', - [param('std::ostream *', 'os'), param('uint32_t', 'size')], - is_const=True) - ## buffer.h (module 'network'): uint32_t ns3::Buffer::CopyData(uint8_t * buffer, uint32_t size) const [member function] - cls.add_method('CopyData', - 'uint32_t', - [param('uint8_t *', 'buffer'), param('uint32_t', 'size')], - is_const=True) - ## buffer.h (module 'network'): ns3::Buffer ns3::Buffer::CreateFragment(uint32_t start, uint32_t length) const [member function] - cls.add_method('CreateFragment', - 'ns3::Buffer', - [param('uint32_t', 'start'), param('uint32_t', 'length')], - is_const=True) - ## buffer.h (module 'network'): ns3::Buffer ns3::Buffer::CreateFullCopy() const [member function] - cls.add_method('CreateFullCopy', - 'ns3::Buffer', - [], - is_const=True) - ## buffer.h (module 'network'): uint32_t ns3::Buffer::Deserialize(uint8_t const * buffer, uint32_t size) [member function] - cls.add_method('Deserialize', - 'uint32_t', - [param('uint8_t const *', 'buffer'), param('uint32_t', 'size')]) - ## buffer.h (module 'network'): ns3::Buffer::Iterator ns3::Buffer::End() const [member function] - cls.add_method('End', - 'ns3::Buffer::Iterator', - [], - is_const=True) - ## buffer.h (module 'network'): int32_t ns3::Buffer::GetCurrentEndOffset() const [member function] - cls.add_method('GetCurrentEndOffset', - 'int32_t', - [], - is_const=True) - ## buffer.h (module 'network'): int32_t ns3::Buffer::GetCurrentStartOffset() const [member function] - cls.add_method('GetCurrentStartOffset', - 'int32_t', - [], - is_const=True) - ## buffer.h (module 'network'): uint32_t ns3::Buffer::GetSerializedSize() const [member function] - cls.add_method('GetSerializedSize', - 'uint32_t', - [], - is_const=True) - ## buffer.h (module 'network'): uint32_t ns3::Buffer::GetSize() const [member function] - cls.add_method('GetSize', - 'uint32_t', - [], - is_const=True) - ## buffer.h (module 'network'): uint8_t const * ns3::Buffer::PeekData() const [member function] - cls.add_method('PeekData', - 'uint8_t const *', - [], - is_const=True) - ## buffer.h (module 'network'): void ns3::Buffer::RemoveAtEnd(uint32_t end) [member function] - cls.add_method('RemoveAtEnd', - 'void', - [param('uint32_t', 'end')]) - ## buffer.h (module 'network'): void ns3::Buffer::RemoveAtStart(uint32_t start) [member function] - cls.add_method('RemoveAtStart', - 'void', - [param('uint32_t', 'start')]) - ## buffer.h (module 'network'): uint32_t ns3::Buffer::Serialize(uint8_t * buffer, uint32_t maxSize) const [member function] - cls.add_method('Serialize', - 'uint32_t', - [param('uint8_t *', 'buffer'), param('uint32_t', 'maxSize')], - is_const=True) - return - -def register_Ns3BufferIterator_methods(root_module, cls): - ## buffer.h (module 'network'): ns3::Buffer::Iterator::Iterator(ns3::Buffer::Iterator const & arg0) [copy constructor] - cls.add_constructor([param('ns3::Buffer::Iterator const &', 'arg0')]) - ## buffer.h (module 'network'): ns3::Buffer::Iterator::Iterator() [constructor] - cls.add_constructor([]) - ## buffer.h (module 'network'): uint16_t ns3::Buffer::Iterator::CalculateIpChecksum(uint16_t size) [member function] - cls.add_method('CalculateIpChecksum', - 'uint16_t', - [param('uint16_t', 'size')]) - ## buffer.h (module 'network'): uint16_t ns3::Buffer::Iterator::CalculateIpChecksum(uint16_t size, uint32_t initialChecksum) [member function] - cls.add_method('CalculateIpChecksum', - 'uint16_t', - [param('uint16_t', 'size'), param('uint32_t', 'initialChecksum')]) - ## buffer.h (module 'network'): uint32_t ns3::Buffer::Iterator::GetDistanceFrom(ns3::Buffer::Iterator const & o) const [member function] - cls.add_method('GetDistanceFrom', - 'uint32_t', - [param('ns3::Buffer::Iterator const &', 'o')], - is_const=True) - ## buffer.h (module 'network'): uint32_t ns3::Buffer::Iterator::GetSize() const [member function] - cls.add_method('GetSize', - 'uint32_t', - [], - is_const=True) - ## buffer.h (module 'network'): bool ns3::Buffer::Iterator::IsEnd() const [member function] - cls.add_method('IsEnd', - 'bool', - [], - is_const=True) - ## buffer.h (module 'network'): bool ns3::Buffer::Iterator::IsStart() const [member function] - cls.add_method('IsStart', - 'bool', - [], - is_const=True) - ## buffer.h (module 'network'): void ns3::Buffer::Iterator::Next() [member function] - cls.add_method('Next', - 'void', - []) - ## buffer.h (module 'network'): void ns3::Buffer::Iterator::Next(uint32_t delta) [member function] - cls.add_method('Next', - 'void', - [param('uint32_t', 'delta')]) - ## buffer.h (module 'network'): void ns3::Buffer::Iterator::Prev() [member function] - cls.add_method('Prev', - 'void', - []) - ## buffer.h (module 'network'): void ns3::Buffer::Iterator::Prev(uint32_t delta) [member function] - cls.add_method('Prev', - 'void', - [param('uint32_t', 'delta')]) - ## buffer.h (module 'network'): void ns3::Buffer::Iterator::Read(uint8_t * buffer, uint32_t size) [member function] - cls.add_method('Read', - 'void', - [param('uint8_t *', 'buffer'), param('uint32_t', 'size')]) - ## buffer.h (module 'network'): uint16_t ns3::Buffer::Iterator::ReadLsbtohU16() [member function] - cls.add_method('ReadLsbtohU16', - 'uint16_t', - []) - ## buffer.h (module 'network'): uint32_t ns3::Buffer::Iterator::ReadLsbtohU32() [member function] - cls.add_method('ReadLsbtohU32', - 'uint32_t', - []) - ## buffer.h (module 'network'): uint64_t ns3::Buffer::Iterator::ReadLsbtohU64() [member function] - cls.add_method('ReadLsbtohU64', - 'uint64_t', - []) - ## buffer.h (module 'network'): uint16_t ns3::Buffer::Iterator::ReadNtohU16() [member function] - cls.add_method('ReadNtohU16', - 'uint16_t', - []) - ## buffer.h (module 'network'): uint32_t ns3::Buffer::Iterator::ReadNtohU32() [member function] - cls.add_method('ReadNtohU32', - 'uint32_t', - []) - ## buffer.h (module 'network'): uint64_t ns3::Buffer::Iterator::ReadNtohU64() [member function] - cls.add_method('ReadNtohU64', - 'uint64_t', - []) - ## buffer.h (module 'network'): uint16_t ns3::Buffer::Iterator::ReadU16() [member function] - cls.add_method('ReadU16', - 'uint16_t', - []) - ## buffer.h (module 'network'): uint32_t ns3::Buffer::Iterator::ReadU32() [member function] - cls.add_method('ReadU32', - 'uint32_t', - []) - ## buffer.h (module 'network'): uint64_t ns3::Buffer::Iterator::ReadU64() [member function] - cls.add_method('ReadU64', - 'uint64_t', - []) - ## buffer.h (module 'network'): uint8_t ns3::Buffer::Iterator::ReadU8() [member function] - cls.add_method('ReadU8', - 'uint8_t', - []) - ## buffer.h (module 'network'): void ns3::Buffer::Iterator::Write(uint8_t const * buffer, uint32_t size) [member function] - cls.add_method('Write', - 'void', - [param('uint8_t const *', 'buffer'), param('uint32_t', 'size')]) - ## buffer.h (module 'network'): void ns3::Buffer::Iterator::Write(ns3::Buffer::Iterator start, ns3::Buffer::Iterator end) [member function] - cls.add_method('Write', - 'void', - [param('ns3::Buffer::Iterator', 'start'), param('ns3::Buffer::Iterator', 'end')]) - ## buffer.h (module 'network'): void ns3::Buffer::Iterator::WriteHtolsbU16(uint16_t data) [member function] - cls.add_method('WriteHtolsbU16', - 'void', - [param('uint16_t', 'data')]) - ## buffer.h (module 'network'): void ns3::Buffer::Iterator::WriteHtolsbU32(uint32_t data) [member function] - cls.add_method('WriteHtolsbU32', - 'void', - [param('uint32_t', 'data')]) - ## buffer.h (module 'network'): void ns3::Buffer::Iterator::WriteHtolsbU64(uint64_t data) [member function] - cls.add_method('WriteHtolsbU64', - 'void', - [param('uint64_t', 'data')]) - ## buffer.h (module 'network'): void ns3::Buffer::Iterator::WriteHtonU16(uint16_t data) [member function] - cls.add_method('WriteHtonU16', - 'void', - [param('uint16_t', 'data')]) - ## buffer.h (module 'network'): void ns3::Buffer::Iterator::WriteHtonU32(uint32_t data) [member function] - cls.add_method('WriteHtonU32', - 'void', - [param('uint32_t', 'data')]) - ## buffer.h (module 'network'): void ns3::Buffer::Iterator::WriteHtonU64(uint64_t data) [member function] - cls.add_method('WriteHtonU64', - 'void', - [param('uint64_t', 'data')]) - ## buffer.h (module 'network'): void ns3::Buffer::Iterator::WriteU16(uint16_t data) [member function] - cls.add_method('WriteU16', - 'void', - [param('uint16_t', 'data')]) - ## buffer.h (module 'network'): void ns3::Buffer::Iterator::WriteU32(uint32_t data) [member function] - cls.add_method('WriteU32', - 'void', - [param('uint32_t', 'data')]) - ## buffer.h (module 'network'): void ns3::Buffer::Iterator::WriteU64(uint64_t data) [member function] - cls.add_method('WriteU64', - 'void', - [param('uint64_t', 'data')]) - ## buffer.h (module 'network'): void ns3::Buffer::Iterator::WriteU8(uint8_t data) [member function] - cls.add_method('WriteU8', - 'void', - [param('uint8_t', 'data')]) - ## buffer.h (module 'network'): void ns3::Buffer::Iterator::WriteU8(uint8_t data, uint32_t len) [member function] - cls.add_method('WriteU8', - 'void', - [param('uint8_t', 'data'), param('uint32_t', 'len')]) - return - -def register_Ns3ByteTagIterator_methods(root_module, cls): - ## packet.h (module 'network'): ns3::ByteTagIterator::ByteTagIterator(ns3::ByteTagIterator const & arg0) [copy constructor] - cls.add_constructor([param('ns3::ByteTagIterator const &', 'arg0')]) - ## packet.h (module 'network'): bool ns3::ByteTagIterator::HasNext() const [member function] - cls.add_method('HasNext', - 'bool', - [], - is_const=True) - ## packet.h (module 'network'): ns3::ByteTagIterator::Item ns3::ByteTagIterator::Next() [member function] - cls.add_method('Next', - 'ns3::ByteTagIterator::Item', - []) - return - -def register_Ns3ByteTagIteratorItem_methods(root_module, cls): - ## packet.h (module 'network'): ns3::ByteTagIterator::Item::Item(ns3::ByteTagIterator::Item const & arg0) [copy constructor] - cls.add_constructor([param('ns3::ByteTagIterator::Item const &', 'arg0')]) - ## packet.h (module 'network'): uint32_t ns3::ByteTagIterator::Item::GetEnd() const [member function] - cls.add_method('GetEnd', - 'uint32_t', - [], - is_const=True) - ## packet.h (module 'network'): uint32_t ns3::ByteTagIterator::Item::GetStart() const [member function] - cls.add_method('GetStart', - 'uint32_t', - [], - is_const=True) - ## packet.h (module 'network'): void ns3::ByteTagIterator::Item::GetTag(ns3::Tag & tag) const [member function] - cls.add_method('GetTag', - 'void', - [param('ns3::Tag &', 'tag')], - is_const=True) - ## packet.h (module 'network'): ns3::TypeId ns3::ByteTagIterator::Item::GetTypeId() const [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_const=True) - return - -def register_Ns3ByteTagList_methods(root_module, cls): - ## byte-tag-list.h (module 'network'): ns3::ByteTagList::ByteTagList() [constructor] - cls.add_constructor([]) - ## byte-tag-list.h (module 'network'): ns3::ByteTagList::ByteTagList(ns3::ByteTagList const & o) [copy constructor] - cls.add_constructor([param('ns3::ByteTagList const &', 'o')]) - ## byte-tag-list.h (module 'network'): ns3::TagBuffer ns3::ByteTagList::Add(ns3::TypeId tid, uint32_t bufferSize, int32_t start, int32_t end) [member function] - cls.add_method('Add', - 'ns3::TagBuffer', - [param('ns3::TypeId', 'tid'), param('uint32_t', 'bufferSize'), param('int32_t', 'start'), param('int32_t', 'end')]) - ## byte-tag-list.h (module 'network'): void ns3::ByteTagList::Add(ns3::ByteTagList const & o) [member function] - cls.add_method('Add', - 'void', - [param('ns3::ByteTagList const &', 'o')]) - ## byte-tag-list.h (module 'network'): void ns3::ByteTagList::AddAtEnd(int32_t adjustment, int32_t appendOffset) [member function] - cls.add_method('AddAtEnd', - 'void', - [param('int32_t', 'adjustment'), param('int32_t', 'appendOffset')]) - ## byte-tag-list.h (module 'network'): void ns3::ByteTagList::AddAtStart(int32_t adjustment, int32_t prependOffset) [member function] - cls.add_method('AddAtStart', - 'void', - [param('int32_t', 'adjustment'), param('int32_t', 'prependOffset')]) - ## byte-tag-list.h (module 'network'): ns3::ByteTagList::Iterator ns3::ByteTagList::Begin(int32_t offsetStart, int32_t offsetEnd) const [member function] - cls.add_method('Begin', - 'ns3::ByteTagList::Iterator', - [param('int32_t', 'offsetStart'), param('int32_t', 'offsetEnd')], - is_const=True) - ## byte-tag-list.h (module 'network'): void ns3::ByteTagList::RemoveAll() [member function] - cls.add_method('RemoveAll', - 'void', - []) - return - -def register_Ns3ByteTagListIterator_methods(root_module, cls): - ## byte-tag-list.h (module 'network'): ns3::ByteTagList::Iterator::Iterator(ns3::ByteTagList::Iterator const & arg0) [copy constructor] - cls.add_constructor([param('ns3::ByteTagList::Iterator const &', 'arg0')]) - ## byte-tag-list.h (module 'network'): uint32_t ns3::ByteTagList::Iterator::GetOffsetStart() const [member function] - cls.add_method('GetOffsetStart', - 'uint32_t', - [], - is_const=True) - ## byte-tag-list.h (module 'network'): bool ns3::ByteTagList::Iterator::HasNext() const [member function] - cls.add_method('HasNext', - 'bool', - [], - is_const=True) - ## byte-tag-list.h (module 'network'): ns3::ByteTagList::Iterator::Item ns3::ByteTagList::Iterator::Next() [member function] - cls.add_method('Next', - 'ns3::ByteTagList::Iterator::Item', - []) - return - -def register_Ns3ByteTagListIteratorItem_methods(root_module, cls): - ## byte-tag-list.h (module 'network'): ns3::ByteTagList::Iterator::Item::Item(ns3::ByteTagList::Iterator::Item const & arg0) [copy constructor] - cls.add_constructor([param('ns3::ByteTagList::Iterator::Item const &', 'arg0')]) - ## byte-tag-list.h (module 'network'): ns3::ByteTagList::Iterator::Item::Item(ns3::TagBuffer buf) [constructor] - cls.add_constructor([param('ns3::TagBuffer', 'buf')]) - ## byte-tag-list.h (module 'network'): ns3::ByteTagList::Iterator::Item::buf [variable] - cls.add_instance_attribute('buf', 'ns3::TagBuffer', is_const=False) - ## byte-tag-list.h (module 'network'): ns3::ByteTagList::Iterator::Item::end [variable] - cls.add_instance_attribute('end', 'int32_t', is_const=False) - ## byte-tag-list.h (module 'network'): ns3::ByteTagList::Iterator::Item::size [variable] - cls.add_instance_attribute('size', 'uint32_t', is_const=False) - ## byte-tag-list.h (module 'network'): ns3::ByteTagList::Iterator::Item::start [variable] - cls.add_instance_attribute('start', 'int32_t', is_const=False) - ## byte-tag-list.h (module 'network'): ns3::ByteTagList::Iterator::Item::tid [variable] - cls.add_instance_attribute('tid', 'ns3::TypeId', is_const=False) - return - -def register_Ns3CallbackBase_methods(root_module, cls): - ## callback.h (module 'core'): ns3::CallbackBase::CallbackBase(ns3::CallbackBase const & arg0) [copy constructor] - cls.add_constructor([param('ns3::CallbackBase const &', 'arg0')]) - ## callback.h (module 'core'): ns3::CallbackBase::CallbackBase() [constructor] - cls.add_constructor([]) - ## callback.h (module 'core'): ns3::Ptr ns3::CallbackBase::GetImpl() const [member function] - cls.add_method('GetImpl', - 'ns3::Ptr< ns3::CallbackImplBase >', - [], - is_const=True) - ## callback.h (module 'core'): ns3::CallbackBase::CallbackBase(ns3::Ptr impl) [constructor] - cls.add_constructor([param('ns3::Ptr< ns3::CallbackImplBase >', 'impl')], - visibility='protected') - ## callback.h (module 'core'): static std::string ns3::CallbackBase::Demangle(std::string const & mangled) [member function] - cls.add_method('Demangle', - 'std::string', - [param('std::string const &', 'mangled')], - is_static=True, visibility='protected') - return - -def register_Ns3DelayJitterEstimation_methods(root_module, cls): - ## delay-jitter-estimation.h (module 'contrib'): ns3::DelayJitterEstimation::DelayJitterEstimation(ns3::DelayJitterEstimation const & arg0) [copy constructor] - cls.add_constructor([param('ns3::DelayJitterEstimation const &', 'arg0')]) - ## delay-jitter-estimation.h (module 'contrib'): ns3::DelayJitterEstimation::DelayJitterEstimation() [constructor] - cls.add_constructor([]) - ## delay-jitter-estimation.h (module 'contrib'): ns3::Time ns3::DelayJitterEstimation::GetLastDelay() const [member function] - cls.add_method('GetLastDelay', - 'ns3::Time', - [], - is_const=True) - ## delay-jitter-estimation.h (module 'contrib'): ns3::Time ns3::DelayJitterEstimation::GetLastJitter() const [member function] - cls.add_method('GetLastJitter', - 'ns3::Time', - [], - is_const=True) - ## delay-jitter-estimation.h (module 'contrib'): static void ns3::DelayJitterEstimation::PrepareTx(ns3::Ptr packet) [member function] - cls.add_method('PrepareTx', - 'void', - [param('ns3::Ptr< ns3::Packet const >', 'packet')], - is_static=True) - ## delay-jitter-estimation.h (module 'contrib'): void ns3::DelayJitterEstimation::RecordRx(ns3::Ptr packet) [member function] - cls.add_method('RecordRx', - 'void', - [param('ns3::Ptr< ns3::Packet const >', 'packet')]) - return - -def register_Ns3EventGarbageCollector_methods(root_module, cls): - ## event-garbage-collector.h (module 'contrib'): ns3::EventGarbageCollector::EventGarbageCollector(ns3::EventGarbageCollector const & arg0) [copy constructor] - cls.add_constructor([param('ns3::EventGarbageCollector const &', 'arg0')]) - ## event-garbage-collector.h (module 'contrib'): ns3::EventGarbageCollector::EventGarbageCollector() [constructor] - cls.add_constructor([]) - ## event-garbage-collector.h (module 'contrib'): void ns3::EventGarbageCollector::Track(ns3::EventId event) [member function] - cls.add_method('Track', - 'void', - [param('ns3::EventId', 'event')]) - return - -def register_Ns3EventId_methods(root_module, cls): - cls.add_binary_comparison_operator('!=') - cls.add_binary_comparison_operator('==') - ## event-id.h (module 'core'): ns3::EventId::EventId(ns3::EventId const & arg0) [copy constructor] - cls.add_constructor([param('ns3::EventId const &', 'arg0')]) - ## event-id.h (module 'core'): ns3::EventId::EventId() [constructor] - cls.add_constructor([]) - ## event-id.h (module 'core'): ns3::EventId::EventId(ns3::Ptr const & impl, uint64_t ts, uint32_t context, uint32_t uid) [constructor] - cls.add_constructor([param('ns3::Ptr< ns3::EventImpl > const &', 'impl'), param('uint64_t', 'ts'), param('uint32_t', 'context'), param('uint32_t', 'uid')]) - ## event-id.h (module 'core'): void ns3::EventId::Cancel() [member function] - cls.add_method('Cancel', - 'void', - []) - ## event-id.h (module 'core'): uint32_t ns3::EventId::GetContext() const [member function] - cls.add_method('GetContext', - 'uint32_t', - [], - is_const=True) - ## event-id.h (module 'core'): uint64_t ns3::EventId::GetTs() const [member function] - cls.add_method('GetTs', - 'uint64_t', - [], - is_const=True) - ## event-id.h (module 'core'): uint32_t ns3::EventId::GetUid() const [member function] - cls.add_method('GetUid', - 'uint32_t', - [], - is_const=True) - ## event-id.h (module 'core'): bool ns3::EventId::IsExpired() const [member function] - cls.add_method('IsExpired', - 'bool', - [], - is_const=True) - ## event-id.h (module 'core'): bool ns3::EventId::IsRunning() const [member function] - cls.add_method('IsRunning', - 'bool', - [], - is_const=True) - ## event-id.h (module 'core'): ns3::EventImpl * ns3::EventId::PeekEventImpl() const [member function] - cls.add_method('PeekEventImpl', - 'ns3::EventImpl *', - [], - is_const=True) - return - -def register_Ns3FileConfig_methods(root_module, cls): - ## file-config.h (module 'contrib'): ns3::FileConfig::FileConfig() [constructor] - cls.add_constructor([]) - ## file-config.h (module 'contrib'): ns3::FileConfig::FileConfig(ns3::FileConfig const & arg0) [copy constructor] - cls.add_constructor([param('ns3::FileConfig const &', 'arg0')]) - ## file-config.h (module 'contrib'): void ns3::FileConfig::Attributes() [member function] - cls.add_method('Attributes', - 'void', - [], - is_pure_virtual=True, is_virtual=True) - ## file-config.h (module 'contrib'): void ns3::FileConfig::Default() [member function] - cls.add_method('Default', - 'void', - [], - is_pure_virtual=True, is_virtual=True) - ## file-config.h (module 'contrib'): void ns3::FileConfig::Global() [member function] - cls.add_method('Global', - 'void', - [], - is_pure_virtual=True, is_virtual=True) - ## file-config.h (module 'contrib'): void ns3::FileConfig::SetFilename(std::string filename) [member function] - cls.add_method('SetFilename', - 'void', - [param('std::string', 'filename')], - is_pure_virtual=True, is_virtual=True) - return - -def register_Ns3Gnuplot_methods(root_module, cls): - ## gnuplot.h (module 'contrib'): ns3::Gnuplot::Gnuplot(ns3::Gnuplot const & arg0) [copy constructor] - cls.add_constructor([param('ns3::Gnuplot const &', 'arg0')]) - ## gnuplot.h (module 'contrib'): ns3::Gnuplot::Gnuplot(std::string const & outputFilename="", std::string const & title="") [constructor] - cls.add_constructor([param('std::string const &', 'outputFilename', default_value='""'), param('std::string const &', 'title', default_value='""')]) - ## gnuplot.h (module 'contrib'): void ns3::Gnuplot::AddDataset(ns3::GnuplotDataset const & dataset) [member function] - cls.add_method('AddDataset', - 'void', - [param('ns3::GnuplotDataset const &', 'dataset')]) - ## gnuplot.h (module 'contrib'): void ns3::Gnuplot::AppendExtra(std::string const & extra) [member function] - cls.add_method('AppendExtra', - 'void', - [param('std::string const &', 'extra')]) - ## gnuplot.h (module 'contrib'): static std::string ns3::Gnuplot::DetectTerminal(std::string const & filename) [member function] - cls.add_method('DetectTerminal', - 'std::string', - [param('std::string const &', 'filename')], - is_static=True) - ## gnuplot.h (module 'contrib'): void ns3::Gnuplot::GenerateOutput(std::ostream & os) const [member function] - cls.add_method('GenerateOutput', - 'void', - [param('std::ostream &', 'os')], - is_const=True) - ## gnuplot.h (module 'contrib'): void ns3::Gnuplot::SetExtra(std::string const & extra) [member function] - cls.add_method('SetExtra', - 'void', - [param('std::string const &', 'extra')]) - ## gnuplot.h (module 'contrib'): void ns3::Gnuplot::SetLegend(std::string const & xLegend, std::string const & yLegend) [member function] - cls.add_method('SetLegend', - 'void', - [param('std::string const &', 'xLegend'), param('std::string const &', 'yLegend')]) - ## gnuplot.h (module 'contrib'): void ns3::Gnuplot::SetTerminal(std::string const & terminal) [member function] - cls.add_method('SetTerminal', - 'void', - [param('std::string const &', 'terminal')]) - ## gnuplot.h (module 'contrib'): void ns3::Gnuplot::SetTitle(std::string const & title) [member function] - cls.add_method('SetTitle', - 'void', - [param('std::string const &', 'title')]) - return - -def register_Ns3GnuplotCollection_methods(root_module, cls): - ## gnuplot.h (module 'contrib'): ns3::GnuplotCollection::GnuplotCollection(ns3::GnuplotCollection const & arg0) [copy constructor] - cls.add_constructor([param('ns3::GnuplotCollection const &', 'arg0')]) - ## gnuplot.h (module 'contrib'): ns3::GnuplotCollection::GnuplotCollection(std::string const & outputFilename) [constructor] - cls.add_constructor([param('std::string const &', 'outputFilename')]) - ## gnuplot.h (module 'contrib'): void ns3::GnuplotCollection::AddPlot(ns3::Gnuplot const & plot) [member function] - cls.add_method('AddPlot', - 'void', - [param('ns3::Gnuplot const &', 'plot')]) - ## gnuplot.h (module 'contrib'): void ns3::GnuplotCollection::GenerateOutput(std::ostream & os) const [member function] - cls.add_method('GenerateOutput', - 'void', - [param('std::ostream &', 'os')], - is_const=True) - ## gnuplot.h (module 'contrib'): ns3::Gnuplot & ns3::GnuplotCollection::GetPlot(unsigned int id) [member function] - cls.add_method('GetPlot', - 'ns3::Gnuplot &', - [param('unsigned int', 'id')]) - ## gnuplot.h (module 'contrib'): void ns3::GnuplotCollection::SetTerminal(std::string const & terminal) [member function] - cls.add_method('SetTerminal', - 'void', - [param('std::string const &', 'terminal')]) - return - -def register_Ns3GnuplotDataset_methods(root_module, cls): - ## gnuplot.h (module 'contrib'): ns3::GnuplotDataset::GnuplotDataset(ns3::GnuplotDataset const & original) [copy constructor] - cls.add_constructor([param('ns3::GnuplotDataset const &', 'original')]) - ## gnuplot.h (module 'contrib'): static void ns3::GnuplotDataset::SetDefaultExtra(std::string const & extra) [member function] - cls.add_method('SetDefaultExtra', - 'void', - [param('std::string const &', 'extra')], - is_static=True) - ## gnuplot.h (module 'contrib'): void ns3::GnuplotDataset::SetExtra(std::string const & extra) [member function] - cls.add_method('SetExtra', - 'void', - [param('std::string const &', 'extra')]) - ## gnuplot.h (module 'contrib'): void ns3::GnuplotDataset::SetTitle(std::string const & title) [member function] - cls.add_method('SetTitle', - 'void', - [param('std::string const &', 'title')]) - ## gnuplot.h (module 'contrib'): ns3::GnuplotDataset::GnuplotDataset(ns3::GnuplotDataset::Data * data) [constructor] - cls.add_constructor([param('ns3::GnuplotDataset::Data *', 'data')], - visibility='protected') - return - -def register_Ns3HighPrecision_methods(root_module, cls): - cls.add_output_stream_operator() - ## high-precision-128.h (module 'core'): ns3::HighPrecision::HighPrecision(ns3::HighPrecision const & arg0) [copy constructor] - cls.add_constructor([param('ns3::HighPrecision const &', 'arg0')]) - ## high-precision-128.h (module 'core'): ns3::HighPrecision::HighPrecision(int64_t high, uint64_t low) [constructor] - cls.add_constructor([param('int64_t', 'high'), param('uint64_t', 'low')]) - ## high-precision-128.h (module 'core'): ns3::HighPrecision::HighPrecision() [constructor] - cls.add_constructor([]) - ## high-precision-128.h (module 'core'): ns3::HighPrecision::HighPrecision(int64_t value, bool dummy) [constructor] - cls.add_constructor([param('int64_t', 'value'), param('bool', 'dummy')]) - ## high-precision-128.h (module 'core'): ns3::HighPrecision::HighPrecision(double value) [constructor] - cls.add_constructor([param('double', 'value')]) - ## high-precision-128.h (module 'core'): void ns3::HighPrecision::Add(ns3::HighPrecision const & o) [member function] - cls.add_method('Add', - 'void', - [param('ns3::HighPrecision const &', 'o')]) - ## high-precision-128.h (module 'core'): int ns3::HighPrecision::Compare(ns3::HighPrecision const & o) const [member function] - cls.add_method('Compare', - 'int', - [param('ns3::HighPrecision const &', 'o')], - is_const=True) - ## high-precision-128.h (module 'core'): void ns3::HighPrecision::Div(ns3::HighPrecision const & o) [member function] - cls.add_method('Div', - 'void', - [param('ns3::HighPrecision const &', 'o')]) - ## high-precision-128.h (module 'core'): double ns3::HighPrecision::GetDouble() const [member function] - cls.add_method('GetDouble', - 'double', - [], - is_const=True) - ## high-precision-128.h (module 'core'): int64_t ns3::HighPrecision::GetHigh() const [member function] - cls.add_method('GetHigh', - 'int64_t', - [], - is_const=True) - ## high-precision-128.h (module 'core'): int64_t ns3::HighPrecision::GetInteger() const [member function] - cls.add_method('GetInteger', - 'int64_t', - [], - is_const=True) - ## high-precision-128.h (module 'core'): uint64_t ns3::HighPrecision::GetLow() const [member function] - cls.add_method('GetLow', - 'uint64_t', - [], - is_const=True) - ## high-precision-128.h (module 'core'): static ns3::HighPrecision ns3::HighPrecision::Invert(uint64_t v) [member function] - cls.add_method('Invert', - 'ns3::HighPrecision', - [param('uint64_t', 'v')], - is_static=True) - ## high-precision-128.h (module 'core'): void ns3::HighPrecision::Mul(ns3::HighPrecision const & o) [member function] - cls.add_method('Mul', - 'void', - [param('ns3::HighPrecision const &', 'o')]) - ## high-precision-128.h (module 'core'): void ns3::HighPrecision::MulByInvert(ns3::HighPrecision const & o) [member function] - cls.add_method('MulByInvert', - 'void', - [param('ns3::HighPrecision const &', 'o')]) - ## high-precision-128.h (module 'core'): void ns3::HighPrecision::Sub(ns3::HighPrecision const & o) [member function] - cls.add_method('Sub', - 'void', - [param('ns3::HighPrecision const &', 'o')]) - ## high-precision-128.h (module 'core'): static ns3::HighPrecision ns3::HighPrecision::Zero() [member function] - cls.add_method('Zero', - 'ns3::HighPrecision', - [], - is_static=True) - return - -def register_Ns3NoneFileConfig_methods(root_module, cls): - ## file-config.h (module 'contrib'): ns3::NoneFileConfig::NoneFileConfig(ns3::NoneFileConfig const & arg0) [copy constructor] - cls.add_constructor([param('ns3::NoneFileConfig const &', 'arg0')]) - ## file-config.h (module 'contrib'): ns3::NoneFileConfig::NoneFileConfig() [constructor] - cls.add_constructor([]) - ## file-config.h (module 'contrib'): void ns3::NoneFileConfig::Attributes() [member function] - cls.add_method('Attributes', - 'void', - [], - is_virtual=True) - ## file-config.h (module 'contrib'): void ns3::NoneFileConfig::Default() [member function] - cls.add_method('Default', - 'void', - [], - is_virtual=True) - ## file-config.h (module 'contrib'): void ns3::NoneFileConfig::Global() [member function] - cls.add_method('Global', - 'void', - [], - is_virtual=True) - ## file-config.h (module 'contrib'): void ns3::NoneFileConfig::SetFilename(std::string filename) [member function] - cls.add_method('SetFilename', - 'void', - [param('std::string', 'filename')], - is_virtual=True) - return - -def register_Ns3ObjectBase_methods(root_module, cls): - ## object-base.h (module 'core'): ns3::ObjectBase::ObjectBase() [constructor] - cls.add_constructor([]) - ## object-base.h (module 'core'): ns3::ObjectBase::ObjectBase(ns3::ObjectBase const & arg0) [copy constructor] - cls.add_constructor([param('ns3::ObjectBase const &', 'arg0')]) - ## object-base.h (module 'core'): void ns3::ObjectBase::GetAttribute(std::string name, ns3::AttributeValue & value) const [member function] - cls.add_method('GetAttribute', - 'void', - [param('std::string', 'name'), param('ns3::AttributeValue &', 'value')], - is_const=True) - ## object-base.h (module 'core'): bool ns3::ObjectBase::GetAttributeFailSafe(std::string name, ns3::AttributeValue & attribute) const [member function] - cls.add_method('GetAttributeFailSafe', - 'bool', - [param('std::string', 'name'), param('ns3::AttributeValue &', 'attribute')], - is_const=True) - ## object-base.h (module 'core'): ns3::TypeId ns3::ObjectBase::GetInstanceTypeId() const [member function] - cls.add_method('GetInstanceTypeId', - 'ns3::TypeId', - [], - is_pure_virtual=True, is_const=True, is_virtual=True) - ## object-base.h (module 'core'): static ns3::TypeId ns3::ObjectBase::GetTypeId() [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_static=True) - ## object-base.h (module 'core'): void ns3::ObjectBase::SetAttribute(std::string name, ns3::AttributeValue const & value) [member function] - cls.add_method('SetAttribute', - 'void', - [param('std::string', 'name'), param('ns3::AttributeValue const &', 'value')]) - ## object-base.h (module 'core'): bool ns3::ObjectBase::SetAttributeFailSafe(std::string name, ns3::AttributeValue const & value) [member function] - cls.add_method('SetAttributeFailSafe', - 'bool', - [param('std::string', 'name'), param('ns3::AttributeValue const &', 'value')]) - ## object-base.h (module 'core'): bool ns3::ObjectBase::TraceConnect(std::string name, std::string context, ns3::CallbackBase const & cb) [member function] - cls.add_method('TraceConnect', - 'bool', - [param('std::string', 'name'), param('std::string', 'context'), param('ns3::CallbackBase const &', 'cb')]) - ## object-base.h (module 'core'): bool ns3::ObjectBase::TraceConnectWithoutContext(std::string name, ns3::CallbackBase const & cb) [member function] - cls.add_method('TraceConnectWithoutContext', - 'bool', - [param('std::string', 'name'), param('ns3::CallbackBase const &', 'cb')]) - ## object-base.h (module 'core'): bool ns3::ObjectBase::TraceDisconnect(std::string name, std::string context, ns3::CallbackBase const & cb) [member function] - cls.add_method('TraceDisconnect', - 'bool', - [param('std::string', 'name'), param('std::string', 'context'), param('ns3::CallbackBase const &', 'cb')]) - ## object-base.h (module 'core'): bool ns3::ObjectBase::TraceDisconnectWithoutContext(std::string name, ns3::CallbackBase const & cb) [member function] - cls.add_method('TraceDisconnectWithoutContext', - 'bool', - [param('std::string', 'name'), param('ns3::CallbackBase const &', 'cb')]) - ## object-base.h (module 'core'): void ns3::ObjectBase::ConstructSelf(ns3::AttributeList const & attributes) [member function] - cls.add_method('ConstructSelf', - 'void', - [param('ns3::AttributeList const &', 'attributes')], - visibility='protected') - ## object-base.h (module 'core'): void ns3::ObjectBase::NotifyConstructionCompleted() [member function] - cls.add_method('NotifyConstructionCompleted', - 'void', - [], - visibility='protected', is_virtual=True) - return - -def register_Ns3ObjectDeleter_methods(root_module, cls): - ## object.h (module 'core'): ns3::ObjectDeleter::ObjectDeleter() [constructor] - cls.add_constructor([]) - ## object.h (module 'core'): ns3::ObjectDeleter::ObjectDeleter(ns3::ObjectDeleter const & arg0) [copy constructor] - cls.add_constructor([param('ns3::ObjectDeleter const &', 'arg0')]) - ## object.h (module 'core'): static void ns3::ObjectDeleter::Delete(ns3::Object * object) [member function] - cls.add_method('Delete', - 'void', - [param('ns3::Object *', 'object')], - is_static=True) - return - -def register_Ns3ObjectFactory_methods(root_module, cls): - cls.add_output_stream_operator() - ## object-factory.h (module 'core'): ns3::ObjectFactory::ObjectFactory(ns3::ObjectFactory const & arg0) [copy constructor] - cls.add_constructor([param('ns3::ObjectFactory const &', 'arg0')]) - ## object-factory.h (module 'core'): ns3::ObjectFactory::ObjectFactory() [constructor] - cls.add_constructor([]) - ## object-factory.h (module 'core'): ns3::Ptr ns3::ObjectFactory::Create() const [member function] - cls.add_method('Create', - 'ns3::Ptr< ns3::Object >', - [], - is_const=True) - ## object-factory.h (module 'core'): ns3::TypeId ns3::ObjectFactory::GetTypeId() const [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_const=True) - ## object-factory.h (module 'core'): void ns3::ObjectFactory::Set(std::string name, ns3::AttributeValue const & value) [member function] - cls.add_method('Set', - 'void', - [param('std::string', 'name'), param('ns3::AttributeValue const &', 'value')]) - ## object-factory.h (module 'core'): void ns3::ObjectFactory::Set(ns3::AttributeList const & list) [member function] - cls.add_method('Set', - 'void', - [param('ns3::AttributeList const &', 'list')]) - ## object-factory.h (module 'core'): void ns3::ObjectFactory::SetTypeId(ns3::TypeId tid) [member function] - cls.add_method('SetTypeId', - 'void', - [param('ns3::TypeId', 'tid')]) - ## object-factory.h (module 'core'): void ns3::ObjectFactory::SetTypeId(char const * tid) [member function] - cls.add_method('SetTypeId', - 'void', - [param('char const *', 'tid')]) - ## object-factory.h (module 'core'): void ns3::ObjectFactory::SetTypeId(std::string tid) [member function] - cls.add_method('SetTypeId', - 'void', - [param('std::string', 'tid')]) - return - -def register_Ns3PacketMetadata_methods(root_module, cls): - ## packet-metadata.h (module 'network'): ns3::PacketMetadata::PacketMetadata(uint64_t uid, uint32_t size) [constructor] - cls.add_constructor([param('uint64_t', 'uid'), param('uint32_t', 'size')]) - ## packet-metadata.h (module 'network'): ns3::PacketMetadata::PacketMetadata(ns3::PacketMetadata const & o) [copy constructor] - cls.add_constructor([param('ns3::PacketMetadata const &', 'o')]) - ## packet-metadata.h (module 'network'): void ns3::PacketMetadata::AddAtEnd(ns3::PacketMetadata const & o) [member function] - cls.add_method('AddAtEnd', - 'void', - [param('ns3::PacketMetadata const &', 'o')]) - ## packet-metadata.h (module 'network'): void ns3::PacketMetadata::AddHeader(ns3::Header const & header, uint32_t size) [member function] - cls.add_method('AddHeader', - 'void', - [param('ns3::Header const &', 'header'), param('uint32_t', 'size')]) - ## packet-metadata.h (module 'network'): void ns3::PacketMetadata::AddPaddingAtEnd(uint32_t end) [member function] - cls.add_method('AddPaddingAtEnd', - 'void', - [param('uint32_t', 'end')]) - ## packet-metadata.h (module 'network'): void ns3::PacketMetadata::AddTrailer(ns3::Trailer const & trailer, uint32_t size) [member function] - cls.add_method('AddTrailer', - 'void', - [param('ns3::Trailer const &', 'trailer'), param('uint32_t', 'size')]) - ## packet-metadata.h (module 'network'): ns3::PacketMetadata::ItemIterator ns3::PacketMetadata::BeginItem(ns3::Buffer buffer) const [member function] - cls.add_method('BeginItem', - 'ns3::PacketMetadata::ItemIterator', - [param('ns3::Buffer', 'buffer')], - is_const=True) - ## packet-metadata.h (module 'network'): ns3::PacketMetadata ns3::PacketMetadata::CreateFragment(uint32_t start, uint32_t end) const [member function] - cls.add_method('CreateFragment', - 'ns3::PacketMetadata', - [param('uint32_t', 'start'), param('uint32_t', 'end')], - is_const=True) - ## packet-metadata.h (module 'network'): uint32_t ns3::PacketMetadata::Deserialize(uint8_t const * buffer, uint32_t size) [member function] - cls.add_method('Deserialize', - 'uint32_t', - [param('uint8_t const *', 'buffer'), param('uint32_t', 'size')]) - ## packet-metadata.h (module 'network'): static void ns3::PacketMetadata::Enable() [member function] - cls.add_method('Enable', - 'void', - [], - is_static=True) - ## packet-metadata.h (module 'network'): static void ns3::PacketMetadata::EnableChecking() [member function] - cls.add_method('EnableChecking', - 'void', - [], - is_static=True) - ## packet-metadata.h (module 'network'): uint32_t ns3::PacketMetadata::GetSerializedSize() const [member function] - cls.add_method('GetSerializedSize', - 'uint32_t', - [], - is_const=True) - ## packet-metadata.h (module 'network'): uint64_t ns3::PacketMetadata::GetUid() const [member function] - cls.add_method('GetUid', - 'uint64_t', - [], - is_const=True) - ## packet-metadata.h (module 'network'): void ns3::PacketMetadata::RemoveAtEnd(uint32_t end) [member function] - cls.add_method('RemoveAtEnd', - 'void', - [param('uint32_t', 'end')]) - ## packet-metadata.h (module 'network'): void ns3::PacketMetadata::RemoveAtStart(uint32_t start) [member function] - cls.add_method('RemoveAtStart', - 'void', - [param('uint32_t', 'start')]) - ## packet-metadata.h (module 'network'): void ns3::PacketMetadata::RemoveHeader(ns3::Header const & header, uint32_t size) [member function] - cls.add_method('RemoveHeader', - 'void', - [param('ns3::Header const &', 'header'), param('uint32_t', 'size')]) - ## packet-metadata.h (module 'network'): void ns3::PacketMetadata::RemoveTrailer(ns3::Trailer const & trailer, uint32_t size) [member function] - cls.add_method('RemoveTrailer', - 'void', - [param('ns3::Trailer const &', 'trailer'), param('uint32_t', 'size')]) - ## packet-metadata.h (module 'network'): uint32_t ns3::PacketMetadata::Serialize(uint8_t * buffer, uint32_t maxSize) const [member function] - cls.add_method('Serialize', - 'uint32_t', - [param('uint8_t *', 'buffer'), param('uint32_t', 'maxSize')], - is_const=True) - return - -def register_Ns3PacketMetadataItem_methods(root_module, cls): - ## packet-metadata.h (module 'network'): ns3::PacketMetadata::Item::Item() [constructor] - cls.add_constructor([]) - ## packet-metadata.h (module 'network'): ns3::PacketMetadata::Item::Item(ns3::PacketMetadata::Item const & arg0) [copy constructor] - cls.add_constructor([param('ns3::PacketMetadata::Item const &', 'arg0')]) - ## packet-metadata.h (module 'network'): ns3::PacketMetadata::Item::current [variable] - cls.add_instance_attribute('current', 'ns3::Buffer::Iterator', is_const=False) - ## packet-metadata.h (module 'network'): ns3::PacketMetadata::Item::currentSize [variable] - cls.add_instance_attribute('currentSize', 'uint32_t', is_const=False) - ## packet-metadata.h (module 'network'): ns3::PacketMetadata::Item::currentTrimedFromEnd [variable] - cls.add_instance_attribute('currentTrimedFromEnd', 'uint32_t', is_const=False) - ## packet-metadata.h (module 'network'): ns3::PacketMetadata::Item::currentTrimedFromStart [variable] - cls.add_instance_attribute('currentTrimedFromStart', 'uint32_t', is_const=False) - ## packet-metadata.h (module 'network'): ns3::PacketMetadata::Item::isFragment [variable] - cls.add_instance_attribute('isFragment', 'bool', is_const=False) - ## packet-metadata.h (module 'network'): ns3::PacketMetadata::Item::tid [variable] - cls.add_instance_attribute('tid', 'ns3::TypeId', is_const=False) - return - -def register_Ns3PacketMetadataItemIterator_methods(root_module, cls): - ## packet-metadata.h (module 'network'): ns3::PacketMetadata::ItemIterator::ItemIterator(ns3::PacketMetadata::ItemIterator const & arg0) [copy constructor] - cls.add_constructor([param('ns3::PacketMetadata::ItemIterator const &', 'arg0')]) - ## packet-metadata.h (module 'network'): ns3::PacketMetadata::ItemIterator::ItemIterator(ns3::PacketMetadata const * metadata, ns3::Buffer buffer) [constructor] - cls.add_constructor([param('ns3::PacketMetadata const *', 'metadata'), param('ns3::Buffer', 'buffer')]) - ## packet-metadata.h (module 'network'): bool ns3::PacketMetadata::ItemIterator::HasNext() const [member function] - cls.add_method('HasNext', - 'bool', - [], - is_const=True) - ## packet-metadata.h (module 'network'): ns3::PacketMetadata::Item ns3::PacketMetadata::ItemIterator::Next() [member function] - cls.add_method('Next', - 'ns3::PacketMetadata::Item', - []) - return - -def register_Ns3PacketTagIterator_methods(root_module, cls): - ## packet.h (module 'network'): ns3::PacketTagIterator::PacketTagIterator(ns3::PacketTagIterator const & arg0) [copy constructor] - cls.add_constructor([param('ns3::PacketTagIterator const &', 'arg0')]) - ## packet.h (module 'network'): bool ns3::PacketTagIterator::HasNext() const [member function] - cls.add_method('HasNext', - 'bool', - [], - is_const=True) - ## packet.h (module 'network'): ns3::PacketTagIterator::Item ns3::PacketTagIterator::Next() [member function] - cls.add_method('Next', - 'ns3::PacketTagIterator::Item', - []) - return - -def register_Ns3PacketTagIteratorItem_methods(root_module, cls): - ## packet.h (module 'network'): ns3::PacketTagIterator::Item::Item(ns3::PacketTagIterator::Item const & arg0) [copy constructor] - cls.add_constructor([param('ns3::PacketTagIterator::Item const &', 'arg0')]) - ## packet.h (module 'network'): void ns3::PacketTagIterator::Item::GetTag(ns3::Tag & tag) const [member function] - cls.add_method('GetTag', - 'void', - [param('ns3::Tag &', 'tag')], - is_const=True) - ## packet.h (module 'network'): ns3::TypeId ns3::PacketTagIterator::Item::GetTypeId() const [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_const=True) - return - -def register_Ns3PacketTagList_methods(root_module, cls): - ## packet-tag-list.h (module 'network'): ns3::PacketTagList::PacketTagList() [constructor] - cls.add_constructor([]) - ## packet-tag-list.h (module 'network'): ns3::PacketTagList::PacketTagList(ns3::PacketTagList const & o) [copy constructor] - cls.add_constructor([param('ns3::PacketTagList const &', 'o')]) - ## packet-tag-list.h (module 'network'): void ns3::PacketTagList::Add(ns3::Tag const & tag) const [member function] - cls.add_method('Add', - 'void', - [param('ns3::Tag const &', 'tag')], - is_const=True) - ## packet-tag-list.h (module 'network'): ns3::PacketTagList::TagData const * ns3::PacketTagList::Head() const [member function] - cls.add_method('Head', - 'ns3::PacketTagList::TagData const *', - [], - is_const=True) - ## packet-tag-list.h (module 'network'): bool ns3::PacketTagList::Peek(ns3::Tag & tag) const [member function] - cls.add_method('Peek', - 'bool', - [param('ns3::Tag &', 'tag')], - is_const=True) - ## packet-tag-list.h (module 'network'): bool ns3::PacketTagList::Remove(ns3::Tag & tag) [member function] - cls.add_method('Remove', - 'bool', - [param('ns3::Tag &', 'tag')]) - ## packet-tag-list.h (module 'network'): void ns3::PacketTagList::RemoveAll() [member function] - cls.add_method('RemoveAll', - 'void', - []) - return - -def register_Ns3PacketTagListTagData_methods(root_module, cls): - ## packet-tag-list.h (module 'network'): ns3::PacketTagList::TagData::TagData() [constructor] - cls.add_constructor([]) - ## packet-tag-list.h (module 'network'): ns3::PacketTagList::TagData::TagData(ns3::PacketTagList::TagData const & arg0) [copy constructor] - cls.add_constructor([param('ns3::PacketTagList::TagData const &', 'arg0')]) - ## packet-tag-list.h (module 'network'): ns3::PacketTagList::TagData::count [variable] - cls.add_instance_attribute('count', 'uint32_t', is_const=False) - ## packet-tag-list.h (module 'network'): ns3::PacketTagList::TagData::data [variable] - cls.add_instance_attribute('data', 'uint8_t [ 20 ]', is_const=False) - ## packet-tag-list.h (module 'network'): ns3::PacketTagList::TagData::next [variable] - cls.add_instance_attribute('next', 'ns3::PacketTagList::TagData *', is_const=False) - ## packet-tag-list.h (module 'network'): ns3::PacketTagList::TagData::tid [variable] - cls.add_instance_attribute('tid', 'ns3::TypeId', is_const=False) - return - -def register_Ns3SimpleRefCount__Ns3Object_Ns3ObjectBase_Ns3ObjectDeleter_methods(root_module, cls): - ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount::SimpleRefCount() [constructor] - cls.add_constructor([]) - ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount::SimpleRefCount(ns3::SimpleRefCount const & o) [copy constructor] - cls.add_constructor([param('ns3::SimpleRefCount< ns3::Object, ns3::ObjectBase, ns3::ObjectDeleter > const &', 'o')]) - ## simple-ref-count.h (module 'core'): static void ns3::SimpleRefCount::Cleanup() [member function] - cls.add_method('Cleanup', - 'void', - [], - is_static=True) - return - -def register_Ns3Simulator_methods(root_module, cls): - ## simulator.h (module 'core'): ns3::Simulator::Simulator(ns3::Simulator const & arg0) [copy constructor] - cls.add_constructor([param('ns3::Simulator const &', 'arg0')]) - ## simulator.h (module 'core'): static void ns3::Simulator::Cancel(ns3::EventId const & id) [member function] - cls.add_method('Cancel', - 'void', - [param('ns3::EventId const &', 'id')], - is_static=True) - ## simulator.h (module 'core'): static void ns3::Simulator::Destroy() [member function] - cls.add_method('Destroy', - 'void', - [], - is_static=True) - ## simulator.h (module 'core'): static uint32_t ns3::Simulator::GetContext() [member function] - cls.add_method('GetContext', - 'uint32_t', - [], - is_static=True) - ## simulator.h (module 'core'): static ns3::Time ns3::Simulator::GetDelayLeft(ns3::EventId const & id) [member function] - cls.add_method('GetDelayLeft', - 'ns3::Time', - [param('ns3::EventId const &', 'id')], - is_static=True) - ## simulator.h (module 'core'): static ns3::Ptr ns3::Simulator::GetImplementation() [member function] - cls.add_method('GetImplementation', - 'ns3::Ptr< ns3::SimulatorImpl >', - [], - is_static=True) - ## simulator.h (module 'core'): static ns3::Time ns3::Simulator::GetMaximumSimulationTime() [member function] - cls.add_method('GetMaximumSimulationTime', - 'ns3::Time', - [], - is_static=True) - ## simulator.h (module 'core'): static uint32_t ns3::Simulator::GetSystemId() [member function] - cls.add_method('GetSystemId', - 'uint32_t', - [], - is_static=True) - ## simulator.h (module 'core'): static bool ns3::Simulator::IsExpired(ns3::EventId const & id) [member function] - cls.add_method('IsExpired', - 'bool', - [param('ns3::EventId const &', 'id')], - is_static=True) - ## simulator.h (module 'core'): static bool ns3::Simulator::IsFinished() [member function] - cls.add_method('IsFinished', - 'bool', - [], - is_static=True) - ## simulator.h (module 'core'): static ns3::Time ns3::Simulator::Next() [member function] - cls.add_method('Next', - 'ns3::Time', - [], - is_static=True, deprecated=True) - ## simulator.h (module 'core'): static ns3::Time ns3::Simulator::Now() [member function] - cls.add_method('Now', - 'ns3::Time', - [], - is_static=True) - ## simulator.h (module 'core'): static void ns3::Simulator::Remove(ns3::EventId const & id) [member function] - cls.add_method('Remove', - 'void', - [param('ns3::EventId const &', 'id')], - is_static=True) - ## simulator.h (module 'core'): static void ns3::Simulator::RunOneEvent() [member function] - cls.add_method('RunOneEvent', - 'void', - [], - is_static=True, deprecated=True) - ## simulator.h (module 'core'): static void ns3::Simulator::SetImplementation(ns3::Ptr impl) [member function] - cls.add_method('SetImplementation', - 'void', - [param('ns3::Ptr< ns3::SimulatorImpl >', 'impl')], - is_static=True) - ## simulator.h (module 'core'): static void ns3::Simulator::SetScheduler(ns3::ObjectFactory schedulerFactory) [member function] - cls.add_method('SetScheduler', - 'void', - [param('ns3::ObjectFactory', 'schedulerFactory')], - is_static=True) - ## simulator.h (module 'core'): static void ns3::Simulator::Stop() [member function] - cls.add_method('Stop', - 'void', - [], - is_static=True) - ## simulator.h (module 'core'): static void ns3::Simulator::Stop(ns3::Time const & time) [member function] - cls.add_method('Stop', - 'void', - [param('ns3::Time const &', 'time')], - is_static=True) - return - -def register_Ns3Tag_methods(root_module, cls): - ## tag.h (module 'network'): ns3::Tag::Tag() [constructor] - cls.add_constructor([]) - ## tag.h (module 'network'): ns3::Tag::Tag(ns3::Tag const & arg0) [copy constructor] - cls.add_constructor([param('ns3::Tag const &', 'arg0')]) - ## tag.h (module 'network'): void ns3::Tag::Deserialize(ns3::TagBuffer i) [member function] - cls.add_method('Deserialize', - 'void', - [param('ns3::TagBuffer', 'i')], - is_pure_virtual=True, is_virtual=True) - ## tag.h (module 'network'): uint32_t ns3::Tag::GetSerializedSize() const [member function] - cls.add_method('GetSerializedSize', - 'uint32_t', - [], - is_pure_virtual=True, is_const=True, is_virtual=True) - ## tag.h (module 'network'): static ns3::TypeId ns3::Tag::GetTypeId() [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_static=True) - ## tag.h (module 'network'): void ns3::Tag::Print(std::ostream & os) const [member function] - cls.add_method('Print', - 'void', - [param('std::ostream &', 'os')], - is_pure_virtual=True, is_const=True, is_virtual=True) - ## tag.h (module 'network'): void ns3::Tag::Serialize(ns3::TagBuffer i) const [member function] - cls.add_method('Serialize', - 'void', - [param('ns3::TagBuffer', 'i')], - is_pure_virtual=True, is_const=True, is_virtual=True) - return - -def register_Ns3TagBuffer_methods(root_module, cls): - ## tag-buffer.h (module 'network'): ns3::TagBuffer::TagBuffer(ns3::TagBuffer const & arg0) [copy constructor] - cls.add_constructor([param('ns3::TagBuffer const &', 'arg0')]) - ## tag-buffer.h (module 'network'): ns3::TagBuffer::TagBuffer(uint8_t * start, uint8_t * end) [constructor] - cls.add_constructor([param('uint8_t *', 'start'), param('uint8_t *', 'end')]) - ## tag-buffer.h (module 'network'): void ns3::TagBuffer::CopyFrom(ns3::TagBuffer o) [member function] - cls.add_method('CopyFrom', - 'void', - [param('ns3::TagBuffer', 'o')]) - ## tag-buffer.h (module 'network'): void ns3::TagBuffer::Read(uint8_t * buffer, uint32_t size) [member function] - cls.add_method('Read', - 'void', - [param('uint8_t *', 'buffer'), param('uint32_t', 'size')]) - ## tag-buffer.h (module 'network'): double ns3::TagBuffer::ReadDouble() [member function] - cls.add_method('ReadDouble', - 'double', - []) - ## tag-buffer.h (module 'network'): uint16_t ns3::TagBuffer::ReadU16() [member function] - cls.add_method('ReadU16', - 'uint16_t', - []) - ## tag-buffer.h (module 'network'): uint32_t ns3::TagBuffer::ReadU32() [member function] - cls.add_method('ReadU32', - 'uint32_t', - []) - ## tag-buffer.h (module 'network'): uint64_t ns3::TagBuffer::ReadU64() [member function] - cls.add_method('ReadU64', - 'uint64_t', - []) - ## tag-buffer.h (module 'network'): uint8_t ns3::TagBuffer::ReadU8() [member function] - cls.add_method('ReadU8', - 'uint8_t', - []) - ## tag-buffer.h (module 'network'): void ns3::TagBuffer::TrimAtEnd(uint32_t trim) [member function] - cls.add_method('TrimAtEnd', - 'void', - [param('uint32_t', 'trim')]) - ## tag-buffer.h (module 'network'): void ns3::TagBuffer::Write(uint8_t const * buffer, uint32_t size) [member function] - cls.add_method('Write', - 'void', - [param('uint8_t const *', 'buffer'), param('uint32_t', 'size')]) - ## tag-buffer.h (module 'network'): void ns3::TagBuffer::WriteDouble(double v) [member function] - cls.add_method('WriteDouble', - 'void', - [param('double', 'v')]) - ## tag-buffer.h (module 'network'): void ns3::TagBuffer::WriteU16(uint16_t data) [member function] - cls.add_method('WriteU16', - 'void', - [param('uint16_t', 'data')]) - ## tag-buffer.h (module 'network'): void ns3::TagBuffer::WriteU32(uint32_t data) [member function] - cls.add_method('WriteU32', - 'void', - [param('uint32_t', 'data')]) - ## tag-buffer.h (module 'network'): void ns3::TagBuffer::WriteU64(uint64_t v) [member function] - cls.add_method('WriteU64', - 'void', - [param('uint64_t', 'v')]) - ## tag-buffer.h (module 'network'): void ns3::TagBuffer::WriteU8(uint8_t v) [member function] - cls.add_method('WriteU8', - 'void', - [param('uint8_t', 'v')]) - return - -def register_Ns3Time_methods(root_module, cls): - cls.add_binary_numeric_operator('*', root_module['ns3::Time'], root_module['ns3::Time'], param('ns3::Time const &', 'right')) - cls.add_binary_numeric_operator('+', root_module['ns3::Time'], root_module['ns3::Time'], param('ns3::Time const &', 'right')) - cls.add_binary_numeric_operator('-', root_module['ns3::Time'], root_module['ns3::Time'], param('ns3::Time const &', 'right')) - cls.add_binary_numeric_operator('/', root_module['ns3::Time'], root_module['ns3::Time'], param('ns3::Time const &', 'right')) - cls.add_binary_comparison_operator('<') - cls.add_binary_comparison_operator('>') - cls.add_binary_comparison_operator('!=') - cls.add_inplace_numeric_operator('*=', param('ns3::Time const &', 'right')) - cls.add_inplace_numeric_operator('+=', param('ns3::Time const &', 'right')) - cls.add_inplace_numeric_operator('-=', param('ns3::Time const &', 'right')) - cls.add_inplace_numeric_operator('/=', param('ns3::Time const &', 'right')) - cls.add_output_stream_operator() - cls.add_binary_comparison_operator('<=') - cls.add_binary_comparison_operator('==') - cls.add_binary_comparison_operator('>=') - ## nstime.h (module 'core'): ns3::Time::Time() [constructor] - cls.add_constructor([]) - ## nstime.h (module 'core'): ns3::Time::Time(ns3::Time const & o) [copy constructor] - cls.add_constructor([param('ns3::Time const &', 'o')]) - ## nstime.h (module 'core'): ns3::Time::Time(ns3::HighPrecision const & data) [constructor] - cls.add_constructor([param('ns3::HighPrecision const &', 'data')]) - ## nstime.h (module 'core'): ns3::Time::Time(std::string const & s) [constructor] - cls.add_constructor([param('std::string const &', 's')]) - ## nstime.h (module 'core'): int ns3::Time::Compare(ns3::Time const & o) const [member function] - cls.add_method('Compare', - 'int', - [param('ns3::Time const &', 'o')], - is_const=True) - ## nstime.h (module 'core'): static ns3::Time ns3::Time::FromDouble(double value, ns3::Time::Unit timeUnit) [member function] - cls.add_method('FromDouble', - 'ns3::Time', - [param('double', 'value'), param('ns3::Time::Unit', 'timeUnit')], - is_static=True) - ## nstime.h (module 'core'): static ns3::Time ns3::Time::FromInteger(uint64_t value, ns3::Time::Unit timeUnit) [member function] - cls.add_method('FromInteger', - 'ns3::Time', - [param('uint64_t', 'value'), param('ns3::Time::Unit', 'timeUnit')], - is_static=True) - ## nstime.h (module 'core'): int64_t ns3::Time::GetFemtoSeconds() const [member function] - cls.add_method('GetFemtoSeconds', - 'int64_t', - [], - is_const=True) - ## nstime.h (module 'core'): ns3::HighPrecision const & ns3::Time::GetHighPrecision() const [member function] - cls.add_method('GetHighPrecision', - 'ns3::HighPrecision const &', - [], - is_const=True) - ## nstime.h (module 'core'): int64_t ns3::Time::GetMicroSeconds() const [member function] - cls.add_method('GetMicroSeconds', - 'int64_t', - [], - is_const=True) - ## nstime.h (module 'core'): int64_t ns3::Time::GetMilliSeconds() const [member function] - cls.add_method('GetMilliSeconds', - 'int64_t', - [], - is_const=True) - ## nstime.h (module 'core'): int64_t ns3::Time::GetNanoSeconds() const [member function] - cls.add_method('GetNanoSeconds', - 'int64_t', - [], - is_const=True) - ## nstime.h (module 'core'): int64_t ns3::Time::GetPicoSeconds() const [member function] - cls.add_method('GetPicoSeconds', - 'int64_t', - [], - is_const=True) - ## nstime.h (module 'core'): static ns3::Time::Unit ns3::Time::GetResolution() [member function] - cls.add_method('GetResolution', - 'ns3::Time::Unit', - [], - is_static=True) - ## nstime.h (module 'core'): double ns3::Time::GetSeconds() const [member function] - cls.add_method('GetSeconds', - 'double', - [], - is_const=True) - ## nstime.h (module 'core'): int64_t ns3::Time::GetTimeStep() const [member function] - cls.add_method('GetTimeStep', - 'int64_t', - [], - is_const=True) - ## nstime.h (module 'core'): bool ns3::Time::IsNegative() const [member function] - cls.add_method('IsNegative', - 'bool', - [], - is_const=True) - ## nstime.h (module 'core'): bool ns3::Time::IsPositive() const [member function] - cls.add_method('IsPositive', - 'bool', - [], - is_const=True) - ## nstime.h (module 'core'): bool ns3::Time::IsStrictlyNegative() const [member function] - cls.add_method('IsStrictlyNegative', - 'bool', - [], - is_const=True) - ## nstime.h (module 'core'): bool ns3::Time::IsStrictlyPositive() const [member function] - cls.add_method('IsStrictlyPositive', - 'bool', - [], - is_const=True) - ## nstime.h (module 'core'): bool ns3::Time::IsZero() const [member function] - cls.add_method('IsZero', - 'bool', - [], - is_const=True) - ## nstime.h (module 'core'): ns3::HighPrecision * ns3::Time::PeekHighPrecision() [member function] - cls.add_method('PeekHighPrecision', - 'ns3::HighPrecision *', - []) - ## nstime.h (module 'core'): static void ns3::Time::SetResolution(ns3::Time::Unit resolution) [member function] - cls.add_method('SetResolution', - 'void', - [param('ns3::Time::Unit', 'resolution')], - is_static=True) - ## nstime.h (module 'core'): static double ns3::Time::ToDouble(ns3::Time const & time, ns3::Time::Unit timeUnit) [member function] - cls.add_method('ToDouble', - 'double', - [param('ns3::Time const &', 'time'), param('ns3::Time::Unit', 'timeUnit')], - is_static=True) - ## nstime.h (module 'core'): static uint64_t ns3::Time::ToInteger(ns3::Time const & time, ns3::Time::Unit timeUnit) [member function] - cls.add_method('ToInteger', - 'uint64_t', - [param('ns3::Time const &', 'time'), param('ns3::Time::Unit', 'timeUnit')], - is_static=True) - return - -def register_Ns3TypeId_methods(root_module, cls): - cls.add_binary_comparison_operator('<') - cls.add_binary_comparison_operator('!=') - cls.add_output_stream_operator() - cls.add_binary_comparison_operator('==') - ## type-id.h (module 'core'): ns3::TypeId::TypeId(char const * name) [constructor] - cls.add_constructor([param('char const *', 'name')]) - ## type-id.h (module 'core'): ns3::TypeId::TypeId() [constructor] - cls.add_constructor([]) - ## type-id.h (module 'core'): ns3::TypeId::TypeId(ns3::TypeId const & o) [copy constructor] - cls.add_constructor([param('ns3::TypeId const &', 'o')]) - ## type-id.h (module 'core'): ns3::TypeId ns3::TypeId::AddAttribute(std::string name, std::string help, ns3::AttributeValue const & initialValue, ns3::Ptr accessor, ns3::Ptr checker) [member function] - cls.add_method('AddAttribute', - 'ns3::TypeId', - [param('std::string', 'name'), param('std::string', 'help'), param('ns3::AttributeValue const &', 'initialValue'), param('ns3::Ptr< ns3::AttributeAccessor const >', 'accessor'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')]) - ## type-id.h (module 'core'): ns3::TypeId ns3::TypeId::AddAttribute(std::string name, std::string help, uint32_t flags, ns3::AttributeValue const & initialValue, ns3::Ptr accessor, ns3::Ptr checker) [member function] - cls.add_method('AddAttribute', - 'ns3::TypeId', - [param('std::string', 'name'), param('std::string', 'help'), param('uint32_t', 'flags'), param('ns3::AttributeValue const &', 'initialValue'), param('ns3::Ptr< ns3::AttributeAccessor const >', 'accessor'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')]) - ## type-id.h (module 'core'): ns3::TypeId ns3::TypeId::AddTraceSource(std::string name, std::string help, ns3::Ptr accessor) [member function] - cls.add_method('AddTraceSource', - 'ns3::TypeId', - [param('std::string', 'name'), param('std::string', 'help'), param('ns3::Ptr< ns3::TraceSourceAccessor const >', 'accessor')]) - ## type-id.h (module 'core'): ns3::Ptr ns3::TypeId::GetAttributeAccessor(uint32_t i) const [member function] - cls.add_method('GetAttributeAccessor', - 'ns3::Ptr< ns3::AttributeAccessor const >', - [param('uint32_t', 'i')], - is_const=True) - ## type-id.h (module 'core'): ns3::Ptr ns3::TypeId::GetAttributeChecker(uint32_t i) const [member function] - cls.add_method('GetAttributeChecker', - 'ns3::Ptr< ns3::AttributeChecker const >', - [param('uint32_t', 'i')], - is_const=True) - ## type-id.h (module 'core'): uint32_t ns3::TypeId::GetAttributeFlags(uint32_t i) const [member function] - cls.add_method('GetAttributeFlags', - 'uint32_t', - [param('uint32_t', 'i')], - is_const=True) - ## type-id.h (module 'core'): std::string ns3::TypeId::GetAttributeFullName(uint32_t i) const [member function] - cls.add_method('GetAttributeFullName', - 'std::string', - [param('uint32_t', 'i')], - is_const=True) - ## type-id.h (module 'core'): std::string ns3::TypeId::GetAttributeHelp(uint32_t i) const [member function] - cls.add_method('GetAttributeHelp', - 'std::string', - [param('uint32_t', 'i')], - is_const=True) - ## type-id.h (module 'core'): ns3::Ptr ns3::TypeId::GetAttributeInitialValue(uint32_t i) const [member function] - cls.add_method('GetAttributeInitialValue', - 'ns3::Ptr< ns3::AttributeValue const >', - [param('uint32_t', 'i')], - is_const=True) - ## type-id.h (module 'core'): uint32_t ns3::TypeId::GetAttributeN() const [member function] - cls.add_method('GetAttributeN', - 'uint32_t', - [], - is_const=True) - ## type-id.h (module 'core'): std::string ns3::TypeId::GetAttributeName(uint32_t i) const [member function] - cls.add_method('GetAttributeName', - 'std::string', - [param('uint32_t', 'i')], - is_const=True) - ## type-id.h (module 'core'): ns3::Callback ns3::TypeId::GetConstructor() const [member function] - cls.add_method('GetConstructor', - 'ns3::Callback< ns3::ObjectBase *, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', - [], - is_const=True) - ## type-id.h (module 'core'): std::string ns3::TypeId::GetGroupName() const [member function] - cls.add_method('GetGroupName', - 'std::string', - [], - is_const=True) - ## type-id.h (module 'core'): std::string ns3::TypeId::GetName() const [member function] - cls.add_method('GetName', - 'std::string', - [], - is_const=True) - ## type-id.h (module 'core'): ns3::TypeId ns3::TypeId::GetParent() const [member function] - cls.add_method('GetParent', - 'ns3::TypeId', - [], - is_const=True) - ## type-id.h (module 'core'): static ns3::TypeId ns3::TypeId::GetRegistered(uint32_t i) [member function] - cls.add_method('GetRegistered', - 'ns3::TypeId', - [param('uint32_t', 'i')], - is_static=True) - ## type-id.h (module 'core'): static uint32_t ns3::TypeId::GetRegisteredN() [member function] - cls.add_method('GetRegisteredN', - 'uint32_t', - [], - is_static=True) - ## type-id.h (module 'core'): ns3::Ptr ns3::TypeId::GetTraceSourceAccessor(uint32_t i) const [member function] - cls.add_method('GetTraceSourceAccessor', - 'ns3::Ptr< ns3::TraceSourceAccessor const >', - [param('uint32_t', 'i')], - is_const=True) - ## type-id.h (module 'core'): std::string ns3::TypeId::GetTraceSourceHelp(uint32_t i) const [member function] - cls.add_method('GetTraceSourceHelp', - 'std::string', - [param('uint32_t', 'i')], - is_const=True) - ## type-id.h (module 'core'): uint32_t ns3::TypeId::GetTraceSourceN() const [member function] - cls.add_method('GetTraceSourceN', - 'uint32_t', - [], - is_const=True) - ## type-id.h (module 'core'): std::string ns3::TypeId::GetTraceSourceName(uint32_t i) const [member function] - cls.add_method('GetTraceSourceName', - 'std::string', - [param('uint32_t', 'i')], - is_const=True) - ## type-id.h (module 'core'): uint16_t ns3::TypeId::GetUid() const [member function] - cls.add_method('GetUid', - 'uint16_t', - [], - is_const=True) - ## type-id.h (module 'core'): bool ns3::TypeId::HasConstructor() const [member function] - cls.add_method('HasConstructor', - 'bool', - [], - is_const=True) - ## type-id.h (module 'core'): bool ns3::TypeId::HasParent() const [member function] - cls.add_method('HasParent', - 'bool', - [], - is_const=True) - ## type-id.h (module 'core'): ns3::TypeId ns3::TypeId::HideFromDocumentation() [member function] - cls.add_method('HideFromDocumentation', - 'ns3::TypeId', - []) - ## type-id.h (module 'core'): bool ns3::TypeId::IsChildOf(ns3::TypeId other) const [member function] - cls.add_method('IsChildOf', - 'bool', - [param('ns3::TypeId', 'other')], - is_const=True) - ## type-id.h (module 'core'): static bool ns3::TypeId::LookupAttributeByFullName(std::string fullName, ns3::TypeId::AttributeInfo * info) [member function] - cls.add_method('LookupAttributeByFullName', - 'bool', - [param('std::string', 'fullName'), param('ns3::TypeId::AttributeInfo *', 'info')], - is_static=True) - ## type-id.h (module 'core'): bool ns3::TypeId::LookupAttributeByName(std::string name, ns3::TypeId::AttributeInfo * info) const [member function] - cls.add_method('LookupAttributeByName', - 'bool', - [param('std::string', 'name'), param('ns3::TypeId::AttributeInfo *', 'info', transfer_ownership=False)], - is_const=True) - ## type-id.h (module 'core'): static ns3::TypeId ns3::TypeId::LookupByName(std::string name) [member function] - cls.add_method('LookupByName', - 'ns3::TypeId', - [param('std::string', 'name')], - is_static=True) - ## type-id.h (module 'core'): ns3::Ptr ns3::TypeId::LookupTraceSourceByName(std::string name) const [member function] - cls.add_method('LookupTraceSourceByName', - 'ns3::Ptr< ns3::TraceSourceAccessor const >', - [param('std::string', 'name')], - is_const=True) - ## type-id.h (module 'core'): bool ns3::TypeId::MustHideFromDocumentation() const [member function] - cls.add_method('MustHideFromDocumentation', - 'bool', - [], - is_const=True) - ## type-id.h (module 'core'): ns3::TypeId ns3::TypeId::SetGroupName(std::string groupName) [member function] - cls.add_method('SetGroupName', - 'ns3::TypeId', - [param('std::string', 'groupName')]) - ## type-id.h (module 'core'): ns3::TypeId ns3::TypeId::SetParent(ns3::TypeId tid) [member function] - cls.add_method('SetParent', - 'ns3::TypeId', - [param('ns3::TypeId', 'tid')]) - ## type-id.h (module 'core'): void ns3::TypeId::SetUid(uint16_t tid) [member function] - cls.add_method('SetUid', - 'void', - [param('uint16_t', 'tid')]) - return - -def register_Ns3TypeIdAttributeInfo_methods(root_module, cls): - ## type-id.h (module 'core'): ns3::TypeId::AttributeInfo::AttributeInfo() [constructor] - cls.add_constructor([]) - ## type-id.h (module 'core'): ns3::TypeId::AttributeInfo::AttributeInfo(ns3::TypeId::AttributeInfo const & arg0) [copy constructor] - cls.add_constructor([param('ns3::TypeId::AttributeInfo const &', 'arg0')]) - ## type-id.h (module 'core'): ns3::TypeId::AttributeInfo::accessor [variable] - cls.add_instance_attribute('accessor', 'ns3::Ptr< ns3::AttributeAccessor const >', is_const=False) - ## type-id.h (module 'core'): ns3::TypeId::AttributeInfo::checker [variable] - cls.add_instance_attribute('checker', 'ns3::Ptr< ns3::AttributeChecker const >', is_const=False) - ## type-id.h (module 'core'): ns3::TypeId::AttributeInfo::flags [variable] - cls.add_instance_attribute('flags', 'uint32_t', is_const=False) - ## type-id.h (module 'core'): ns3::TypeId::AttributeInfo::initialValue [variable] - cls.add_instance_attribute('initialValue', 'ns3::Ptr< ns3::AttributeValue const >', is_const=False) - return - -def register_Ns3UnsafeAttributeList_methods(root_module, cls): - ## attribute-list.h (module 'core'): ns3::UnsafeAttributeList::UnsafeAttributeList() [constructor] - cls.add_constructor([]) - ## attribute-list.h (module 'core'): ns3::UnsafeAttributeList::UnsafeAttributeList(ns3::UnsafeAttributeList const & o) [copy constructor] - cls.add_constructor([param('ns3::UnsafeAttributeList const &', 'o')]) - ## attribute-list.h (module 'core'): ns3::AttributeList ns3::UnsafeAttributeList::GetSafe(std::string name) const [member function] - cls.add_method('GetSafe', - 'ns3::AttributeList', - [param('std::string', 'name')], - is_const=True) - ## attribute-list.h (module 'core'): void ns3::UnsafeAttributeList::Set(std::string name, ns3::AttributeValue const & param) [member function] - cls.add_method('Set', - 'void', - [param('std::string', 'name'), param('ns3::AttributeValue const &', 'param')]) - return - -def register_Ns3Empty_methods(root_module, cls): - ## empty.h (module 'core'): ns3::empty::empty() [constructor] - cls.add_constructor([]) - ## empty.h (module 'core'): ns3::empty::empty(ns3::empty const & arg0) [copy constructor] - cls.add_constructor([param('ns3::empty const &', 'arg0')]) - return - -def register_Ns3Chunk_methods(root_module, cls): - ## chunk.h (module 'network'): ns3::Chunk::Chunk() [constructor] - cls.add_constructor([]) - ## chunk.h (module 'network'): ns3::Chunk::Chunk(ns3::Chunk const & arg0) [copy constructor] - cls.add_constructor([param('ns3::Chunk const &', 'arg0')]) - ## chunk.h (module 'network'): uint32_t ns3::Chunk::Deserialize(ns3::Buffer::Iterator start) [member function] - cls.add_method('Deserialize', - 'uint32_t', - [param('ns3::Buffer::Iterator', 'start')], - is_pure_virtual=True, is_virtual=True) - ## chunk.h (module 'network'): static ns3::TypeId ns3::Chunk::GetTypeId() [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_static=True) - ## chunk.h (module 'network'): void ns3::Chunk::Print(std::ostream & os) const [member function] - cls.add_method('Print', - 'void', - [param('std::ostream &', 'os')], - is_pure_virtual=True, is_const=True, is_virtual=True) - return - -def register_Ns3ConfigStore_methods(root_module, cls): - ## config-store.h (module 'contrib'): ns3::ConfigStore::ConfigStore(ns3::ConfigStore const & arg0) [copy constructor] - cls.add_constructor([param('ns3::ConfigStore const &', 'arg0')]) - ## config-store.h (module 'contrib'): ns3::ConfigStore::ConfigStore() [constructor] - cls.add_constructor([]) - ## config-store.h (module 'contrib'): void ns3::ConfigStore::ConfigureAttributes() [member function] - cls.add_method('ConfigureAttributes', - 'void', - []) - ## config-store.h (module 'contrib'): void ns3::ConfigStore::ConfigureDefaults() [member function] - cls.add_method('ConfigureDefaults', - 'void', - []) - ## config-store.h (module 'contrib'): ns3::TypeId ns3::ConfigStore::GetInstanceTypeId() const [member function] - cls.add_method('GetInstanceTypeId', - 'ns3::TypeId', - [], - is_const=True, is_virtual=True) - ## config-store.h (module 'contrib'): static ns3::TypeId ns3::ConfigStore::GetTypeId() [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_static=True) - ## config-store.h (module 'contrib'): void ns3::ConfigStore::SetFileFormat(ns3::ConfigStore::FileFormat format) [member function] - cls.add_method('SetFileFormat', - 'void', - [param('ns3::ConfigStore::FileFormat', 'format')]) - ## config-store.h (module 'contrib'): void ns3::ConfigStore::SetFilename(std::string filename) [member function] - cls.add_method('SetFilename', - 'void', - [param('std::string', 'filename')]) - ## config-store.h (module 'contrib'): void ns3::ConfigStore::SetMode(ns3::ConfigStore::Mode mode) [member function] - cls.add_method('SetMode', - 'void', - [param('ns3::ConfigStore::Mode', 'mode')]) - return - -def register_Ns3FlowIdTag_methods(root_module, cls): - ## flow-id-tag.h (module 'contrib'): ns3::FlowIdTag::FlowIdTag(ns3::FlowIdTag const & arg0) [copy constructor] - cls.add_constructor([param('ns3::FlowIdTag const &', 'arg0')]) - ## flow-id-tag.h (module 'contrib'): ns3::FlowIdTag::FlowIdTag() [constructor] - cls.add_constructor([]) - ## flow-id-tag.h (module 'contrib'): ns3::FlowIdTag::FlowIdTag(uint32_t flowId) [constructor] - cls.add_constructor([param('uint32_t', 'flowId')]) - ## flow-id-tag.h (module 'contrib'): static uint32_t ns3::FlowIdTag::AllocateFlowId() [member function] - cls.add_method('AllocateFlowId', - 'uint32_t', - [], - is_static=True) - ## flow-id-tag.h (module 'contrib'): void ns3::FlowIdTag::Deserialize(ns3::TagBuffer buf) [member function] - cls.add_method('Deserialize', - 'void', - [param('ns3::TagBuffer', 'buf')], - is_virtual=True) - ## flow-id-tag.h (module 'contrib'): uint32_t ns3::FlowIdTag::GetFlowId() const [member function] - cls.add_method('GetFlowId', - 'uint32_t', - [], - is_const=True) - ## flow-id-tag.h (module 'contrib'): ns3::TypeId ns3::FlowIdTag::GetInstanceTypeId() const [member function] - cls.add_method('GetInstanceTypeId', - 'ns3::TypeId', - [], - is_const=True, is_virtual=True) - ## flow-id-tag.h (module 'contrib'): uint32_t ns3::FlowIdTag::GetSerializedSize() const [member function] - cls.add_method('GetSerializedSize', - 'uint32_t', - [], - is_const=True, is_virtual=True) - ## flow-id-tag.h (module 'contrib'): static ns3::TypeId ns3::FlowIdTag::GetTypeId() [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_static=True) - ## flow-id-tag.h (module 'contrib'): void ns3::FlowIdTag::Print(std::ostream & os) const [member function] - cls.add_method('Print', - 'void', - [param('std::ostream &', 'os')], - is_const=True, is_virtual=True) - ## flow-id-tag.h (module 'contrib'): void ns3::FlowIdTag::Serialize(ns3::TagBuffer buf) const [member function] - cls.add_method('Serialize', - 'void', - [param('ns3::TagBuffer', 'buf')], - is_const=True, is_virtual=True) - ## flow-id-tag.h (module 'contrib'): void ns3::FlowIdTag::SetFlowId(uint32_t flowId) [member function] - cls.add_method('SetFlowId', - 'void', - [param('uint32_t', 'flowId')]) - return - -def register_Ns3Gnuplot2dDataset_methods(root_module, cls): - ## gnuplot.h (module 'contrib'): ns3::Gnuplot2dDataset::Gnuplot2dDataset(ns3::Gnuplot2dDataset const & arg0) [copy constructor] - cls.add_constructor([param('ns3::Gnuplot2dDataset const &', 'arg0')]) - ## gnuplot.h (module 'contrib'): ns3::Gnuplot2dDataset::Gnuplot2dDataset(std::string const & title="Untitled") [constructor] - cls.add_constructor([param('std::string const &', 'title', default_value='"Untitled"')]) - ## gnuplot.h (module 'contrib'): void ns3::Gnuplot2dDataset::Add(double x, double y) [member function] - cls.add_method('Add', - 'void', - [param('double', 'x'), param('double', 'y')]) - ## gnuplot.h (module 'contrib'): void ns3::Gnuplot2dDataset::Add(double x, double y, double errorDelta) [member function] - cls.add_method('Add', - 'void', - [param('double', 'x'), param('double', 'y'), param('double', 'errorDelta')]) - ## gnuplot.h (module 'contrib'): void ns3::Gnuplot2dDataset::Add(double x, double y, double minY, double maxY) [member function] - cls.add_method('Add', - 'void', - [param('double', 'x'), param('double', 'y'), param('double', 'minY'), param('double', 'maxY')]) - ## gnuplot.h (module 'contrib'): void ns3::Gnuplot2dDataset::AddEmptyLine() [member function] - cls.add_method('AddEmptyLine', - 'void', - []) - ## gnuplot.h (module 'contrib'): static void ns3::Gnuplot2dDataset::SetDefaultErrorBars(ns3::Gnuplot2dDataset::ErrorBars errorBars) [member function] - cls.add_method('SetDefaultErrorBars', - 'void', - [param('ns3::Gnuplot2dDataset::ErrorBars', 'errorBars')], - is_static=True) - ## gnuplot.h (module 'contrib'): static void ns3::Gnuplot2dDataset::SetDefaultStyle(ns3::Gnuplot2dDataset::Style style) [member function] - cls.add_method('SetDefaultStyle', - 'void', - [param('ns3::Gnuplot2dDataset::Style', 'style')], - is_static=True) - ## gnuplot.h (module 'contrib'): void ns3::Gnuplot2dDataset::SetErrorBars(ns3::Gnuplot2dDataset::ErrorBars errorBars) [member function] - cls.add_method('SetErrorBars', - 'void', - [param('ns3::Gnuplot2dDataset::ErrorBars', 'errorBars')]) - ## gnuplot.h (module 'contrib'): void ns3::Gnuplot2dDataset::SetStyle(ns3::Gnuplot2dDataset::Style style) [member function] - cls.add_method('SetStyle', - 'void', - [param('ns3::Gnuplot2dDataset::Style', 'style')]) - return - -def register_Ns3Gnuplot2dFunction_methods(root_module, cls): - ## gnuplot.h (module 'contrib'): ns3::Gnuplot2dFunction::Gnuplot2dFunction(ns3::Gnuplot2dFunction const & arg0) [copy constructor] - cls.add_constructor([param('ns3::Gnuplot2dFunction const &', 'arg0')]) - ## gnuplot.h (module 'contrib'): ns3::Gnuplot2dFunction::Gnuplot2dFunction(std::string const & title="Untitled", std::string const & function="") [constructor] - cls.add_constructor([param('std::string const &', 'title', default_value='"Untitled"'), param('std::string const &', 'function', default_value='""')]) - ## gnuplot.h (module 'contrib'): void ns3::Gnuplot2dFunction::SetFunction(std::string const & function) [member function] - cls.add_method('SetFunction', - 'void', - [param('std::string const &', 'function')]) - return - -def register_Ns3Gnuplot3dDataset_methods(root_module, cls): - ## gnuplot.h (module 'contrib'): ns3::Gnuplot3dDataset::Gnuplot3dDataset(ns3::Gnuplot3dDataset const & arg0) [copy constructor] - cls.add_constructor([param('ns3::Gnuplot3dDataset const &', 'arg0')]) - ## gnuplot.h (module 'contrib'): ns3::Gnuplot3dDataset::Gnuplot3dDataset(std::string const & title="Untitled") [constructor] - cls.add_constructor([param('std::string const &', 'title', default_value='"Untitled"')]) - ## gnuplot.h (module 'contrib'): void ns3::Gnuplot3dDataset::Add(double x, double y, double z) [member function] - cls.add_method('Add', - 'void', - [param('double', 'x'), param('double', 'y'), param('double', 'z')]) - ## gnuplot.h (module 'contrib'): void ns3::Gnuplot3dDataset::AddEmptyLine() [member function] - cls.add_method('AddEmptyLine', - 'void', - []) - ## gnuplot.h (module 'contrib'): static void ns3::Gnuplot3dDataset::SetDefaultStyle(std::string const & style) [member function] - cls.add_method('SetDefaultStyle', - 'void', - [param('std::string const &', 'style')], - is_static=True) - ## gnuplot.h (module 'contrib'): void ns3::Gnuplot3dDataset::SetStyle(std::string const & style) [member function] - cls.add_method('SetStyle', - 'void', - [param('std::string const &', 'style')]) - return - -def register_Ns3Gnuplot3dFunction_methods(root_module, cls): - ## gnuplot.h (module 'contrib'): ns3::Gnuplot3dFunction::Gnuplot3dFunction(ns3::Gnuplot3dFunction const & arg0) [copy constructor] - cls.add_constructor([param('ns3::Gnuplot3dFunction const &', 'arg0')]) - ## gnuplot.h (module 'contrib'): ns3::Gnuplot3dFunction::Gnuplot3dFunction(std::string const & title="Untitled", std::string const & function="") [constructor] - cls.add_constructor([param('std::string const &', 'title', default_value='"Untitled"'), param('std::string const &', 'function', default_value='""')]) - ## gnuplot.h (module 'contrib'): void ns3::Gnuplot3dFunction::SetFunction(std::string const & function) [member function] - cls.add_method('SetFunction', - 'void', - [param('std::string const &', 'function')]) - return - -def register_Ns3Header_methods(root_module, cls): - cls.add_output_stream_operator() - ## header.h (module 'network'): ns3::Header::Header() [constructor] - cls.add_constructor([]) - ## header.h (module 'network'): ns3::Header::Header(ns3::Header const & arg0) [copy constructor] - cls.add_constructor([param('ns3::Header const &', 'arg0')]) - ## header.h (module 'network'): uint32_t ns3::Header::Deserialize(ns3::Buffer::Iterator start) [member function] - cls.add_method('Deserialize', - 'uint32_t', - [param('ns3::Buffer::Iterator', 'start')], - is_pure_virtual=True, is_virtual=True) - ## header.h (module 'network'): uint32_t ns3::Header::GetSerializedSize() const [member function] - cls.add_method('GetSerializedSize', - 'uint32_t', - [], - is_pure_virtual=True, is_const=True, is_virtual=True) - ## header.h (module 'network'): static ns3::TypeId ns3::Header::GetTypeId() [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_static=True) - ## header.h (module 'network'): void ns3::Header::Print(std::ostream & os) const [member function] - cls.add_method('Print', - 'void', - [param('std::ostream &', 'os')], - is_pure_virtual=True, is_const=True, is_virtual=True) - ## header.h (module 'network'): void ns3::Header::Serialize(ns3::Buffer::Iterator start) const [member function] - cls.add_method('Serialize', - 'void', - [param('ns3::Buffer::Iterator', 'start')], - is_pure_virtual=True, is_const=True, is_virtual=True) - return - -def register_Ns3Object_methods(root_module, cls): - ## object.h (module 'core'): ns3::Object::Object() [constructor] - cls.add_constructor([]) - ## object.h (module 'core'): void ns3::Object::AggregateObject(ns3::Ptr other) [member function] - cls.add_method('AggregateObject', - 'void', - [param('ns3::Ptr< ns3::Object >', 'other')]) - ## object.h (module 'core'): void ns3::Object::Dispose() [member function] - cls.add_method('Dispose', - 'void', - []) - ## object.h (module 'core'): ns3::Object::AggregateIterator ns3::Object::GetAggregateIterator() const [member function] - cls.add_method('GetAggregateIterator', - 'ns3::Object::AggregateIterator', - [], - is_const=True) - ## object.h (module 'core'): ns3::TypeId ns3::Object::GetInstanceTypeId() const [member function] - cls.add_method('GetInstanceTypeId', - 'ns3::TypeId', - [], - is_const=True, is_virtual=True) - ## object.h (module 'core'): static ns3::TypeId ns3::Object::GetTypeId() [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_static=True) - ## object.h (module 'core'): void ns3::Object::Start() [member function] - cls.add_method('Start', - 'void', - []) - ## object.h (module 'core'): ns3::Object::Object(ns3::Object const & o) [copy constructor] - cls.add_constructor([param('ns3::Object const &', 'o')], - visibility='protected') - ## object.h (module 'core'): void ns3::Object::DoDispose() [member function] - cls.add_method('DoDispose', - 'void', - [], - visibility='protected', is_virtual=True) - ## object.h (module 'core'): void ns3::Object::DoStart() [member function] - cls.add_method('DoStart', - 'void', - [], - visibility='protected', is_virtual=True) - ## object.h (module 'core'): void ns3::Object::NotifyNewAggregate() [member function] - cls.add_method('NotifyNewAggregate', - 'void', - [], - visibility='protected', is_virtual=True) - return - -def register_Ns3ObjectAggregateIterator_methods(root_module, cls): - ## object.h (module 'core'): ns3::Object::AggregateIterator::AggregateIterator(ns3::Object::AggregateIterator const & arg0) [copy constructor] - cls.add_constructor([param('ns3::Object::AggregateIterator const &', 'arg0')]) - ## object.h (module 'core'): ns3::Object::AggregateIterator::AggregateIterator() [constructor] - cls.add_constructor([]) - ## object.h (module 'core'): bool ns3::Object::AggregateIterator::HasNext() const [member function] - cls.add_method('HasNext', - 'bool', - [], - is_const=True) - ## object.h (module 'core'): ns3::Ptr ns3::Object::AggregateIterator::Next() [member function] - cls.add_method('Next', - 'ns3::Ptr< ns3::Object const >', - []) - return - -def register_Ns3Scalar_methods(root_module, cls): - ## nstime.h (module 'core'): ns3::Scalar::Scalar(ns3::Scalar const & arg0) [copy constructor] - cls.add_constructor([param('ns3::Scalar const &', 'arg0')]) - ## nstime.h (module 'core'): ns3::Scalar::Scalar() [constructor] - cls.add_constructor([]) - ## nstime.h (module 'core'): ns3::Scalar::Scalar(double v) [constructor] - cls.add_constructor([param('double', 'v')]) - ## nstime.h (module 'core'): ns3::Scalar::Scalar(uint32_t v) [constructor] - cls.add_constructor([param('uint32_t', 'v')]) - ## nstime.h (module 'core'): ns3::Scalar::Scalar(int32_t v) [constructor] - cls.add_constructor([param('int32_t', 'v')]) - ## nstime.h (module 'core'): ns3::Scalar::Scalar(uint64_t v) [constructor] - cls.add_constructor([param('uint64_t', 'v')]) - ## nstime.h (module 'core'): ns3::Scalar::Scalar(int64_t v) [constructor] - cls.add_constructor([param('int64_t', 'v')]) - ## nstime.h (module 'core'): ns3::Scalar::Scalar(ns3::Time t) [constructor] - cls.add_constructor([param('ns3::Time', 't')]) - ## nstime.h (module 'core'): double ns3::Scalar::GetDouble() const [member function] - cls.add_method('GetDouble', - 'double', - [], - is_const=True) - return - -def register_Ns3SimpleRefCount__Ns3AttributeAccessor_Ns3Empty_Ns3DefaultDeleter__lt__ns3AttributeAccessor__gt___methods(root_module, cls): - ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount() [constructor] - cls.add_constructor([]) - ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount(ns3::SimpleRefCount > const & o) [copy constructor] - cls.add_constructor([param('ns3::SimpleRefCount< ns3::AttributeAccessor, ns3::empty, ns3::DefaultDeleter< ns3::AttributeAccessor > > const &', 'o')]) - ## simple-ref-count.h (module 'core'): static void ns3::SimpleRefCount >::Cleanup() [member function] - cls.add_method('Cleanup', - 'void', - [], - is_static=True) - return - -def register_Ns3SimpleRefCount__Ns3AttributeChecker_Ns3Empty_Ns3DefaultDeleter__lt__ns3AttributeChecker__gt___methods(root_module, cls): - ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount() [constructor] - cls.add_constructor([]) - ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount(ns3::SimpleRefCount > const & o) [copy constructor] - cls.add_constructor([param('ns3::SimpleRefCount< ns3::AttributeChecker, ns3::empty, ns3::DefaultDeleter< ns3::AttributeChecker > > const &', 'o')]) - ## simple-ref-count.h (module 'core'): static void ns3::SimpleRefCount >::Cleanup() [member function] - cls.add_method('Cleanup', - 'void', - [], - is_static=True) - return - -def register_Ns3SimpleRefCount__Ns3AttributeValue_Ns3Empty_Ns3DefaultDeleter__lt__ns3AttributeValue__gt___methods(root_module, cls): - ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount() [constructor] - cls.add_constructor([]) - ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount(ns3::SimpleRefCount > const & o) [copy constructor] - cls.add_constructor([param('ns3::SimpleRefCount< ns3::AttributeValue, ns3::empty, ns3::DefaultDeleter< ns3::AttributeValue > > const &', 'o')]) - ## simple-ref-count.h (module 'core'): static void ns3::SimpleRefCount >::Cleanup() [member function] - cls.add_method('Cleanup', - 'void', - [], - is_static=True) - return - -def register_Ns3SimpleRefCount__Ns3CallbackImplBase_Ns3Empty_Ns3DefaultDeleter__lt__ns3CallbackImplBase__gt___methods(root_module, cls): - ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount() [constructor] - cls.add_constructor([]) - ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount(ns3::SimpleRefCount > const & o) [copy constructor] - cls.add_constructor([param('ns3::SimpleRefCount< ns3::CallbackImplBase, ns3::empty, ns3::DefaultDeleter< ns3::CallbackImplBase > > const &', 'o')]) - ## simple-ref-count.h (module 'core'): static void ns3::SimpleRefCount >::Cleanup() [member function] - cls.add_method('Cleanup', - 'void', - [], - is_static=True) - return - -def register_Ns3SimpleRefCount__Ns3EventImpl_Ns3Empty_Ns3DefaultDeleter__lt__ns3EventImpl__gt___methods(root_module, cls): - ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount() [constructor] - cls.add_constructor([]) - ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount(ns3::SimpleRefCount > const & o) [copy constructor] - cls.add_constructor([param('ns3::SimpleRefCount< ns3::EventImpl, ns3::empty, ns3::DefaultDeleter< ns3::EventImpl > > const &', 'o')]) - ## simple-ref-count.h (module 'core'): static void ns3::SimpleRefCount >::Cleanup() [member function] - cls.add_method('Cleanup', - 'void', - [], - is_static=True) - return - -def register_Ns3SimpleRefCount__Ns3NixVector_Ns3Empty_Ns3DefaultDeleter__lt__ns3NixVector__gt___methods(root_module, cls): - ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount() [constructor] - cls.add_constructor([]) - ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount(ns3::SimpleRefCount > const & o) [copy constructor] - cls.add_constructor([param('ns3::SimpleRefCount< ns3::NixVector, ns3::empty, ns3::DefaultDeleter< ns3::NixVector > > const &', 'o')]) - ## simple-ref-count.h (module 'core'): static void ns3::SimpleRefCount >::Cleanup() [member function] - cls.add_method('Cleanup', - 'void', - [], - is_static=True) - return - -def register_Ns3SimpleRefCount__Ns3Packet_Ns3Empty_Ns3DefaultDeleter__lt__ns3Packet__gt___methods(root_module, cls): - ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount() [constructor] - cls.add_constructor([]) - ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount(ns3::SimpleRefCount > const & o) [copy constructor] - cls.add_constructor([param('ns3::SimpleRefCount< ns3::Packet, ns3::empty, ns3::DefaultDeleter< ns3::Packet > > const &', 'o')]) - ## simple-ref-count.h (module 'core'): static void ns3::SimpleRefCount >::Cleanup() [member function] - cls.add_method('Cleanup', - 'void', - [], - is_static=True) - return - -def register_Ns3Trailer_methods(root_module, cls): - cls.add_output_stream_operator() - ## trailer.h (module 'network'): ns3::Trailer::Trailer() [constructor] - cls.add_constructor([]) - ## trailer.h (module 'network'): ns3::Trailer::Trailer(ns3::Trailer const & arg0) [copy constructor] - cls.add_constructor([param('ns3::Trailer const &', 'arg0')]) - ## trailer.h (module 'network'): uint32_t ns3::Trailer::Deserialize(ns3::Buffer::Iterator end) [member function] - cls.add_method('Deserialize', - 'uint32_t', - [param('ns3::Buffer::Iterator', 'end')], - is_pure_virtual=True, is_virtual=True) - ## trailer.h (module 'network'): uint32_t ns3::Trailer::GetSerializedSize() const [member function] - cls.add_method('GetSerializedSize', - 'uint32_t', - [], - is_pure_virtual=True, is_const=True, is_virtual=True) - ## trailer.h (module 'network'): static ns3::TypeId ns3::Trailer::GetTypeId() [member function] - cls.add_method('GetTypeId', - 'ns3::TypeId', - [], - is_static=True) - ## trailer.h (module 'network'): void ns3::Trailer::Print(std::ostream & os) const [member function] - cls.add_method('Print', - 'void', - [param('std::ostream &', 'os')], - is_pure_virtual=True, is_const=True, is_virtual=True) - ## trailer.h (module 'network'): void ns3::Trailer::Serialize(ns3::Buffer::Iterator start) const [member function] - cls.add_method('Serialize', - 'void', - [param('ns3::Buffer::Iterator', 'start')], - is_pure_virtual=True, is_const=True, is_virtual=True) - return - -def register_Ns3AttributeAccessor_methods(root_module, cls): - ## attribute.h (module 'core'): ns3::AttributeAccessor::AttributeAccessor(ns3::AttributeAccessor const & arg0) [copy constructor] - cls.add_constructor([param('ns3::AttributeAccessor const &', 'arg0')]) - ## attribute.h (module 'core'): ns3::AttributeAccessor::AttributeAccessor() [constructor] - cls.add_constructor([]) - ## attribute.h (module 'core'): bool ns3::AttributeAccessor::Get(ns3::ObjectBase const * object, ns3::AttributeValue & attribute) const [member function] - cls.add_method('Get', - 'bool', - [param('ns3::ObjectBase const *', 'object'), param('ns3::AttributeValue &', 'attribute')], - is_pure_virtual=True, is_const=True, is_virtual=True) - ## attribute.h (module 'core'): bool ns3::AttributeAccessor::HasGetter() const [member function] - cls.add_method('HasGetter', - 'bool', - [], - is_pure_virtual=True, is_const=True, is_virtual=True) - ## attribute.h (module 'core'): bool ns3::AttributeAccessor::HasSetter() const [member function] - cls.add_method('HasSetter', - 'bool', - [], - is_pure_virtual=True, is_const=True, is_virtual=True) - ## attribute.h (module 'core'): bool ns3::AttributeAccessor::Set(ns3::ObjectBase * object, ns3::AttributeValue const & value) const [member function] - cls.add_method('Set', - 'bool', - [param('ns3::ObjectBase *', 'object', transfer_ownership=False), param('ns3::AttributeValue const &', 'value')], - is_pure_virtual=True, is_const=True, is_virtual=True) - return - -def register_Ns3AttributeChecker_methods(root_module, cls): - ## attribute.h (module 'core'): ns3::AttributeChecker::AttributeChecker(ns3::AttributeChecker const & arg0) [copy constructor] - cls.add_constructor([param('ns3::AttributeChecker const &', 'arg0')]) - ## attribute.h (module 'core'): ns3::AttributeChecker::AttributeChecker() [constructor] - cls.add_constructor([]) - ## attribute.h (module 'core'): bool ns3::AttributeChecker::Check(ns3::AttributeValue const & value) const [member function] - cls.add_method('Check', - 'bool', - [param('ns3::AttributeValue const &', 'value')], - is_pure_virtual=True, is_const=True, is_virtual=True) - ## attribute.h (module 'core'): bool ns3::AttributeChecker::Copy(ns3::AttributeValue const & source, ns3::AttributeValue & destination) const [member function] - cls.add_method('Copy', - 'bool', - [param('ns3::AttributeValue const &', 'source'), param('ns3::AttributeValue &', 'destination')], - is_pure_virtual=True, is_const=True, is_virtual=True) - ## attribute.h (module 'core'): ns3::Ptr ns3::AttributeChecker::Create() const [member function] - cls.add_method('Create', - 'ns3::Ptr< ns3::AttributeValue >', - [], - is_pure_virtual=True, is_const=True, is_virtual=True) - ## attribute.h (module 'core'): std::string ns3::AttributeChecker::GetUnderlyingTypeInformation() const [member function] - cls.add_method('GetUnderlyingTypeInformation', - 'std::string', - [], - is_pure_virtual=True, is_const=True, is_virtual=True) - ## attribute.h (module 'core'): std::string ns3::AttributeChecker::GetValueTypeName() const [member function] - cls.add_method('GetValueTypeName', - 'std::string', - [], - is_pure_virtual=True, is_const=True, is_virtual=True) - ## attribute.h (module 'core'): bool ns3::AttributeChecker::HasUnderlyingTypeInformation() const [member function] - cls.add_method('HasUnderlyingTypeInformation', - 'bool', - [], - is_pure_virtual=True, is_const=True, is_virtual=True) - return - -def register_Ns3AttributeValue_methods(root_module, cls): - ## attribute.h (module 'core'): ns3::AttributeValue::AttributeValue(ns3::AttributeValue const & arg0) [copy constructor] - cls.add_constructor([param('ns3::AttributeValue const &', 'arg0')]) - ## attribute.h (module 'core'): ns3::AttributeValue::AttributeValue() [constructor] - cls.add_constructor([]) - ## attribute.h (module 'core'): ns3::Ptr ns3::AttributeValue::Copy() const [member function] - cls.add_method('Copy', - 'ns3::Ptr< ns3::AttributeValue >', - [], - is_pure_virtual=True, is_const=True, is_virtual=True) - ## attribute.h (module 'core'): bool ns3::AttributeValue::DeserializeFromString(std::string value, ns3::Ptr checker) [member function] - cls.add_method('DeserializeFromString', - 'bool', - [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], - is_pure_virtual=True, is_virtual=True) - ## attribute.h (module 'core'): std::string ns3::AttributeValue::SerializeToString(ns3::Ptr checker) const [member function] - cls.add_method('SerializeToString', - 'std::string', - [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], - is_pure_virtual=True, is_const=True, is_virtual=True) - return - -def register_Ns3CallbackChecker_methods(root_module, cls): - ## callback.h (module 'core'): ns3::CallbackChecker::CallbackChecker() [constructor] - cls.add_constructor([]) - ## callback.h (module 'core'): ns3::CallbackChecker::CallbackChecker(ns3::CallbackChecker const & arg0) [copy constructor] - cls.add_constructor([param('ns3::CallbackChecker const &', 'arg0')]) - return - -def register_Ns3CallbackImplBase_methods(root_module, cls): - ## callback.h (module 'core'): ns3::CallbackImplBase::CallbackImplBase() [constructor] - cls.add_constructor([]) - ## callback.h (module 'core'): ns3::CallbackImplBase::CallbackImplBase(ns3::CallbackImplBase const & arg0) [copy constructor] - cls.add_constructor([param('ns3::CallbackImplBase const &', 'arg0')]) - ## callback.h (module 'core'): bool ns3::CallbackImplBase::IsEqual(ns3::Ptr other) const [member function] - cls.add_method('IsEqual', - 'bool', - [param('ns3::Ptr< ns3::CallbackImplBase const >', 'other')], - is_pure_virtual=True, is_const=True, is_virtual=True) - return - -def register_Ns3CallbackValue_methods(root_module, cls): - ## callback.h (module 'core'): ns3::CallbackValue::CallbackValue(ns3::CallbackValue const & arg0) [copy constructor] - cls.add_constructor([param('ns3::CallbackValue const &', 'arg0')]) - ## callback.h (module 'core'): ns3::CallbackValue::CallbackValue() [constructor] - cls.add_constructor([]) - ## callback.h (module 'core'): ns3::CallbackValue::CallbackValue(ns3::CallbackBase const & base) [constructor] - cls.add_constructor([param('ns3::CallbackBase const &', 'base')]) - ## callback.h (module 'core'): ns3::Ptr ns3::CallbackValue::Copy() const [member function] - cls.add_method('Copy', - 'ns3::Ptr< ns3::AttributeValue >', - [], - is_const=True, is_virtual=True) - ## callback.h (module 'core'): bool ns3::CallbackValue::DeserializeFromString(std::string value, ns3::Ptr checker) [member function] - cls.add_method('DeserializeFromString', - 'bool', - [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], - is_virtual=True) - ## callback.h (module 'core'): std::string ns3::CallbackValue::SerializeToString(ns3::Ptr checker) const [member function] - cls.add_method('SerializeToString', - 'std::string', - [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], - is_const=True, is_virtual=True) - ## callback.h (module 'core'): void ns3::CallbackValue::Set(ns3::CallbackBase base) [member function] - cls.add_method('Set', - 'void', - [param('ns3::CallbackBase', 'base')]) - return - -def register_Ns3EmptyAttributeValue_methods(root_module, cls): - ## attribute.h (module 'core'): ns3::EmptyAttributeValue::EmptyAttributeValue(ns3::EmptyAttributeValue const & arg0) [copy constructor] - cls.add_constructor([param('ns3::EmptyAttributeValue const &', 'arg0')]) - ## attribute.h (module 'core'): ns3::EmptyAttributeValue::EmptyAttributeValue() [constructor] - cls.add_constructor([]) - ## attribute.h (module 'core'): ns3::Ptr ns3::EmptyAttributeValue::Copy() const [member function] - cls.add_method('Copy', - 'ns3::Ptr< ns3::AttributeValue >', - [], - is_const=True, visibility='private', is_virtual=True) - ## attribute.h (module 'core'): bool ns3::EmptyAttributeValue::DeserializeFromString(std::string value, ns3::Ptr checker) [member function] - cls.add_method('DeserializeFromString', - 'bool', - [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], - visibility='private', is_virtual=True) - ## attribute.h (module 'core'): std::string ns3::EmptyAttributeValue::SerializeToString(ns3::Ptr checker) const [member function] - cls.add_method('SerializeToString', - 'std::string', - [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], - is_const=True, visibility='private', is_virtual=True) - return - -def register_Ns3EventImpl_methods(root_module, cls): - ## event-impl.h (module 'core'): ns3::EventImpl::EventImpl(ns3::EventImpl const & arg0) [copy constructor] - cls.add_constructor([param('ns3::EventImpl const &', 'arg0')]) - ## event-impl.h (module 'core'): ns3::EventImpl::EventImpl() [constructor] - cls.add_constructor([]) - ## event-impl.h (module 'core'): void ns3::EventImpl::Cancel() [member function] - cls.add_method('Cancel', - 'void', - []) - ## event-impl.h (module 'core'): void ns3::EventImpl::Invoke() [member function] - cls.add_method('Invoke', - 'void', - []) - ## event-impl.h (module 'core'): bool ns3::EventImpl::IsCancelled() [member function] - cls.add_method('IsCancelled', - 'bool', - []) - ## event-impl.h (module 'core'): void ns3::EventImpl::Notify() [member function] - cls.add_method('Notify', - 'void', - [], - is_pure_virtual=True, visibility='protected', is_virtual=True) - return - -def register_Ns3NixVector_methods(root_module, cls): - cls.add_output_stream_operator() - ## nix-vector.h (module 'network'): ns3::NixVector::NixVector() [constructor] - cls.add_constructor([]) - ## nix-vector.h (module 'network'): ns3::NixVector::NixVector(ns3::NixVector const & o) [copy constructor] - cls.add_constructor([param('ns3::NixVector const &', 'o')]) - ## nix-vector.h (module 'network'): void ns3::NixVector::AddNeighborIndex(uint32_t newBits, uint32_t numberOfBits) [member function] - cls.add_method('AddNeighborIndex', - 'void', - [param('uint32_t', 'newBits'), param('uint32_t', 'numberOfBits')]) - ## nix-vector.h (module 'network'): uint32_t ns3::NixVector::BitCount(uint32_t numberOfNeighbors) const [member function] - cls.add_method('BitCount', - 'uint32_t', - [param('uint32_t', 'numberOfNeighbors')], - is_const=True) - ## nix-vector.h (module 'network'): ns3::Ptr ns3::NixVector::Copy() const [member function] - cls.add_method('Copy', - 'ns3::Ptr< ns3::NixVector >', - [], - is_const=True) - ## nix-vector.h (module 'network'): uint32_t ns3::NixVector::Deserialize(uint32_t const * buffer, uint32_t size) [member function] - cls.add_method('Deserialize', - 'uint32_t', - [param('uint32_t const *', 'buffer'), param('uint32_t', 'size')]) - ## nix-vector.h (module 'network'): uint32_t ns3::NixVector::ExtractNeighborIndex(uint32_t numberOfBits) [member function] - cls.add_method('ExtractNeighborIndex', - 'uint32_t', - [param('uint32_t', 'numberOfBits')]) - ## nix-vector.h (module 'network'): uint32_t ns3::NixVector::GetRemainingBits() [member function] - cls.add_method('GetRemainingBits', - 'uint32_t', - []) - ## nix-vector.h (module 'network'): uint32_t ns3::NixVector::GetSerializedSize() const [member function] - cls.add_method('GetSerializedSize', - 'uint32_t', - [], - is_const=True) - ## nix-vector.h (module 'network'): uint32_t ns3::NixVector::Serialize(uint32_t * buffer, uint32_t maxSize) const [member function] - cls.add_method('Serialize', - 'uint32_t', - [param('uint32_t *', 'buffer'), param('uint32_t', 'maxSize')], - is_const=True) - return - -def register_Ns3ObjectFactoryChecker_methods(root_module, cls): - ## object-factory.h (module 'core'): ns3::ObjectFactoryChecker::ObjectFactoryChecker() [constructor] - cls.add_constructor([]) - ## object-factory.h (module 'core'): ns3::ObjectFactoryChecker::ObjectFactoryChecker(ns3::ObjectFactoryChecker const & arg0) [copy constructor] - cls.add_constructor([param('ns3::ObjectFactoryChecker const &', 'arg0')]) - return - -def register_Ns3ObjectFactoryValue_methods(root_module, cls): - ## object-factory.h (module 'core'): ns3::ObjectFactoryValue::ObjectFactoryValue() [constructor] - cls.add_constructor([]) - ## object-factory.h (module 'core'): ns3::ObjectFactoryValue::ObjectFactoryValue(ns3::ObjectFactoryValue const & arg0) [copy constructor] - cls.add_constructor([param('ns3::ObjectFactoryValue const &', 'arg0')]) - ## object-factory.h (module 'core'): ns3::ObjectFactoryValue::ObjectFactoryValue(ns3::ObjectFactory const & value) [constructor] - cls.add_constructor([param('ns3::ObjectFactory const &', 'value')]) - ## object-factory.h (module 'core'): ns3::Ptr ns3::ObjectFactoryValue::Copy() const [member function] - cls.add_method('Copy', - 'ns3::Ptr< ns3::AttributeValue >', - [], - is_const=True, is_virtual=True) - ## object-factory.h (module 'core'): bool ns3::ObjectFactoryValue::DeserializeFromString(std::string value, ns3::Ptr checker) [member function] - cls.add_method('DeserializeFromString', - 'bool', - [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], - is_virtual=True) - ## object-factory.h (module 'core'): ns3::ObjectFactory ns3::ObjectFactoryValue::Get() const [member function] - cls.add_method('Get', - 'ns3::ObjectFactory', - [], - is_const=True) - ## object-factory.h (module 'core'): std::string ns3::ObjectFactoryValue::SerializeToString(ns3::Ptr checker) const [member function] - cls.add_method('SerializeToString', - 'std::string', - [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], - is_const=True, is_virtual=True) - ## object-factory.h (module 'core'): void ns3::ObjectFactoryValue::Set(ns3::ObjectFactory const & value) [member function] - cls.add_method('Set', - 'void', - [param('ns3::ObjectFactory const &', 'value')]) - return - -def register_Ns3Packet_methods(root_module, cls): - cls.add_output_stream_operator() - ## packet.h (module 'network'): ns3::Packet::Packet() [constructor] - cls.add_constructor([]) - ## packet.h (module 'network'): ns3::Packet::Packet(ns3::Packet const & o) [copy constructor] - cls.add_constructor([param('ns3::Packet const &', 'o')]) - ## packet.h (module 'network'): ns3::Packet::Packet(uint32_t size) [constructor] - cls.add_constructor([param('uint32_t', 'size')]) - ## packet.h (module 'network'): ns3::Packet::Packet(uint8_t const * buffer, uint32_t size, bool magic) [constructor] - cls.add_constructor([param('uint8_t const *', 'buffer'), param('uint32_t', 'size'), param('bool', 'magic')]) - ## packet.h (module 'network'): ns3::Packet::Packet(uint8_t const * buffer, uint32_t size) [constructor] - cls.add_constructor([param('uint8_t const *', 'buffer'), param('uint32_t', 'size')]) - ## packet.h (module 'network'): void ns3::Packet::AddAtEnd(ns3::Ptr packet) [member function] - cls.add_method('AddAtEnd', - 'void', - [param('ns3::Ptr< ns3::Packet const >', 'packet')]) - ## packet.h (module 'network'): void ns3::Packet::AddByteTag(ns3::Tag const & tag) const [member function] - cls.add_method('AddByteTag', - 'void', - [param('ns3::Tag const &', 'tag')], - is_const=True) - ## packet.h (module 'network'): void ns3::Packet::AddHeader(ns3::Header const & header) [member function] - cls.add_method('AddHeader', - 'void', - [param('ns3::Header const &', 'header')]) - ## packet.h (module 'network'): void ns3::Packet::AddPacketTag(ns3::Tag const & tag) const [member function] - cls.add_method('AddPacketTag', - 'void', - [param('ns3::Tag const &', 'tag')], - is_const=True) - ## packet.h (module 'network'): void ns3::Packet::AddPaddingAtEnd(uint32_t size) [member function] - cls.add_method('AddPaddingAtEnd', - 'void', - [param('uint32_t', 'size')]) - ## packet.h (module 'network'): void ns3::Packet::AddTrailer(ns3::Trailer const & trailer) [member function] - cls.add_method('AddTrailer', - 'void', - [param('ns3::Trailer const &', 'trailer')]) - ## packet.h (module 'network'): ns3::PacketMetadata::ItemIterator ns3::Packet::BeginItem() const [member function] - cls.add_method('BeginItem', - 'ns3::PacketMetadata::ItemIterator', - [], - is_const=True) - ## packet.h (module 'network'): ns3::Ptr ns3::Packet::Copy() const [member function] - cls.add_method('Copy', - 'ns3::Ptr< ns3::Packet >', - [], - is_const=True) - ## packet.h (module 'network'): uint32_t ns3::Packet::CopyData(uint8_t * buffer, uint32_t size) const [member function] - cls.add_method('CopyData', - 'uint32_t', - [param('uint8_t *', 'buffer'), param('uint32_t', 'size')], - is_const=True) - ## packet.h (module 'network'): void ns3::Packet::CopyData(std::ostream * os, uint32_t size) const [member function] - cls.add_method('CopyData', - 'void', - [param('std::ostream *', 'os'), param('uint32_t', 'size')], - is_const=True) - ## packet.h (module 'network'): ns3::Ptr ns3::Packet::CreateFragment(uint32_t start, uint32_t length) const [member function] - cls.add_method('CreateFragment', - 'ns3::Ptr< ns3::Packet >', - [param('uint32_t', 'start'), param('uint32_t', 'length')], - is_const=True) - ## packet.h (module 'network'): static void ns3::Packet::EnableChecking() [member function] - cls.add_method('EnableChecking', - 'void', - [], - is_static=True) - ## packet.h (module 'network'): static void ns3::Packet::EnablePrinting() [member function] - cls.add_method('EnablePrinting', - 'void', - [], - is_static=True) - ## packet.h (module 'network'): bool ns3::Packet::FindFirstMatchingByteTag(ns3::Tag & tag) const [member function] - cls.add_method('FindFirstMatchingByteTag', - 'bool', - [param('ns3::Tag &', 'tag')], - is_const=True) - ## packet.h (module 'network'): ns3::ByteTagIterator ns3::Packet::GetByteTagIterator() const [member function] - cls.add_method('GetByteTagIterator', - 'ns3::ByteTagIterator', - [], - is_const=True) - ## packet.h (module 'network'): ns3::Ptr ns3::Packet::GetNixVector() const [member function] - cls.add_method('GetNixVector', - 'ns3::Ptr< ns3::NixVector >', - [], - is_const=True) - ## packet.h (module 'network'): ns3::PacketTagIterator ns3::Packet::GetPacketTagIterator() const [member function] - cls.add_method('GetPacketTagIterator', - 'ns3::PacketTagIterator', - [], - is_const=True) - ## packet.h (module 'network'): uint32_t ns3::Packet::GetSerializedSize() const [member function] - cls.add_method('GetSerializedSize', - 'uint32_t', - [], - is_const=True) - ## packet.h (module 'network'): uint32_t ns3::Packet::GetSize() const [member function] - cls.add_method('GetSize', - 'uint32_t', - [], - is_const=True) - ## packet.h (module 'network'): uint64_t ns3::Packet::GetUid() const [member function] - cls.add_method('GetUid', - 'uint64_t', - [], - is_const=True) - ## packet.h (module 'network'): uint8_t const * ns3::Packet::PeekData() const [member function] - cls.add_method('PeekData', - 'uint8_t const *', - [], - deprecated=True, is_const=True) - ## packet.h (module 'network'): uint32_t ns3::Packet::PeekHeader(ns3::Header & header) const [member function] - cls.add_method('PeekHeader', - 'uint32_t', - [param('ns3::Header &', 'header')], - is_const=True) - ## packet.h (module 'network'): bool ns3::Packet::PeekPacketTag(ns3::Tag & tag) const [member function] - cls.add_method('PeekPacketTag', - 'bool', - [param('ns3::Tag &', 'tag')], - is_const=True) - ## packet.h (module 'network'): uint32_t ns3::Packet::PeekTrailer(ns3::Trailer & trailer) [member function] - cls.add_method('PeekTrailer', - 'uint32_t', - [param('ns3::Trailer &', 'trailer')]) - ## packet.h (module 'network'): void ns3::Packet::Print(std::ostream & os) const [member function] - cls.add_method('Print', - 'void', - [param('std::ostream &', 'os')], - is_const=True) - ## packet.h (module 'network'): void ns3::Packet::PrintByteTags(std::ostream & os) const [member function] - cls.add_method('PrintByteTags', - 'void', - [param('std::ostream &', 'os')], - is_const=True) - ## packet.h (module 'network'): void ns3::Packet::PrintPacketTags(std::ostream & os) const [member function] - cls.add_method('PrintPacketTags', - 'void', - [param('std::ostream &', 'os')], - is_const=True) - ## packet.h (module 'network'): void ns3::Packet::RemoveAllByteTags() [member function] - cls.add_method('RemoveAllByteTags', - 'void', - []) - ## packet.h (module 'network'): void ns3::Packet::RemoveAllPacketTags() [member function] - cls.add_method('RemoveAllPacketTags', - 'void', - []) - ## packet.h (module 'network'): void ns3::Packet::RemoveAtEnd(uint32_t size) [member function] - cls.add_method('RemoveAtEnd', - 'void', - [param('uint32_t', 'size')]) - ## packet.h (module 'network'): void ns3::Packet::RemoveAtStart(uint32_t size) [member function] - cls.add_method('RemoveAtStart', - 'void', - [param('uint32_t', 'size')]) - ## packet.h (module 'network'): uint32_t ns3::Packet::RemoveHeader(ns3::Header & header) [member function] - cls.add_method('RemoveHeader', - 'uint32_t', - [param('ns3::Header &', 'header')]) - ## packet.h (module 'network'): bool ns3::Packet::RemovePacketTag(ns3::Tag & tag) [member function] - cls.add_method('RemovePacketTag', - 'bool', - [param('ns3::Tag &', 'tag')]) - ## packet.h (module 'network'): uint32_t ns3::Packet::RemoveTrailer(ns3::Trailer & trailer) [member function] - cls.add_method('RemoveTrailer', - 'uint32_t', - [param('ns3::Trailer &', 'trailer')]) - ## packet.h (module 'network'): uint32_t ns3::Packet::Serialize(uint8_t * buffer, uint32_t maxSize) const [member function] - cls.add_method('Serialize', - 'uint32_t', - [param('uint8_t *', 'buffer'), param('uint32_t', 'maxSize')], - is_const=True) - ## packet.h (module 'network'): void ns3::Packet::SetNixVector(ns3::Ptr arg0) [member function] - cls.add_method('SetNixVector', - 'void', - [param('ns3::Ptr< ns3::NixVector >', 'arg0')]) - return - -def register_Ns3TimeChecker_methods(root_module, cls): - ## nstime.h (module 'core'): ns3::TimeChecker::TimeChecker() [constructor] - cls.add_constructor([]) - ## nstime.h (module 'core'): ns3::TimeChecker::TimeChecker(ns3::TimeChecker const & arg0) [copy constructor] - cls.add_constructor([param('ns3::TimeChecker const &', 'arg0')]) - return - -def register_Ns3TimeValue_methods(root_module, cls): - ## nstime.h (module 'core'): ns3::TimeValue::TimeValue() [constructor] - cls.add_constructor([]) - ## nstime.h (module 'core'): ns3::TimeValue::TimeValue(ns3::TimeValue const & arg0) [copy constructor] - cls.add_constructor([param('ns3::TimeValue const &', 'arg0')]) - ## nstime.h (module 'core'): ns3::TimeValue::TimeValue(ns3::Time const & value) [constructor] - cls.add_constructor([param('ns3::Time const &', 'value')]) - ## nstime.h (module 'core'): ns3::Ptr ns3::TimeValue::Copy() const [member function] - cls.add_method('Copy', - 'ns3::Ptr< ns3::AttributeValue >', - [], - is_const=True, is_virtual=True) - ## nstime.h (module 'core'): bool ns3::TimeValue::DeserializeFromString(std::string value, ns3::Ptr checker) [member function] - cls.add_method('DeserializeFromString', - 'bool', - [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], - is_virtual=True) - ## nstime.h (module 'core'): ns3::Time ns3::TimeValue::Get() const [member function] - cls.add_method('Get', - 'ns3::Time', - [], - is_const=True) - ## nstime.h (module 'core'): std::string ns3::TimeValue::SerializeToString(ns3::Ptr checker) const [member function] - cls.add_method('SerializeToString', - 'std::string', - [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], - is_const=True, is_virtual=True) - ## nstime.h (module 'core'): void ns3::TimeValue::Set(ns3::Time const & value) [member function] - cls.add_method('Set', - 'void', - [param('ns3::Time const &', 'value')]) - return - -def register_Ns3TypeIdChecker_methods(root_module, cls): - ## type-id.h (module 'core'): ns3::TypeIdChecker::TypeIdChecker() [constructor] - cls.add_constructor([]) - ## type-id.h (module 'core'): ns3::TypeIdChecker::TypeIdChecker(ns3::TypeIdChecker const & arg0) [copy constructor] - cls.add_constructor([param('ns3::TypeIdChecker const &', 'arg0')]) - return - -def register_Ns3TypeIdValue_methods(root_module, cls): - ## type-id.h (module 'core'): ns3::TypeIdValue::TypeIdValue() [constructor] - cls.add_constructor([]) - ## type-id.h (module 'core'): ns3::TypeIdValue::TypeIdValue(ns3::TypeIdValue const & arg0) [copy constructor] - cls.add_constructor([param('ns3::TypeIdValue const &', 'arg0')]) - ## type-id.h (module 'core'): ns3::TypeIdValue::TypeIdValue(ns3::TypeId const & value) [constructor] - cls.add_constructor([param('ns3::TypeId const &', 'value')]) - ## type-id.h (module 'core'): ns3::Ptr ns3::TypeIdValue::Copy() const [member function] - cls.add_method('Copy', - 'ns3::Ptr< ns3::AttributeValue >', - [], - is_const=True, is_virtual=True) - ## type-id.h (module 'core'): bool ns3::TypeIdValue::DeserializeFromString(std::string value, ns3::Ptr checker) [member function] - cls.add_method('DeserializeFromString', - 'bool', - [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], - is_virtual=True) - ## type-id.h (module 'core'): ns3::TypeId ns3::TypeIdValue::Get() const [member function] - cls.add_method('Get', - 'ns3::TypeId', - [], - is_const=True) - ## type-id.h (module 'core'): std::string ns3::TypeIdValue::SerializeToString(ns3::Ptr checker) const [member function] - cls.add_method('SerializeToString', - 'std::string', - [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], - is_const=True, is_virtual=True) - ## type-id.h (module 'core'): void ns3::TypeIdValue::Set(ns3::TypeId const & value) [member function] - cls.add_method('Set', - 'void', - [param('ns3::TypeId const &', 'value')]) - return - -def register_functions(root_module): - module = root_module - register_functions_ns3_FatalImpl(module.get_submodule('FatalImpl'), root_module) - return - -def register_functions_ns3_FatalImpl(module, root_module): - return - -def main(): - out = FileCodeSink(sys.stdout) - root_module = module_init() - register_types(root_module) - register_methods(root_module) - register_functions(root_module) - root_module.generate(out) - -if __name__ == '__main__': - main() - diff -r afe2960e58b7 -r 9d2c79c992d7 src/contrib/config-store.cc --- a/src/contrib/config-store.cc Thu Mar 24 15:11:56 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,135 +0,0 @@ -#include "config-store.h" -#include "raw-text-config.h" -#include "ns3/string.h" -#include "ns3/log.h" -#include "ns3/simulator.h" -#include "ns3/enum.h" -#include "ns3/attribute-list.h" -#include "ns3/contrib-config.h" -#ifdef HAVE_LIBXML2 -#include "xml-config.h" -#endif - -#include -#include -#include -#include -#include - - -NS_LOG_COMPONENT_DEFINE ("ConfigStore"); - -namespace ns3 { - - -NS_OBJECT_ENSURE_REGISTERED (ConfigStore); - -TypeId -ConfigStore::GetTypeId (void) -{ - static TypeId tid = TypeId ("ns3::ConfigStore") - .SetParent () - .AddAttribute ("Mode", - "Configuration mode", - EnumValue (ConfigStore::NONE), - MakeEnumAccessor (&ConfigStore::SetMode), - MakeEnumChecker (ConfigStore::NONE, "None", - ConfigStore::LOAD, "Load", - ConfigStore::SAVE, "Save")) - .AddAttribute ("Filename", - "The file where the configuration should be saved to or loaded from.", - StringValue (""), - MakeStringAccessor (&ConfigStore::SetFilename), - MakeStringChecker ()) - .AddAttribute ("FileFormat", - "Type of file format", - EnumValue (ConfigStore::RAW_TEXT), - MakeEnumAccessor (&ConfigStore::SetFileFormat), - MakeEnumChecker (ConfigStore::RAW_TEXT, "RawText", - ConfigStore::XML, "Xml")) - ; - return tid; -} -TypeId -ConfigStore::GetInstanceTypeId (void) const -{ - return GetTypeId (); -} - - -ConfigStore::ConfigStore () -{ - ObjectBase::ConstructSelf (AttributeList ()); - -#ifdef HAVE_LIBXML2 - if (m_fileFormat == ConfigStore::XML) - { - if (m_mode == ConfigStore::SAVE) - { - m_file = new XmlConfigSave (); - } - else if (m_mode == ConfigStore::LOAD) - { - m_file = new XmlConfigLoad (); - } - else - { - m_file = new NoneFileConfig (); - } - } - else -#endif /* HAVE_LIBXML2 */ - if (m_fileFormat == ConfigStore::RAW_TEXT) - { - if (m_mode == ConfigStore::SAVE) - { - m_file = new RawTextConfigSave (); - } - else if (m_mode == ConfigStore::LOAD) - { - m_file = new RawTextConfigLoad (); - } - else - { - m_file = new NoneFileConfig (); - } - } - m_file->SetFilename (m_filename); -} - -ConfigStore::~ConfigStore () -{ - delete m_file; - m_file = 0; -} - -void -ConfigStore::SetMode (enum Mode mode) -{ - m_mode = mode; -} -void -ConfigStore::SetFileFormat (enum FileFormat format) -{ - m_fileFormat = format; -} -void -ConfigStore::SetFilename (std::string filename) -{ - m_filename = filename; -} - -void -ConfigStore::ConfigureAttributes (void) -{ - m_file->Attributes (); -} - -void -ConfigStore::ConfigureDefaults (void) -{ - m_file->Default (); - m_file->Global (); -} - -} // namespace ns3 diff -r afe2960e58b7 -r 9d2c79c992d7 src/contrib/config-store.h --- a/src/contrib/config-store.h Thu Mar 24 15:11:56 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,61 +0,0 @@ -#ifndef CONFIG_STORE_H -#define CONFIG_STORE_H - -#include "ns3/object-base.h" -#include "file-config.h" - -namespace ns3 { - -/** - * \brief Store and load simulation attribute configuration - * - * While it is possible to generate a sample config file and lightly - * edit it to change a couple of values, there are cases where this - * process will not work because the same value on the same object - * can appear multiple times in the same automatically-generated - * configuration file under different configuration paths. - * - * As such, the best way to use this class is to use it to generate - * an initial configuration file, extract from that configuration - * file only the strictly necessary elements, and move these minimal - * elements to a new configuration file which can then safely - * be edited. Another option is to use the ns3::GtkConfigStore class - * which will allow you to edit the parameters and will generate - * configuration files where all the instances of the same parameter - * are changed. - */ -class ConfigStore : public ObjectBase -{ -public: - enum Mode { - LOAD, - SAVE, - NONE - }; - enum FileFormat { - XML, - RAW_TEXT - }; - static TypeId GetTypeId (void); - virtual TypeId GetInstanceTypeId (void) const; - - ConfigStore (); - ~ConfigStore (); - - void SetMode (enum Mode mode); - void SetFileFormat (enum FileFormat format); - void SetFilename (std::string filename); - - void ConfigureDefaults (void); - void ConfigureAttributes (void); - -private: - enum Mode m_mode; - enum FileFormat m_fileFormat; - std::string m_filename; - FileConfig *m_file; -}; - -} // namespace ns3 - -#endif /* CONFIG_STORE_H */ diff -r afe2960e58b7 -r 9d2c79c992d7 src/contrib/contrib.h --- a/src/contrib/contrib.h Thu Mar 24 15:11:56 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,18 +0,0 @@ -/** - * \addtogroup contrib Contrib - * - * The src/contrib directory is for contributed code that is being maintained - * by the authors, but is not yet part of the main tree. - * For instance, the developers may be requesting feedback on whether anyone - * thinks the contributed model is generally useful to maintain in the main - * tree, or may want feedback on the API or features. If you find the - * code in this directory useful, please let the ns-3 developers know. - * Code may migrate from this directory to the main tree, or may be - * removed due to lack of interest, for a later release. - * - * - A class to generate graphs with gnuplot: ns3::Gnuplot and ns3::GnuplotDataset - * - A class to hold configuration data: ns3::ConfigStore and methods to allow the configuration to be read from and written to a file - * - A graphical editor of the config store: ns3::GtkConfigStore - * - An object that garbage collects events: ns3::EventGarbageCollector - * - An object that provides "quick and dirty" delay and jitter estimation: ns3::DelayJitterEstimation - */ diff -r afe2960e58b7 -r 9d2c79c992d7 src/contrib/delay-jitter-estimation.cc --- a/src/contrib/delay-jitter-estimation.cc Thu Mar 24 15:11:56 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,118 +0,0 @@ - -#include "delay-jitter-estimation.h" -#include "ns3/tag.h" -#include "ns3/simulator.h" -#include "ns3/string.h" - -namespace ns3 { - -class DelayJitterEstimationTimestampTag : public Tag -{ -public: - DelayJitterEstimationTimestampTag (); - static TypeId GetTypeId (void); - virtual TypeId GetInstanceTypeId (void) const; - - virtual uint32_t GetSerializedSize (void) const; - virtual void Serialize (TagBuffer i) const; - virtual void Deserialize (TagBuffer i); - virtual void Print (std::ostream &os) const; - - Time GetTxTime (void) const; -private: - uint64_t m_creationTime; -}; - -DelayJitterEstimationTimestampTag::DelayJitterEstimationTimestampTag () - : m_creationTime (Simulator::Now ().GetTimeStep ()) -{} - -TypeId -DelayJitterEstimationTimestampTag::GetTypeId (void) -{ - static TypeId tid = TypeId ("anon::DelayJitterEstimationTimestampTag") - .SetParent () - .AddConstructor () - .AddAttribute ("CreationTime", - "The time at which the timestamp was created", - StringValue ("0.0s"), - MakeTimeAccessor (&DelayJitterEstimationTimestampTag::GetTxTime), - MakeTimeChecker ()) - ; - return tid; -} -TypeId -DelayJitterEstimationTimestampTag::GetInstanceTypeId (void) const -{ - return GetTypeId (); -} - -uint32_t -DelayJitterEstimationTimestampTag::GetSerializedSize (void) const -{ - return 8; -} -void -DelayJitterEstimationTimestampTag::Serialize (TagBuffer i) const -{ - i.WriteU64 (m_creationTime); -} -void -DelayJitterEstimationTimestampTag::Deserialize (TagBuffer i) -{ - m_creationTime = i.ReadU64 (); -} -void -DelayJitterEstimationTimestampTag::Print (std::ostream &os) const -{ - os << "CreationTime=" << m_creationTime; -} -Time -DelayJitterEstimationTimestampTag::GetTxTime (void) const -{ - return TimeStep (m_creationTime); -} - -DelayJitterEstimation::DelayJitterEstimation () - : m_previousRx (Simulator::Now ()), - m_previousRxTx (Simulator::Now ()), - m_jitter (Seconds (0.0)), - m_delay (Seconds (0.0)) -{} -void -DelayJitterEstimation::PrepareTx (Ptr packet) -{ - DelayJitterEstimationTimestampTag tag; - packet->AddByteTag (tag); -} -void -DelayJitterEstimation::RecordRx (Ptr packet) -{ - DelayJitterEstimationTimestampTag tag; - bool found; - found = packet->FindFirstMatchingByteTag (tag); - if (!found) - { - return; - } - tag.GetTxTime (); - - Time delta = (Simulator::Now () - m_previousRx) - (tag.GetTxTime () - m_previousRxTx); - m_jitter += (Abs (delta) - m_jitter ) / Scalar (16.0); - m_previousRx = Simulator::Now (); - m_previousRxTx = tag.GetTxTime (); - m_delay = Simulator::Now () - tag.GetTxTime (); -} - -Time -DelayJitterEstimation::GetLastDelay (void) const -{ - return m_delay; -} -Time -DelayJitterEstimation::GetLastJitter (void) const -{ - return m_jitter; -} - -} // namespace ns3 diff -r afe2960e58b7 -r 9d2c79c992d7 src/contrib/delay-jitter-estimation.h --- a/src/contrib/delay-jitter-estimation.h Thu Mar 24 15:11:56 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,59 +0,0 @@ -#ifndef DELAY_JITTER_ESTIMATION_H -#define DELAY_JITTER_ESTIMATION_H - -#include "ns3/nstime.h" -#include "ns3/packet.h" - -namespace ns3 { - -/** - * \brief quick and dirty delay and jitter estimation - * - */ -class DelayJitterEstimation -{ -public: - DelayJitterEstimation (); - - /** - * \param packet the packet to send over a wire - * - * This method should be invoked once on each packet to - * record within the packet the tx time which is used upon - * packet reception to calculate the delay and jitter. The - * tx time is stored in the packet as an ns3::Tag which means - * that it does not use any network resources and is not - * taken into account in transmission delay calculations. - */ - static void PrepareTx (Ptr packet); - /** - * \param packet the packet received - * - * Invoke this method to update the delay and jitter calculations - * After a call to this method, \ref GetLastDelay and \ref GetLastJitter - * will return an updated delay and jitter. - */ - void RecordRx (Ptr packet); - - /** - * \returns the updated delay. - */ - Time GetLastDelay (void) const; - /** - * The jitter is calculated using the RFC 1889 (RTP) jitter - * definition. - * - * \returns the updated jitter. - */ - Time GetLastJitter (void) const; - -private: - Time m_previousRx; - Time m_previousRxTx; - Time m_jitter; - Time m_delay; -}; - -} // namespace ns3 - -#endif /* DELAY_JITTER_ESTIMATION_H */ diff -r afe2960e58b7 -r 9d2c79c992d7 src/contrib/display-functions.cc --- a/src/contrib/display-functions.cc Thu Mar 24 15:11:56 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,594 +0,0 @@ -/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ -/* - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation; - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * Authors: Faker Moatamri - * Mathieu Lacage - */ -#include "display-functions.h" -#include "raw-text-config.h" -#include "ns3/config.h" -#include "ns3/string.h" -#include "ns3/pointer.h" - -namespace ns3 { -/** - * This function includes the name of the attribute or the editable value - * in the second column - */ -void -cell_data_function_col_1 (GtkTreeViewColumn *col, GtkCellRenderer *renderer, - GtkTreeModel *model, GtkTreeIter *iter, gpointer user_data) -{ - ModelNode *node; - gtk_tree_model_get (model, iter, COL_NODE, &node, -1); - if (node->type == ModelNode::NODE_ATTRIBUTE) - { - StringValue str; - node->object->GetAttribute (node->name, str); - g_object_set (renderer, "text", str.Get ().c_str (), (char*) 0); - g_object_set (renderer, "editable", TRUE, (char*) 0); - } - else - { - g_object_set (renderer, "text", "", (char*) 0); - g_object_set (renderer, "editable", FALSE, (char*) 0); - } -} -/** - * This function includes the name of the object, pointer, vector or vector item - * in the first column - */ -void -cell_data_function_col_0 (GtkTreeViewColumn *col, GtkCellRenderer *renderer, GtkTreeModel *model, - GtkTreeIter *iter, gpointer user_data) -{ - ModelNode *node; - gtk_tree_model_get (model, iter, COL_NODE, &node, -1); - g_object_set (renderer, "editable", FALSE, (char*) 0); - switch (node->type) - { - case ModelNode::NODE_OBJECT: - g_object_set (renderer, "text", node->object->GetInstanceTypeId ().GetName ().c_str (), (char*) 0); - break; - case ModelNode::NODE_POINTER: - g_object_set (renderer, "text", node->name.c_str (), (char*) 0); - break; - case ModelNode::NODE_VECTOR: - g_object_set (renderer, "text", node->name.c_str (), (char*) 0); - break; - case ModelNode::NODE_VECTOR_ITEM: - { - std::stringstream oss; - oss << node->index; - g_object_set (renderer, "text", oss.str ().c_str (), (char*) 0); - } - break; - case ModelNode::NODE_ATTRIBUTE: - g_object_set (renderer, "text", node->name.c_str (), (char*) 0); - break; - } -} - -/** - * This is the callback called when the value of an attribute is changed - */ -void -cell_edited_callback (GtkCellRendererText *cell, gchar *path_string, - gchar *new_text, gpointer user_data) -{ - GtkTreeModel *model = GTK_TREE_MODEL (user_data); - GtkTreeIter iter; - gtk_tree_model_get_iter_from_string (model, &iter, path_string); - ModelNode *node; - gtk_tree_model_get (model, &iter, COL_NODE, &node, -1); - NS_ASSERT (node->type == ModelNode::NODE_ATTRIBUTE); - node->object->SetAttribute (node->name, StringValue (new_text)); -} - -/** - * This function gets the column number 0 or 1 from the mouse - * click - */ -int -get_col_number_from_tree_view_column (GtkTreeViewColumn *col) -{ - GList *cols; - int num; - g_return_val_if_fail (col != 0, -1); - g_return_val_if_fail (col->tree_view != 0, -1); - cols = gtk_tree_view_get_columns (GTK_TREE_VIEW (col->tree_view)); - num = g_list_index (cols, (gpointer) col); - g_list_free (cols); - return num; -} - -/** - * This function displays the tooltip for an object, pointer, vector - * item or an attribute - */ -gboolean -cell_tooltip_callback (GtkWidget *widget, gint x, gint y, gboolean keyboard_tip, - GtkTooltip *tooltip, gpointer user_data) -{ - GtkTreeModel *model; - GtkTreeIter iter; - GtkTreeViewColumn * column; - if (!gtk_tree_view_get_tooltip_context (GTK_TREE_VIEW (widget), &x, &y, - keyboard_tip, &model, 0, &iter)) - { - return FALSE; - } - if (!gtk_tree_view_get_path_at_pos (GTK_TREE_VIEW (widget), x, y, 0, &column, 0, 0)) - { - return FALSE; - } - int col = get_col_number_from_tree_view_column (column); - - ModelNode *node; - gtk_tree_model_get (model, &iter, COL_NODE, &node, -1); - - switch (node->type) - { - case ModelNode::NODE_OBJECT: - if (col == 0) - { - std::string tip = "This object is of type " - + node->object->GetInstanceTypeId ().GetName (); - gtk_tooltip_set_text (tooltip, tip.c_str ()); - return TRUE; - } - break; - case ModelNode::NODE_POINTER: - if (col == 0) - { - PointerValue ptr; - node->object->GetAttribute (node->name, ptr); - std::string tip = "This object is of type " - + ptr.GetObject ()->GetInstanceTypeId ().GetName (); - gtk_tooltip_set_text (tooltip, tip.c_str ()); - return TRUE; - } - break; - case ModelNode::NODE_VECTOR: - break; - case ModelNode::NODE_VECTOR_ITEM: - if (col == 0) - { - std::string tip = "This object is of type " - + node->object->GetInstanceTypeId ().GetName (); - gtk_tooltip_set_text (tooltip, tip.c_str ()); - return TRUE; - } - break; - case ModelNode::NODE_ATTRIBUTE: - { - uint32_t attrIndex = 0; - TypeId tid; - for (tid = node->object->GetInstanceTypeId (); tid.HasParent (); tid - = tid.GetParent ()) - { - for (uint32_t i = 0; i < tid.GetAttributeN (); ++i) - { - if (tid.GetAttributeName (i) == node->name) - { - attrIndex = i; - goto out; - } - } - } -out: if (col == 0) - { - std::string tip = tid.GetAttributeHelp (attrIndex); - gtk_tooltip_set_text (tooltip, tip.c_str ()); - } - else - { - Ptr checker = tid.GetAttributeChecker ( - attrIndex); - std::string tip; - tip = "This attribute is of type " + checker->GetValueTypeName (); - if (checker->HasUnderlyingTypeInformation ()) - { - tip += " " + checker->GetUnderlyingTypeInformation (); - } - gtk_tooltip_set_text (tooltip, tip.c_str ()); - } - return TRUE; - } - break; - } - return FALSE; -} - -/** - * This is the main view opening the widget, getting tooltips and drawing the - * tree of attributes... - */ -GtkWidget * -create_view (GtkTreeStore *model) -{ - GtkTreeViewColumn *col; - GtkCellRenderer *renderer; - GtkWidget *view; - - view = gtk_tree_view_new (); - g_object_set (view, "has-tooltip", TRUE, (char*) 0); - g_signal_connect (view, "query-tooltip", (GCallback) cell_tooltip_callback, 0); - - gtk_tree_view_set_grid_lines (GTK_TREE_VIEW (view), GTK_TREE_VIEW_GRID_LINES_BOTH); - gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (view), TRUE); - - col = gtk_tree_view_column_new (); - gtk_tree_view_column_set_title (col, "Object Attributes"); - gtk_tree_view_append_column (GTK_TREE_VIEW (view), col); - renderer = gtk_cell_renderer_text_new (); - gtk_tree_view_column_pack_start (col, renderer, TRUE); - gtk_tree_view_column_set_cell_data_func (col, renderer, cell_data_function_col_0, 0, 0); - g_object_set (renderer, "editable", FALSE, (char*) 0); - - col = gtk_tree_view_column_new (); - gtk_tree_view_column_set_title (col, "Attribute Value"); - gtk_tree_view_append_column (GTK_TREE_VIEW (view), col); - renderer = gtk_cell_renderer_text_new (); - g_signal_connect (renderer, "edited", (GCallback) cell_edited_callback, model); - gtk_tree_view_column_pack_start (col, renderer, TRUE); - gtk_tree_view_column_set_cell_data_func (col, renderer, cell_data_function_col_1, 0, 0); - - gtk_tree_view_set_model (GTK_TREE_VIEW (view), GTK_TREE_MODEL (model)); - - g_object_unref (model); /* destroy model automatically with view */ - - return view; -} - -/** - * This is the action done when the user presses on the save button. - * It will save the config to a file. - */ -void -save_clicked (GtkButton *button, gpointer user_data) -{ - GtkWidget *parent_window = GTK_WIDGET (user_data); - GtkWidget *dialog; - - dialog = gtk_file_chooser_dialog_new ("Save File", GTK_WINDOW (parent_window), GTK_FILE_CHOOSER_ACTION_SAVE, - GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_SAVE, - GTK_RESPONSE_ACCEPT, (char *) 0); - gtk_file_chooser_set_do_overwrite_confirmation (GTK_FILE_CHOOSER (dialog), - TRUE); - - gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (dialog), "config.txt"); - - if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT) - { - char *filename; - - filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog)); - RawTextConfigSave config; - config.SetFilename (filename); - config.Attributes (); - g_free (filename); - } - - gtk_widget_destroy (dialog); -} - -/** - * If the user presses the button load, it will load the config file into memory. - */ -void -load_clicked (GtkButton *button, gpointer user_data) -{ - GtkWidget *parent_window = GTK_WIDGET (user_data); - GtkWidget *dialog; - - dialog = gtk_file_chooser_dialog_new ("Open File", GTK_WINDOW (parent_window), GTK_FILE_CHOOSER_ACTION_OPEN, - GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OPEN, - GTK_RESPONSE_ACCEPT, (char *) 0); - - if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT) - { - char *filename; - - filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog)); - RawTextConfigLoad config; - config.SetFilename (filename); - config.Attributes (); - } - - gtk_widget_destroy (dialog); -} - -/** - * Exit the window when exit button is pressed - */ -void -exit_clicked_callback (GtkButton *button, gpointer user_data) -{ - gtk_main_quit (); - gtk_widget_hide (GTK_WIDGET (user_data)); -} - -/** - * Exit the application - */ -gboolean -delete_event_callback (GtkWidget *widget, GdkEvent *event, gpointer user_data) -{ - gtk_main_quit (); - gtk_widget_hide (GTK_WIDGET (user_data)); - return TRUE; -} - -/** - * Delete the tree model contents - */ -gboolean -clean_model_callback (GtkTreeModel *model, GtkTreePath *path, - GtkTreeIter *iter, gpointer data) -{ - ModelNode *node; - gtk_tree_model_get (GTK_TREE_MODEL (model), iter, COL_NODE, &node, -1); - delete node; - gtk_tree_store_set (GTK_TREE_STORE (model), iter, COL_NODE, (ModelNode*) 0, - -1); - return FALSE; -} - -/************************** display functions used by default configurator **********************/ -/** - * This function writes data in the second column, this data is going to be editable - * if it is a NODE_ATTRIBUTE - */ -void -cell_data_function_col_1_config_default (GtkTreeViewColumn *col, GtkCellRenderer *renderer, - GtkTreeModel *model, GtkTreeIter *iter, - gpointer user_data) -{ - ModelTypeid *node; - gtk_tree_model_get (model, iter, COL_TYPEID, &node, -1); - if (node->type == ModelTypeid::NODE_ATTRIBUTE) - { - g_object_set (renderer, "text", node->defaultValue.c_str (), (char*) 0); - g_object_set (renderer, "editable", TRUE, (char*) 0); - } - else - { - g_object_set (renderer, "text", "", (char*) 0); - g_object_set (renderer, "editable", FALSE, (char*) 0); - } -} -/** - * This function writes the attribute or typeid name in the column 0 - */ -void -cell_data_function_col_0_config_default (GtkTreeViewColumn *col, GtkCellRenderer *renderer, GtkTreeModel *model, - GtkTreeIter *iter, gpointer user_data) -{ - ModelTypeid *node; - gtk_tree_model_get (model, iter, COL_NODE, &node, -1); - g_object_set (renderer, "editable", FALSE, (char*) 0); - switch (node->type) - { - case ModelTypeid::NODE_TYPEID: - g_object_set (renderer, "text", node->tid.GetName ().c_str (), (char*) 0); - break; - case ModelTypeid::NODE_ATTRIBUTE: - g_object_set (renderer, "text", node->name.c_str (), (char*) 0); - break; - } -} - - -/** - * This functions is called whenever there is a change in the value of an attribute - * If the input value is ok, it will be updated in the default value and in the - * gui, otherwise, it won't be updated in both. - */ -void -cell_edited_callback_config_default (GtkCellRendererText *cell, gchar *path_string, - gchar *new_text, gpointer user_data) -{ - GtkTreeModel *model = GTK_TREE_MODEL (user_data); - GtkTreeIter iter; - gtk_tree_model_get_iter_from_string (model, &iter, path_string); - ModelTypeid *node; - gtk_tree_model_get (model, &iter, COL_NODE, &node, -1); - NS_ASSERT (node->type == ModelTypeid::NODE_ATTRIBUTE); - if (Config::SetDefaultFailSafe (node->tid.GetAttributeFullName (node->index),StringValue (new_text))) - { - node->defaultValue = new_text; - } -} - -/** - * This function is used to display a tooltip whenever the user puts the mouse - * over a type ID or an attribute. It will give the type and the possible values of - * an attribute value and the type of the object for an attribute object or a - * typeID object - */ -gboolean -cell_tooltip_callback_config_default (GtkWidget *widget, gint x, gint y, - gboolean keyboard_tip, GtkTooltip *tooltip, gpointer user_data) -{ - GtkTreeModel *model; - GtkTreeIter iter; - GtkTreeViewColumn * column; - if (!gtk_tree_view_get_tooltip_context (GTK_TREE_VIEW (widget), &x, &y, - keyboard_tip, &model, 0, &iter)) - { - return FALSE; - } - if (!gtk_tree_view_get_path_at_pos (GTK_TREE_VIEW (widget), x, y, 0, &column, 0, 0)) - { - return FALSE; - } - int col = get_col_number_from_tree_view_column (column); - - ModelTypeid *node; - gtk_tree_model_get (model, &iter, COL_NODE, &node, -1); - - switch (node->type) - { - case ModelTypeid::NODE_TYPEID: - if (col == 0) - { - std::string tip = "This object is of type " + node->tid.GetName (); - gtk_tooltip_set_text (tooltip, tip.c_str ()); - return TRUE; - } - break; - case ModelTypeid::NODE_ATTRIBUTE: - { - uint32_t attrIndex = node->index; - if (col == 0) - { - std::string tip = node->tid.GetAttributeHelp (attrIndex); - gtk_tooltip_set_text (tooltip, tip.c_str ()); - } - else - { - Ptr checker = node->tid.GetAttributeChecker (attrIndex); - std::string tip; - tip = "This attribute is of type " + checker->GetValueTypeName (); - if (checker->HasUnderlyingTypeInformation ()) - { - tip += " " + checker->GetUnderlyingTypeInformation (); - } - gtk_tooltip_set_text (tooltip, tip.c_str ()); - } - return TRUE; - } - break; - } - return FALSE; -} - -/** - * This is the action done when the user presses on the save button. - * It will save the config to a file. - */ -void -save_clicked_default (GtkButton *button, gpointer user_data) -{ - GtkWidget *parent_window = GTK_WIDGET (user_data); - GtkWidget *dialog; - - dialog = gtk_file_chooser_dialog_new ("Save File", GTK_WINDOW (parent_window), GTK_FILE_CHOOSER_ACTION_SAVE, - GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_SAVE, - GTK_RESPONSE_ACCEPT, (char *) 0); - gtk_file_chooser_set_do_overwrite_confirmation (GTK_FILE_CHOOSER (dialog), - TRUE); - - gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (dialog), "config.txt"); - - if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT) - { - char *filename; - - filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog)); - RawTextConfigSave config; - config.SetFilename (filename); - config.Default (); - g_free (filename); - } - - gtk_widget_destroy (dialog); -} - -/** - * If the user presses the button load, it will load the config file into memory. - */ -void -load_clicked_default (GtkButton *button, gpointer user_data) -{ - GtkWidget *parent_window = GTK_WIDGET (user_data); - GtkWidget *dialog; - - dialog = gtk_file_chooser_dialog_new ("Open File", GTK_WINDOW (parent_window), GTK_FILE_CHOOSER_ACTION_OPEN, - GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OPEN, - GTK_RESPONSE_ACCEPT, (char *) 0); - - if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT) - { - char *filename; - - filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog)); - RawTextConfigLoad config; - config.SetFilename (filename); - config.Default (); - } - - gtk_widget_destroy (dialog); -} - -/** - * This is the main view opening the widget, getting tooltips and drawing the - * tree of attributes - */ -GtkWidget * -create_view_config_default (GtkTreeStore *model) -{ - GtkTreeViewColumn *col; - GtkCellRenderer *renderer; - GtkWidget *view; - - view = gtk_tree_view_new (); - g_object_set (view, "has-tooltip", TRUE, (char*) 0); - g_signal_connect (view, "query-tooltip", (GCallback) cell_tooltip_callback_config_default, 0); - - gtk_tree_view_set_grid_lines (GTK_TREE_VIEW (view), GTK_TREE_VIEW_GRID_LINES_BOTH); - gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (view), TRUE); - - col = gtk_tree_view_column_new (); - gtk_tree_view_column_set_title (col, "Object Attributes"); - gtk_tree_view_append_column (GTK_TREE_VIEW (view), col); - renderer = gtk_cell_renderer_text_new (); - gtk_tree_view_column_pack_start (col, renderer, TRUE); - gtk_tree_view_column_set_cell_data_func (col, renderer, cell_data_function_col_0_config_default, 0, 0); - g_object_set (renderer, "editable", FALSE, (char*) 0); - - col = gtk_tree_view_column_new (); - gtk_tree_view_column_set_title (col, "Attribute Value"); - gtk_tree_view_append_column (GTK_TREE_VIEW (view), col); - renderer = gtk_cell_renderer_text_new (); - g_signal_connect (renderer, "edited", (GCallback) cell_edited_callback_config_default, model); - gtk_tree_view_column_pack_start (col, renderer, TRUE); - gtk_tree_view_column_set_cell_data_func (col, renderer, cell_data_function_col_1_config_default, 0, 0); - - gtk_tree_view_set_model (GTK_TREE_VIEW (view), GTK_TREE_MODEL (model)); - - g_object_unref (model); /* destroy model automatically with view */ - - return view; -} - -/** - * Delete the tree model contents - */ -gboolean -clean_model_callback_config_default (GtkTreeModel *model, GtkTreePath *path, - GtkTreeIter *iter, gpointer data) -{ - ModelTypeid *node; - gtk_tree_model_get (GTK_TREE_MODEL (model), iter, COL_TYPEID, &node, -1); - delete node; - gtk_tree_store_set (GTK_TREE_STORE (model), iter, COL_TYPEID, (ModelTypeid*) 0, -1); - return FALSE; -} - - -}//end ns3 namespace - diff -r afe2960e58b7 -r 9d2c79c992d7 src/contrib/display-functions.h --- a/src/contrib/display-functions.h Thu Mar 24 15:11:56 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,150 +0,0 @@ -/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ -/* - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation; - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * Authors: Faker Moatamri - * Mathieu Lacage - */ -#ifndef DISPLAY_FUNCTIONS_H -#define DISPLAY_FUNCTIONS_H - -#include "model-node-creator.h" -#include "model-typeid-creator.h" -#include - -namespace ns3 { -/** - * This function includes the name of the attribute or the editable value - * in the second column - */ -void -cell_data_function_col_1 (GtkTreeViewColumn *col, GtkCellRenderer *renderer, - GtkTreeModel *model, GtkTreeIter *iter, gpointer user_data); -/** - * This function includes the name of the object, pointer, vector or vector item - * in the first column - */ -void -cell_data_function_col_0 (GtkTreeViewColumn *col, GtkCellRenderer *renderer, GtkTreeModel *model, - GtkTreeIter *iter, gpointer user_data); -/** - * This is the callback called when the value of an attribute is changed - */ -void -cell_edited_callback (GtkCellRendererText *cell, gchar *path_string, - gchar *new_text, gpointer user_data); -/** - * This function gets the column number 0 or 1 from the mouse - * click - */ -int -get_col_number_from_tree_view_column (GtkTreeViewColumn *col); -/** - * This function displays the tooltip for an object, pointer, vector - * item or an attribute - */ -gboolean -cell_tooltip_callback (GtkWidget *widget, gint x, gint y, gboolean keyboard_tip, - GtkTooltip *tooltip, gpointer user_data); -/** - * This is the main view opening the widget, getting tooltips and drawing the - * tree of attributes... - */ -GtkWidget * -create_view (GtkTreeStore *model); -/** - * This is the action done when the user presses on the save button. - * It will save the config to a file. - */ -void -save_clicked (GtkButton *button, gpointer user_data); -/** - * If the user presses the button load, it will load the config file into memory. - */ -void -load_clicked (GtkButton *button, gpointer user_data); -/** - * Exit the window when exit button is pressed - */ -void -exit_clicked_callback (GtkButton *button, gpointer user_data); -/** - * Exit the application - */ -gboolean -delete_event_callback (GtkWidget *widget, GdkEvent *event, gpointer user_data); -/** - * Delete the tree model contents - */ -gboolean -clean_model_callback (GtkTreeModel *model, GtkTreePath *path, - GtkTreeIter *iter, gpointer data); -/************************** display functions used by default configurator **********************/ -/** - * This function writes data in the second column, this data is going to be editable - * if it is a NODE_ATTRIBUTE - */ -void -cell_data_function_col_1_config_default (GtkTreeViewColumn *col, GtkCellRenderer *renderer, - GtkTreeModel *model, GtkTreeIter *iter, - gpointer user_data); -/** - * This function writes the attribute or typeid name in the column 0 - */ -void -cell_data_function_col_0_config_default (GtkTreeViewColumn *col, GtkCellRenderer *renderer, GtkTreeModel *model, - GtkTreeIter *iter, gpointer user_data); -/** - * This is the action done when the user presses on the save button. - * It will save the config to a file. - */ -void -save_clicked_default (GtkButton *button, gpointer user_data); -/** - * If the user presses the button load, it will load the config file into memory. - */ -void -load_clicked_default (GtkButton *button, gpointer user_data); -/** - * This functions is called whenever there is a change in the value of an attribute - * If the input value is ok, it will be updated in the default value and in the - * gui, otherwise, it won't be updated in both. - */ -void -cell_edited_callback_config_default (GtkCellRendererText *cell, gchar *path_string, - gchar *new_text, gpointer user_data); -/** - * This function is used to display a tooltip whenever the user puts the mouse - * over a type ID or an attribute. It will give the type and the possible values of - * an attribute value and the type of the object for an attribute object or a - * typeID object - */ -gboolean -cell_tooltip_callback_config_default (GtkWidget *widget, gint x, gint y, - gboolean keyboard_tip, GtkTooltip *tooltip, gpointer user_data); -/** - * This is the main view opening the widget, getting tooltips and drawing the - * tree of attributes - */ -GtkWidget * -create_view_config_default (GtkTreeStore *model); -/** - * Delete the tree model contents - */ -gboolean -clean_model_callback_config_default (GtkTreeModel *model, GtkTreePath *path, - GtkTreeIter *iter, gpointer data); -}//end namespace ns3 - -#endif diff -r afe2960e58b7 -r 9d2c79c992d7 src/contrib/event-garbage-collector.cc --- a/src/contrib/event-garbage-collector.cc Thu Mar 24 15:11:56 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,155 +0,0 @@ -/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ -/* - * Copyright (c) 2007 INESC Porto - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation; - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * Author: Gustavo J. A. M. Carneiro - */ -#include "event-garbage-collector.h" - -#define CLEANUP_CHUNK_MIN_SIZE 8 -#define CLEANUP_CHUNK_MAX_SIZE 128 - - -namespace ns3 { - - -EventGarbageCollector::EventGarbageCollector () : - m_nextCleanupSize (CLEANUP_CHUNK_MIN_SIZE) -{} - -void -EventGarbageCollector::Track (EventId event) -{ - m_events.insert (event); - if (m_events.size () >= m_nextCleanupSize) - Cleanup (); -} - -void -EventGarbageCollector::Grow () -{ - m_nextCleanupSize += (m_nextCleanupSize < CLEANUP_CHUNK_MAX_SIZE? - m_nextCleanupSize : CLEANUP_CHUNK_MAX_SIZE); -} - -void -EventGarbageCollector::Shrink () -{ - while (m_nextCleanupSize > m_events.size ()) - m_nextCleanupSize >>= 1; - Grow (); -} - -// Called when a new event was added and the cleanup limit was exceeded in consequence. -void -EventGarbageCollector::Cleanup () -{ - for (EventList::iterator iter = m_events.begin (); iter != m_events.end ();) - { - if ((*iter).IsExpired ()) - { - m_events.erase (iter++); - } - else - break; // EventIds are sorted by timestamp => further events are not expired for sure - } - - // If after cleanup we are still over the limit, increase the limit. - if (m_events.size () >= m_nextCleanupSize) - Grow (); - else - Shrink (); -} - - -EventGarbageCollector::~EventGarbageCollector () -{ - for (EventList::iterator event = m_events.begin (); - event != m_events.end (); event++) - { - Simulator::Cancel (*event); - } -} - -} // namespace ns3 - - -#include "ns3/test.h" - -namespace ns3 { - -class EventGarbageCollectorTestCase : public TestCase -{ - int m_counter; - EventGarbageCollector *m_events; - - void EventGarbageCollectorCallback (); - -public: - - EventGarbageCollectorTestCase (); - virtual ~EventGarbageCollectorTestCase (); - virtual void DoRun (void); -}; - -EventGarbageCollectorTestCase::EventGarbageCollectorTestCase () - : TestCase ("EventGarbageCollector"), m_counter (0), m_events (0) -{} - -EventGarbageCollectorTestCase::~EventGarbageCollectorTestCase () -{} - -void -EventGarbageCollectorTestCase::EventGarbageCollectorCallback () -{ - m_counter++; - if (m_counter == 50) - { - // this should cause the remaining (50) events to be cancelled - delete m_events; - m_events = 0; - } -} - -void EventGarbageCollectorTestCase::DoRun (void) -{ - m_events = new EventGarbageCollector (); - - for (int n = 0; n < 100; n++) - { - m_events->Track (Simulator::Schedule - (Simulator::Now (), - &EventGarbageCollectorTestCase::EventGarbageCollectorCallback, - this)); - } - Simulator::Run (); - NS_TEST_EXPECT_MSG_EQ (m_events, 0, ""); - NS_TEST_EXPECT_MSG_EQ (m_counter, 50, ""); - Simulator::Destroy (); -} - -static class EventGarbageCollectorTestSuite : public TestSuite -{ -public: - EventGarbageCollectorTestSuite () - : TestSuite ("event-garbage-collector", UNIT) - { - AddTestCase (new EventGarbageCollectorTestCase ()); - } -} g_eventGarbageCollectorTests; - -} - diff -r afe2960e58b7 -r 9d2c79c992d7 src/contrib/event-garbage-collector.h --- a/src/contrib/event-garbage-collector.h Thu Mar 24 15:11:56 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,71 +0,0 @@ -/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ -/* - * Copyright (c) 2007 INESC Porto - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation; - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * Author: Gustavo J. A. M. Carneiro - */ -#ifndef EVENT_GARBAGE_COLLECTOR_H -#define EVENT_GARBAGE_COLLECTOR_H - -#include -#include "ns3/event-id.h" -#include "ns3/simulator.h" - -namespace ns3 { - -/** - * \brief An object that tracks scheduled events and automatically - * cancels them when it is destroyed. It is useful in situations - * where multiple instances of the same type of event can - * simultaneously be scheduled, and when the events should be limited - * to the lifetime of a container object. - */ -class EventGarbageCollector -{ -public: - - EventGarbageCollector (); - - /** - * \brief Tracks a new event - */ - void Track (EventId event); - - ~EventGarbageCollector (); - -private: - - struct EventIdLessThanTs - { - bool operator () (const EventId &a, const EventId &b) const - { - return (a.GetTs () < b.GetTs ()); - } - }; - - typedef std::multiset EventList; - - EventList::size_type m_nextCleanupSize; - EventList m_events; - - void Cleanup (); - void Grow (); - void Shrink (); -}; - -}; // namespace ns3 - -#endif /* EVENT_GARBAGE_COLLECTOR_H */ diff -r afe2960e58b7 -r 9d2c79c992d7 src/contrib/file-config.cc --- a/src/contrib/file-config.cc Thu Mar 24 15:11:56 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,25 +0,0 @@ -#include "file-config.h" - -namespace ns3 { - -FileConfig::~FileConfig () -{} - -NoneFileConfig::NoneFileConfig () -{} -NoneFileConfig::~NoneFileConfig () -{} -void -NoneFileConfig::SetFilename (std::string filename) -{} -void -NoneFileConfig::Default (void) -{} -void -NoneFileConfig::Global (void) -{} -void -NoneFileConfig::Attributes (void) -{} - -} // namespace ns3 diff -r afe2960e58b7 -r 9d2c79c992d7 src/contrib/file-config.h --- a/src/contrib/file-config.h Thu Mar 24 15:11:56 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,31 +0,0 @@ -#ifndef FILE_CONFIG_H -#define FILE_CONFIG_H - -#include - -namespace ns3 { - -class FileConfig -{ -public: - virtual ~FileConfig (); - virtual void SetFilename (std::string filename) = 0; - virtual void Default (void) = 0; - virtual void Global (void) = 0; - virtual void Attributes (void) = 0; -}; - -class NoneFileConfig : public FileConfig -{ -public: - NoneFileConfig (); - virtual ~NoneFileConfig (); - virtual void SetFilename (std::string filename); - virtual void Default (void); - virtual void Global (void); - virtual void Attributes (void); -}; - -} // namespace ns3 - -#endif /* FILE_CONFIG_H */ diff -r afe2960e58b7 -r 9d2c79c992d7 src/contrib/flow-id-tag.cc --- a/src/contrib/flow-id-tag.cc Thu Mar 24 15:11:56 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,90 +0,0 @@ -/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ -/* - * Copyright (c) 2008 INRIA - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation; - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * Author: Mathieu Lacage - */ -#include "flow-id-tag.h" - -namespace ns3 { - -NS_OBJECT_ENSURE_REGISTERED (FlowIdTag); - -TypeId -FlowIdTag::GetTypeId (void) -{ - static TypeId tid = TypeId ("ns3::FlowIdTag") - .SetParent () - .AddConstructor () - ; - return tid; -} -TypeId -FlowIdTag::GetInstanceTypeId (void) const -{ - return GetTypeId (); -} -uint32_t -FlowIdTag::GetSerializedSize (void) const -{ - return 4; -} -void -FlowIdTag::Serialize (TagBuffer buf) const -{ - buf.WriteU32 (m_flowId); -} -void -FlowIdTag::Deserialize (TagBuffer buf) -{ - m_flowId = buf.ReadU32 (); -} -void -FlowIdTag::Print (std::ostream &os) const -{ - os << "FlowId=" << m_flowId; -} -FlowIdTag::FlowIdTag () - : Tag () -{} - -FlowIdTag::FlowIdTag (uint32_t id) - : Tag (), - m_flowId (id) -{} - -void -FlowIdTag::SetFlowId (uint32_t id) -{ - m_flowId = id; -} -uint32_t -FlowIdTag::GetFlowId (void) const -{ - return m_flowId; -} - -uint32_t -FlowIdTag::AllocateFlowId (void) -{ - static uint32_t nextFlowId = 1; - uint32_t flowId = nextFlowId; - nextFlowId++; - return flowId; -} - -} // namespace ns3 - diff -r afe2960e58b7 -r 9d2c79c992d7 src/contrib/flow-id-tag.h --- a/src/contrib/flow-id-tag.h Thu Mar 24 15:11:56 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,47 +0,0 @@ -/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ -/* - * Copyright (c) 2008 INRIA - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation; - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * Author: Mathieu Lacage - */ -#ifndef FLOW_ID_TAG_H -#define FLOW_ID_TAG_H - -#include "ns3/tag.h" - -namespace ns3 { - -class FlowIdTag : public Tag -{ -public: - static TypeId GetTypeId (void); - virtual TypeId GetInstanceTypeId (void) const; - virtual uint32_t GetSerializedSize (void) const; - virtual void Serialize (TagBuffer buf) const; - virtual void Deserialize (TagBuffer buf); - virtual void Print (std::ostream &os) const; - FlowIdTag (); - FlowIdTag (uint32_t flowId); - void SetFlowId (uint32_t flowId); - uint32_t GetFlowId (void) const; - static uint32_t AllocateFlowId (void); -private: - uint32_t m_flowId; -}; - -} // namespace ns3 - -#endif /* FLOW_ID_TAG_H */ diff -r afe2960e58b7 -r 9d2c79c992d7 src/contrib/gnuplot.cc --- a/src/contrib/gnuplot.cc Thu Mar 24 15:11:56 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,733 +0,0 @@ -/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ -/* - * Copyright (c) 2007 INRIA, 2008 Timo Bingmann - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation; - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * Original Author: Mathieu Lacage - * Enhancements: Timo Bingmann - */ -#include "gnuplot.h" -#include "ns3/assert.h" -#include -#include - -namespace ns3 { - -// --- GnuplotDataset::Data ------------------------------------------------ // - -struct GnuplotDataset::Data -{ - // *** Data Variables *** - - unsigned int m_references; - - std::string m_title; - std::string m_extra; - - /** - * Initializes the reference counter to 1 and sets m_title and m_extra. - */ - Data(const std::string& title); - - /// Required. - virtual ~Data(); - - /** - * Returns "plot" or "splot". - */ - virtual std::string GetCommand() const = 0; - - /** - * Prints the plot description used as argument to (s)plot. Either the - * function expression or a datafile description. Should include m_title and - * m_extra in the output. - */ - virtual void PrintExpression(std::ostream &os) const = 0; - - /** - * Print the inline data file contents trailing the plot command. Empty for - * functions. - */ - virtual void PrintDatafile(std::ostream &os) const = 0; -}; - -GnuplotDataset::Data::Data(const std::string& title) - : m_references(1), - m_title(title), - m_extra(m_defaultExtra) -{ -} - -GnuplotDataset::Data::~Data() -{ -} - -// --- GnuplotDataset ------------------------------------------------------ // - -std::string GnuplotDataset::m_defaultExtra = ""; - -GnuplotDataset::GnuplotDataset (struct Data* data) - : m_data(data) -{ -} - -GnuplotDataset::GnuplotDataset (const GnuplotDataset& original) - : m_data(original.m_data) -{ - ++m_data->m_references; -} - -GnuplotDataset::~GnuplotDataset() -{ - if (--m_data->m_references == 0) - delete m_data; -} - -GnuplotDataset& GnuplotDataset::operator= (const GnuplotDataset& original) -{ - if (this != &original) - { - if (--m_data->m_references == 0) - delete m_data; - - m_data = original.m_data; - ++m_data->m_references; - } - return *this; -} - -void -GnuplotDataset::SetTitle (const std::string& title) -{ - m_data->m_title = title; -} - -void -GnuplotDataset::SetDefaultExtra (const std::string& extra) -{ - m_defaultExtra = extra; -} -void -GnuplotDataset::SetExtra (const std::string& extra) -{ - m_data->m_extra = extra; -} - -// --- Gnuplot2dDataset::Data2d -------------------------------------------- // - -struct Gnuplot2dDataset::Data2d : public GnuplotDataset::Data -{ - // *** Data Variables *** - - enum Style m_style; - enum ErrorBars m_errorBars; - - PointSet m_pointset; - - /** - * Initializes with the values from m_defaultStyle and m_defaultErrorBars. - */ - Data2d(const std::string& title); - - virtual std::string GetCommand() const; - virtual void PrintExpression(std::ostream &os) const; - virtual void PrintDatafile(std::ostream &os) const; -}; - -Gnuplot2dDataset::Data2d::Data2d(const std::string& title) - : Data(title), - m_style(m_defaultStyle), - m_errorBars(m_defaultErrorBars) -{ -} - -std::string -Gnuplot2dDataset::Data2d::GetCommand() const -{ - return "plot"; -} - -void -Gnuplot2dDataset::Data2d::PrintExpression(std::ostream &os) const -{ - os << "'-' "; - - if (m_title.size()) - os << " title '" << m_title << "'"; - - switch (m_style) { - case LINES: - os << " with lines"; - break; - case POINTS: - switch (m_errorBars) - { - case NONE: - os << " with points"; - break; - case X: - os << " with xerrorbars"; - break; - case Y: - os << " with yerrorbars"; - break; - case XY: - os << " with xyerrorbars"; - break; - } - break; - case LINES_POINTS: - switch (m_errorBars) - { - case NONE: - os << " with linespoints"; - break; - case X: - os << " with errorlines"; - break; - case Y: - os << " with yerrorlines"; - break; - case XY: - os << " with xyerrorlines"; - break; - } - break; - case DOTS: - os << " with dots"; - break; - case IMPULSES: - os << " with impulses"; - break; - case STEPS: - os << " with steps"; - break; - case FSTEPS: - os << " with fsteps"; - break; - case HISTEPS: - os << " with histeps"; - break; - } - - if (m_extra.size()) - os << " " << m_extra; -} - -void -Gnuplot2dDataset::Data2d::PrintDatafile(std::ostream &os) const -{ - for (PointSet::const_iterator i = m_pointset.begin (); - i != m_pointset.end (); ++i) - { - if (i->empty) { - os << std::endl; - continue; - } - - switch (m_errorBars) { - case NONE: - os << i->x << " " << i->y << std::endl; - break; - case X: - os << i->x << " " << i->y << " " << i->dx << std::endl; - break; - case Y: - os << i->x << " " << i->y << " " << i->dy << std::endl; - break; - case XY: - os << i->x << " " << i->y << " " << i->dx << " " << i->dy << std::endl; - break; - } - } - os << "e" << std::endl; -} - -// --- Gnuplot2dDataset ---------------------------------------------------- // - -enum Gnuplot2dDataset::Style Gnuplot2dDataset::m_defaultStyle = LINES; -enum Gnuplot2dDataset::ErrorBars Gnuplot2dDataset::m_defaultErrorBars = NONE; - -Gnuplot2dDataset::Gnuplot2dDataset (const std::string& title) - : GnuplotDataset( new Data2d(title) ) -{ -} - -void -Gnuplot2dDataset::SetDefaultStyle (enum Style style) -{ - m_defaultStyle = style; -} -void -Gnuplot2dDataset::SetStyle (enum Style style) -{ - reinterpret_cast(m_data)->m_style = style; -} - -void -Gnuplot2dDataset::SetDefaultErrorBars (enum ErrorBars errorBars) -{ - m_defaultErrorBars = errorBars; -} -void -Gnuplot2dDataset::SetErrorBars (enum ErrorBars errorBars) -{ - reinterpret_cast(m_data)->m_errorBars = errorBars; -} - -void -Gnuplot2dDataset::Add (double x, double y) -{ - NS_ASSERT (reinterpret_cast(m_data)->m_errorBars == NONE); - - struct Point data; - data.empty = false; - data.x = x; - data.y = y; - data.dx = 0.0; - data.dy = 0.0; - reinterpret_cast(m_data)->m_pointset.push_back (data); -} - -void -Gnuplot2dDataset::Add (double x, double y, double errorDelta) -{ - NS_ASSERT ( reinterpret_cast(m_data)->m_errorBars == X || - reinterpret_cast(m_data)->m_errorBars == Y ); - - struct Point data; - data.empty = false; - data.x = x; - data.y = y; - data.dx = errorDelta; - data.dy = errorDelta; - reinterpret_cast(m_data)->m_pointset.push_back (data); -} - -void -Gnuplot2dDataset::Add (double x, double y, double minY, double maxY) -{ - NS_ASSERT ( reinterpret_cast(m_data)->m_errorBars == X || - reinterpret_cast(m_data)->m_errorBars == Y ); - - struct Point data; - data.empty = false; - data.x = x; - data.y = y; - data.dx = minY; - data.dy = maxY; - reinterpret_cast(m_data)->m_pointset.push_back (data); -} - -void -Gnuplot2dDataset::AddEmptyLine() -{ - struct Point data; - data.empty = true; - reinterpret_cast(m_data)->m_pointset.push_back (data); -} - -// --- Gnuplot2dFunction::Function2d --------------------------------------- // - -struct Gnuplot2dFunction::Function2d : public GnuplotDataset::Data -{ - // *** Data Variables *** - - std::string m_function; - - /** - * Initializes with the function and title. - */ - Function2d(const std::string& title, const std::string& function); - - virtual std::string GetCommand() const; - virtual void PrintExpression(std::ostream &os) const; - virtual void PrintDatafile(std::ostream &os) const; -}; - -Gnuplot2dFunction::Function2d::Function2d(const std::string& title, const std::string& function) - : Data(title), - m_function(function) -{ -} - -std::string -Gnuplot2dFunction::Function2d::GetCommand() const -{ - return "plot"; -} - -void -Gnuplot2dFunction::Function2d::PrintExpression(std::ostream &os) const -{ - os << m_function; - - if (m_title.size()) - os << " title '" << m_title << "'"; - - if (m_extra.size()) - os << " " << m_extra; -} - -void -Gnuplot2dFunction::Function2d::PrintDatafile(std::ostream &os) const -{ -} - -// --- Gnuplot2dFunction --------------------------------------------------- // - -Gnuplot2dFunction::Gnuplot2dFunction (const std::string& title, const std::string& function) - : GnuplotDataset( new Function2d(title, function) ) -{ -} - -void -Gnuplot2dFunction::SetFunction (const std::string& function) -{ - reinterpret_cast(m_data)->m_function = function; -} - -// --- Gnuplot3dDataset::Data3d -------------------------------------------- // - -struct Gnuplot3dDataset::Data3d : public GnuplotDataset::Data -{ - // *** Data Variables *** - - std::string m_style; - - PointSet m_pointset; - - /** - * Initializes with value from m_defaultStyle. - */ - Data3d(const std::string& title); - - virtual std::string GetCommand() const; - virtual void PrintExpression(std::ostream &os) const; - virtual void PrintDatafile(std::ostream &os) const; -}; - -Gnuplot3dDataset::Data3d::Data3d(const std::string& title) - : Data(title), - m_style(m_defaultStyle) -{ -} - -std::string -Gnuplot3dDataset::Data3d::GetCommand() const -{ - return "splot"; -} - -void -Gnuplot3dDataset::Data3d::PrintExpression(std::ostream &os) const -{ - os << "'-' "; - - if (m_style.size()) - os << " " << m_style; - - if (m_title.size()) - os << " title '" << m_title << "'"; - - if (m_extra.size()) - os << " " << m_extra; -} - -void -Gnuplot3dDataset::Data3d::PrintDatafile(std::ostream &os) const -{ - for (PointSet::const_iterator i = m_pointset.begin (); - i != m_pointset.end (); ++i) - { - if (i->empty) { - os << std::endl; - continue; - } - - os << i->x << " " << i->y << " " << i->z << std::endl; - } - os << "e" << std::endl; -} - -// --- Gnuplot3dDataset ---------------------------------------------------- // - -std::string Gnuplot3dDataset::m_defaultStyle = ""; - -Gnuplot3dDataset::Gnuplot3dDataset (const std::string& title) - : GnuplotDataset( new Data3d(title) ) -{ -} - -void -Gnuplot3dDataset::SetDefaultStyle (const std::string& style) -{ - m_defaultStyle = style; -} -void -Gnuplot3dDataset::SetStyle (const std::string& style) -{ - reinterpret_cast(m_data)->m_style = style; -} - -void -Gnuplot3dDataset::Add (double x, double y, double z) -{ - struct Point data; - data.empty = false; - data.x = x; - data.y = y; - data.z = z; - reinterpret_cast(m_data)->m_pointset.push_back (data); -} - -void -Gnuplot3dDataset::AddEmptyLine() -{ - struct Point data; - data.empty = true; - reinterpret_cast(m_data)->m_pointset.push_back (data); -} - -// --- Gnuplot3dFunction::Function3d --------------------------------------- // - -struct Gnuplot3dFunction::Function3d : public GnuplotDataset::Data -{ - // *** Data Variables *** - - std::string m_function; - - /** - * Initializes with the function and title. - */ - Function3d(const std::string& title, const std::string& function); - - virtual std::string GetCommand() const; - virtual void PrintExpression(std::ostream &os) const; - virtual void PrintDatafile(std::ostream &os) const; -}; - -Gnuplot3dFunction::Function3d::Function3d(const std::string& title, const std::string& function) - : Data(title), - m_function(function) -{ -} - -std::string -Gnuplot3dFunction::Function3d::GetCommand() const -{ - return "splot"; -} - -void -Gnuplot3dFunction::Function3d::PrintExpression(std::ostream &os) const -{ - os << m_function; - - if (m_title.size()) - os << " title '" << m_title << "'"; - - if (m_extra.size()) - os << " " << m_extra; -} - -void -Gnuplot3dFunction::Function3d::PrintDatafile(std::ostream &os) const -{ -} - -// --- Gnuplot3dFunction --------------------------------------------------- // - -Gnuplot3dFunction::Gnuplot3dFunction (const std::string& title, const std::string& function) - : GnuplotDataset( new Function3d(title, function) ) -{ -} - -void -Gnuplot3dFunction::SetFunction (const std::string& function) -{ - reinterpret_cast(m_data)->m_function = function; -} - -// ------------------------------------------------------------------------- // - -Gnuplot::Gnuplot (const std::string& outputFilename, const std::string& title) - : m_outputFilename(outputFilename), - m_terminal( DetectTerminal(outputFilename) ), - m_title(title) -{ -} - -std::string Gnuplot::DetectTerminal (const std::string& filename) -{ - std::string::size_type dotpos = filename.rfind('.'); - if (dotpos == std::string::npos) return ""; - - if (filename.substr(dotpos) == ".png") { - return "png"; - } - else if (filename.substr(dotpos) == ".pdf") { - return "pdf"; - } - - return ""; -} - -void -Gnuplot::SetTerminal (const std::string& terminal) -{ - m_terminal = terminal; -} - -void -Gnuplot::SetTitle (const std::string& title) -{ - m_title = title; -} - -void -Gnuplot::SetLegend (const std::string& xLegend, const std::string& yLegend) -{ - m_xLegend = xLegend; - m_yLegend = yLegend; -} - -void -Gnuplot::SetExtra (const std::string& extra) -{ - m_extra = extra; -} - -void -Gnuplot::AppendExtra (const std::string& extra) -{ - m_extra += "\n"; - m_extra += extra; -} - -void -Gnuplot::AddDataset (const GnuplotDataset& dataset) -{ - m_datasets.push_back (dataset); -} - -void -Gnuplot::GenerateOutput (std::ostream &os) const -{ - if (m_terminal.size()) - os << "set terminal " << m_terminal << std::endl; - - if (m_outputFilename.size()) - os << "set output '" << m_outputFilename << "'" << std::endl; - - if (m_title.size()) - os << "set title '" << m_title << "'" << std::endl; - - if (m_xLegend.size()) - os << "set xlabel '" << m_xLegend << "'" << std::endl; - - if (m_yLegend.size()) - os << "set ylabel '" << m_yLegend << "'" << std::endl; - - if (m_extra.size()) - os << m_extra << std::endl; - - if (m_datasets.empty()) - return; - - // Determine the GetCommand() values of all datasets included. Check that all - // are equal and print the command. - - std::string command = m_datasets.begin()->m_data->GetCommand(); - - for (Datasets::const_iterator i = m_datasets.begin () + 1; - i != m_datasets.end (); ++i) - { - NS_ASSERT_MSG(command == i->m_data->GetCommand(), - "Cannot mix 'plot' and 'splot' GnuplotDatasets."); - } - - os << command << " "; - - // Print all dataset expressions - - for (Datasets::const_iterator i = m_datasets.begin (); i != m_datasets.end ();) - { - i->m_data->PrintExpression(os); - - i++; - - if (i != m_datasets.end ()) - { - os << ", "; - } - } - os << std::endl; - - // followed by the inline datafile. - - for (Datasets::const_iterator i = m_datasets.begin (); i != m_datasets.end (); i++) - { - i->m_data->PrintDatafile(os); - } -} - -// ------------------------------------------------------------------------- // - -GnuplotCollection::GnuplotCollection (const std::string& outputFilename) - : m_outputFilename(outputFilename), - m_terminal( Gnuplot::DetectTerminal(outputFilename) ) -{ -} - -void -GnuplotCollection::SetTerminal (const std::string& terminal) -{ - m_terminal = terminal; -} - -void -GnuplotCollection::AddPlot (const Gnuplot& plot) -{ - m_plots.push_back (plot); -} - -Gnuplot& -GnuplotCollection::GetPlot(unsigned int id) -{ - if (id >= m_plots.size()) - throw(std::range_error("Gnuplot id is out of range")); - else - return m_plots[id]; -} - -void -GnuplotCollection::GenerateOutput (std::ostream &os) const -{ - if (m_terminal.size()) - os << "set terminal " << m_terminal << std::endl; - - if (m_outputFilename.size()) - os << "set output '" << m_outputFilename << "'" << std::endl; - - for (Plots::const_iterator i = m_plots.begin (); i != m_plots.end (); ++i) - { - i->GenerateOutput (os); - } -} - -// ------------------------------------------------------------------------- // - -} // namespace ns3 diff -r afe2960e58b7 -r 9d2c79c992d7 src/contrib/gnuplot.h --- a/src/contrib/gnuplot.h Thu Mar 24 15:11:56 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,460 +0,0 @@ -/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ -/* - * Copyright (c) 2007 INRIA, 2008 Timo Bingmann - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation; - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * Original Author: Mathieu Lacage - * Enhancements: Timo Bingmann - */ -#ifndef GNUPLOT_H -#define GNUPLOT_H - -#include -#include -#include - -namespace ns3 { - -/** - * \brief Abstract class to store a plot line to be used by ns3::Gnuplot. - * - * This class contains a reference counted data object in m_data. The data - * object contains different structs derived from struct Data by subclasses. - */ -class GnuplotDataset -{ -public: - - /** - * Reference-counting copy constructor. - */ - GnuplotDataset (const GnuplotDataset& original); - - /** - * Reference-counting destructor. - */ - ~GnuplotDataset(); - - /** - * Reference-counting assignment operator. - */ - GnuplotDataset& operator= (const GnuplotDataset& original); - - /** - * \brief Change line title. - * \param title the new title string to use for this dataset. - */ - void SetTitle (const std::string& title); - - /** - * \brief Change extra formatting style parameters for newly created objects. - * \param extra extra formatting - */ - static void SetDefaultExtra (const std::string& extra); - - /** - * \brief Add extra formatting parameters to this dataset. - * \param extra extra formatting - */ - void SetExtra (const std::string& extra); - -protected: - - /// Friend because it accesses m_data and it's virtual functions directly in - /// GenerateOutput(). - friend class Gnuplot; - - /** - * \brief Extra gnuplot parameters set on every newly created dataset. - */ - static std::string m_defaultExtra; - - /** - * \brief Derived classes subclass this struct and add their own data fields. - */ - struct Data; - - /** - * Called by constructors of derived classes. - * \param data the reference counted data object representing this dataset. - */ - GnuplotDataset (struct Data* data); - - /** - * Reference counted data object. - */ - struct Data* m_data; -}; - -/** - * \brief Class to represent a 2D points plot. Set the line or points style - * using SetStyle() and set points using Add(). - */ -class Gnuplot2dDataset : public GnuplotDataset -{ -public: - /** - * The plotting style to use for this dataset. - */ - enum Style { - LINES, - POINTS, - LINES_POINTS, - DOTS, - IMPULSES, - STEPS, - FSTEPS, - HISTEPS, - }; - - /** - * Whether errorbars should be used for this dataset. - */ - enum ErrorBars { - NONE, - X, - Y, - XY - }; - - /** - * \param title the title to be associated to this dataset. - * - * Create an empty dataset. Usually, the dataset's title is - * displayed in the legend box. - */ - Gnuplot2dDataset (const std::string& title = "Untitled"); - - /** - * Change default style for all newly created objects. - * \param style the style of plotting to use for newly created datasets. - */ - static void SetDefaultStyle (enum Style style); - - /** - * \param style the style of plotting to use for this dataset. - */ - void SetStyle (enum Style style); - - /** - * Change default errorbars style for all newly created objects. - * \param errorBars the style of errorbars to use for newly created datasets. - */ - static void SetDefaultErrorBars (enum ErrorBars errorBars); - - /** - * \param errorBars the style of errorbars to display. - * - * If you use any style other than none, you need - * to make sure you store the delta information in - * this dataset with the right GnuplotDataset::Add - * method. - */ - void SetErrorBars (enum ErrorBars errorBars); - - /** - * \param x x coord to new data point - * \param y y coord to new data point - * - * Use this method with error bar style NONE. - */ - void Add (double x, double y); - - /** - * \param x x coord to new data point - * \param y y coord to new data point - * \param errorDelta data point error range. - * - * Use this method with error bar style X or Y. - */ - void Add (double x, double y, double errorDelta); - - /** - * \param x x coord to new data point - * \param y y coord to new data point - * \param minY minimum error data point - * \param maxY maximum error data point - * - * Use this method with error bar style X or Y. - */ - void Add (double x, double y, double minY, double maxY); - - /** - * Add an empty line in the data output sequence. Empty lines in the plot - * data break continuous lines and do other things in the output. - */ - void AddEmptyLine(); - -private: - - struct Point { - bool empty; - double x; - double y; - double dx; - double dy; - }; - - typedef std::vector PointSet; - - static enum Style m_defaultStyle; - static enum ErrorBars m_defaultErrorBars; - - /// Forward declaration of the internal data class. - struct Data2d; -}; - -/** - * \brief Class to represent a 2D function expression plot. - * - * Since the function expression is not escaped, styles and extras could just - * as well be included in the expression string. - */ -class Gnuplot2dFunction : public GnuplotDataset -{ -public: - /** - * \param title the title to be associated to this dataset. - * \param function function to plot - * - * Create an function dataset. Usually, the dataset's title is displayed in - * the legend box. - */ - Gnuplot2dFunction (const std::string& title = "Untitled", const std::string& function = ""); - - /** - * \param function new function string to set - */ - void SetFunction (const std::string& function); - -private: - - /// Forward declaration of the internal data class. - struct Function2d; -}; - -/** - * \brief Class to represent a 3D points plot. Set the line or points style - * using SetStyle() and set points using Add(). - */ -class Gnuplot3dDataset : public GnuplotDataset -{ -public: - /** - * \param title the title to be associated to this dataset. - * - * Create an empty dataset. Usually, the dataset's title is - * displayed in the legend box. - */ - Gnuplot3dDataset (const std::string& title = "Untitled"); - - /** - * Change default style for all newly created objects. - * \param style the style of plotting to use for newly created datasets. - */ - static void SetDefaultStyle (const std::string& style); - - /** - * \param style the style of plotting to use for this dataset. - */ - void SetStyle (const std::string& style); - - /** - * \param x x coord to new data point - * \param y y coord to new data point - * \param z z coord to new data point - * - * Use this method to add a new 3D point - */ - void Add (double x, double y, double z); - - /** - * Add an empty line in the data output sequence. Empty lines in the plot - * data break continuous lines and do other things in the output. - */ - void AddEmptyLine(); - -private: - - struct Point { - bool empty; - double x, y, z; - }; - - typedef std::vector PointSet; - - static std::string m_defaultStyle; - - /// Forward declaration of the internal data class. - struct Data3d; -}; - -/** - * \brief Class to represent a 3D function expression plot. - * - * Since the function expression is not escaped, styles and extras could just as - * well be included in the expression string. The only difference to - * Gnuplot2dFunction is the splot command string. - */ -class Gnuplot3dFunction : public GnuplotDataset -{ -public: - /** - * \param title the title to be associated to this dataset. - * \param function function to plot - * - * Create an function dataset. Usually, the dataset's title is displayed in - * the legend box. - */ - Gnuplot3dFunction (const std::string& title = "Untitled", const std::string& function = ""); - - /** - * \param function new function string to set - */ - void SetFunction (const std::string& function); - -private: - - /// Forward declaration of the internal data class. - struct Function3d; -}; - -/** - * \brief a simple class to generate gnuplot-ready plotting commands - * from a set of datasets. - * - * This class really represents a single graph on which multiple datasets - * can be plotted. - */ -class Gnuplot -{ -public: - /** - * \param outputFilename the name of the file where the rendering of the - * graph will be generated if you feed the command stream output by - * Gnuplot::GenerateOutput to the gnuplot program. - * \param title title line of the plot page - */ - Gnuplot (const std::string& outputFilename="", const std::string& title = ""); - - /** - * Crude attempt to auto-detect the correct terminal setting by inspecting - * the filename's extension. - * \param filename output file name - */ - static std::string DetectTerminal(const std::string& filename); - - /** - * \param terminal terminal setting string for output. The default terminal - * string is "png" - */ - void SetTerminal (const std::string& terminal); - - /** - * \param title set new plot title string to use for this plot. - */ - void SetTitle (const std::string& title); - - /** - * \param xLegend the legend for the x horizontal axis - * \param yLegend the legend for the y vertical axis - */ - void SetLegend (const std::string& xLegend, const std::string& yLegend); - - /** - * \param extra set extra gnuplot directive for output. - */ - void SetExtra (const std::string& extra); - - /** - * \param extra append extra gnuplot directive for output. - */ - void AppendExtra (const std::string& extra); - - /** - * \param dataset add a dataset to the graph to be plotted. - */ - void AddDataset (const GnuplotDataset& dataset); - - /** - * \param os the output stream on which the relevant gnuplot commands should - * be generated. Including output file and terminal headers. - */ - void GenerateOutput (std::ostream &os) const; - -private: - typedef std::vector Datasets; - - std::string m_outputFilename; - std::string m_terminal; - - Datasets m_datasets; - - std::string m_title; - std::string m_xLegend; - std::string m_yLegend; - std::string m_extra; -}; - -/** - * \brief a simple class to group together multiple gnuplots into one file, - * e.g. for PDF multi-page output terminals. - */ -class GnuplotCollection -{ -public: - /** - * \param outputFilename the name of the file where the rendering of the - * graph will be generated if you feed the command stream output by - * GnuplotCollection::GenerateOutput to the gnuplot program. - */ - GnuplotCollection (const std::string& outputFilename); - - /** - * \param terminal terminal setting string for output. The default terminal - * string is guessed from the output filename's extension. - */ - void SetTerminal (const std::string& terminal); - - /** - * \param plot add a plot to the collection to be plotted. - */ - void AddPlot (const Gnuplot& plot); - - /** - * Return a pointer to one of the added plots. - * \param id index of plot to return - * \return reference to plot, throws std::range_error if it does not exist. - */ - Gnuplot& GetPlot(unsigned int id); - - /** - * \param os the output stream on which the relevant gnuplot commands should - * be generated. - */ - void GenerateOutput (std::ostream &os) const; - -private: - typedef std::vector Plots; - - std::string m_outputFilename; - std::string m_terminal; - - Plots m_plots; -}; - -} // namespace ns3 - -#endif /* GNUPLOT_H */ diff -r afe2960e58b7 -r 9d2c79c992d7 src/contrib/gtk-config-store.cc --- a/src/contrib/gtk-config-store.cc Thu Mar 24 15:11:56 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,139 +0,0 @@ -/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ -/* - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation; - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * Authors: Faker Moatamri - * Mathieu Lacage - */ - -#include "gtk-config-store.h" -#include "raw-text-config.h" -#include "display-functions.h" -#include "ns3/log.h" -#include - - -namespace ns3 { - -NS_LOG_COMPONENT_DEFINE ("GtkconfigStore"); - - -GtkConfigStore::GtkConfigStore () -{ -} - -void -GtkConfigStore::ConfigureDefaults (void) -{ - //this function should be called before running the script to enable the user - //to configure the default values for the objects he wants to use - GtkWidget *window; - GtkWidget *view; - GtkWidget *scroll; - - gtk_init (0, 0); - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); - gtk_window_set_title (GTK_WINDOW (window), "ns-3 Default attributes."); - gtk_window_set_default_size (GTK_WINDOW (window), 600, 600); - - g_signal_connect (window, "delete_event", (GCallback)delete_event_callback, window); - GtkTreeStore *model = gtk_tree_store_new (COL_LAST, G_TYPE_POINTER); - ModelTypeidCreator creator; - creator.Build (model); - - view = create_view_config_default (model); - scroll = gtk_scrolled_window_new (0, 0); - gtk_container_add (GTK_CONTAINER (scroll), view); - - GtkWidget *vbox = gtk_vbox_new (FALSE, 5); - gtk_box_pack_start (GTK_BOX (vbox), scroll, TRUE, TRUE, 0); - gtk_box_pack_end (GTK_BOX (vbox), gtk_hseparator_new (), FALSE, FALSE, 0); - GtkWidget *hbox = gtk_hbox_new (FALSE, 5); - gtk_box_pack_end (GTK_BOX (vbox), hbox, FALSE, FALSE, 0); - GtkWidget *save = gtk_button_new_with_label ("Save"); - g_signal_connect (save, "clicked", (GCallback) save_clicked_default, window); - gtk_box_pack_end (GTK_BOX (hbox), save, FALSE, FALSE, 0); - GtkWidget *load = gtk_button_new_with_label ("Load"); - g_signal_connect (load, "clicked", (GCallback) load_clicked_default, window); - gtk_box_pack_end (GTK_BOX (hbox), load, FALSE, FALSE, 0); - GtkWidget *exit = gtk_button_new_with_label ("Run Simulation"); - g_signal_connect (exit, "clicked", (GCallback) exit_clicked_callback, window); - gtk_box_pack_end (GTK_BOX (hbox), exit, FALSE, FALSE, 0); - - gtk_container_add (GTK_CONTAINER (window), vbox); - - gtk_widget_show_all (window); - - gtk_main (); - - gtk_tree_model_foreach (GTK_TREE_MODEL (model), - clean_model_callback_config_default, - 0); - - gtk_widget_destroy (window); -} - -void -GtkConfigStore::ConfigureAttributes (void) -{ - GtkWidget *window; - GtkWidget *view; - GtkWidget *scroll; - - gtk_init (0, 0); - - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); - gtk_window_set_title (GTK_WINDOW (window), "ns-3 Object attributes."); - gtk_window_set_default_size (GTK_WINDOW (window), 600, 600); - - g_signal_connect (window, "delete_event", (GCallback)delete_event_callback, window); - - - GtkTreeStore *model = gtk_tree_store_new (COL_LAST, G_TYPE_POINTER); - ModelCreator creator; - creator.Build (model); - - view = create_view (model); - scroll = gtk_scrolled_window_new (0, 0); - gtk_container_add (GTK_CONTAINER (scroll), view); - - GtkWidget *vbox = gtk_vbox_new (FALSE, 5); - gtk_box_pack_start (GTK_BOX (vbox), scroll, TRUE, TRUE, 0); - gtk_box_pack_end (GTK_BOX (vbox), gtk_hseparator_new (), FALSE, FALSE, 0); - GtkWidget *hbox = gtk_hbox_new (FALSE, 5); - gtk_box_pack_end (GTK_BOX (vbox), hbox, FALSE, FALSE, 0); - GtkWidget *save = gtk_button_new_with_label ("Save"); - g_signal_connect (save, "clicked", (GCallback) save_clicked, window); - gtk_box_pack_end (GTK_BOX (hbox), save, FALSE, FALSE, 0); - GtkWidget *load = gtk_button_new_with_label ("Load"); - g_signal_connect (load, "clicked", (GCallback) load_clicked, window); - gtk_box_pack_end (GTK_BOX (hbox), load, FALSE, FALSE, 0); - GtkWidget *exit = gtk_button_new_with_label ("Run Simulation"); - g_signal_connect (exit, "clicked", (GCallback) exit_clicked_callback, window); - gtk_box_pack_end (GTK_BOX (hbox), exit, FALSE, FALSE, 0); - - gtk_container_add (GTK_CONTAINER (window), vbox); - - gtk_widget_show_all (window); - - gtk_main (); - - gtk_tree_model_foreach (GTK_TREE_MODEL (model), - clean_model_callback, - 0); - - gtk_widget_destroy (window); -} - -} // namespace ns3 diff -r afe2960e58b7 -r 9d2c79c992d7 src/contrib/gtk-config-store.h --- a/src/contrib/gtk-config-store.h Thu Mar 24 15:11:56 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,40 +0,0 @@ -/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ -/* - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation; - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * Authors: Faker Moatamri - * Mathieu Lacage - */ - -#ifndef GTK_CONFIG_STORE_H -#define GTK_CONFIG_STORE_H - -namespace ns3 { - -/** - * \brief A class that provides a GTK-based front end to ns3::ConfigStore - */ -class GtkConfigStore -{ -public: - GtkConfigStore (); - - void ConfigureDefaults (void); - void ConfigureAttributes (void); -}; - - -} // namespace ns3 - -#endif /* GTK_CONFIG_STORE_H */ diff -r afe2960e58b7 -r 9d2c79c992d7 src/contrib/model-node-creator.cc --- a/src/contrib/model-node-creator.cc Thu Mar 24 15:11:56 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,130 +0,0 @@ -/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ -/* - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation; - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * Authors: Faker Moatamri - * Mathieu Lacage - */ - -#include "model-node-creator.h" -namespace ns3 { - -ModelCreator::ModelCreator () -{ -} -void - -ModelCreator::Build (GtkTreeStore *treestore) -{ - m_treestore = treestore; - m_iters.push_back (0); - //this function will go through all the objects and call on them - //DoStartVisitObject, DoIterate and DoEndVisitObject - Iterate (); - NS_ASSERT (m_iters.size () == 1); -} - - -void -ModelCreator::Add (ModelNode *node) -{ - GtkTreeIter *parent = m_iters.back (); - GtkTreeIter *current = g_new (GtkTreeIter, 1); - gtk_tree_store_append (m_treestore, current, parent); - gtk_tree_store_set (m_treestore, current, - COL_NODE, node, -1); - m_iters.push_back (current); -} -void -ModelCreator::Remove (void) -{ - GtkTreeIter *iter = m_iters.back (); - g_free (iter); - m_iters.pop_back (); -} - -void -ModelCreator::DoVisitAttribute (Ptr object, std::string name) -{ - ModelNode *node = new ModelNode (); - node->type = ModelNode::NODE_ATTRIBUTE; - node->object = object; - node->name = name; - Add (node); - Remove (); -} -void -ModelCreator::DoStartVisitObject (Ptr object) -{ - ModelNode *node = new ModelNode (); - node->type = ModelNode::NODE_OBJECT; - node->object = object; - Add (node); -} -void -ModelCreator::DoEndVisitObject (void) -{ - Remove (); -} -void -ModelCreator::DoStartVisitPointerAttribute (Ptr object, std::string name, Ptr value) -{ - ModelNode *node = new ModelNode (); - node->type = ModelNode::NODE_POINTER; - node->object = object; - node->name = name; - Add (node); -} -void -ModelCreator::DoEndVisitPointerAttribute (void) -{ - Remove (); -} -void -ModelCreator::DoStartVisitArrayAttribute (Ptr object, std::string name, const ObjectVectorValue &vector) -{ - ModelNode *node = new ModelNode (); - node->type = ModelNode::NODE_VECTOR; - node->object = object; - node->name = name; - Add (node); -} -void -ModelCreator::DoEndVisitArrayAttribute (void) -{ - Remove (); -} -void -ModelCreator::DoStartVisitArrayItem (const ObjectVectorValue &vector, uint32_t index, Ptr item) -{ - GtkTreeIter *parent = m_iters.back (); - GtkTreeIter *current = g_new (GtkTreeIter, 1); - ModelNode *node = new ModelNode (); - node->type = ModelNode::NODE_VECTOR_ITEM; - node->object = item; - node->index = index; - gtk_tree_store_append (m_treestore, current, parent); - gtk_tree_store_set (m_treestore, current, - COL_NODE, node, - -1); - m_iters.push_back (current); -} -void -ModelCreator::DoEndVisitArrayItem (void) -{ - GtkTreeIter *iter = m_iters.back (); - g_free (iter); - m_iters.pop_back (); -} -}//end namespace ns3 diff -r afe2960e58b7 -r 9d2c79c992d7 src/contrib/model-node-creator.h --- a/src/contrib/model-node-creator.h Thu Mar 24 15:11:56 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,73 +0,0 @@ -/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ -/* - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation; - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * Authors: Faker Moatamri - * Mathieu Lacage - */ - -#include "attribute-iterator.h" -#include - -namespace ns3 -{ - -enum -{ - COL_NODE = 0, COL_LAST -}; - -struct ModelNode -{ - enum - { - // store object + attribute name - NODE_ATTRIBUTE, - // store object + attribute name - NODE_POINTER, - // store object + attribute name - NODE_VECTOR, - // store index + value (object) - NODE_VECTOR_ITEM, - // store object - NODE_OBJECT - } type; - std::string name; - Ptr object; - uint32_t index; -}; -class ModelCreator : public AttributeIterator -{ -public: - ModelCreator (); - - void Build (GtkTreeStore *treestore); -private: - virtual void DoVisitAttribute (Ptr object, std::string name); - virtual void DoStartVisitObject (Ptr object); - virtual void DoEndVisitObject (void); - virtual void DoStartVisitPointerAttribute (Ptr object, std::string name, Ptr value); - virtual void DoEndVisitPointerAttribute (void); - virtual void DoStartVisitArrayAttribute (Ptr object, std::string name, const ObjectVectorValue &vector); - virtual void DoEndVisitArrayAttribute (void); - virtual void DoStartVisitArrayItem (const ObjectVectorValue &vector, - uint32_t index, Ptr item); - virtual void DoEndVisitArrayItem (void); - void Add (ModelNode *node); - void Remove (void); - - GtkTreeStore *m_treestore; - std::vector m_iters; -}; -} diff -r afe2960e58b7 -r 9d2c79c992d7 src/contrib/model-typeid-creator.cc --- a/src/contrib/model-typeid-creator.cc Thu Mar 24 15:11:56 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,81 +0,0 @@ -/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ -/* - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation; - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * Author: Faker Moatamri - */ - -#include "model-typeid-creator.h" - -namespace ns3 { - -ModelTypeidCreator::ModelTypeidCreator () -{ -} -void - -ModelTypeidCreator::Build (GtkTreeStore *treestore) -{ - m_treestore = treestore; - m_iters.push_back (0); - Iterate (); - NS_ASSERT (m_iters.size () == 1); -} - -void -ModelTypeidCreator::Add (ModelTypeid *node) -{ - GtkTreeIter *parent = m_iters.back (); - GtkTreeIter *current = g_new (GtkTreeIter, 1); - gtk_tree_store_append (m_treestore, current, parent); - gtk_tree_store_set (m_treestore, current, COL_TYPEID, node, -1); - m_iters.push_back (current); -} - -void -ModelTypeidCreator::Remove (void) -{ - GtkTreeIter *iter = m_iters.back (); - g_free (iter); - m_iters.pop_back (); -} - -void -ModelTypeidCreator::VisitAttribute (TypeId tid, std::string name, std::string defaultValue, uint32_t index) -{ - ModelTypeid *node = new ModelTypeid (); - node->type = ModelTypeid::NODE_ATTRIBUTE; - node->tid = tid; - node->name = name; - node->defaultValue = defaultValue; - node->index = index; - Add (node); - Remove (); -} - -void -ModelTypeidCreator::StartVisitTypeId (std::string name) -{ - ModelTypeid *node = new ModelTypeid (); - node->type = ModelTypeid::NODE_TYPEID; - node->tid = TypeId::LookupByName (name); - Add (node); -} - -void -ModelTypeidCreator::EndVisitTypeId (void) -{ - Remove (); -} -}//end namespace ns3 diff -r afe2960e58b7 -r 9d2c79c992d7 src/contrib/model-typeid-creator.h --- a/src/contrib/model-typeid-creator.h Thu Mar 24 15:11:56 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,82 +0,0 @@ -/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ -/* - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation; - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * Author: Moatamri Faker - */ - -#include "attribute-default-iterator.h" -#include "ns3/type-id.h" -#include -#include - -namespace ns3 { - -enum -{ - COL_TYPEID = 0, COL_LASTID -}; - -struct ModelTypeid -{ - enum - { - // store TypeId + attribute name +defaultValue and index - NODE_ATTRIBUTE, - // store TypeId - NODE_TYPEID - } type; - std::string name; - std::string defaultValue; - //The TypeId object and if it is an attribute, it's the TypeId object of the attribute - TypeId tid; - //stores the index of the attribute in list of attributes for a given TypeId - uint32_t index; -}; -class ModelTypeidCreator : public AttributeDefaultIterator -{ -public: - ModelTypeidCreator (); - /** - * \brief This method will iterate on typeIds having default attributes and create a model - * for them, this model will be used by the view. - */ - void Build (GtkTreeStore *treestore); -private: - /** - * \brief This method will add a ModelTypeid to the GtkTreeIterator - */ - virtual void VisitAttribute (TypeId tid, std::string name, std::string defaultValue, uint32_t index); - /** - * \brief Add a node for the new TypeId object - */ - virtual void StartVisitTypeId (std::string name); - /** - * \brief Remove the last gtk tree iterator - */ - virtual void EndVisitTypeId (void); - /** - * \brief Adds a treestore iterator to m_treestore model - */ - void Add (ModelTypeid *node); - /** - * Removes the last GtkTreeIterator from m_iters - */ - void Remove (void); - //this is the TreeStore model corresponding to the view - GtkTreeStore *m_treestore; - //This contains a vector of iterators used to build the TreeStore - std::vector m_iters; -}; -} diff -r afe2960e58b7 -r 9d2c79c992d7 src/contrib/raw-text-config.cc --- a/src/contrib/raw-text-config.cc Thu Mar 24 15:11:56 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,166 +0,0 @@ -#include "raw-text-config.h" -#include "attribute-iterator.h" -#include "attribute-default-iterator.h" -#include "ns3/global-value.h" -#include "ns3/string.h" -#include "ns3/log.h" -#include "ns3/config.h" - -NS_LOG_COMPONENT_DEFINE ("RawTextConfig"); - -namespace ns3 { - -RawTextConfigSave::RawTextConfigSave () - : m_os (0) -{} -RawTextConfigSave::~RawTextConfigSave () -{ - if (m_os != 0) - { - m_os->close (); - } - delete m_os; - m_os = 0; -} -void -RawTextConfigSave::SetFilename (std::string filename) -{ - m_os = new std::ofstream (); - m_os->open (filename.c_str (), std::ios::out); -} -void -RawTextConfigSave::Default (void) -{ - class RawTextDefaultIterator : public AttributeDefaultIterator - { - public: - RawTextDefaultIterator (std::ostream *os) { - m_os = os; - } - private: - virtual void StartVisitTypeId (std::string name) { - m_typeId = name; - } - virtual void DoVisitAttribute (std::string name, std::string defaultValue) { - *m_os << "default " << m_typeId << "::" << name << " \"" << defaultValue << "\"" << std::endl; - } - std::string m_typeId; - std::ostream *m_os; - }; - - RawTextDefaultIterator iterator = RawTextDefaultIterator (m_os); - iterator.Iterate (); -} -void -RawTextConfigSave::Global (void) -{ - for (GlobalValue::Iterator i = GlobalValue::Begin (); i != GlobalValue::End (); ++i) - { - StringValue value; - (*i)->GetValue (value); - *m_os << "global " << (*i)->GetName () << " \"" << value.Get () << "\"" << std::endl; - } -} -void -RawTextConfigSave::Attributes (void) -{ - class RawTextAttributeIterator : public AttributeIterator - { - public: - RawTextAttributeIterator (std::ostream *os) - : m_os (os) {} - private: - virtual void DoVisitAttribute (Ptr object, std::string name) { - StringValue str; - object->GetAttribute (name, str); - *m_os << "value " << GetCurrentPath () << " \"" << str.Get () << "\"" << std::endl; - } - std::ostream *m_os; - }; - - RawTextAttributeIterator iter = RawTextAttributeIterator (m_os); - iter.Iterate (); -} - -RawTextConfigLoad::RawTextConfigLoad () - : m_is (0) -{} -RawTextConfigLoad::~RawTextConfigLoad () -{ - if (m_is != 0) - { - m_is->close (); - delete m_is; - m_is = 0; - } -} -void -RawTextConfigLoad::SetFilename (std::string filename) -{ - m_is = new std::ifstream (); - m_is->open (filename.c_str (), std::ios::in); -} -std::string -RawTextConfigLoad::Strip (std::string value) -{ - std::string::size_type start = value.find ("\""); - std::string::size_type end = value.find ("\"", 1); - NS_ASSERT (start == 0); - NS_ASSERT (end == value.size () - 1); - return value.substr (start+1, end-start-1); -} - -void -RawTextConfigLoad::Default (void) -{ - m_is->seekg (0); - std::string type, name, value; - *m_is >> type >> name >> value; - while (m_is->good()) - { - NS_LOG_DEBUG ("type=" << type << ", name=" << name << ", value=" << value); - value = Strip (value); - if (type == "default") - { - Config::SetDefault (name, StringValue (value)); - } - *m_is >> type >> name >> value; - } -} -void -RawTextConfigLoad::Global (void) -{ - m_is->seekg (0); - std::string type, name, value; - *m_is >> type >> name >> value; - while (m_is->good()) - { - NS_LOG_DEBUG ("type=" << type << ", name=" << name << ", value=" << value); - value = Strip (value); - if (type == "global") - { - Config::SetGlobal (name, StringValue (value)); - } - *m_is >> type >> name >> value; - } -} -void -RawTextConfigLoad::Attributes (void) -{ - m_is->seekg (0); - std::string type, path, value; - *m_is >> type >> path >> value; - while (m_is->good()) - { - NS_LOG_DEBUG ("type=" << type << ", path=" << path << ", value=" << value); - value = Strip (value); - if (type == "value") - { - Config::Set (path, StringValue (value)); - } - *m_is >> type >> path >> value; - } -} - - -} // namespace ns3 diff -r afe2960e58b7 -r 9d2c79c992d7 src/contrib/raw-text-config.h --- a/src/contrib/raw-text-config.h Thu Mar 24 15:11:56 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,39 +0,0 @@ -#ifndef RAW_TEXT_CONFIG_H -#define RAW_TEXT_CONFIG_H - -#include -#include -#include "file-config.h" - -namespace ns3 { - -class RawTextConfigSave : public FileConfig -{ -public: - RawTextConfigSave (); - virtual ~RawTextConfigSave (); - virtual void SetFilename (std::string filename); - virtual void Default (void); - virtual void Global (void); - virtual void Attributes (void); -private: - std::ofstream *m_os; -}; - -class RawTextConfigLoad : public FileConfig -{ -public: - RawTextConfigLoad (); - virtual ~RawTextConfigLoad (); - virtual void SetFilename (std::string filename); - virtual void Default (void); - virtual void Global (void); - virtual void Attributes (void); -private: - std::string Strip (std::string value); - std::ifstream *m_is; -}; - -} // namespace ns3 - -#endif /* RAW_TEXT_CONFIG_H */ diff -r afe2960e58b7 -r 9d2c79c992d7 src/contrib/test/examples-to-run.py --- a/src/contrib/test/examples-to-run.py Thu Mar 24 15:11:56 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,19 +0,0 @@ -#! /usr/bin/env python -## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- - -# A list of C++ examples to run in order to ensure that they remain -# buildable and runnable over time. Each tuple in the list contains -# -# (example_name, do_run, do_valgrind_run). -# -# See test.py for more information. -cpp_examples = [ -] - -# A list of Python examples to run in order to ensure that they remain -# runnable over time. Each tuple in the list contains -# -# (example_name, do_run). -# -# See test.py for more information. -python_examples = [] diff -r afe2960e58b7 -r 9d2c79c992d7 src/contrib/wscript --- a/src/contrib/wscript Thu Mar 24 15:11:56 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,62 +0,0 @@ -## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- - -def configure(conf): - have_gtk = conf.pkg_check_modules('GTK_CONFIG_STORE', 'gtk+-2.0 >= 2.12', mandatory=False) - conf.env['ENABLE_GTK_CONFIG_STORE'] = have_gtk - conf.report_optional_feature("GtkConfigStore", "GtkConfigStore", - conf.env['ENABLE_GTK_CONFIG_STORE'], - "library 'gtk+-2.0 >= 2.12' not found") - have_libxml2 = conf.pkg_check_modules('LIBXML2', 'libxml-2.0 >= 2.6', mandatory=False) - if have_libxml2: - conf.define('HAVE_LIBXML2', 1) - - conf.env['ENABLE_LIBXML2'] = have_libxml2 - conf.report_optional_feature("XmlIo", "XmlIo", - conf.env['ENABLE_LIBXML2'], - "library 'libxml-2.0 >= 2.7' not found") - conf.write_config_header('ns3/contrib-config.h', top=True) - - -def build(bld): - module = bld.create_ns3_module('contrib', ['core', 'network']) - module.source = [ - 'event-garbage-collector.cc', - 'gnuplot.cc', - 'delay-jitter-estimation.cc', - 'attribute-iterator.cc', - 'config-store.cc', - 'flow-id-tag.cc', - 'attribute-default-iterator.cc', - 'file-config.cc', - 'raw-text-config.cc', - ] - - headers = bld.new_task_gen('ns3header') - headers.module = 'contrib' - headers.source = [ - 'event-garbage-collector.h', - 'gnuplot.h', - 'delay-jitter-estimation.h', - 'file-config.h', - 'config-store.h', - 'flow-id-tag.h', - 'average.h', - ] - - if bld.env['ENABLE_GTK_CONFIG_STORE']: - headers.source.append ('gtk-config-store.h') - module.source.extend (['gtk-config-store.cc', - 'model-node-creator.cc', - 'model-typeid-creator.cc', - 'display-functions.cc', - ]) - module.uselib = 'GTK_CONFIG_STORE' - - if bld.env['ENABLE_LIBXML2']: - module.source.append ('xml-config.cc') - if bld.env['ENABLE_GTK_CONFIG_STORE']: - module.uselib = module.uselib + ' LIBXML2' - else: - module.uselib = 'LIBXML2' - - bld.ns3_python_bindings() diff -r afe2960e58b7 -r 9d2c79c992d7 src/contrib/xml-config.cc --- a/src/contrib/xml-config.cc Thu Mar 24 15:11:56 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,335 +0,0 @@ -#include "xml-config.h" -#include "attribute-default-iterator.h" -#include "attribute-iterator.h" -#include "ns3/fatal-error.h" -#include "ns3/log.h" -#include "ns3/global-value.h" -#include "ns3/string.h" -#include "ns3/config.h" -#include -#include - -NS_LOG_COMPONENT_DEFINE ("XmlConfig"); - -namespace ns3 { - -XmlConfigSave::XmlConfigSave () - : m_writer (0) -{ - NS_LOG_FUNCTION (this); -} -void -XmlConfigSave::SetFilename (std::string filename) -{ - NS_LOG_FUNCTION (filename); - if (filename == "") - { - return; - } - int rc; - - /* Create a new XmlWriter for uri, with no compression. */ - m_writer = xmlNewTextWriterFilename(filename.c_str (), 0); - if (m_writer == NULL) - { - NS_FATAL_ERROR ("Error creating the xml writer"); - } - rc = xmlTextWriterSetIndent (m_writer, 1); - if (rc < 0) - { - NS_FATAL_ERROR ("Error at xmlTextWriterSetIndent"); - } - /* Start the document with the xml default for the version, - * encoding utf-8 and the default for the standalone - * declaration. */ - rc = xmlTextWriterStartDocument(m_writer, NULL, "utf-8", NULL); - if (rc < 0) - { - NS_FATAL_ERROR ("Error at xmlTextWriterStartDocument"); - } - - /* Start an element named "ns3". Since thist is the first - * element, this will be the root element of the document. */ - rc = xmlTextWriterStartElement(m_writer, BAD_CAST "ns3"); - if (rc < 0) - { - NS_FATAL_ERROR ("Error at xmlTextWriterStartElement\n"); - } -} -XmlConfigSave::~XmlConfigSave () -{ - NS_LOG_FUNCTION (this); - if (m_writer == 0) - { - return; - } - int rc; - /* Here we could close the remaining elements using the - * function xmlTextWriterEndElement, but since we do not want to - * write any other elements, we simply call xmlTextWriterEndDocument, - * which will do all the work. */ - rc = xmlTextWriterEndDocument(m_writer); - if (rc < 0) - { - NS_FATAL_ERROR ("Error at xmlTextWriterEndDocument\n"); - } - - xmlFreeTextWriter(m_writer); - m_writer = 0; -} -void -XmlConfigSave::Default (void) -{ - class XmlDefaultIterator : public AttributeDefaultIterator - { - public: - XmlDefaultIterator (xmlTextWriterPtr writer) { - m_writer = writer; - } - private: - virtual void StartVisitTypeId (std::string name) { - m_typeid = name; - } - virtual void DoVisitAttribute (std::string name, std::string defaultValue) { - int rc; - rc = xmlTextWriterStartElement(m_writer, BAD_CAST "default"); - if (rc < 0) - { - NS_FATAL_ERROR ("Error at xmlTextWriterStartElement"); - } - std::string fullname = m_typeid + "::" + name; - rc = xmlTextWriterWriteAttribute(m_writer, BAD_CAST "name", - BAD_CAST fullname.c_str ()); - if (rc < 0) - { - NS_FATAL_ERROR ("Error at xmlTextWriterWriteAttribute"); - } - rc = xmlTextWriterWriteAttribute(m_writer, BAD_CAST "value", - BAD_CAST defaultValue.c_str ()); - if (rc < 0) - { - NS_FATAL_ERROR ("Error at xmlTextWriterWriteAttribute"); - } - rc = xmlTextWriterEndElement(m_writer); - if (rc < 0) - { - NS_FATAL_ERROR ("Error at xmlTextWriterEndElement"); - } - } - xmlTextWriterPtr m_writer; - std::string m_typeid; - }; - XmlDefaultIterator iterator = XmlDefaultIterator (m_writer); - iterator.Iterate (); -} - -void -XmlConfigSave::Attributes (void) -{ - class XmlTextAttributeIterator : public AttributeIterator - { - public: - XmlTextAttributeIterator (xmlTextWriterPtr writer) - : m_writer (writer) {} - private: - virtual void DoVisitAttribute (Ptr object, std::string name) { - StringValue str; - object->GetAttribute (name, str); - int rc; - rc = xmlTextWriterStartElement(m_writer, BAD_CAST "value"); - if (rc < 0) - { - NS_FATAL_ERROR ("Error at xmlTextWriterStartElement"); - } - rc = xmlTextWriterWriteAttribute(m_writer, BAD_CAST "path", - BAD_CAST GetCurrentPath ().c_str ()); - if (rc < 0) - { - NS_FATAL_ERROR ("Error at xmlTextWriterWriteAttribute"); - } - rc = xmlTextWriterWriteAttribute(m_writer, BAD_CAST "value", - BAD_CAST str.Get ().c_str ()); - if (rc < 0) - { - NS_FATAL_ERROR ("Error at xmlTextWriterWriteAttribute"); - } - rc = xmlTextWriterEndElement(m_writer); - if (rc < 0) - { - NS_FATAL_ERROR ("Error at xmlTextWriterEndElement"); - } - } - xmlTextWriterPtr m_writer; - }; - - XmlTextAttributeIterator iter = XmlTextAttributeIterator (m_writer); - iter.Iterate (); -} - -void -XmlConfigSave::Global (void) -{ - int rc; - for (GlobalValue::Iterator i = GlobalValue::Begin (); i != GlobalValue::End (); ++i) - { - StringValue value; - (*i)->GetValue (value); - - rc = xmlTextWriterStartElement(m_writer, BAD_CAST "global"); - if (rc < 0) - { - NS_FATAL_ERROR ("Error at xmlTextWriterStartElement"); - } - rc = xmlTextWriterWriteAttribute(m_writer, BAD_CAST "name", - BAD_CAST (*i)->GetName ().c_str ()); - if (rc < 0) - { - NS_FATAL_ERROR ("Error at xmlTextWriterWriteAttribute"); - } - rc = xmlTextWriterWriteAttribute(m_writer, BAD_CAST "value", - BAD_CAST value.Get ().c_str ()); - if (rc < 0) - { - NS_FATAL_ERROR ("Error at xmlTextWriterWriteAttribute"); - } - rc = xmlTextWriterEndElement(m_writer); - if (rc < 0) - { - NS_FATAL_ERROR ("Error at xmlTextWriterEndElement"); - } - } -} - -XmlConfigLoad::XmlConfigLoad () -{ - NS_LOG_FUNCTION (this); -} -XmlConfigLoad::~XmlConfigLoad () -{ - NS_LOG_FUNCTION (this); -} - -void -XmlConfigLoad::SetFilename (std::string filename) -{ - NS_LOG_FUNCTION (filename); - m_filename = filename; -} -void -XmlConfigLoad::Default (void) -{ - xmlTextReaderPtr reader = xmlNewTextReaderFilename(m_filename.c_str ()); - if (reader == NULL) - { - NS_FATAL_ERROR ("Error at xmlReaderForFile"); - } - int rc; - rc = xmlTextReaderRead (reader); - while (rc > 0) - { - const xmlChar *type = xmlTextReaderConstName(reader); - if (type == 0) - { - NS_FATAL_ERROR ("Invalid value"); - } - if (std::string ((char*)type) == "default") - { - xmlChar *name = xmlTextReaderGetAttribute (reader, BAD_CAST "name"); - if (name == 0) - { - NS_FATAL_ERROR ("Error getting attribute 'name'"); - } - xmlChar *value = xmlTextReaderGetAttribute (reader, BAD_CAST "value"); - if (value == 0) - { - NS_FATAL_ERROR ("Error getting attribute 'value'"); - } - NS_LOG_DEBUG ("default="<<(char*)name<<", value=" < 0) - { - const xmlChar *type = xmlTextReaderConstName(reader); - if (type == 0) - { - NS_FATAL_ERROR ("Invalid value"); - } - if (std::string ((char*)type) == "global") - { - xmlChar *name = xmlTextReaderGetAttribute (reader, BAD_CAST "name"); - if (name == 0) - { - NS_FATAL_ERROR ("Error getting attribute 'name'"); - } - xmlChar *value = xmlTextReaderGetAttribute (reader, BAD_CAST "value"); - if (value == 0) - { - NS_FATAL_ERROR ("Error getting attribute 'value'"); - } - NS_LOG_DEBUG ("global="<<(char*)name<<", value=" < 0) - { - const xmlChar *type = xmlTextReaderConstName(reader); - if (type == 0) - { - NS_FATAL_ERROR ("Invalid value"); - } - if (std::string ((char*)type) == "value") - { - xmlChar *path = xmlTextReaderGetAttribute (reader, BAD_CAST "path"); - if (path == 0) - { - NS_FATAL_ERROR ("Error getting attribute 'path'"); - } - xmlChar *value = xmlTextReaderGetAttribute (reader, BAD_CAST "value"); - if (value == 0) - { - NS_FATAL_ERROR ("Error getting attribute 'value'"); - } - NS_LOG_DEBUG ("path="<<(char*)path << ", value=" << (char*)value); - Config::Set ((char*)path, StringValue ((char*)value)); - xmlFree (path); - xmlFree (value); - } - rc = xmlTextReaderRead (reader); - } - xmlFreeTextReader (reader); -} - - - -} // namespace ns3 diff -r afe2960e58b7 -r 9d2c79c992d7 src/contrib/xml-config.h --- a/src/contrib/xml-config.h Thu Mar 24 15:11:56 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,41 +0,0 @@ -#ifndef XML_CONFIG_STORE_H -#define XML_CONFIG_STORE_H - -#include -#include -#include -#include "file-config.h" - -namespace ns3 { - -class XmlConfigSave : public FileConfig -{ -public: - XmlConfigSave (); - virtual ~XmlConfigSave (); - - virtual void SetFilename (std::string filename); - virtual void Default (void); - virtual void Global (void); - virtual void Attributes (void); -private: - xmlTextWriterPtr m_writer; -}; - -class XmlConfigLoad : public FileConfig -{ -public: - XmlConfigLoad (); - virtual ~XmlConfigLoad (); - - virtual void SetFilename (std::string filename); - virtual void Default (void); - virtual void Global (void); - virtual void Attributes (void); -private: - std::string m_filename; -}; - -} // namespace ns3 - -#endif /* XML_CONFIG_STORE_H */ diff -r afe2960e58b7 -r 9d2c79c992d7 src/dsdv/examples/dsdv-manet.cc --- a/src/dsdv/examples/dsdv-manet.cc Thu Mar 24 15:11:56 2011 +0100 +++ b/src/dsdv/examples/dsdv-manet.cc Thu Mar 24 09:23:44 2011 -0700 @@ -32,7 +32,7 @@ #include "ns3/network-module.h" #include "ns3/applications-module.h" #include "ns3/mobility-module.h" -#include "ns3/contrib-module.h" +#include "ns3/config-store-module.h" #include "ns3/wifi-module.h" #include "ns3/internet-module.h" #include "ns3/dsdv-helper.h" diff -r afe2960e58b7 -r 9d2c79c992d7 src/flow-monitor/wscript --- a/src/flow-monitor/wscript Thu Mar 24 15:11:56 2011 +0100 +++ b/src/flow-monitor/wscript Thu Mar 24 09:23:44 2011 -0700 @@ -1,7 +1,7 @@ ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- def build(bld): - obj = bld.create_ns3_module('flow-monitor', ['internet', 'contrib']) + obj = bld.create_ns3_module('flow-monitor', ['network', 'config-store', 'tools']) obj.source = ["model/%s" % s for s in [ 'flow-monitor.cc', 'flow-classifier.cc', diff -r afe2960e58b7 -r 9d2c79c992d7 src/lte/examples/lte-device.cc --- a/src/lte/examples/lte-device.cc Thu Mar 24 15:11:56 2011 +0100 +++ b/src/lte/examples/lte-device.cc Thu Mar 24 09:23:44 2011 -0700 @@ -14,7 +14,7 @@ #include "ns3/network-module.h" #include "ns3/applications-module.h" #include "ns3/mobility-module.h" -#include "ns3/contrib-module.h" +#include "ns3/config-store-module.h" #include "ns3/internet-module.h" #include "ns3/lte-module.h" #include diff -r afe2960e58b7 -r 9d2c79c992d7 src/lte/examples/lte-multiple-flows.cc --- a/src/lte/examples/lte-multiple-flows.cc Thu Mar 24 15:11:56 2011 +0100 +++ b/src/lte/examples/lte-multiple-flows.cc Thu Mar 24 09:23:44 2011 -0700 @@ -14,7 +14,7 @@ #include "ns3/network-module.h" #include "ns3/applications-module.h" #include "ns3/mobility-module.h" -#include "ns3/contrib-module.h" +#include "ns3/config-store-module.h" #include "ns3/internet-module.h" #include "ns3/lte-module.h" #include diff -r afe2960e58b7 -r 9d2c79c992d7 src/network/utils/flow-id-tag.cc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/network/utils/flow-id-tag.cc Thu Mar 24 09:23:44 2011 -0700 @@ -0,0 +1,90 @@ +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2008 INRIA + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation; + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Author: Mathieu Lacage + */ +#include "flow-id-tag.h" + +namespace ns3 { + +NS_OBJECT_ENSURE_REGISTERED (FlowIdTag); + +TypeId +FlowIdTag::GetTypeId (void) +{ + static TypeId tid = TypeId ("ns3::FlowIdTag") + .SetParent () + .AddConstructor () + ; + return tid; +} +TypeId +FlowIdTag::GetInstanceTypeId (void) const +{ + return GetTypeId (); +} +uint32_t +FlowIdTag::GetSerializedSize (void) const +{ + return 4; +} +void +FlowIdTag::Serialize (TagBuffer buf) const +{ + buf.WriteU32 (m_flowId); +} +void +FlowIdTag::Deserialize (TagBuffer buf) +{ + m_flowId = buf.ReadU32 (); +} +void +FlowIdTag::Print (std::ostream &os) const +{ + os << "FlowId=" << m_flowId; +} +FlowIdTag::FlowIdTag () + : Tag () +{} + +FlowIdTag::FlowIdTag (uint32_t id) + : Tag (), + m_flowId (id) +{} + +void +FlowIdTag::SetFlowId (uint32_t id) +{ + m_flowId = id; +} +uint32_t +FlowIdTag::GetFlowId (void) const +{ + return m_flowId; +} + +uint32_t +FlowIdTag::AllocateFlowId (void) +{ + static uint32_t nextFlowId = 1; + uint32_t flowId = nextFlowId; + nextFlowId++; + return flowId; +} + +} // namespace ns3 + diff -r afe2960e58b7 -r 9d2c79c992d7 src/network/utils/flow-id-tag.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/network/utils/flow-id-tag.h Thu Mar 24 09:23:44 2011 -0700 @@ -0,0 +1,47 @@ +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2008 INRIA + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation; + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Author: Mathieu Lacage + */ +#ifndef FLOW_ID_TAG_H +#define FLOW_ID_TAG_H + +#include "ns3/tag.h" + +namespace ns3 { + +class FlowIdTag : public Tag +{ +public: + static TypeId GetTypeId (void); + virtual TypeId GetInstanceTypeId (void) const; + virtual uint32_t GetSerializedSize (void) const; + virtual void Serialize (TagBuffer buf) const; + virtual void Deserialize (TagBuffer buf); + virtual void Print (std::ostream &os) const; + FlowIdTag (); + FlowIdTag (uint32_t flowId); + void SetFlowId (uint32_t flowId); + uint32_t GetFlowId (void) const; + static uint32_t AllocateFlowId (void); +private: + uint32_t m_flowId; +}; + +} // namespace ns3 + +#endif /* FLOW_ID_TAG_H */ diff -r afe2960e58b7 -r 9d2c79c992d7 src/network/wscript --- a/src/network/wscript Thu Mar 24 15:11:56 2011 +0100 +++ b/src/network/wscript Thu Mar 24 09:23:44 2011 -0700 @@ -29,6 +29,7 @@ 'utils/error-model.cc', 'utils/ethernet-header.cc', 'utils/ethernet-trailer.cc', + 'utils/flow-id-tag.cc', 'utils/inet-socket-address.cc', 'utils/inet6-socket-address.cc', 'utils/ipv4-address.cc', @@ -93,6 +94,7 @@ 'utils/error-model.h', 'utils/ethernet-header.h', 'utils/ethernet-trailer.h', + 'utils/flow-id-tag.h', 'utils/inet-socket-address.h', 'utils/inet6-socket-address.h', 'utils/ipv4-address.h', diff -r afe2960e58b7 -r 9d2c79c992d7 src/olsr/examples/olsr-hna.cc --- a/src/olsr/examples/olsr-hna.cc Thu Mar 24 15:11:56 2011 +0100 +++ b/src/olsr/examples/olsr-hna.cc Thu Mar 24 09:23:44 2011 -0700 @@ -53,7 +53,7 @@ #include "ns3/core-module.h" #include "ns3/network-module.h" #include "ns3/mobility-module.h" -#include "ns3/contrib-module.h" +#include "ns3/config-store-module.h" #include "ns3/wifi-module.h" #include "ns3/csma-module.h" #include "ns3/ipv4-list-routing.h" diff -r afe2960e58b7 -r 9d2c79c992d7 src/olsr/wscript --- a/src/olsr/wscript Thu Mar 24 15:11:56 2011 +0100 +++ b/src/olsr/wscript Thu Mar 24 09:23:44 2011 -0700 @@ -1,7 +1,7 @@ ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- def build(bld): - module = bld.create_ns3_module('olsr', ['internet', 'contrib', 'point-to-point', 'wifi', 'mobility', 'applications', 'csma']) + module = bld.create_ns3_module('olsr', ['internet', 'config-store', 'tools', 'point-to-point', 'wifi', 'mobility', 'applications', 'csma']) module.includes = '.' module.source = [ 'model/olsr-header.cc', diff -r afe2960e58b7 -r 9d2c79c992d7 src/test/wscript --- a/src/test/wscript Thu Mar 24 15:11:56 2011 +0100 +++ b/src/test/wscript Thu Mar 24 09:23:44 2011 -0700 @@ -4,7 +4,7 @@ conf.sub_config('perf') def build(bld): - test = bld.create_ns3_module('test', ['internet', 'mobility', 'applications', 'csma', 'bridge', 'contrib', 'point-to-point']) + test = bld.create_ns3_module('test', ['internet', 'mobility', 'applications', 'csma', 'bridge', 'config-store', 'tools', 'point-to-point']) test.source = [ 'csma-system-test-suite.cc', 'global-routing-test-suite.cc', diff -r afe2960e58b7 -r 9d2c79c992d7 src/tools/model/average.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/tools/model/average.h Thu Mar 24 09:23:44 2011 -0700 @@ -0,0 +1,113 @@ +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2009 IITP RAS + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation; + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Authors: Pavel Boyko + * Corrections and extensions: Timo Bingmann + */ + +#ifndef AVERAGE_H +#define AVERAGE_H +#include +#include +#include +#include + +namespace ns3 { + +/// Simple average, min, max and std. deviation calculator +template +class Average +{ +public: + Average () + : m_size (0), m_min (std::numeric_limits::max ()), m_max (0), + m_avg (0), m_avg2 (0) + { + } + + /// Add new sample + void Update (T const & x) + { + m_min = std::min (x, m_min); + m_max = std::max (x, m_max); + m_avg = (m_size * m_avg + x) / (m_size + 1); + m_avg2 = (m_size * m_avg2 + x * x) / (m_size + 1); + m_size++; + } + /// Reset statistics + void Reset () + { + m_size = 0; + m_min = std::numeric_limits::max (); + m_max = 0; + m_avg = 0; + m_avg2 = 0; + } + + ///\name Sample statistics + //\{ + /// Sample size + uint32_t Count () const { return m_size; } + /// Minimum + T Min () const { return m_min; } + /// Maximum + T Max () const { return m_max; } + /// Sample average + double Avg () const { return m_avg; } + /// Estimate of mean, alias to Avg + double Mean () const { return Avg (); } + /// Unbiased estimate of variance + double Var () const { return Count() / (double)(Count() - 1) * (m_avg2 - m_avg*m_avg); } + /// Standard deviation + double Stddev () const { return sqrt (Var ());} + //\} + + /** + * \name Error of the mean estimates + * + * Note that estimates are valid for + * - uncorrelated measurements, + * - normal distribution and + * - large enough sample size. + */ + //\{ + /// Margin of error of the mean for 90% confidence level + double Error90() const { return 1.645 * sqrt (Var () / Count ()); } + /// Margin of error of the mean for 95% confidence level + double Error95() const { return 1.960 * sqrt (Var () / Count ()); } + /// Margin of error of the mean for 99% confidence level + double Error99() const { return 2.576 * sqrt (Var () / Count ()); } + //\} + +private: + uint32_t m_size; + T m_min, m_max; + double m_avg, m_avg2; +}; + +/// Print avg (err) [min, max] +template +std::ostream & operator<< (std::ostream & os, Average const & x) +{ + if (x.Count () != 0) + os << x.Avg () << " (" << x.Stddev () << ") [" << x.Min () << ", " << x.Max () << "]"; + else + os << "NA"; // not available + return os; +} +} +#endif /* AVERAGE_H */ diff -r afe2960e58b7 -r 9d2c79c992d7 src/tools/model/delay-jitter-estimation.cc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/tools/model/delay-jitter-estimation.cc Thu Mar 24 09:23:44 2011 -0700 @@ -0,0 +1,118 @@ + +#include "delay-jitter-estimation.h" +#include "ns3/tag.h" +#include "ns3/simulator.h" +#include "ns3/string.h" + +namespace ns3 { + +class DelayJitterEstimationTimestampTag : public Tag +{ +public: + DelayJitterEstimationTimestampTag (); + static TypeId GetTypeId (void); + virtual TypeId GetInstanceTypeId (void) const; + + virtual uint32_t GetSerializedSize (void) const; + virtual void Serialize (TagBuffer i) const; + virtual void Deserialize (TagBuffer i); + virtual void Print (std::ostream &os) const; + + Time GetTxTime (void) const; +private: + uint64_t m_creationTime; +}; + +DelayJitterEstimationTimestampTag::DelayJitterEstimationTimestampTag () + : m_creationTime (Simulator::Now ().GetTimeStep ()) +{} + +TypeId +DelayJitterEstimationTimestampTag::GetTypeId (void) +{ + static TypeId tid = TypeId ("anon::DelayJitterEstimationTimestampTag") + .SetParent () + .AddConstructor () + .AddAttribute ("CreationTime", + "The time at which the timestamp was created", + StringValue ("0.0s"), + MakeTimeAccessor (&DelayJitterEstimationTimestampTag::GetTxTime), + MakeTimeChecker ()) + ; + return tid; +} +TypeId +DelayJitterEstimationTimestampTag::GetInstanceTypeId (void) const +{ + return GetTypeId (); +} + +uint32_t +DelayJitterEstimationTimestampTag::GetSerializedSize (void) const +{ + return 8; +} +void +DelayJitterEstimationTimestampTag::Serialize (TagBuffer i) const +{ + i.WriteU64 (m_creationTime); +} +void +DelayJitterEstimationTimestampTag::Deserialize (TagBuffer i) +{ + m_creationTime = i.ReadU64 (); +} +void +DelayJitterEstimationTimestampTag::Print (std::ostream &os) const +{ + os << "CreationTime=" << m_creationTime; +} +Time +DelayJitterEstimationTimestampTag::GetTxTime (void) const +{ + return TimeStep (m_creationTime); +} + +DelayJitterEstimation::DelayJitterEstimation () + : m_previousRx (Simulator::Now ()), + m_previousRxTx (Simulator::Now ()), + m_jitter (Seconds (0.0)), + m_delay (Seconds (0.0)) +{} +void +DelayJitterEstimation::PrepareTx (Ptr packet) +{ + DelayJitterEstimationTimestampTag tag; + packet->AddByteTag (tag); +} +void +DelayJitterEstimation::RecordRx (Ptr packet) +{ + DelayJitterEstimationTimestampTag tag; + bool found; + found = packet->FindFirstMatchingByteTag (tag); + if (!found) + { + return; + } + tag.GetTxTime (); + + Time delta = (Simulator::Now () - m_previousRx) - (tag.GetTxTime () - m_previousRxTx); + m_jitter += (Abs (delta) - m_jitter ) / Scalar (16.0); + m_previousRx = Simulator::Now (); + m_previousRxTx = tag.GetTxTime (); + m_delay = Simulator::Now () - tag.GetTxTime (); +} + +Time +DelayJitterEstimation::GetLastDelay (void) const +{ + return m_delay; +} +Time +DelayJitterEstimation::GetLastJitter (void) const +{ + return m_jitter; +} + +} // namespace ns3 diff -r afe2960e58b7 -r 9d2c79c992d7 src/tools/model/delay-jitter-estimation.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/tools/model/delay-jitter-estimation.h Thu Mar 24 09:23:44 2011 -0700 @@ -0,0 +1,59 @@ +#ifndef DELAY_JITTER_ESTIMATION_H +#define DELAY_JITTER_ESTIMATION_H + +#include "ns3/nstime.h" +#include "ns3/packet.h" + +namespace ns3 { + +/** + * \brief quick and dirty delay and jitter estimation + * + */ +class DelayJitterEstimation +{ +public: + DelayJitterEstimation (); + + /** + * \param packet the packet to send over a wire + * + * This method should be invoked once on each packet to + * record within the packet the tx time which is used upon + * packet reception to calculate the delay and jitter. The + * tx time is stored in the packet as an ns3::Tag which means + * that it does not use any network resources and is not + * taken into account in transmission delay calculations. + */ + static void PrepareTx (Ptr packet); + /** + * \param packet the packet received + * + * Invoke this method to update the delay and jitter calculations + * After a call to this method, \ref GetLastDelay and \ref GetLastJitter + * will return an updated delay and jitter. + */ + void RecordRx (Ptr packet); + + /** + * \returns the updated delay. + */ + Time GetLastDelay (void) const; + /** + * The jitter is calculated using the RFC 1889 (RTP) jitter + * definition. + * + * \returns the updated jitter. + */ + Time GetLastJitter (void) const; + +private: + Time m_previousRx; + Time m_previousRxTx; + Time m_jitter; + Time m_delay; +}; + +} // namespace ns3 + +#endif /* DELAY_JITTER_ESTIMATION_H */ diff -r afe2960e58b7 -r 9d2c79c992d7 src/tools/model/event-garbage-collector.cc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/tools/model/event-garbage-collector.cc Thu Mar 24 09:23:44 2011 -0700 @@ -0,0 +1,155 @@ +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2007 INESC Porto + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation; + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Author: Gustavo J. A. M. Carneiro + */ +#include "event-garbage-collector.h" + +#define CLEANUP_CHUNK_MIN_SIZE 8 +#define CLEANUP_CHUNK_MAX_SIZE 128 + + +namespace ns3 { + + +EventGarbageCollector::EventGarbageCollector () : + m_nextCleanupSize (CLEANUP_CHUNK_MIN_SIZE) +{} + +void +EventGarbageCollector::Track (EventId event) +{ + m_events.insert (event); + if (m_events.size () >= m_nextCleanupSize) + Cleanup (); +} + +void +EventGarbageCollector::Grow () +{ + m_nextCleanupSize += (m_nextCleanupSize < CLEANUP_CHUNK_MAX_SIZE? + m_nextCleanupSize : CLEANUP_CHUNK_MAX_SIZE); +} + +void +EventGarbageCollector::Shrink () +{ + while (m_nextCleanupSize > m_events.size ()) + m_nextCleanupSize >>= 1; + Grow (); +} + +// Called when a new event was added and the cleanup limit was exceeded in consequence. +void +EventGarbageCollector::Cleanup () +{ + for (EventList::iterator iter = m_events.begin (); iter != m_events.end ();) + { + if ((*iter).IsExpired ()) + { + m_events.erase (iter++); + } + else + break; // EventIds are sorted by timestamp => further events are not expired for sure + } + + // If after cleanup we are still over the limit, increase the limit. + if (m_events.size () >= m_nextCleanupSize) + Grow (); + else + Shrink (); +} + + +EventGarbageCollector::~EventGarbageCollector () +{ + for (EventList::iterator event = m_events.begin (); + event != m_events.end (); event++) + { + Simulator::Cancel (*event); + } +} + +} // namespace ns3 + + +#include "ns3/test.h" + +namespace ns3 { + +class EventGarbageCollectorTestCase : public TestCase +{ + int m_counter; + EventGarbageCollector *m_events; + + void EventGarbageCollectorCallback (); + +public: + + EventGarbageCollectorTestCase (); + virtual ~EventGarbageCollectorTestCase (); + virtual void DoRun (void); +}; + +EventGarbageCollectorTestCase::EventGarbageCollectorTestCase () + : TestCase ("EventGarbageCollector"), m_counter (0), m_events (0) +{} + +EventGarbageCollectorTestCase::~EventGarbageCollectorTestCase () +{} + +void +EventGarbageCollectorTestCase::EventGarbageCollectorCallback () +{ + m_counter++; + if (m_counter == 50) + { + // this should cause the remaining (50) events to be cancelled + delete m_events; + m_events = 0; + } +} + +void EventGarbageCollectorTestCase::DoRun (void) +{ + m_events = new EventGarbageCollector (); + + for (int n = 0; n < 100; n++) + { + m_events->Track (Simulator::Schedule + (Simulator::Now (), + &EventGarbageCollectorTestCase::EventGarbageCollectorCallback, + this)); + } + Simulator::Run (); + NS_TEST_EXPECT_MSG_EQ (m_events, 0, ""); + NS_TEST_EXPECT_MSG_EQ (m_counter, 50, ""); + Simulator::Destroy (); +} + +static class EventGarbageCollectorTestSuite : public TestSuite +{ +public: + EventGarbageCollectorTestSuite () + : TestSuite ("event-garbage-collector", UNIT) + { + AddTestCase (new EventGarbageCollectorTestCase ()); + } +} g_eventGarbageCollectorTests; + +} + diff -r afe2960e58b7 -r 9d2c79c992d7 src/tools/model/event-garbage-collector.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/tools/model/event-garbage-collector.h Thu Mar 24 09:23:44 2011 -0700 @@ -0,0 +1,71 @@ +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2007 INESC Porto + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation; + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Author: Gustavo J. A. M. Carneiro + */ +#ifndef EVENT_GARBAGE_COLLECTOR_H +#define EVENT_GARBAGE_COLLECTOR_H + +#include +#include "ns3/event-id.h" +#include "ns3/simulator.h" + +namespace ns3 { + +/** + * \brief An object that tracks scheduled events and automatically + * cancels them when it is destroyed. It is useful in situations + * where multiple instances of the same type of event can + * simultaneously be scheduled, and when the events should be limited + * to the lifetime of a container object. + */ +class EventGarbageCollector +{ +public: + + EventGarbageCollector (); + + /** + * \brief Tracks a new event + */ + void Track (EventId event); + + ~EventGarbageCollector (); + +private: + + struct EventIdLessThanTs + { + bool operator () (const EventId &a, const EventId &b) const + { + return (a.GetTs () < b.GetTs ()); + } + }; + + typedef std::multiset EventList; + + EventList::size_type m_nextCleanupSize; + EventList m_events; + + void Cleanup (); + void Grow (); + void Shrink (); +}; + +}; // namespace ns3 + +#endif /* EVENT_GARBAGE_COLLECTOR_H */ diff -r afe2960e58b7 -r 9d2c79c992d7 src/tools/model/gnuplot.cc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/tools/model/gnuplot.cc Thu Mar 24 09:23:44 2011 -0700 @@ -0,0 +1,733 @@ +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2007 INRIA, 2008 Timo Bingmann + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation; + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Original Author: Mathieu Lacage + * Enhancements: Timo Bingmann + */ +#include "gnuplot.h" +#include "ns3/assert.h" +#include +#include + +namespace ns3 { + +// --- GnuplotDataset::Data ------------------------------------------------ // + +struct GnuplotDataset::Data +{ + // *** Data Variables *** + + unsigned int m_references; + + std::string m_title; + std::string m_extra; + + /** + * Initializes the reference counter to 1 and sets m_title and m_extra. + */ + Data(const std::string& title); + + /// Required. + virtual ~Data(); + + /** + * Returns "plot" or "splot". + */ + virtual std::string GetCommand() const = 0; + + /** + * Prints the plot description used as argument to (s)plot. Either the + * function expression or a datafile description. Should include m_title and + * m_extra in the output. + */ + virtual void PrintExpression(std::ostream &os) const = 0; + + /** + * Print the inline data file contents trailing the plot command. Empty for + * functions. + */ + virtual void PrintDatafile(std::ostream &os) const = 0; +}; + +GnuplotDataset::Data::Data(const std::string& title) + : m_references(1), + m_title(title), + m_extra(m_defaultExtra) +{ +} + +GnuplotDataset::Data::~Data() +{ +} + +// --- GnuplotDataset ------------------------------------------------------ // + +std::string GnuplotDataset::m_defaultExtra = ""; + +GnuplotDataset::GnuplotDataset (struct Data* data) + : m_data(data) +{ +} + +GnuplotDataset::GnuplotDataset (const GnuplotDataset& original) + : m_data(original.m_data) +{ + ++m_data->m_references; +} + +GnuplotDataset::~GnuplotDataset() +{ + if (--m_data->m_references == 0) + delete m_data; +} + +GnuplotDataset& GnuplotDataset::operator= (const GnuplotDataset& original) +{ + if (this != &original) + { + if (--m_data->m_references == 0) + delete m_data; + + m_data = original.m_data; + ++m_data->m_references; + } + return *this; +} + +void +GnuplotDataset::SetTitle (const std::string& title) +{ + m_data->m_title = title; +} + +void +GnuplotDataset::SetDefaultExtra (const std::string& extra) +{ + m_defaultExtra = extra; +} +void +GnuplotDataset::SetExtra (const std::string& extra) +{ + m_data->m_extra = extra; +} + +// --- Gnuplot2dDataset::Data2d -------------------------------------------- // + +struct Gnuplot2dDataset::Data2d : public GnuplotDataset::Data +{ + // *** Data Variables *** + + enum Style m_style; + enum ErrorBars m_errorBars; + + PointSet m_pointset; + + /** + * Initializes with the values from m_defaultStyle and m_defaultErrorBars. + */ + Data2d(const std::string& title); + + virtual std::string GetCommand() const; + virtual void PrintExpression(std::ostream &os) const; + virtual void PrintDatafile(std::ostream &os) const; +}; + +Gnuplot2dDataset::Data2d::Data2d(const std::string& title) + : Data(title), + m_style(m_defaultStyle), + m_errorBars(m_defaultErrorBars) +{ +} + +std::string +Gnuplot2dDataset::Data2d::GetCommand() const +{ + return "plot"; +} + +void +Gnuplot2dDataset::Data2d::PrintExpression(std::ostream &os) const +{ + os << "'-' "; + + if (m_title.size()) + os << " title '" << m_title << "'"; + + switch (m_style) { + case LINES: + os << " with lines"; + break; + case POINTS: + switch (m_errorBars) + { + case NONE: + os << " with points"; + break; + case X: + os << " with xerrorbars"; + break; + case Y: + os << " with yerrorbars"; + break; + case XY: + os << " with xyerrorbars"; + break; + } + break; + case LINES_POINTS: + switch (m_errorBars) + { + case NONE: + os << " with linespoints"; + break; + case X: + os << " with errorlines"; + break; + case Y: + os << " with yerrorlines"; + break; + case XY: + os << " with xyerrorlines"; + break; + } + break; + case DOTS: + os << " with dots"; + break; + case IMPULSES: + os << " with impulses"; + break; + case STEPS: + os << " with steps"; + break; + case FSTEPS: + os << " with fsteps"; + break; + case HISTEPS: + os << " with histeps"; + break; + } + + if (m_extra.size()) + os << " " << m_extra; +} + +void +Gnuplot2dDataset::Data2d::PrintDatafile(std::ostream &os) const +{ + for (PointSet::const_iterator i = m_pointset.begin (); + i != m_pointset.end (); ++i) + { + if (i->empty) { + os << std::endl; + continue; + } + + switch (m_errorBars) { + case NONE: + os << i->x << " " << i->y << std::endl; + break; + case X: + os << i->x << " " << i->y << " " << i->dx << std::endl; + break; + case Y: + os << i->x << " " << i->y << " " << i->dy << std::endl; + break; + case XY: + os << i->x << " " << i->y << " " << i->dx << " " << i->dy << std::endl; + break; + } + } + os << "e" << std::endl; +} + +// --- Gnuplot2dDataset ---------------------------------------------------- // + +enum Gnuplot2dDataset::Style Gnuplot2dDataset::m_defaultStyle = LINES; +enum Gnuplot2dDataset::ErrorBars Gnuplot2dDataset::m_defaultErrorBars = NONE; + +Gnuplot2dDataset::Gnuplot2dDataset (const std::string& title) + : GnuplotDataset( new Data2d(title) ) +{ +} + +void +Gnuplot2dDataset::SetDefaultStyle (enum Style style) +{ + m_defaultStyle = style; +} +void +Gnuplot2dDataset::SetStyle (enum Style style) +{ + reinterpret_cast(m_data)->m_style = style; +} + +void +Gnuplot2dDataset::SetDefaultErrorBars (enum ErrorBars errorBars) +{ + m_defaultErrorBars = errorBars; +} +void +Gnuplot2dDataset::SetErrorBars (enum ErrorBars errorBars) +{ + reinterpret_cast(m_data)->m_errorBars = errorBars; +} + +void +Gnuplot2dDataset::Add (double x, double y) +{ + NS_ASSERT (reinterpret_cast(m_data)->m_errorBars == NONE); + + struct Point data; + data.empty = false; + data.x = x; + data.y = y; + data.dx = 0.0; + data.dy = 0.0; + reinterpret_cast(m_data)->m_pointset.push_back (data); +} + +void +Gnuplot2dDataset::Add (double x, double y, double errorDelta) +{ + NS_ASSERT ( reinterpret_cast(m_data)->m_errorBars == X || + reinterpret_cast(m_data)->m_errorBars == Y ); + + struct Point data; + data.empty = false; + data.x = x; + data.y = y; + data.dx = errorDelta; + data.dy = errorDelta; + reinterpret_cast(m_data)->m_pointset.push_back (data); +} + +void +Gnuplot2dDataset::Add (double x, double y, double minY, double maxY) +{ + NS_ASSERT ( reinterpret_cast(m_data)->m_errorBars == X || + reinterpret_cast(m_data)->m_errorBars == Y ); + + struct Point data; + data.empty = false; + data.x = x; + data.y = y; + data.dx = minY; + data.dy = maxY; + reinterpret_cast(m_data)->m_pointset.push_back (data); +} + +void +Gnuplot2dDataset::AddEmptyLine() +{ + struct Point data; + data.empty = true; + reinterpret_cast(m_data)->m_pointset.push_back (data); +} + +// --- Gnuplot2dFunction::Function2d --------------------------------------- // + +struct Gnuplot2dFunction::Function2d : public GnuplotDataset::Data +{ + // *** Data Variables *** + + std::string m_function; + + /** + * Initializes with the function and title. + */ + Function2d(const std::string& title, const std::string& function); + + virtual std::string GetCommand() const; + virtual void PrintExpression(std::ostream &os) const; + virtual void PrintDatafile(std::ostream &os) const; +}; + +Gnuplot2dFunction::Function2d::Function2d(const std::string& title, const std::string& function) + : Data(title), + m_function(function) +{ +} + +std::string +Gnuplot2dFunction::Function2d::GetCommand() const +{ + return "plot"; +} + +void +Gnuplot2dFunction::Function2d::PrintExpression(std::ostream &os) const +{ + os << m_function; + + if (m_title.size()) + os << " title '" << m_title << "'"; + + if (m_extra.size()) + os << " " << m_extra; +} + +void +Gnuplot2dFunction::Function2d::PrintDatafile(std::ostream &os) const +{ +} + +// --- Gnuplot2dFunction --------------------------------------------------- // + +Gnuplot2dFunction::Gnuplot2dFunction (const std::string& title, const std::string& function) + : GnuplotDataset( new Function2d(title, function) ) +{ +} + +void +Gnuplot2dFunction::SetFunction (const std::string& function) +{ + reinterpret_cast(m_data)->m_function = function; +} + +// --- Gnuplot3dDataset::Data3d -------------------------------------------- // + +struct Gnuplot3dDataset::Data3d : public GnuplotDataset::Data +{ + // *** Data Variables *** + + std::string m_style; + + PointSet m_pointset; + + /** + * Initializes with value from m_defaultStyle. + */ + Data3d(const std::string& title); + + virtual std::string GetCommand() const; + virtual void PrintExpression(std::ostream &os) const; + virtual void PrintDatafile(std::ostream &os) const; +}; + +Gnuplot3dDataset::Data3d::Data3d(const std::string& title) + : Data(title), + m_style(m_defaultStyle) +{ +} + +std::string +Gnuplot3dDataset::Data3d::GetCommand() const +{ + return "splot"; +} + +void +Gnuplot3dDataset::Data3d::PrintExpression(std::ostream &os) const +{ + os << "'-' "; + + if (m_style.size()) + os << " " << m_style; + + if (m_title.size()) + os << " title '" << m_title << "'"; + + if (m_extra.size()) + os << " " << m_extra; +} + +void +Gnuplot3dDataset::Data3d::PrintDatafile(std::ostream &os) const +{ + for (PointSet::const_iterator i = m_pointset.begin (); + i != m_pointset.end (); ++i) + { + if (i->empty) { + os << std::endl; + continue; + } + + os << i->x << " " << i->y << " " << i->z << std::endl; + } + os << "e" << std::endl; +} + +// --- Gnuplot3dDataset ---------------------------------------------------- // + +std::string Gnuplot3dDataset::m_defaultStyle = ""; + +Gnuplot3dDataset::Gnuplot3dDataset (const std::string& title) + : GnuplotDataset( new Data3d(title) ) +{ +} + +void +Gnuplot3dDataset::SetDefaultStyle (const std::string& style) +{ + m_defaultStyle = style; +} +void +Gnuplot3dDataset::SetStyle (const std::string& style) +{ + reinterpret_cast(m_data)->m_style = style; +} + +void +Gnuplot3dDataset::Add (double x, double y, double z) +{ + struct Point data; + data.empty = false; + data.x = x; + data.y = y; + data.z = z; + reinterpret_cast(m_data)->m_pointset.push_back (data); +} + +void +Gnuplot3dDataset::AddEmptyLine() +{ + struct Point data; + data.empty = true; + reinterpret_cast(m_data)->m_pointset.push_back (data); +} + +// --- Gnuplot3dFunction::Function3d --------------------------------------- // + +struct Gnuplot3dFunction::Function3d : public GnuplotDataset::Data +{ + // *** Data Variables *** + + std::string m_function; + + /** + * Initializes with the function and title. + */ + Function3d(const std::string& title, const std::string& function); + + virtual std::string GetCommand() const; + virtual void PrintExpression(std::ostream &os) const; + virtual void PrintDatafile(std::ostream &os) const; +}; + +Gnuplot3dFunction::Function3d::Function3d(const std::string& title, const std::string& function) + : Data(title), + m_function(function) +{ +} + +std::string +Gnuplot3dFunction::Function3d::GetCommand() const +{ + return "splot"; +} + +void +Gnuplot3dFunction::Function3d::PrintExpression(std::ostream &os) const +{ + os << m_function; + + if (m_title.size()) + os << " title '" << m_title << "'"; + + if (m_extra.size()) + os << " " << m_extra; +} + +void +Gnuplot3dFunction::Function3d::PrintDatafile(std::ostream &os) const +{ +} + +// --- Gnuplot3dFunction --------------------------------------------------- // + +Gnuplot3dFunction::Gnuplot3dFunction (const std::string& title, const std::string& function) + : GnuplotDataset( new Function3d(title, function) ) +{ +} + +void +Gnuplot3dFunction::SetFunction (const std::string& function) +{ + reinterpret_cast(m_data)->m_function = function; +} + +// ------------------------------------------------------------------------- // + +Gnuplot::Gnuplot (const std::string& outputFilename, const std::string& title) + : m_outputFilename(outputFilename), + m_terminal( DetectTerminal(outputFilename) ), + m_title(title) +{ +} + +std::string Gnuplot::DetectTerminal (const std::string& filename) +{ + std::string::size_type dotpos = filename.rfind('.'); + if (dotpos == std::string::npos) return ""; + + if (filename.substr(dotpos) == ".png") { + return "png"; + } + else if (filename.substr(dotpos) == ".pdf") { + return "pdf"; + } + + return ""; +} + +void +Gnuplot::SetTerminal (const std::string& terminal) +{ + m_terminal = terminal; +} + +void +Gnuplot::SetTitle (const std::string& title) +{ + m_title = title; +} + +void +Gnuplot::SetLegend (const std::string& xLegend, const std::string& yLegend) +{ + m_xLegend = xLegend; + m_yLegend = yLegend; +} + +void +Gnuplot::SetExtra (const std::string& extra) +{ + m_extra = extra; +} + +void +Gnuplot::AppendExtra (const std::string& extra) +{ + m_extra += "\n"; + m_extra += extra; +} + +void +Gnuplot::AddDataset (const GnuplotDataset& dataset) +{ + m_datasets.push_back (dataset); +} + +void +Gnuplot::GenerateOutput (std::ostream &os) const +{ + if (m_terminal.size()) + os << "set terminal " << m_terminal << std::endl; + + if (m_outputFilename.size()) + os << "set output '" << m_outputFilename << "'" << std::endl; + + if (m_title.size()) + os << "set title '" << m_title << "'" << std::endl; + + if (m_xLegend.size()) + os << "set xlabel '" << m_xLegend << "'" << std::endl; + + if (m_yLegend.size()) + os << "set ylabel '" << m_yLegend << "'" << std::endl; + + if (m_extra.size()) + os << m_extra << std::endl; + + if (m_datasets.empty()) + return; + + // Determine the GetCommand() values of all datasets included. Check that all + // are equal and print the command. + + std::string command = m_datasets.begin()->m_data->GetCommand(); + + for (Datasets::const_iterator i = m_datasets.begin () + 1; + i != m_datasets.end (); ++i) + { + NS_ASSERT_MSG(command == i->m_data->GetCommand(), + "Cannot mix 'plot' and 'splot' GnuplotDatasets."); + } + + os << command << " "; + + // Print all dataset expressions + + for (Datasets::const_iterator i = m_datasets.begin (); i != m_datasets.end ();) + { + i->m_data->PrintExpression(os); + + i++; + + if (i != m_datasets.end ()) + { + os << ", "; + } + } + os << std::endl; + + // followed by the inline datafile. + + for (Datasets::const_iterator i = m_datasets.begin (); i != m_datasets.end (); i++) + { + i->m_data->PrintDatafile(os); + } +} + +// ------------------------------------------------------------------------- // + +GnuplotCollection::GnuplotCollection (const std::string& outputFilename) + : m_outputFilename(outputFilename), + m_terminal( Gnuplot::DetectTerminal(outputFilename) ) +{ +} + +void +GnuplotCollection::SetTerminal (const std::string& terminal) +{ + m_terminal = terminal; +} + +void +GnuplotCollection::AddPlot (const Gnuplot& plot) +{ + m_plots.push_back (plot); +} + +Gnuplot& +GnuplotCollection::GetPlot(unsigned int id) +{ + if (id >= m_plots.size()) + throw(std::range_error("Gnuplot id is out of range")); + else + return m_plots[id]; +} + +void +GnuplotCollection::GenerateOutput (std::ostream &os) const +{ + if (m_terminal.size()) + os << "set terminal " << m_terminal << std::endl; + + if (m_outputFilename.size()) + os << "set output '" << m_outputFilename << "'" << std::endl; + + for (Plots::const_iterator i = m_plots.begin (); i != m_plots.end (); ++i) + { + i->GenerateOutput (os); + } +} + +// ------------------------------------------------------------------------- // + +} // namespace ns3 diff -r afe2960e58b7 -r 9d2c79c992d7 src/tools/model/gnuplot.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/tools/model/gnuplot.h Thu Mar 24 09:23:44 2011 -0700 @@ -0,0 +1,460 @@ +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2007 INRIA, 2008 Timo Bingmann + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation; + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Original Author: Mathieu Lacage + * Enhancements: Timo Bingmann + */ +#ifndef GNUPLOT_H +#define GNUPLOT_H + +#include +#include +#include + +namespace ns3 { + +/** + * \brief Abstract class to store a plot line to be used by ns3::Gnuplot. + * + * This class contains a reference counted data object in m_data. The data + * object contains different structs derived from struct Data by subclasses. + */ +class GnuplotDataset +{ +public: + + /** + * Reference-counting copy constructor. + */ + GnuplotDataset (const GnuplotDataset& original); + + /** + * Reference-counting destructor. + */ + ~GnuplotDataset(); + + /** + * Reference-counting assignment operator. + */ + GnuplotDataset& operator= (const GnuplotDataset& original); + + /** + * \brief Change line title. + * \param title the new title string to use for this dataset. + */ + void SetTitle (const std::string& title); + + /** + * \brief Change extra formatting style parameters for newly created objects. + * \param extra extra formatting + */ + static void SetDefaultExtra (const std::string& extra); + + /** + * \brief Add extra formatting parameters to this dataset. + * \param extra extra formatting + */ + void SetExtra (const std::string& extra); + +protected: + + /// Friend because it accesses m_data and it's virtual functions directly in + /// GenerateOutput(). + friend class Gnuplot; + + /** + * \brief Extra gnuplot parameters set on every newly created dataset. + */ + static std::string m_defaultExtra; + + /** + * \brief Derived classes subclass this struct and add their own data fields. + */ + struct Data; + + /** + * Called by constructors of derived classes. + * \param data the reference counted data object representing this dataset. + */ + GnuplotDataset (struct Data* data); + + /** + * Reference counted data object. + */ + struct Data* m_data; +}; + +/** + * \brief Class to represent a 2D points plot. Set the line or points style + * using SetStyle() and set points using Add(). + */ +class Gnuplot2dDataset : public GnuplotDataset +{ +public: + /** + * The plotting style to use for this dataset. + */ + enum Style { + LINES, + POINTS, + LINES_POINTS, + DOTS, + IMPULSES, + STEPS, + FSTEPS, + HISTEPS, + }; + + /** + * Whether errorbars should be used for this dataset. + */ + enum ErrorBars { + NONE, + X, + Y, + XY + }; + + /** + * \param title the title to be associated to this dataset. + * + * Create an empty dataset. Usually, the dataset's title is + * displayed in the legend box. + */ + Gnuplot2dDataset (const std::string& title = "Untitled"); + + /** + * Change default style for all newly created objects. + * \param style the style of plotting to use for newly created datasets. + */ + static void SetDefaultStyle (enum Style style); + + /** + * \param style the style of plotting to use for this dataset. + */ + void SetStyle (enum Style style); + + /** + * Change default errorbars style for all newly created objects. + * \param errorBars the style of errorbars to use for newly created datasets. + */ + static void SetDefaultErrorBars (enum ErrorBars errorBars); + + /** + * \param errorBars the style of errorbars to display. + * + * If you use any style other than none, you need + * to make sure you store the delta information in + * this dataset with the right GnuplotDataset::Add + * method. + */ + void SetErrorBars (enum ErrorBars errorBars); + + /** + * \param x x coord to new data point + * \param y y coord to new data point + * + * Use this method with error bar style NONE. + */ + void Add (double x, double y); + + /** + * \param x x coord to new data point + * \param y y coord to new data point + * \param errorDelta data point error range. + * + * Use this method with error bar style X or Y. + */ + void Add (double x, double y, double errorDelta); + + /** + * \param x x coord to new data point + * \param y y coord to new data point + * \param minY minimum error data point + * \param maxY maximum error data point + * + * Use this method with error bar style X or Y. + */ + void Add (double x, double y, double minY, double maxY); + + /** + * Add an empty line in the data output sequence. Empty lines in the plot + * data break continuous lines and do other things in the output. + */ + void AddEmptyLine(); + +private: + + struct Point { + bool empty; + double x; + double y; + double dx; + double dy; + }; + + typedef std::vector PointSet; + + static enum Style m_defaultStyle; + static enum ErrorBars m_defaultErrorBars; + + /// Forward declaration of the internal data class. + struct Data2d; +}; + +/** + * \brief Class to represent a 2D function expression plot. + * + * Since the function expression is not escaped, styles and extras could just + * as well be included in the expression string. + */ +class Gnuplot2dFunction : public GnuplotDataset +{ +public: + /** + * \param title the title to be associated to this dataset. + * \param function function to plot + * + * Create an function dataset. Usually, the dataset's title is displayed in + * the legend box. + */ + Gnuplot2dFunction (const std::string& title = "Untitled", const std::string& function = ""); + + /** + * \param function new function string to set + */ + void SetFunction (const std::string& function); + +private: + + /// Forward declaration of the internal data class. + struct Function2d; +}; + +/** + * \brief Class to represent a 3D points plot. Set the line or points style + * using SetStyle() and set points using Add(). + */ +class Gnuplot3dDataset : public GnuplotDataset +{ +public: + /** + * \param title the title to be associated to this dataset. + * + * Create an empty dataset. Usually, the dataset's title is + * displayed in the legend box. + */ + Gnuplot3dDataset (const std::string& title = "Untitled"); + + /** + * Change default style for all newly created objects. + * \param style the style of plotting to use for newly created datasets. + */ + static void SetDefaultStyle (const std::string& style); + + /** + * \param style the style of plotting to use for this dataset. + */ + void SetStyle (const std::string& style); + + /** + * \param x x coord to new data point + * \param y y coord to new data point + * \param z z coord to new data point + * + * Use this method to add a new 3D point + */ + void Add (double x, double y, double z); + + /** + * Add an empty line in the data output sequence. Empty lines in the plot + * data break continuous lines and do other things in the output. + */ + void AddEmptyLine(); + +private: + + struct Point { + bool empty; + double x, y, z; + }; + + typedef std::vector PointSet; + + static std::string m_defaultStyle; + + /// Forward declaration of the internal data class. + struct Data3d; +}; + +/** + * \brief Class to represent a 3D function expression plot. + * + * Since the function expression is not escaped, styles and extras could just as + * well be included in the expression string. The only difference to + * Gnuplot2dFunction is the splot command string. + */ +class Gnuplot3dFunction : public GnuplotDataset +{ +public: + /** + * \param title the title to be associated to this dataset. + * \param function function to plot + * + * Create an function dataset. Usually, the dataset's title is displayed in + * the legend box. + */ + Gnuplot3dFunction (const std::string& title = "Untitled", const std::string& function = ""); + + /** + * \param function new function string to set + */ + void SetFunction (const std::string& function); + +private: + + /// Forward declaration of the internal data class. + struct Function3d; +}; + +/** + * \brief a simple class to generate gnuplot-ready plotting commands + * from a set of datasets. + * + * This class really represents a single graph on which multiple datasets + * can be plotted. + */ +class Gnuplot +{ +public: + /** + * \param outputFilename the name of the file where the rendering of the + * graph will be generated if you feed the command stream output by + * Gnuplot::GenerateOutput to the gnuplot program. + * \param title title line of the plot page + */ + Gnuplot (const std::string& outputFilename="", const std::string& title = ""); + + /** + * Crude attempt to auto-detect the correct terminal setting by inspecting + * the filename's extension. + * \param filename output file name + */ + static std::string DetectTerminal(const std::string& filename); + + /** + * \param terminal terminal setting string for output. The default terminal + * string is "png" + */ + void SetTerminal (const std::string& terminal); + + /** + * \param title set new plot title string to use for this plot. + */ + void SetTitle (const std::string& title); + + /** + * \param xLegend the legend for the x horizontal axis + * \param yLegend the legend for the y vertical axis + */ + void SetLegend (const std::string& xLegend, const std::string& yLegend); + + /** + * \param extra set extra gnuplot directive for output. + */ + void SetExtra (const std::string& extra); + + /** + * \param extra append extra gnuplot directive for output. + */ + void AppendExtra (const std::string& extra); + + /** + * \param dataset add a dataset to the graph to be plotted. + */ + void AddDataset (const GnuplotDataset& dataset); + + /** + * \param os the output stream on which the relevant gnuplot commands should + * be generated. Including output file and terminal headers. + */ + void GenerateOutput (std::ostream &os) const; + +private: + typedef std::vector Datasets; + + std::string m_outputFilename; + std::string m_terminal; + + Datasets m_datasets; + + std::string m_title; + std::string m_xLegend; + std::string m_yLegend; + std::string m_extra; +}; + +/** + * \brief a simple class to group together multiple gnuplots into one file, + * e.g. for PDF multi-page output terminals. + */ +class GnuplotCollection +{ +public: + /** + * \param outputFilename the name of the file where the rendering of the + * graph will be generated if you feed the command stream output by + * GnuplotCollection::GenerateOutput to the gnuplot program. + */ + GnuplotCollection (const std::string& outputFilename); + + /** + * \param terminal terminal setting string for output. The default terminal + * string is guessed from the output filename's extension. + */ + void SetTerminal (const std::string& terminal); + + /** + * \param plot add a plot to the collection to be plotted. + */ + void AddPlot (const Gnuplot& plot); + + /** + * Return a pointer to one of the added plots. + * \param id index of plot to return + * \return reference to plot, throws std::range_error if it does not exist. + */ + Gnuplot& GetPlot(unsigned int id); + + /** + * \param os the output stream on which the relevant gnuplot commands should + * be generated. + */ + void GenerateOutput (std::ostream &os) const; + +private: + typedef std::vector Plots; + + std::string m_outputFilename; + std::string m_terminal; + + Plots m_plots; +}; + +} // namespace ns3 + +#endif /* GNUPLOT_H */ diff -r afe2960e58b7 -r 9d2c79c992d7 src/tools/wscript --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/tools/wscript Thu Mar 24 09:23:44 2011 -0700 @@ -0,0 +1,21 @@ +## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- + +def build(bld): + + module = bld.create_ns3_module('tools', ['network']) + module.source = [ + 'model/event-garbage-collector.cc', + 'model/gnuplot.cc', + 'model/delay-jitter-estimation.cc', + ] + + headers = bld.new_task_gen('ns3header') + headers.module = 'tools' + headers.source = [ + 'model/average.h', + 'model/event-garbage-collector.h', + 'model/gnuplot.h', + 'model/delay-jitter-estimation.h', + ] + + bld.ns3_python_bindings() diff -r afe2960e58b7 -r 9d2c79c992d7 src/uan/examples/uan-cw-example.cc --- a/src/uan/examples/uan-cw-example.cc Thu Mar 24 15:11:56 2011 +0100 +++ b/src/uan/examples/uan-cw-example.cc Thu Mar 24 09:23:44 2011 -0700 @@ -40,7 +40,7 @@ #include "ns3/core-module.h" #include "ns3/network-module.h" #include "ns3/mobility-module.h" -#include "ns3/contrib-module.h" +#include "ns3/tools-module.h" #include "ns3/applications-module.h" #include diff -r afe2960e58b7 -r 9d2c79c992d7 src/uan/examples/uan-cw-example.h --- a/src/uan/examples/uan-cw-example.h Thu Mar 24 15:11:56 2011 +0100 +++ b/src/uan/examples/uan-cw-example.h Thu Mar 24 09:23:44 2011 -0700 @@ -22,7 +22,7 @@ #define UANCWEXAMPLE_H #include "ns3/network-module.h" -#include "ns3/contrib-module.h" +#include "ns3/tools-module.h" #include "ns3/uan-module.h" using namespace ns3; diff -r afe2960e58b7 -r 9d2c79c992d7 src/uan/examples/uan-rc-example.cc --- a/src/uan/examples/uan-rc-example.cc Thu Mar 24 15:11:56 2011 +0100 +++ b/src/uan/examples/uan-rc-example.cc Thu Mar 24 09:23:44 2011 -0700 @@ -59,7 +59,7 @@ #include "ns3/log.h" #include "ns3/config.h" #include "ns3/callback.h" -#include "ns3/contrib-module.h" +#include "ns3/tools-module.h" #include diff -r afe2960e58b7 -r 9d2c79c992d7 src/uan/examples/uan-rc-example.h --- a/src/uan/examples/uan-rc-example.h Thu Mar 24 15:11:56 2011 +0100 +++ b/src/uan/examples/uan-rc-example.h Thu Mar 24 09:23:44 2011 -0700 @@ -22,7 +22,7 @@ #define UANRCEXAMPLE_H #include "ns3/network-module.h" -#include "ns3/contrib-module.h" +#include "ns3/tools-module.h" #include "ns3/uan-module.h" using namespace ns3; diff -r afe2960e58b7 -r 9d2c79c992d7 src/uan/examples/wscript --- a/src/uan/examples/wscript Thu Mar 24 15:11:56 2011 +0100 +++ b/src/uan/examples/wscript Thu Mar 24 09:23:44 2011 -0700 @@ -1,8 +1,8 @@ ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- def build(bld): - obj = bld.create_ns3_program('uan-cw-example', ['internet', 'mobility', 'contrib', 'applications', 'uan']) + obj = bld.create_ns3_program('uan-cw-example', ['internet', 'mobility', 'tools', 'applications', 'uan']) obj.source = 'uan-cw-example.cc' - obj = bld.create_ns3_program('uan-rc-example', ['internet', 'mobility', 'contrib', 'applications', 'uan']) + obj = bld.create_ns3_program('uan-rc-example', ['internet', 'mobility', 'tools', 'applications', 'uan']) obj.source = 'uan-rc-example.cc' diff -r afe2960e58b7 -r 9d2c79c992d7 src/uan/wscript --- a/src/uan/wscript Thu Mar 24 15:11:56 2011 +0100 +++ b/src/uan/wscript Thu Mar 24 09:23:44 2011 -0700 @@ -7,7 +7,7 @@ 'model/uan-phy-gen.cc', 'model/uan-transducer-hd.cc', 'model/uan-address.cc', - 'model/uan-net-device.cc', + 'model/uan-net-device.cc', 'model/uan-tx-mode.cc', 'model/uan-prop-model.cc', 'model/uan-prop-model-ideal.cc', @@ -34,12 +34,12 @@ 'model/uan-channel.h', 'model/uan-phy.h', 'model/uan-mac.h', - 'model/uan-net-device.h', - 'model/uan-prop-model.h', - 'model/uan-tx-mode.h', - 'model/uan-transducer.h', + 'model/uan-net-device.h', + 'model/uan-prop-model.h', + 'model/uan-tx-mode.h', + 'model/uan-transducer.h', 'model/uan-phy-gen.h', - 'model/uan-transducer-hd.h', + 'model/uan-transducer-hd.h', 'model/uan-address.h', 'model/uan-prop-model-ideal.h', 'model/uan-mac-aloha.h', diff -r afe2960e58b7 -r 9d2c79c992d7 src/wimax/examples/wimax-ipv4.cc --- a/src/wimax/examples/wimax-ipv4.cc Thu Mar 24 15:11:56 2011 +0100 +++ b/src/wimax/examples/wimax-ipv4.cc Thu Mar 24 09:23:44 2011 -0700 @@ -54,7 +54,7 @@ #include "ns3/network-module.h" #include "ns3/applications-module.h" #include "ns3/mobility-module.h" -#include "ns3/contrib-module.h" +#include "ns3/config-store-module.h" #include "ns3/wimax-module.h" #include "ns3/internet-module.h" #include "ns3/global-route-manager.h" diff -r afe2960e58b7 -r 9d2c79c992d7 src/wimax/examples/wimax-multicast.cc --- a/src/wimax/examples/wimax-multicast.cc Thu Mar 24 15:11:56 2011 +0100 +++ b/src/wimax/examples/wimax-multicast.cc Thu Mar 24 09:23:44 2011 -0700 @@ -54,7 +54,7 @@ #include "ns3/network-module.h" #include "ns3/applications-module.h" #include "ns3/mobility-module.h" -#include "ns3/contrib-module.h" +#include "ns3/config-store-module.h" #include "ns3/wimax-module.h" #include "ns3/csma-module.h" #include diff -r afe2960e58b7 -r 9d2c79c992d7 src/wimax/examples/wimax-simple.cc --- a/src/wimax/examples/wimax-simple.cc Thu Mar 24 15:11:56 2011 +0100 +++ b/src/wimax/examples/wimax-simple.cc Thu Mar 24 09:23:44 2011 -0700 @@ -46,7 +46,7 @@ #include "ns3/network-module.h" #include "ns3/applications-module.h" #include "ns3/mobility-module.h" -#include "ns3/contrib-module.h" +#include "ns3/config-store-module.h" #include "ns3/wimax-module.h" #include "ns3/internet-module.h" #include "ns3/global-route-manager.h" diff -r afe2960e58b7 -r 9d2c79c992d7 src/wscript --- a/src/wscript Thu Mar 24 15:11:56 2011 +0100 +++ b/src/wscript Thu Mar 24 09:23:44 2011 -0700 @@ -23,7 +23,7 @@ all_modules = ( 'core', 'network', - 'contrib', + 'config-store', 'internet', 'propagation', 'point-to-point', @@ -55,6 +55,7 @@ 'mpi', 'topology-read', 'energy', + 'tools', 'tools/visualizer', ) @@ -78,7 +79,7 @@ conf.sub_config('core') conf.sub_config('emu') conf.sub_config('tap-bridge') - conf.sub_config('contrib') + conf.sub_config('config-store') conf.sub_config('internet') conf.sub_config('netanim') conf.sub_config('test')