Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9869 in orxonox.OLD for trunk/src/lib/network/monitor


Ignore:
Timestamp:
Oct 3, 2006, 12:19:30 AM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: merged the new_class_id branche back to the trunk.
merged with command:
svn merge https://svn.orxonox.net/orxonox/branches/new_class_id trunk -r9683:HEAD
no conflicts… puh..

Location:
trunk/src/lib/network/monitor
Files:
6 edited

Legend:

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

    r9494 r9869  
    2323/* using namespace std is default, this needs to be here */
    2424
    25 
     25ObjectListDefinition(ConnectionMonitor);
    2626/**
    2727 * constructor
     
    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;
  • trunk/src/lib/network/monitor/connection_monitor.h

    r9494 r9869  
    1919class ConnectionMonitor : virtual public BaseObject
    2020{
     21  ObjectListDeclaration(ConnectionMonitor);
    2122  public:
    2223    ConnectionMonitor( int userId );
  • trunk/src/lib/network/monitor/network_monitor.cc

    r9656 r9869  
    3737SHELL_COMMAND(debug, NetworkMonitor, debug);
    3838
     39ObjectListDefinition(NetworkMonitor);
    3940
    4041
     
    4546  : Synchronizeable()
    4647{
    47   this->setClassID(CL_NETWORK_MONITOR, "NetworkMonitor");
     48  this->registerObject(this, NetworkMonitor::_objectList);
    4849
    4950  this->networkStream = networkStream;
  • trunk/src/lib/network/monitor/network_monitor.h

    r9656 r9869  
    2727class NetworkMonitor : public Synchronizeable
    2828{
    29 
     29  ObjectListDeclaration(NetworkMonitor);
    3030  public:
    3131    NetworkMonitor(NetworkStream* networkStream);
  • trunk/src/lib/network/monitor/network_stats_widget.cc

    r9656 r9869  
    2020#include "peer_info.h"
    2121
     22#include "loading/resource_manager.h"
     23
    2224#include "multi_type.h"
    2325
    2426#include "shell_command.h"
    25 
    26 #include "loading/resource_manager.h"
    2727
    2828// this fcuk does not work!
     
    3030// ->setAlias("ProxyGui");
    3131
    32 
    3332HostWidget::HostWidget(const std::string& name, const IP& ip)
    3433    : GLGuiBox(OrxGui::Horizontal)
     
    5756{
    5857  if(_font == NULL)
    59     _font = new Font(ResourceManager::getInstance()->getDataDir() + "/fonts/arial.ttf", 20);
     58    _font = new Font(Resources::ResourceManager::getInstance()->mainGlobalPath().name() + "/fonts/arial.ttf", 20);
    6059
    6160  //this->_name.setFont(*_font);
     
    211210//======================================================//
    212211
     212
     213ObjectListDefinition(NetworkStatsWidget);
    213214/**
    214215 * @brief standard constructor
     
    273274NetworkStatsWidget* NetworkStatsWidget::_statsWidget = NULL;
    274275
    275 #include "class_list.h"
    276 
    277276void NetworkStatsWidget::toggleGUI()
    278277{
    279   BaseObject* bo = NULL;
    280   const std::list<BaseObject*>* ls = ClassList::getList(CL_NETWORK_MONITOR);
    281   if (ls != NULL && !ls->empty())
    282     bo = ls->front();
    283 
    284   if (bo != NULL && NetworkStatsWidget::_statsWidget == NULL)
    285   {
    286     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);
    287285    NetworkStatsWidget::_statsWidget->showAll();
    288286  }
  • trunk/src/lib/network/monitor/network_stats_widget.h

    r9656 r9869  
    8181class NetworkStatsWidget : public OrxGui::GLGuiFixedpositionBox
    8282{
     83  ObjectListDeclaration(NetworkStatsWidget);
    8384  public:
    8485    static void toggleGUI();
Note: See TracChangeset for help on using the changeset viewer.