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/utils/tracers/ndn-l3-aggregate-tracer.hpp b/utils/tracers/ndn-l3-aggregate-tracer.hpp
index a94d2f5..bedfccc 100644
--- a/utils/tracers/ndn-l3-aggregate-tracer.hpp
+++ b/utils/tracers/ndn-l3-aggregate-tracer.hpp
@@ -39,49 +39,54 @@
* @ingroup ndn-tracers
* @brief NDN network-layer tracer for aggregate packet counts
*/
-class L3AggregateTracer : public L3Tracer
-{
+class L3AggregateTracer : public L3Tracer {
public:
/**
* @brief Helper method to install tracers on all simulation nodes
*
* @param file File to which traces will be written. If filename is -, then std::out is used
- * @param averagingPeriod How often data will be written into the trace file (default, every half second)
+ * @param averagingPeriod How often data will be written into the trace file (default, every half
+ *second)
*
- * @returns a tuple of reference to output stream and list of tracers. !!! Attention !!! This tuple needs to be preserved
+ * @returns a tuple of reference to output stream and list of tracers. !!! Attention !!! This
+ *tuple needs to be preserved
* for the lifetime of simulation, otherwise SEGFAULTs are inevitable
*
*/
static void
- InstallAll (const std::string &file, Time averagingPeriod = Seconds (0.5));
+ InstallAll(const std::string& file, Time averagingPeriod = Seconds(0.5));
/**
* @brief Helper method to install tracers on the selected simulation nodes
*
* @param nodes Nodes on which to install tracer
* @param file File to which traces will be written. If filename is -, then std::out is used
- * @param averagingPeriod How often data will be written into the trace file (default, every half second)
+ * @param averagingPeriod How often data will be written into the trace file (default, every half
+ *second)
*
- * @returns a tuple of reference to output stream and list of tracers. !!! Attention !!! This tuple needs to be preserved
+ * @returns a tuple of reference to output stream and list of tracers. !!! Attention !!! This
+ *tuple needs to be preserved
* for the lifetime of simulation, otherwise SEGFAULTs are inevitable
*
*/
static void
- Install (const NodeContainer &nodes, const std::string &file, Time averagingPeriod = Seconds (0.5));
+ Install(const NodeContainer& nodes, const std::string& file, Time averagingPeriod = Seconds(0.5));
/**
* @brief Helper method to install tracers on a specific simulation node
*
* @param nodes Nodes on which to install tracer
* @param file File to which traces will be written. If filename is -, then std::out is used
- * @param averagingPeriod How often data will be written into the trace file (default, every half second)
+ * @param averagingPeriod How often data will be written into the trace file (default, every half
+ *second)
*
- * @returns a tuple of reference to output stream and list of tracers. !!! Attention !!! This tuple needs to be preserved
+ * @returns a tuple of reference to output stream and list of tracers. !!! Attention !!! This
+ *tuple needs to be preserved
* for the lifetime of simulation, otherwise SEGFAULTs are inevitable
*
*/
static void
- Install (Ptr<Node> node, const std::string &file, Time averagingPeriod = Seconds (0.5));
+ Install(Ptr<Node> node, const std::string& file, Time averagingPeriod = Seconds(0.5));
/**
* @brief Explicit request to remove all statically created tracers
@@ -90,91 +95,93 @@
* or if it is desired to do a postprocessing of the resulting data
*/
static void
- Destroy ();
+ Destroy();
/**
* @brief Trace constructor that attaches to the node using node pointer
* @param os reference to the output stream
* @param node pointer to the node
*/
- L3AggregateTracer (boost::shared_ptr<std::ostream> os, Ptr<Node> node);
+ L3AggregateTracer(boost::shared_ptr<std::ostream> os, Ptr<Node> node);
/**
* @brief Trace constructor that attaches to the node using node name
* @param os reference to the output stream
* @param nodeName name of the node registered using Names::Add
*/
- L3AggregateTracer (boost::shared_ptr<std::ostream> os, const std::string &nodeName);
+ L3AggregateTracer(boost::shared_ptr<std::ostream> os, const std::string& nodeName);
/**
* @brief Destructor
*/
- virtual ~L3AggregateTracer ();
+ virtual ~L3AggregateTracer();
/**
* @brief Helper method to install tracers on a specific simulation node
*
* @param nodes Nodes on which to install tracer
* @param outputStream Smart pointer to a stream
- * @param averagingPeriod How often data will be written into the trace file (default, every half second)
+ * @param averagingPeriod How often data will be written into the trace file (default, every half
+ *second)
*
- * @returns a tuple of reference to output stream and list of tracers. !!! Attention !!! This tuple needs to be preserved
+ * @returns a tuple of reference to output stream and list of tracers. !!! Attention !!! This
+ *tuple needs to be preserved
* for the lifetime of simulation, otherwise SEGFAULTs are inevitable
*/
static Ptr<L3AggregateTracer>
- Install (Ptr<Node> node, boost::shared_ptr<std::ostream> outputStream, Time averagingPeriod = Seconds (0.5));
+ Install(Ptr<Node> node, boost::shared_ptr<std::ostream> outputStream,
+ Time averagingPeriod = Seconds(0.5));
protected:
// from L3Tracer
virtual void
- PrintHeader (std::ostream &os) const;
+ PrintHeader(std::ostream& os) const;
virtual void
- Print (std::ostream &os) const;
+ Print(std::ostream& os) const;
virtual void
- OutInterests (Ptr<const Interest>, Ptr<const Face>);
+ OutInterests(Ptr<const Interest>, Ptr<const Face>);
virtual void
- InInterests (Ptr<const Interest>, Ptr<const Face>);
+ InInterests(Ptr<const Interest>, Ptr<const Face>);
virtual void
- DropInterests (Ptr<const Interest>, Ptr<const Face>);
+ DropInterests(Ptr<const Interest>, Ptr<const Face>);
virtual void
- OutNacks (Ptr<const Interest>, Ptr<const Face>);
+ OutNacks(Ptr<const Interest>, Ptr<const Face>);
virtual void
- InNacks (Ptr<const Interest>, Ptr<const Face>);
+ InNacks(Ptr<const Interest>, Ptr<const Face>);
virtual void
- DropNacks (Ptr<const Interest>, Ptr<const Face>);
+ DropNacks(Ptr<const Interest>, Ptr<const Face>);
virtual void
- OutData (Ptr<const Data>, bool fromCache, Ptr<const Face>);
+ OutData(Ptr<const Data>, bool fromCache, Ptr<const Face>);
virtual void
- InData (Ptr<const Data>, Ptr<const Face>);
+ InData(Ptr<const Data>, Ptr<const Face>);
virtual void
- DropData (Ptr<const Data>, Ptr<const Face>);
-
+ DropData(Ptr<const Data>, Ptr<const Face>);
virtual void
- SatisfiedInterests (Ptr<const pit::Entry>);
+ SatisfiedInterests(Ptr<const pit::Entry>);
virtual void
- TimedOutInterests (Ptr<const pit::Entry>);
+ TimedOutInterests(Ptr<const pit::Entry>);
protected:
void
- SetAveragingPeriod (const Time &period);
+ SetAveragingPeriod(const Time& period);
void
- Reset ();
+ Reset();
void
- PeriodicPrinter ();
+ PeriodicPrinter();
protected:
boost::shared_ptr<std::ostream> m_os;
@@ -182,7 +189,7 @@
Time m_period;
EventId m_printEvent;
- mutable std::map<Ptr<const Face>, boost::tuple<Stats, Stats> > m_stats;
+ mutable std::map<Ptr<const Face>, boost::tuple<Stats, Stats>> m_stats;
};
} // namespace ndn