PUMA Library Reference Manual
Loading...
Searching...
No Matches
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.
 
bool isModified () const
 Check if the unit was marked as modified.
 
long lastModified () const
 Get the last modification time of the unit.
 
void modified ()
 Mark the unit as being modified.
 
void lastModified (long time)
 Set a last modification time for the unit.
 
void unmodified ()
 Mark the unit as not being modified.
 

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.