AGXDynamics
2.35.0.2
FileState.h
Go to the documentation of this file.
1
/*
2
Copyright 2007-2022. 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
32
class
AGXCORE_EXPORT
FileState
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;
62
FileSystem::StatStruct
m_buf;
63
};
64
69
class
AGXCORE_EXPORT
FileStateVector
:
public
agx::Vector
<agxIO::FileState>
70
{
71
typedef
agx::Vector<agxIO::FileState>
Base
;
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
agxIO::FileStateVector
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
AGXCORE_EXPORT
#define AGXCORE_EXPORT
FileSystem.h
Vector.h
agx::Vector
Templated vector class.
Definition:
Vector.h:52
agxIO::FileSystem::StatStruct
struct stat StatStruct
Definition:
FileSystem.h:34
agxCore_export.h
agx::operator!=
bool operator!=(T val, InvalidIndexStruct)
Definition:
agx.h:196
agx.h
agxIO::FileState
Class for storing and comparing a change date for a file on disk.
Definition:
FileState.h:32
agx::operator==
bool operator==(T val, InvalidIndexStruct)
Definition:
agx.h:190
String.h
agx::AgXString< std::string >
agxIO
The agxIO namespace contains classes for reading, writing and finding files.
Definition:
Material.h:41
include
agxIO
FileState.h
Generated on Mon Jan 30 2023 15:44:12 for AGXDynamics by
1.8.17