AGX Dynamics  2.37.3.2
FileState.h
Go to the documentation of this file.
1 /*
2 Copyright 2007-2024. Algoryx Simulation AB.
3 
4 All AGX source code, intellectual property, documentation, sample code,
5 tutorials, scene files and technical white papers, are copyrighted, proprietary
6 and confidential material of Algoryx Simulation AB. You may not download, read,
7 store, distribute, publish, copy or otherwise disseminate, use or expose this
8 material unless having a written signed agreement with Algoryx Simulation AB, or having been
9 advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10 valid commercial license from Algoryx Simulation AB.
11 
12 Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13 from using this software, unless otherwise stated in written agreements with
14 Algoryx 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 
28 namespace agxIO
29 {
30 
33  {
34  public:
39  FileState( const agx::String& filename);
40 
42  FileState();
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
The agxIO namespace contains classes for reading, writing and finding files.
Definition: Material.h:41
bool operator==(T val, InvalidIndexStruct)
Definition: agx.h:194
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:69
Templated vector class.
Definition: Vector.h:52
Class for storing and comparing a change date for a file on disk.
Definition: FileState.h:32
struct stat StatStruct
Definition: FileSystem.h:34
bool operator!=(T val, InvalidIndexStruct)
Definition: agx.h:200
#define AGXCORE_EXPORT