Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8035 in orxonox.OLD for trunk/src/lib/gui/gl_gui/signal_connector.cc


Ignore:
Timestamp:
May 31, 2006, 4:20:51 PM (19 years ago)
Author:
bensch
Message:

gui: merged the gui back to the trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/gui/gl_gui/signal_connector.cc

    r7855 r8035  
    2121{
    2222
     23  /**
     24   * @brief creates a clean SignalConnector
     25   */
    2326  SignalConnector::SignalConnector( )
    2427  {
     
    2730  }
    2831
     32  /**
     33   * @brief Creates a SignalConnector out of an ObjectPointer, and an Executor.
     34   * @param object the Object the Executor will apply to.
     35   * @param executor the Executor that will be executed.
     36   * @return a new SignalConnector.
     37   */
    2938  SignalConnector::SignalConnector(BaseObject* object, const Executor* executor)
    3039  {
     
    3342  };
    3443
     44  /**
     45   * @brief Creates a SignalConnector as a copy of another one.
     46   * @param signalConnector The SignalConnector to copy.
     47   */
    3548  SignalConnector::SignalConnector(const SignalConnector& signalConnector)
    3649  {
     
    3952  }
    4053
     54  /**
     55   * @brief deletes a SignalConnector.
     56   *
     57   * frees the stored executor
     58   */
    4159  SignalConnector::~SignalConnector()
    4260  {
     
    4462  }
    4563
     64  /**
     65   * @brief assignes a SignalConnector to the current one
     66   * @param signalConnector the SignalConnector to assign to this one
     67   * @return A Reference to this SignalConnector.
     68   */
    4669  SignalConnector& SignalConnector::operator=(const SignalConnector& signalConnector)
    4770  {
     
    5174  }
    5275
    53   void SignalConnector::operator()(const std::string& parameters) const
     76
     77  /**
     78   * @brief compares two SignalConnectors.
     79   * @param signalConnector the SignalConnector to compare against this one.
     80   * @return true if the Connectors are the same.
     81   */
     82  bool SignalConnector::operator==(const SignalConnector& signalConnector) const
     83  {
     84    return (this->object == signalConnector.object /* && this->exec == signalConnector.exec */ );
     85  }
     86
     87
     88  /**
     89   * @brief Executes the SignalConnector.
     90   */
     91  void SignalConnector::operator()() const
     92  {
     93    if (this->isValid())
     94      (*this->exec)(this->object, 0, NULL);
     95  }
     96
     97  /**
     98   * @brief Executes the SignalConnector.
     99   * @param value0 First Value.
     100   */
     101  void SignalConnector::operator()(const MultiType& value0) const
    54102  {
    55103    if (exec != NULL && object != NULL)
    56       (*this->exec)(this->object, parameters);
     104      (*this->exec)(this->object, 1, &value0);
    57105  }
    58106
     107  /**
     108   * @brief Executes the SignalConnector.
     109   * @param value0 First Value
     110   * @param value1 Second Value
     111   */
     112  void SignalConnector::operator()(const MultiType& value0, const MultiType& value1) const
     113  {
     114    if (exec != NULL && object != NULL)
     115    {
     116      MultiType mt[] = { value0, value1 };
     117      (*this->exec)(this->object, 2, mt);
     118    }
     119  }
     120
     121  /**
     122   * @brief Executes the SignalConnector.
     123   * @param value0 First Value
     124   * @param value1 Second Value
     125   * @param value2 Third Value
     126   */
     127  void SignalConnector::operator()(const MultiType& value0, const MultiType& value1, const MultiType& value2) const
     128  {
     129    if (exec != NULL && object != NULL)
     130    {
     131      MultiType mt[] = { value0, value1, value2 };
     132      (*this->exec)(this->object, 3, mt);
     133    }
     134  }
     135
     136  /**
     137   * @brief Executes the SignalConnector.
     138   * @param value0 First Value
     139   * @param value1 Second Value
     140   * @param value2 Third Value
     141   * @param value3 Fourth Value
     142   */
     143  void SignalConnector::operator()(const MultiType& value0, const MultiType& value1, const MultiType& value2, const MultiType& value3) const
     144  {
     145    if (exec != NULL && object != NULL)
     146    {
     147      MultiType mt[] = { value0, value1, value2, value3 };
     148      (*this->exec)(this->object, 4, mt);
     149    }
     150  }
     151
     152  /**
     153   * @brief Executes the SignalConnector.
     154   * @param value0 First Value
     155   * @param value1 Second Value
     156   * @param value2 Third Value
     157   * @param value3 Fourth Value
     158   * @param value3 Fifth Value
     159   */
     160  void SignalConnector::operator()(const MultiType& value0, const MultiType& value1, const MultiType& value2, const MultiType& value3, const MultiType& value4) const
     161  {
     162    if (exec != NULL && object != NULL)
     163    {
     164      MultiType mt[] = { value0, value1, value2, value3, value4 };
     165      (*this->exec)(this->object, 5, mt);
     166    }
     167  }
    59168}
Note: See TracChangeset for help on using the changeset viewer.