Home > Back-end >  Solving a function, see don't understand! Such as bosses to rescue
Solving a function, see don't understand! Such as bosses to rescue

Time:11-06

 
Void Navigation: : AddMoveFeedbackData (
Const cotek_msgs: : move_feedback: : ConstPtr& Feedback) {
State_manager_ - & gt; AddMoveFeedbackData (feedback);
}

The definition of state_manager_
STD: : from & lt; StateManager> State_manager_;


Did not understand what this add function inside, why use pointer call it again add, like recursion a face of meng,

CodePudding user response:

There is no specific code to do detailed
This is a class member function, parameter is feedback
Is that since share_ptr - & gt; Is packed in his internal StateManager *, object call AddMoveFeedbackData, parameter is feedback

CodePudding user response:

Two AddMoveFeedbackData same name, the purely grammatical didn't anything to do, packed in design mode, in order not to let you see the internal details.

CodePudding user response:

Inside out with another object, a, b two classes are defined function func (), b is a, the internal pointer to the object of a's func () calls - b & gt; Func (), very clear!

CodePudding user response:

refer to the second floor ggglivw response:
two AddMoveFeedbackData, same name purely grammatical didn't anything to do, packed in design mode, in order not to let you see the internal details.
really like this? Small white one, the feeling is so there is no need to dig into the... The somebody else is not going to write to understand

CodePudding user response:

reference wave820930 reply: 3/f
inside out with another object, a, b two classes are defined function func (), b is a, the internal pointer to the object of a's func () calls - b & gt; Func (), very clear!
simple bosses can say some concrete? Small white some can't keep up with you..

CodePudding user response:

reference c - 137-5 floor rick's reply:
Quote: refer to the third floor wave820930 response:
inside out with another object, a, b two classes are defined function func (), b is a, the internal pointer to the object of a's func () calls - b & gt; Func (), very clear!
simple bosses can say some concrete? Small white some can't keep up with you..

To see state_manager_ this object class also has such a function AddMoveFeedbackData, this object is defined in the Navigation class, through the objects of Navigation pass state_manager_ object, the parameters of function Pointers in Navigation object calls to this function, the equivalent of a transit point

CodePudding user response:

reference c - 137, 4/f, rick's reply:
Quote: refer to the second floor ggglivw response:
two AddMoveFeedbackData, same name purely grammatical didn't anything to do, packed in design mode, in order not to let you see the internal details.
really like this? Small white one, the feeling is so there is no need to dig into the... The somebody else is not going to write understand right


Temporarily don't have to dig into, your ability to temporarily haven't reached the point where, write more code, a few months later you will understand what you mean, a year later you will understand the meaning of another writing and benefits

CodePudding user response:

Look at the base of the class
  • Related