StdHelpers.h

00001 /***************************************************************************
00002  *                                                                         *
00003  *   (c) Art Tevs, MPI Informatik Saarbruecken                             *
00004  *       mailto: <tevs@mpi-sb.mpg.de>                                      *
00005  *                                                                         *
00006  *   This program is free software; you can redistribute it and/or modify  *
00007  *   it under the terms of the GNU General Public License as published by  *
00008  *   the Free Software Foundation; either version 2 of the License, or     *
00009  *   (at your option) any later version.                                   *
00010  *                                                                         *
00011  ***************************************************************************/
00012 
00013 #ifndef __NR_ENGINE_STD_HELPERS_H_
00014 #define __NR_ENGINE_STD_HELPERS_H_
00015 
00016 //----------------------------------------------------------------------------------
00017 // Includes
00018 //----------------------------------------------------------------------------------
00019 #include "Prerequisities.h"
00020 
00021 /*!
00022  * \defgroup helpers Global helper functions
00023  *
00024  * This group defines some usefull functions, macros and classes
00025  * which are helpfull by the work with the engine.
00026  *
00027  **/
00028 
00029 namespace nrEngine{
00030 
00031         /**
00032         * NR_sleep do a sleep for a given count of milliseconds.
00033         * The sleeping function is defined to be platform independent, so
00034         * you are able to use it on every platform.
00035         * \param milliseconds Time in milliseconds, how long to sleep
00036         * \ingroup helpers
00037         **/
00038         void _NRExport sleep( uint32 milliseconds );
00039 
00040 
00041         /**
00042         * Convert a given version integer into a understandable string
00043         * which have a form like x.x.x
00044         * @param version Version integer build by NR_createVersionInteger
00045         * \ingroup helpers
00046         **/
00047         std::string _NRExport convertVersionToString(uint32 version);
00048 
00049 
00050         /**
00051         * Create an version integer from major, minor, patch numbers.
00052         * @param major,minor,patch 8 Bit long version number parts
00053         * \ingroup helpers
00054         **/
00055         uint32 _NRExport createVersionInteger(uint8 major, uint8 minor, uint8 patch);
00056 
00057         /**
00058          * Delete spaces in the given string.
00059          * @param str String to trim
00060          * \ingroup helpers
00061          **/
00062         std::string _NRExport trim(const std::string& str);
00063 
00064         /**
00065          * Convert a given order name into a readable string
00066          * \ingroup helpers
00067          **/
00068         std::string _NRExport orderToString(int32 order);
00069         
00070 }; // end namespace
00071 
00072 #endif
00073 

Generated on Wed Sep 12 23:19:42 2007 for nrEngine by  doxygen 1.5.1