Changeset 15 in flair-src for trunk/lib/FlairCore/src/Box.h


Ignore:
Timestamp:
04/08/16 15:40:57 (8 years ago)
Author:
Bayard Gildas
Message:

sources reformatted with flair-format-dir script

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/FlairCore/src/Box.h

    r2 r15  
    1616#include <Widget.h>
    1717
    18 namespace flair
    19 {
    20 namespace gui
    21 {
     18namespace flair {
     19namespace gui {
    2220
    23     class Layout;
    24     class LayoutPosition;
     21class Layout;
     22class LayoutPosition;
    2523
    26     /*! \class Box
    27     *
    28     * \brief Abstract class to display a box on the ground station
    29     *
    30     * This is an abstract class to display boxes (like CheckBox, SpinBox, etc). \n
    31     * To access reimplemented box's value, use Box::GetMutex and Box::ReleaseMutex. \n
    32     * Note that this mutex is in reality the one from the parent Layout. To minimize memory
    33     * footprint, each Box does not have its own Mutex.
    34     */
    35     class Box: public Widget
    36     {
    37         public:
    38             /*!
    39             * \brief Constructor
    40             *
    41             * Construct a Box. \n
    42             * Type must agree with predifined (hard coded) types
    43             * in ground station code. \n
    44             * The Box will automatically be child of position->getLayout() Layout. After calling this method,
    45             * position will be deleted as it is no longer usefull.
    46             *
    47             * \param position position
    48             * \param name name
    49             * \param type type
    50             */
    51             Box(const LayoutPosition* position,std::string name,std::string type);
     24/*! \class Box
     25*
     26* \brief Abstract class to display a box on the ground station
     27*
     28* This is an abstract class to display boxes (like CheckBox, SpinBox, etc). \n
     29* To access reimplemented box's value, use Box::GetMutex and Box::ReleaseMutex.
     30*\n
     31* Note that this mutex is in reality the one from the parent Layout. To minimize
     32*memory
     33* footprint, each Box does not have its own Mutex.
     34*/
     35class Box : public Widget {
     36public:
     37  /*!
     38  * \brief Constructor
     39  *
     40  * Construct a Box. \n
     41  * Type must agree with predifined (hard coded) types
     42  * in ground station code. \n
     43  * The Box will automatically be child of position->getLayout() Layout. After
     44  *calling this method,
     45  * position will be deleted as it is no longer usefull.
     46  *
     47  * \param position position
     48  * \param name name
     49  * \param type type
     50  */
     51  Box(const LayoutPosition *position, std::string name, std::string type);
    5252
    53             /*!
    54             * \brief Destructor
    55             *
    56             */
    57             ~Box();
     53  /*!
     54  * \brief Destructor
     55  *
     56  */
     57  ~Box();
    5858
    59             /*!
    60             * \brief Has the value changed since last call?
    61             *
    62             * This method returns the value of an internal flag
    63             * which is set through SetValueChanged(). \n
    64             * After calling this method, the internal flag is
    65             * set to false.
    66             *
    67             * \return true is valued has changed since last call
    68             */
    69             bool ValueChanged(void);
     59  /*!
     60  * \brief Has the value changed since last call?
     61  *
     62  * This method returns the value of an internal flag
     63  * which is set through SetValueChanged(). \n
     64  * After calling this method, the internal flag is
     65  * set to false.
     66  *
     67  * \return true is valued has changed since last call
     68  */
     69  bool ValueChanged(void);
    7070
    71         protected:
    72             /*!
    73             * \brief Set the value changed flag
    74             *
    75             * The reimplemented class must call this method when Box's value is changed. \n
    76             * This method must be called with Mutex locked. Indeed, as reimplemented class
    77             * also has to lock the Mutex to change the Box value, this mecanism avoid two successives
    78             * lock and unlock.
    79             *
    80             */
    81             void SetValueChanged(void);
     71protected:
     72  /*!
     73  * \brief Set the value changed flag
     74  *
     75  * The reimplemented class must call this method when Box's value is changed.
     76  *\n
     77  * This method must be called with Mutex locked. Indeed, as reimplemented class
     78  * also has to lock the Mutex to change the Box value, this mecanism avoid two
     79  *successives
     80  * lock and unlock.
     81  *
     82  */
     83  void SetValueChanged(void);
    8284
    83             /*!
    84             * \brief Get Mutex
    85             *
    86             * This method must be called before changing Box's value or
    87             * calling SetValueChanged().
    88             *
    89             */
    90             void GetMutex(void) const;
     85  /*!
     86  * \brief Get Mutex
     87  *
     88  * This method must be called before changing Box's value or
     89  * calling SetValueChanged().
     90  *
     91  */
     92  void GetMutex(void) const;
    9193
    92             /*!
    93             * \brief Release Mutex
    94             *
    95              * This method must be called after changing Box's value or
    96             *  calling SetValueChanged().
    97             *
    98             */
    99             void ReleaseMutex(void) const;
     94  /*!
     95  * \brief Release Mutex
     96  *
     97   * This method must be called after changing Box's value or
     98  *  calling SetValueChanged().
     99  *
     100  */
     101  void ReleaseMutex(void) const;
    100102
    101 
    102         private:
    103             bool value_changed;
    104     };
     103private:
     104  bool value_changed;
     105};
    105106
    106107} // end namespace gui
Note: See TracChangeset for help on using the changeset viewer.