Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 23, 2011, 12:45:53 AM (13 years ago)
Author:
landauf
Message:

merged output branch back to trunk.

Changes:

  • you have to include util/Output.h instead of util/Debug.h
  • COUT(x) is now called orxout(level)
  • output levels are now defined by an enum instead of numbers. see util/Output.h for the definition
  • it's possible to use output contexts with orxout(level, context). see util/Output.h for some common contexts. you can define more contexts
  • you must use 'endl' at the end of an output message, '\n' does not flush the message

Output levels:

  • instead of COUT(0) use orxout()
  • instead of COUT(1) use orxout(user_error) or orxout(internal_error)
  • instead of COUT(2) use orxout(user_warning) or orxout(internal_warning)
  • instead of COUT(3) use orxout(user_status/user_info) or orxout(internal_status/internal_info)
  • instead of COUT(4) use orxout(verbose)
  • instead of COUT(5) use orxout(verbose_more)
  • instead of COUT(6) use orxout(verbose_ultra)

Guidelines:

  • user_* levels are for the user, visible in the console and the log-file
  • internal_* levels are for developers, visible in the log-file
  • verbose_* levels are for debugging, only visible if the context of the output is activated

Usage in C++:

  • orxout() << "message" << endl;
  • orxout(level) << "message" << endl;
  • orxout(level, context) << "message" << endl;

Usage in Lua:

  • orxout("message")
  • orxout(orxonox.level.levelname, "message")
  • orxout(orxonox.level.levelname, "context", "message")

Usage in Tcl (and in the in-game-console):

  • orxout levelname message
  • orxout_context levelname context message
  • shortcuts: log message, error message, warning message, status message, info message, debug message
Location:
code/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/libraries/network/WANDiscovery.h

    r8351 r8858  
    1919 *   Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
    2020 *
    21  *   Author: Fabian 'x3n' Landau (original) Co-authors: Sandro 'smerkli' Merkli
    22  *   (copied and adapted to WAN)
     21 *   Author:
     22 *      Sandro 'smerkli' Merkli
     23 *   Co-authors:
     24 *      Oliver Scheuss (original)
    2325 *
    2426 */
     
    3032#include "packet/ServerInformation.h"
    3133#include "core/ConfigFileManager.h"
    32 #include "util/Singleton.h"
    3334#include "core/OrxonoxClass.h"
    3435#include "core/ConfigValueIncludes.h"
     
    4748  class _NetworkExport WANDiscovery
    4849// tolua_end
    49     : public Singleton<WANDiscovery>, public OrxonoxClass
     50    : public OrxonoxClass
    5051  { // tolua_export
    51     friend class Singleton<WANDiscovery>;
    5252    public:
    5353      /** constructor */
    54       WANDiscovery();
     54      WANDiscovery(); // tolua_export
    5555
    5656      /** destructor */
     
    8181      std::string getServerListItemIP( unsigned int index ); // tolua_export
    8282
    83       /** \return an instance of WANDiscovery
    84        *
    85        * Create and return an instance of WANDiscovery.
    86        */
    87       static WANDiscovery& getInstance() { return Singleton<WANDiscovery>::getInstance(); } // tolua_export
    88    
    8983      /* todo: might make this private and use getter/setter methods
    9084       * at some later time.
     
    9892      /** Master server communications object */
    9993      MasterServerComm msc;
     94
     95      int rhandler( char *addr, ENetEvent *ev );
    10096     
    10197    private:
    102       /** Singleton pointer */
    103       static WANDiscovery* singletonPtr_s;
    104 
    10598      /** master server address */
    10699      std::string msaddress;
Note: See TracChangeset for help on using the changeset viewer.