Changeset 162 in pacpusframework for branches/2.0-beta1/include


Ignore:
Timestamp:
Aug 1, 2013, 4:46:07 PM (11 years ago)
Author:
Marek Kurdej
Message:

Update: merged changes from trunk.

Location:
branches/2.0-beta1/include/Pacpus
Files:
1 deleted
9 edited

Legend:

Unmodified
Added
Removed
  • branches/2.0-beta1/include/Pacpus/PacpusTools/AsyncWorkerBase.h

    r89 r162  
    1616
    1717//#include <boost/noncopyable.hpp>
     18#include <Pacpus/PacpusTools/PacpusToolsConfig.h>
    1819#include <QObject>
    1920
    2021namespace pacpus
    2122{
    22   /**
    23    * @brief A simple base class for asynchronous workers able to partake in the
    24    * Qt slot / signal mechanism
    25    *
    26    * This class represents an asynchronous event-based worker able to receive and
    27    * send Qt signals to other workers or threads. The rationale is to be able to
    28    * define stateful objects that perform calculations asynchronously, triggered
    29    * by external user-defined messages.
    30    */
    31   class AsyncWorkerBase
     23
     24/// A simple base class for asynchronous workers able to partake in the
     25/// Qt slot / signal mechanism
     26///
     27/// This class represents an asynchronous event-based worker able to receive and
     28/// send Qt signals to other workers or threads. The rationale is to be able to
     29/// define stateful objects that perform calculations asynchronously, triggered
     30/// by external user-defined messages.
     31class PACPUSTOOLS_API AsyncWorkerBase
    3232    : public QObject
    3333    //, private boost::noncopyable
    34   {
     34{
    3535    Q_OBJECT
    36       Q_DISABLE_COPY(AsyncWorkerBase)
    37     public:
    38       /** Constructor. */
     36    Q_DISABLE_COPY(AsyncWorkerBase)
     37
     38public:
     39    /// Constructor.
    3940      AsyncWorkerBase();
    4041
    41       /** Destructor. */
    42       virtual ~AsyncWorkerBase();
     42    /// Destructor.
     43    virtual ~AsyncWorkerBase();
    4344
    44       /** Starts the worker by creating a new thread for it, and calling the setup() virtual method. */
    45       void start();
     45    /// Starts the worker by creating a new thread for it, and calling the setup() virtual method. */
     46    void start();
    4647
    47       /** Terminates the worker as soon as there are no more requests pending and its current processing
    48        *  is finished.
    49        *
    50        *        This method tries to end the worker gracefully. All pending signals sent before the stop() request will
    51        *        be honored.
    52        *        It is safe to call this method from any thread.
    53        *
    54        *  @param autoDelete if true, deletes the worker as soon as its event loop has finished processing.
    55        */
    56       void stop(bool autoDelete);
     48    /// Terminates the worker as soon as there are no more requests pending and its current processing
     49    /// is finished.
     50    ///
     51    /// This method tries to end the worker gracefully. All pending signals sent before the stop() request will
     52    /// be honored.
     53    /// It is safe to call this method from any thread.
     54    ///
     55    ///  @param autoDelete if true, deletes the worker as soon as its event loop has finished processing.
     56    void stop(bool autoDelete);
    5757
    58       /** Returns true if the worker is active. */
    59       bool isActive() const { return active_; }
     58    /// @returns @b true if the worker is active, @b false otherwise.
     59    bool isActive() const
     60    {
     61        return active_;
     62    }
    6063
    6164    Q_SIGNALS:
     
    7376       virtual void cleanup();
    7477
    75        /** Returns true if the worker is stopping. */
     78    /// Returns true if the worker is stopping.
    7679       bool isStopping() const { return stopping_; }
    7780
     
    8386
    8487    private:
    85       /*! \brief Ends the worker, asking the underlying thread to terminate
    86        *
    87        * This method signals the end of processing and requests the underlying thread to terminate. Actual termination
    88        * will occur as soon as all pending signals (including those that may come from other workers during the
    89        * finish request handling) have been processed.
    90        */
     88    /// Ends the worker, asking the underlying thread to terminate
     89    ///
     90    /// This method signals the end of processing and requests the underlying thread to terminate. Actual termination
     91    /// will occur as soon as all pending signals (including those that may come from other workers during the
     92    /// finish request handling) have been processed.
    9193      void finish();
    9294
     
    9597      bool stopping_;
    9698  };
     99
    97100} // namespace pacpus
    98101
  • branches/2.0-beta1/include/Pacpus/PacpusTools/PeriodicWorker.h

    r89 r162  
    1515#define DEF_PACPUS_PERIODIC_WORKER_H
    1616
    17 // Includes, pacpus.
    1817#include <Pacpus/PacpusTools/AsyncWorkerBase.h>
     18#include <Pacpus/PacpusTools/PacpusToolsConfig.h>
    1919
    2020class QTimer;
     
    2222namespace pacpus
    2323{
    24   /** PeriodicWorker
    25    * @brief A simple base class for periodic worker.
    26    *
    27    * @example
    28    *    class MyWorker
    29    *      : public PeriodicWorkder
    30    *    {
    31    *      public:
    32    *        void doWork() { std::cout << "Hey, I'm working!" << std::endl; }
    33    *    };
    34    *
    35    *    // Do its work every second.
    36    *    MyWorker worker;
    37    *    worker.startWork(1000);
    38    */
    39   class PeriodicWorker
     24
     25/// @brief A simple base class for periodic worker.
     26///
     27/// @example
     28/// To use the PeriodicWorker, simply inherit from this class when creating your worker.
     29/// ~~~
     30/// class MyWorker
     31///     : public PeriodicWorkder
     32/// {
     33/// public:
     34///     void doWork() { std::cout << "Hey, I'm working!" << std::endl; }
     35/// };
     36///
     37/// // Do its work every second.
     38/// MyWorker worker;
     39/// worker.startWork(1000);
     40/// ~~~
     41class PACPUSTOOLS_API PeriodicWorker
    4042    : public AsyncWorkerBase
    4143  {
     
    4850      virtual ~PeriodicWorker();
    4951     
    50       /** Start the periodic worker.
    51        * @param msec Period in mseconds.
    52        */
     52    /// Start the periodic worker.
     53    /// @param msec Period in mseconds.
    5354      void startWork(int msec);
    5455     
    55       /** Stop the periodic worker, but do not delete it. */
     56    /// Stop the periodic worker, but do not delete it.
    5657      void stopWork();
    5758     
    58     public slots:
    59       /** Do the work.
    60        * This method need to be implemented in the subclasses, it will be called
    61        * each time the timer has reached its period.
    62        */
     59    public Q_SLOTS:
     60        /// Do the work.
     61        /// This method need to be implemented in the subclasses, it will be called
     62        /// each time the timer has reached its period.
    6363      virtual void doWork() = 0;
    6464     
     
    6666      QTimer* mHeartbeat;
    6767  };
    68 }
     68
     69} // namespace pacpus
    6970
    7071#endif // DEF_PACPUS_PERIODIC_WORKER_H
  • branches/2.0-beta1/include/Pacpus/PacpusTools/PosixShMem.h

    r126 r162  
    2222
    2323/// @todo Documentation
    24 class PACPUS_TOOLS_API PosixShMem
     24class PACPUSTOOLS_API PosixShMem
    2525        : public ShMemBase
    2626{
  • branches/2.0-beta1/include/Pacpus/PacpusTools/ShMem.h

    r148 r162  
    44// %pacpus:license}
    55/// @file
    6 /// @author  Firstname Surname <firstname.surname@utc.fr>
    7 /// @date    Month, Year
     6/// @author  Gerald Dherbomez <firstname.surname@utc.fr>
     7/// @date    January, 2007
    88/// @version $Id: ShMem.h 76 2013-01-10 17:05:10Z kurdejma $
    99/// @copyright Copyright (c) UTC/CNRS Heudiasyc 2006 - 2013. All rights reserved.
     
    3232///
    3333/// Inherits from Win32ShMem on Windows system and from PosixShMem on Unix-like systems.
    34 class /*PACPUS_TOOLS_API*/ ShMem
     34class /*PACPUSTOOLS_API*/ ShMem
    3535    : public ShMemType
    3636{
  • branches/2.0-beta1/include/Pacpus/PacpusTools/ShMemBase.h

    r126 r162  
    1818
    1919/// Base class for shared memory objects.
    20 class PACPUS_TOOLS_API ShMemBase
     20class PACPUSTOOLS_API ShMemBase
    2121{
    2222public:
  • branches/2.0-beta1/include/Pacpus/PacpusTools/Win32ShMem.h

    r126 r162  
    2424typedef void * HANDLE;
    2525
     26#ifdef _MSC_VER
     27#   pragma warning(push)
     28#   pragma warning(disable: 4275)
     29#endif // _MSC_VER
     30
     31namespace pacpus {
     32
    2633/// Shared memory object for Windows.
    27 class PACPUS_TOOLS_API Win32ShMem
     34class PACPUSTOOLS_API Win32ShMem
    2835        : public ShMemBase
    2936{
     
    5764};
    5865
     66} // namespace pacpus
     67
     68#ifdef _MSC_VER
     69#   pragma warning(pop)
     70#endif // _MSC_VER
     71
    5972#endif // DEF_PACPUS_WIN32SHMEM_H
  • branches/2.0-beta1/include/Pacpus/PacpusTools/geodesie.h

    r149 r162  
    44// %}
    55/// @file
    6 /// @author  Firstname Surname <firstname.surname@utc.fr>
    7 /// @date    Month, Year
     6/// @author  Jean Laneurit <firstname.surname@utc.fr>
     7/// @date    April, 2010
    88/// @version $Id: geodesie.h 75 2013-01-10 17:04:19Z kurdejma $
    99/// @copyright Copyright (c) UTC/CNRS Heudiasyc 2006 - 2013. All rights reserved.
     
    4040/// @todo Documentation
    4141/// @todo Rewrite!
    42 struct PACPUS_TOOLS_API Matrice
     42struct PACPUSTOOLS_API Matrice
    4343{
    4444    /// Copy ctor
     
    7171};
    7272
    73 PACPUS_TOOLS_API Matrice TransMat(const Matrice A);
    74 PACPUS_TOOLS_API Matrice ProdMat(const Matrice A,const Matrice B);
    75 PACPUS_TOOLS_API void Write(const Matrice A,std::ostream& out);
     73PACPUSTOOLS_API Matrice TransMat(const Matrice A);
     74PACPUSTOOLS_API Matrice ProdMat(const Matrice A,const Matrice B);
     75PACPUSTOOLS_API void Write(const Matrice A,std::ostream& out);
    7676
    7777////////////////////////////////////////////////////////////////////////
    7878/// @todo Documentation
    79 class PACPUS_TOOLS_API Raf98
     79class PACPUSTOOLS_API Raf98
    8080{
    8181public:
     
    135135
    136136////////////////////////////////////////////////////////////////////////
    137 PACPUS_TOOLS_API void Geographique_2_Lambert93(const Raf98& raf98,double lambda,double phi,double he,Matrice in,double& E,double& N,double& h,Matrice& out);
    138 PACPUS_TOOLS_API void Geographique_2_Lambert93(const Raf98& raf98,double lambda,double phi,double he,double& E,double& N,double& h);
    139 PACPUS_TOOLS_API void Lambert93_2_Geographique(const Raf98& raf98,double E,double N,double h,double& lambda,double& phi,double& he);
    140 PACPUS_TOOLS_API void Lambert93_2_Geographique(const Raf98& raf98,double E,double N,double h,Matrice in,double& lambda,double& phi,double& he,Matrice& out);
     137PACPUSTOOLS_API void Geographique_2_Lambert93(const Raf98& raf98,double lambda,double phi,double he,Matrice in,double& E,double& N,double& h,Matrice& out);
     138PACPUSTOOLS_API void Geographique_2_Lambert93(const Raf98& raf98,double lambda,double phi,double he,double& E,double& N,double& h);
     139PACPUSTOOLS_API void Lambert93_2_Geographique(const Raf98& raf98,double E,double N,double h,double& lambda,double& phi,double& he);
     140PACPUSTOOLS_API void Lambert93_2_Geographique(const Raf98& raf98,double E,double N,double h,Matrice in,double& lambda,double& phi,double& he,Matrice& out);
    141141/** Convert from geographique to ECEF.
    142142 * @param[in] longitude Longitude in radian.
     
    144144 * @param[in] he Height in meter.
    145145 */
    146 PACPUS_TOOLS_API void Geographique_2_ECEF(double longitude, double latitude, double he, double& x, double& y, double& z);
     146PACPUSTOOLS_API void Geographique_2_ECEF(double longitude, double latitude, double he, double& x, double& y, double& z);
    147147/** Convert from ECEF two ENU.
    148148 * @param[in] lon0 Longitude of the origin in radian.
     
    150150 * @param[in] he0 Height of the origin in radian.
    151151 */
    152 PACPUS_TOOLS_API void ECEF_2_ENU(double x,double y,double z,double& e,double& n,double& u,double lon0,double lat0,double he0);
     152PACPUSTOOLS_API void ECEF_2_ENU(double x,double y,double z,double& e,double& n,double& u,double lon0,double lat0,double he0);
    153153////////////////////////////////////////////////////////////////////////
    154154
    155155///ALGO0001
    156156/// @todo Rename
    157 PACPUS_TOOLS_API double LatitueIsometrique(double latitude,double e);
     157PACPUSTOOLS_API double LatitueIsometrique(double latitude,double e);
    158158///ALGO0002
    159159/// @todo Rename
    160 PACPUS_TOOLS_API double LatitueIsometrique2Lat(double latitude_iso,double e,double epsilon);
     160PACPUSTOOLS_API double LatitueIsometrique2Lat(double latitude_iso,double e,double epsilon);
    161161
    162162///ALGO0003
    163 PACPUS_TOOLS_API void Geo2ProjLambert(
     163PACPUSTOOLS_API void Geo2ProjLambert(
    164164    double lambda,double phi,
    165165    double n, double c,double e,
     
    167167    double& X,double& Y);
    168168///ALGO0004
    169 PACPUS_TOOLS_API void Proj2GeoLambert(
     169PACPUSTOOLS_API void Proj2GeoLambert(
    170170    double X,double Y,
    171171    double n, double c,double e,
     
    174174    double& lambda,double& phi);
    175175
    176 PACPUS_TOOLS_API double ConvMerApp(double longitude);
     176PACPUSTOOLS_API double ConvMerApp(double longitude);
    177177
    178178/**
     
    216216}
    217217
    218 PACPUS_TOOLS_API QMatrix4x4 yprenuToMatrix(QVector3D angle, QVector3D position);
     218PACPUSTOOLS_API QMatrix4x4 yprenuToMatrix(QVector3D angle, QVector3D position);
    219219
    220220} // namespace Geodesie
  • branches/2.0-beta1/include/Pacpus/PacpusTools/matrice.h

    r126 r162  
    44// %pacpus:license}
    55/// @file
    6 /// @author  Firstname Surname <firstname.surname@utc.fr>
    7 /// @date    Month, Year
     6/// @author  Jean Laneurit <firstname.surname@utc.fr>
     7/// @date    April, 2010
    88/// @version $Id: matrice.h 76 2013-01-10 17:05:10Z kurdejma $
    99/// @copyright Copyright (c) UTC/CNRS Heudiasyc 2006 - 2013. All rights reserved.
     
    2626/// Simple matrix.
    2727/// @todo Documentation
    28 class PACPUS_TOOLS_API matrice
     28class PACPUSTOOLS_API matrice
    2929{
    3030    typedef double *ligne;
  • branches/2.0-beta1/include/Pacpus/kernel/DbiteFile.h

    r89 r162  
    2424#include <string>
    2525
     26#ifdef _MSC_VER
     27#   pragma warning(push)
     28#   pragma warning(disable: 4251)
     29#endif // _MSC_VER
     30
    2631namespace pacpus {
    2732
     
    262267} // namespace pacpus
    263268
     269#ifdef _MSC_VER
     270#   pragma warning(pop)
     271#endif // _MSC_VER
     272
    264273#endif // DEF_PACPUS_DBITEFILE_H
Note: See TracChangeset for help on using the changeset viewer.