AGX Dynamics 2.40.1.1
Loading...
Searching...
No Matches
FileState.h
Go to the documentation of this file.
1/*
2Copyright 2007-2025. Algoryx Simulation AB.
3
4All AGX source code, intellectual property, documentation, sample code,
5tutorials, scene files and technical white papers, are copyrighted, proprietary
6and confidential material of Algoryx Simulation AB. You may not download, read,
7store, distribute, publish, copy or otherwise disseminate, use or expose this
8material unless having a written signed agreement with Algoryx Simulation AB, or having been
9advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10valid commercial license from Algoryx Simulation AB.
11
12Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13from using this software, unless otherwise stated in written agreements with
14Algoryx Simulation AB.
15*/
16
17#ifndef AGXIO_FILESTATE_H
18#define AGXIO_FILESTATE_H
19
20#include <agx/agx.h>
21#include <agx/agxCore_export.h>
22#include <sys/types.h>
23#include <sys/stat.h>
24#include <agx/String.h>
25#include <agx/Vector.h>
26#include <agxIO/FileSystem.h>
27
28namespace agxIO
29{
30
33 {
34 public:
39 FileState( const agx::String& filename);
40
43
45 bool hasChanged() const;
46
51 bool reset();
52
54 bool operator==(const FileState& other);
55
57 bool operator!=(const FileState& other);
58
59 private:
60 agx::String m_filename;
61 bool m_valid;
63 };
64
69 class AGXCORE_EXPORT FileStateVector : public agx::Vector<agxIO::FileState>
70 {
72 public:
73
75 bool hasChanged() const;
76
78 void push_back( const FileState& fs );
79
81 void push_back( const agx::String& filename );
82 };
83
84
85} // namespace agxIO
86
87#endif
#define AGXCORE_EXPORT
vector for holding a set of file states, where the vector can be asked if any of the files has been c...
Definition: FileState.h:70
void push_back(const agx::String &filename)
Add a filename to the vector.
bool hasChanged() const
void push_back(const FileState &fs)
Add a FileState to the vector.
Class for storing and comparing a change date for a file on disk.
Definition: FileState.h:33
bool operator!=(const FileState &other)
bool reset()
Refresh the last changed info from the file.
FileState()
Default constructor, not valid.
bool hasChanged() const
Is the modified date different from the last call to reset()/Constructor?
FileState(const agx::String &filename)
Constructor.
bool operator==(const FileState &other)
Templated vector class.
Definition: agx/Vector.h:53
The agxIO namespace contains classes for reading, writing and finding files.
Definition: Material.h:42
struct stat StatStruct
Definition: FileSystem.h:34