PUMA Library Reference Manual
Puma::UnitState Class Reference

#include <Puma/UnitState.h>

Description

Unit state information, like modification state and time of last modification.

Public Member Functions

 UnitState ()
 Constructor. More...
 
bool isModified () const
 Check if the unit was marked as modified. More...
 
long lastModified () const
 Get the last modification time of the unit. More...
 
void modified ()
 Mark the unit as being modified. More...
 
void lastModified (long time)
 Set a last modification time for the unit. More...
 
void unmodified ()
 Mark the unit as not being modified. More...
 

Constructor & Destructor Documentation

◆ UnitState()

Puma::UnitState::UnitState ( )
inline

Constructor.

Member Function Documentation

◆ isModified()

bool Puma::UnitState::isModified ( ) const
inline

Check if the unit was marked as modified.

Returns
True if unit was modified.

◆ lastModified() [1/2]

long Puma::UnitState::lastModified ( ) const
inline

Get the last modification time of the unit.

Returns
The last modification time or 0 if not set.

◆ lastModified() [2/2]

void Puma::UnitState::lastModified ( long  time)
inline

Set a last modification time for the unit.

Parameters
timeThe last modification time as returned by stat().

◆ modified()

void Puma::UnitState::modified ( )
inline

Mark the unit as being modified.

◆ unmodified()

void Puma::UnitState::unmodified ( )
inline

Mark the unit as not being modified.