Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 12, 2010, 5:08:27 PM (14 years ago)
Author:
smerkli
Message:

ChatHistory is not being constructed, no idea why.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/chat/src/orxonox/ChatHistory.cc

    r6693 r6698  
    2828
    2929#include "ChatHistory.h"
     30#include "core/ScopedSingletonManager.h"
    3031
    31 #ifndef TEST
     32#ifndef CHATTEST
    3233namespace orxonox
    3334{
     35  /* singleton */
     36  ManageScopedSingleton( ChatHistory, ScopeID::Root, false );
    3437#endif
    3538
    3639  /* constructor */
    37 #ifndef TEST
     40#ifndef CHATTEST
    3841  ChatHistory(BaseObject* creator) : BaseObject(creator)
    3942#else
     
    4245  {
    4346    /* register the object */
    44 #ifndef TEST
     47#ifndef CHATTEST
    4548    RegisterObject(ChatHistory);
    4649#endif
     
    5558      this->chat_hist_logline( "--- Logfile opened ---" );
    5659    }
     60
     61    assert(0);
    5762
    5863    /* Read setting for maximum number of lines and set limit */
     
    7681    std::string text;
    7782
    78 #ifndef TEST
     83    COUT(0) << "Meow.\n";
     84
     85#ifndef CHATTEST
    7986    if (senderID != CLIENTID_UNKNOWN)
    8087    {
     
    104111    //if( this->hist_logfile )
    105112      //this->hist_logfile.sync();
     113    return 0;
    106114  }
    107115
     
    115123    /* push to the front of the history */
    116124    this->hist_buffer.push_back( toadd );
     125    return 0;
    117126  }
    118127
     
    123132    if( this->hist_log_enabled )
    124133      this->hist_logfile << toadd << std::endl;
     134    return 0;
    125135  }
    126136
     
    131141     *       and set the this->hist_logfile_path variable to it
    132142     */
    133 #ifndef TEST
     143#ifndef CHATTEST
    134144    this->hist_logfile.open( PathConfig::getInstance().getLogPathString() +
    135145      "chatlog.log",
     
    143153    if( !this->hist_logfile )
    144154    { this->hist_log_enabled = false;
    145 #ifndef TEST
     155#ifndef CHATTEST
    146156      COUT(2) << "Warning: Could not open logfile." << std::endl;
    147157#endif
     
    176186  }
    177187
    178 #ifndef TEST
     188#ifndef CHATTEST
    179189}
    180190#endif
Note: See TracChangeset for help on using the changeset viewer.