XII Release 0.1.0
Loading...
Searching...
No Matches
xiiDependencyFile Class Reference

Copyright (c) Theophilus Eriata. All Rights Reserved. More...

#include <DependencyFile.h>

Public Member Functions

void Clear ()
 Clears all files that were added with AddFileDependency().
void AddFileDependency (xiiStringView sFile)
 Adds one file as a dependency to the list.
const xiiHybridArray< xiiString, 16 > & GetFileDependencies () const
 Allows read access to all currently stored file dependencies.
xiiResult WriteDependencyFile (xiiStreamWriter &ref_stream) const
xiiResult ReadDependencyFile (xiiStreamReader &ref_stream)
xiiResult WriteDependencyFile (xiiStringView sFile) const
xiiResult ReadDependencyFile (xiiStringView sFile)
bool HasAnyFileChanged () const
void StoreCurrentTimeStamp ()

Detailed Description

Copyright (c) Theophilus Eriata. All Rights Reserved.

This class represents a set of files of which one wants to know when any one of them changes.

xiiDependencyFile stores a list of files that are the 'dependency set'. It can be serialized. Through HasAnyFileChanged() one can detect whether any of the files has changed, since the last call to StoreCurrentTimeStamp(). The time stamp that is retrieved through StoreCurrentTimeStamp() will also be serialized.

Member Function Documentation

◆ HasAnyFileChanged()

bool xiiDependencyFile::HasAnyFileChanged ( ) const

Retrieves the current file time stamps from the filesystem and determines whether any file has changed since the last call to StoreCurrentTimeStamp() (or ReadDependencyFile())

◆ ReadDependencyFile() [1/2]

xiiResult xiiDependencyFile::ReadDependencyFile ( xiiStreamReader & ref_stream)

Reads the state from a stream. Call HasAnyFileChanged() afterwards to determine whether anything has changed since when the data was serialized.

◆ ReadDependencyFile() [2/2]

xiiResult xiiDependencyFile::ReadDependencyFile ( xiiStringView sFile)

Reads the state from a file. Call HasAnyFileChanged() afterwards to determine whether anything has changed since when the data was serialized.

◆ StoreCurrentTimeStamp()

void xiiDependencyFile::StoreCurrentTimeStamp ( )

Retrieves the current file time stamps from the filesystem and stores it for later comparison. This value is also serialized through WriteDependencyFile(), so it should be called before that, to store the latest state.

◆ WriteDependencyFile() [1/2]

xiiResult xiiDependencyFile::WriteDependencyFile ( xiiStreamWriter & ref_stream) const

Writes the current state to a stream. Note that you probably should call StoreCurrentTimeStamp() before this, to serialize the latest file stamp

◆ WriteDependencyFile() [2/2]

xiiResult xiiDependencyFile::WriteDependencyFile ( xiiStringView sFile) const

Writes the current state to a file. Note that you probably should call StoreCurrentTimeStamp() before this, to serialize the latest file stamp


The documentation for this class was generated from the following files:
  • /home/runner/work/XII/XII/Source/Engine/Foundation/IO/DependencyFile.h
  • /home/runner/work/XII/XII/Source/Engine/Foundation/IO/Implementation/DependencyFile.cpp