Public Member Functions | Protected Attributes | Static Private Member Functions | Static Private Attributes | List of all members
vul_timestamp Class Reference

class to generate a unique timestamp. More...

#include <vul_timestamp.h>

Public Member Functions

 vul_timestamp ()
 Constructor. More...
 
virtual ~vul_timestamp ()=default
 Destructor. More...
 
void touch ()
 Get a new timestamp. More...
 
unsigned long get_time_stamp () const
 Get a new timestamp (incremented by 1 each time). More...
 
bool older (vul_timestamp const &t) const
 Returns true if t is older than the last timestamp. More...
 
bool older (vul_timestamp const *t) const
 Returns true if t is older than the last timestamp. More...
 

Protected Attributes

unsigned long timestamp_
 last timestamp. More...
 

Static Private Member Functions

static unsigned long get_unique_timestamp ()
 get a new timestamp. More...
 

Static Private Attributes

static VUL_EXPORT unsigned long mark = 0
 mark is incremented to give a unique timestamp. More...
 

Detailed Description

class to generate a unique timestamp.

Definition at line 16 of file vul_timestamp.h.

Constructor & Destructor Documentation

◆ vul_timestamp()

vul_timestamp::vul_timestamp ( )
inline

Constructor.

Definition at line 24 of file vul_timestamp.h.

◆ ~vul_timestamp()

virtual vul_timestamp::~vul_timestamp ( )
virtualdefault

Destructor.

Member Function Documentation

◆ get_time_stamp()

unsigned long vul_timestamp::get_time_stamp ( ) const
inline

Get a new timestamp (incremented by 1 each time).

Definition at line 31 of file vul_timestamp.h.

◆ get_unique_timestamp()

static unsigned long vul_timestamp::get_unique_timestamp ( )
inlinestaticprivate

get a new timestamp.

Definition at line 44 of file vul_timestamp.h.

◆ older() [1/2]

bool vul_timestamp::older ( vul_timestamp const &  t) const
inline

Returns true if t is older than the last timestamp.

Definition at line 34 of file vul_timestamp.h.

◆ older() [2/2]

bool vul_timestamp::older ( vul_timestamp const *  t) const
inline

Returns true if t is older than the last timestamp.

Definition at line 36 of file vul_timestamp.h.

◆ touch()

void vul_timestamp::touch ( )
inline

Get a new timestamp.

Definition at line 29 of file vul_timestamp.h.

Member Data Documentation

◆ mark

unsigned long vul_timestamp::mark = 0
staticprivate

mark is incremented to give a unique timestamp.

Definition at line 19 of file vul_timestamp.h.

◆ timestamp_

unsigned long vul_timestamp::timestamp_
protected

last timestamp.

Definition at line 40 of file vul_timestamp.h.


The documentation for this class was generated from the following files: