AndroMeta  2.0.0
AndroMeta/include/AndroMeta/MThread.h
Go to the documentation of this file.
00001 /*
00002  * Copyright 2009-2012 AndroMeta LLC. All rights reserved.
00003  *
00004  * AndroMeta LLC retains all intellectual property and proprietary 
00005  * rights to this software and related documentation and any modifications 
00006  * thereto.  Any use, reproduction, disclosure, or distribution of this 
00007  * software and related documentation without an express license agreement 
00008  * from AndroMeta LLC is strictly prohibited.
00009  * 
00010  */
00011 
00019 #include <AndroMeta/MStr.h>
00020 
00021 #include <stdint.h>
00022 
00023 #ifndef ANDROMETA_M_THREAD_H
00024 #define ANDROMETA_M_THREAD_H
00025 
00026 namespace Meta{
00027   
00036   class MThread{
00037   public:
00038     
00042     MThread();
00043     
00047     virtual ~MThread();
00048     
00052     void start(double priority=0.5);
00053     
00057     void await();
00058     
00062     uint64_t id() const;
00063     
00067     static uint64_t threadId();
00068     
00072     static bool isMainThread();
00073     
00077     virtual void run() = 0;
00078     
00079   private:  
00080     MThread& operator=(const MThread&);
00081     MThread(const MThread&);
00082     
00083     class MThread_* x_;
00084   };
00085   
00086 } // end namespace Meta
00087 
00088 #endif // ANDROMETA_M_THREAD_H