Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7329 in orxonox.OLD for trunk/src/lib/util


Ignore:
Timestamp:
Apr 17, 2006, 4:47:48 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: windows compatibility (not finished) also added a threading Class to wrap around SDL_thread (for simple oo-tasks)

Location:
trunk/src/lib/util
Files:
2 copied

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/util/threading.cc

    r7328 r7329  
    1616//#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_
    1717
    18 #include "proto_class.h"
     18#include "threading.h"
    1919
    2020using namespace std;
     
    2525 * @todo this constructor is not jet implemented - do it
    2626*/
    27 ProtoClass::ProtoClass ()
     27Threading::Threading ()
    2828{
    29    this->setClassID(CL_PROTO_ID, "ProtoClass");
    30 
    31    /* If you make a new class, what is most probably the case when you write this file
    32       don't forget to:
    33        1. Add the new file new_class.cc to the ./src/Makefile.am
    34        2. Add the class identifier to ./src/class_id.h eg. CL_NEW_CLASS
    35 
    36       Advanced Topics:
    37       - if you want to let your object be managed via the ObjectManager make sure to read
    38         the object_manager.h header comments. You will use this most certanly only if you
    39         make many objects of your class, like a weapon bullet.
    40    */
    4129}
    4230
     
    4533 * standard deconstructor
    4634*/
    47 ProtoClass::~ProtoClass ()
     35Threading::~Threading ()
    4836{
    4937  // delete what has to be deleted here
  • trunk/src/lib/util/threading.h

    r7328 r7329  
    11/*!
    2  * @file proto_class.h
    3  * @brief Definition of ...
     2 * @file threading.h
     3 * @brief Definition of Thread Classes.
     4 *
     5 * These are mainly Classes, that are used for wrapping around SDL_thread
    46*/
    57
    6 #ifndef _PROTO_CLASS_H
    7 #define _PROTO_CLASS_H
     8#ifndef _THREADING_H
     9#define _THREADING_H
    810
    9 #include "base_object.h"
    10 
    11 // FORWARD DECLARATION
     11#ifdef HAVE_SDL_H
     12 #include <SDL_thread.h>
     13#else
     14 #include <SDL/SDL_thread.h>
     15#endif
    1216
    1317
    14 
    15 //! A class for ...
    16 class ProtoClass : public BaseObject {
     18//! A class for Wrapping Threads
     19class Threading {
    1720
    1821 public:
    19   ProtoClass();
    20   virtual ~ProtoClass();
     22  Threading();
     23  virtual ~Threading();
    2124
    2225
     
    2528};
    2629
    27 #endif /* _PROTO_CLASS_H */
     30#endif /* _THREADING_H */
Note: See TracChangeset for help on using the changeset viewer.