no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
Last revision | |||
— | doc:logging:tutorials-cpp:sample-program [2014/09/19 07:47] – created winkler | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Sample C++ Program for '' | ||
+ | <code cpp> | ||
+ | #include < | ||
+ | #include < | ||
+ | #include < | ||
+ | #include < | ||
+ | |||
+ | |||
+ | using namespace beliefstate_client; | ||
+ | |||
+ | |||
+ | int main(int argc, char** argv) { | ||
+ | ros:: | ||
+ | BeliefstateClient* bscl = new BeliefstateClient(" | ||
+ | | ||
+ | Context* ctxMain = new Context(bscl, | ||
+ | ctxMain-> | ||
+ | | ||
+ | Object* objCup = new Object("& | ||
+ | Object* objTable = new Object("& | ||
+ | Object* objHand = new Object("& | ||
+ | | ||
+ | Context* ctxCupOnTable = ctxMain-> | ||
+ | ctxCupOnTable-> | ||
+ | ctxCupOnTable-> | ||
+ | | ||
+ | Context* ctxCloseHand = ctxMain-> | ||
+ | ctxCloseHand-> | ||
+ | ctxCloseHand-> | ||
+ | | ||
+ | Context* ctxCupInHand = ctxMain-> | ||
+ | ctxCupInHand-> | ||
+ | ctxCupInHand-> | ||
+ | | ||
+ | Context* ctxLiftHand = ctxMain-> | ||
+ | ctxLiftHand-> | ||
+ | ctxLiftHand-> | ||
+ | | ||
+ | ctxCupOnTable-> | ||
+ | | ||
+ | // Cleanup | ||
+ | ctxCupInHand-> | ||
+ | ctxMain-> | ||
+ | | ||
+ | delete objCup; | ||
+ | delete objTable; | ||
+ | | ||
+ | delete ctxMain; | ||
+ | delete ctxCupOnTable; | ||
+ | delete ctxCupInHand; | ||
+ | delete ctxCloseHand; | ||
+ | delete ctxLiftHand; | ||
+ | | ||
+ | bscl-> | ||
+ | | ||
+ | delete bscl; | ||
+ | | ||
+ | return EXIT_SUCCESS; | ||
+ | } | ||
+ | </ |