Changeset 8035 in orxonox.OLD for trunk/src/lib/gui/gl_gui/signal_connector.cc
- Timestamp:
- May 31, 2006, 4:20:51 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/gui/gl_gui/signal_connector.cc
r7855 r8035 21 21 { 22 22 23 /** 24 * @brief creates a clean SignalConnector 25 */ 23 26 SignalConnector::SignalConnector( ) 24 27 { … … 27 30 } 28 31 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 */ 29 38 SignalConnector::SignalConnector(BaseObject* object, const Executor* executor) 30 39 { … … 33 42 }; 34 43 44 /** 45 * @brief Creates a SignalConnector as a copy of another one. 46 * @param signalConnector The SignalConnector to copy. 47 */ 35 48 SignalConnector::SignalConnector(const SignalConnector& signalConnector) 36 49 { … … 39 52 } 40 53 54 /** 55 * @brief deletes a SignalConnector. 56 * 57 * frees the stored executor 58 */ 41 59 SignalConnector::~SignalConnector() 42 60 { … … 44 62 } 45 63 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 */ 46 69 SignalConnector& SignalConnector::operator=(const SignalConnector& signalConnector) 47 70 { … … 51 74 } 52 75 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 54 102 { 55 103 if (exec != NULL && object != NULL) 56 (*this->exec)(this->object, parameters);104 (*this->exec)(this->object, 1, &value0); 57 105 } 58 106 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 } 59 168 }
Note: See TracChangeset
for help on using the changeset viewer.