Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 22, 2006, 11:45:21 PM (18 years ago)
Author:
bensch
Message:

new_class_id: adapted Network

Location:
branches/new_class_id/src/lib/network/monitor
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/new_class_id/src/lib/network/monitor/connection_monitor.cc

    r9690 r9691  
    3131{
    3232  /* set the class id for the base object and add ist to class list*/
    33   this->setClassID(CL_CONNECTION_MONITOR, "ConnectionMonitor");
     33  this->registerObject(this, ConnectionMonitor::_objectList);
    3434
    3535  this->userId = userId;
  • branches/new_class_id/src/lib/network/monitor/network_monitor.cc

    r9690 r9691  
    4646  : Synchronizeable()
    4747{
    48   this->setClassID(CL_NETWORK_MONITOR, "NetworkMonitor");
     48  this->registerObject(this, NetworkMonitor::_objectList);
    4949
    5050  this->networkStream = networkStream;
  • branches/new_class_id/src/lib/network/monitor/network_stats_widget.cc

    r9690 r9691  
    274274NetworkStatsWidget* NetworkStatsWidget::_statsWidget = NULL;
    275275
    276 #include "class_list.h"
    277 
    278276void NetworkStatsWidget::toggleGUI()
    279277{
    280   BaseObject* bo = NULL;
    281   const std::list<BaseObject*>* ls = ClassList::getList(CL_NETWORK_MONITOR);
    282   if (ls != NULL && !ls->empty())
    283     bo = ls->front();
    284 
    285   if (bo != NULL && NetworkStatsWidget::_statsWidget == NULL)
    286   {
    287     NetworkStatsWidget::_statsWidget = new NetworkStatsWidget(dynamic_cast<NetworkMonitor*> (bo));
     278  NetworkMonitor* monitor;
     279  if (!NetworkMonitor::objectList().empty())
     280    monitor = NetworkMonitor::objectList().front();
     281
     282  if (monitor != NULL && NetworkStatsWidget::_statsWidget == NULL)
     283  {
     284    NetworkStatsWidget::_statsWidget = new NetworkStatsWidget(monitor);
    288285    NetworkStatsWidget::_statsWidget->showAll();
    289286  }
  • branches/new_class_id/src/lib/network/monitor/network_stats_widget.h

    r9690 r9691  
    2020class HostWidget : public OrxGui::GLGuiBox
    2121{
    22   NewObjectListDeclaration(HostWidget);
    2322  public:
    2423    HostWidget(const std::string& name, const IP& ip);
     
    8281class NetworkStatsWidget : public OrxGui::GLGuiFixedpositionBox
    8382{
     83  NewObjectListDeclaration(NetworkStatsWidget);
    8484  public:
    8585    static void toggleGUI();
Note: See TracChangeset for help on using the changeset viewer.