summaryrefslogtreecommitdiffstats
path: root/debian/uncrustify-trinity/uncrustify-trinity-0.78.0/tests/expected/cpp/30030-Timestamp.h
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2023-11-18 17:53:35 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2023-11-19 19:27:29 +0900
commitc0a6f1b84c84749908961579b84513fd9f9d9eac (patch)
treeace7ba60cb031acd3a1f4ff10f7bbc5668fa801f /debian/uncrustify-trinity/uncrustify-trinity-0.78.0/tests/expected/cpp/30030-Timestamp.h
parent52e5ffe140f0f4402e97936447bc9a606045d2b5 (diff)
downloadextra-dependencies-c0a6f1b84c84749908961579b84513fd9f9d9eac.tar.gz
extra-dependencies-c0a6f1b84c84749908961579b84513fd9f9d9eac.zip
uncrustify-trinity: updated based on upstream version 0.78.0
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'debian/uncrustify-trinity/uncrustify-trinity-0.78.0/tests/expected/cpp/30030-Timestamp.h')
-rw-r--r--debian/uncrustify-trinity/uncrustify-trinity-0.78.0/tests/expected/cpp/30030-Timestamp.h166
1 files changed, 166 insertions, 0 deletions
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.78.0/tests/expected/cpp/30030-Timestamp.h b/debian/uncrustify-trinity/uncrustify-trinity-0.78.0/tests/expected/cpp/30030-Timestamp.h
new file mode 100644
index 00000000..998b7d6f
--- /dev/null
+++ b/debian/uncrustify-trinity/uncrustify-trinity-0.78.0/tests/expected/cpp/30030-Timestamp.h
@@ -0,0 +1,166 @@
+/**
+ * @file Timestamp.h
+ * Definition of class example::Timestamp.
+ */
+
+#ifndef __Timestamp_h_
+#define __Timestamp_h_
+
+#include <string>
+
+namespace example {
+class IStreamable;
+class InStream;
+class OutStream;
+
+/**
+ * Timestamp is a timestamp with nanosecond resolution.
+ */
+class Timestamp
+ : public IStreamable
+{
+public:
+
+/**
+ * Default constructor.
+ */
+Timestamp();
+
+/**
+ * Constructor.
+ *
+ * @param sec The seconds
+ * @param nsec The nanoseconds
+ */
+Timestamp(long sec, unsigned long nsec);
+
+/**
+ * Destructor.
+ */
+virtual ~Timestamp();
+
+/**
+ * Adds two timestamps.
+ *
+ * @param rhs The other timestamp
+ * @return The resulting timestamp
+ */
+Timestamp operator+(const Timestamp& rhs) const;
+
+/**
+ * Substracts two timestamps.
+ *
+ * @param rhs The other timestamp
+ * @return The resulting timestamp
+ */
+Timestamp operator-(const Timestamp& rhs) const;
+
+/**
+ * Compares two timestamps.
+ *
+ * @param rhs The other timestamp
+ * @return true if timestamp is smaller than the given timestamp
+ */
+bool operator<(const Timestamp& rhs) const;
+
+/**
+ * Compares two timestamps.
+ *
+ * @param rhs The other timestamp
+ * @return true if timestamp is greater than the given timestamp
+ */
+bool operator>(const Timestamp& rhs) const;
+
+/**
+ * Compares two timestamps.
+ *
+ * @param rhs The other timestamp
+ * @return true if timestamp is equal to the given timestamp
+ */
+bool operator==(const Timestamp& rhs) const;
+
+/**
+ * Compares two timestamps.
+ *
+ * @param rhs The other timestamp
+ * @return true if timestamp is not equal to the given timestamp
+ */
+bool operator!=(const Timestamp& rhs) const;
+
+/**
+ * Adds an other timestamp.
+ *
+ * @param rhs The other timestamp
+ */
+void operator+=(const Timestamp& rhs);
+
+/**
+ * Adds milliseconds.
+ *
+ * @param ms The milliseconds
+ * @return The resulting timestamp
+ */
+Timestamp addMilliseconds(unsigned long ms) const;
+
+/**
+ * Adds nanoseconds.
+ *
+ * @param ns The nanoseconds
+ * @return The resulting timestamp
+ */
+Timestamp addNanoseconds(unsigned long ns) const;
+
+/**
+ * Checks if this timestamp is zero.
+ *
+ * @return true if timestamp is zero
+ */
+bool isZero() const;
+
+/**
+ * Gets the milliseconds.
+ * @attention Negativ timestamp return zero
+ *
+ * @return The milliseconds
+ */
+unsigned long getMilliseconds() const;
+
+/**
+ * Divide timestamps by two.
+ *
+ * @return The resulting timestamp
+ */
+Timestamp divideByTwo();
+
+/**
+ * Gets the string-representation.
+ *
+ * @return The string representation
+ */
+std::string getString() const;
+
+/**
+ * Gets the string-representation in milliseconds.
+ *
+ * @return The string representation
+ */
+std::string getStringMilliseconds() const;
+
+/**
+ * Resets the timestamp.
+ */
+void reset();
+
+/** The seconds */
+long sec;
+
+/** The nanoseconds */
+unsigned long nsec;
+
+InStream& operator <<(InStream& in);
+
+OutStream& operator >>(OutStream& out) const;
+};
+} // namespace
+
+#endif // __Timestamp_h_