src: Updating code style to conform (more or less) to ndn-cxx style
Also, adding .clang-format that describes the applied style. Note that
this style requires a slightly customized version of clang-format.
diff --git a/examples/ndn-simple-with-custom-app.cpp b/examples/ndn-simple-with-custom-app.cpp
index 2c9d1b9..c10ceaa 100644
--- a/examples/ndn-simple-with-custom-app.cpp
+++ b/examples/ndn-simple-with-custom-app.cpp
@@ -29,41 +29,43 @@
/**
* This scenario simulates a one-node two-app scenario:
*
- * +------+ <-----> (CustomApp1)
- * | Node |
+ * +------+ <-----> (CustomApp1)
+ * | Node |
* +------+ <-----> (CustomApp2)
*
* NS_LOG=CustomApp ./waf --run=ndn-simple-with-custom-app
*/
-int
-main (int argc, char *argv[])
+int
+main(int argc, char* argv[])
{
// Read optional command-line parameters (e.g., enable visualizer with ./waf --run=<> --visualize
CommandLine cmd;
- cmd.Parse (argc, argv);
+ cmd.Parse(argc, argv);
// Creating nodes
- Ptr<Node> node = CreateObject<Node> ();
+ Ptr<Node> node = CreateObject<Node>();
// Install CCNx stack on all nodes
ndn::StackHelper ccnxHelper;
- ccnxHelper.InstallAll ();
+ ccnxHelper.InstallAll();
// Installing applications
// Consumer
- ndn::AppHelper consumerHelper ("CustomApp");
- ApplicationContainer app1 = consumerHelper.Install (node);
- ApplicationContainer app2 = consumerHelper.Install (node);
+ ndn::AppHelper consumerHelper("CustomApp");
+ ApplicationContainer app1 = consumerHelper.Install(node);
+ ApplicationContainer app2 = consumerHelper.Install(node);
- app1.Start (Seconds (1.0)); // will send out Interest, which nobody will receive (Interests generated by an app will not got back to the app)
- app2.Start (Seconds (2.0)); // will send out an Interests, which will be received and satisfied by app1
-
- Simulator::Stop (Seconds (3.0));
+ app1.Start(Seconds(1.0)); // will send out Interest, which nobody will receive (Interests
+ // generated by an app will not got back to the app)
+ app2.Start(
+ Seconds(2.0)); // will send out an Interests, which will be received and satisfied by app1
- Simulator::Run ();
- Simulator::Destroy ();
+ Simulator::Stop(Seconds(3.0));
+
+ Simulator::Run();
+ Simulator::Destroy();
return 0;
}