KiCad PCB EDA Suite
Loading...
Searching...
No Matches
git_editor_snapshot.h
Go to the documentation of this file.
1/*
2 * This program source code file is part of KiCad, a free EDA CAD application.
3 *
4 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
5 *
6 * This program is free software: you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation, either version 3 of the License, or (at your
9 * option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20#ifndef GIT_EDITOR_SNAPSHOT_H
21#define GIT_EDITOR_SNAPSHOT_H
22
23#include <map>
24
25#include <wx/string.h>
26
27#include <frame_type.h>
28
31{
32 long long modified = 0;
33 long long size = 0;
34
35 bool operator==( const FILE_STAMP& aOther ) const { return modified == aOther.modified && size == aOther.size; }
36
37 bool operator!=( const FILE_STAMP& aOther ) const { return !( *this == aOther ); }
38};
39
45{
46 std::map<wxString, FILE_STAMP> files;
47};
48
55{
56 std::map<FRAME_T, DOCUMENT_SNAPSHOT> editors;
58};
59
60#endif // GIT_EDITOR_SNAPSHOT_H
The files making up one open document, each with its on-disk identity.
std::map< wxString, FILE_STAMP > files
What the open editors and the project settings looked like on disk before an operation that may rewri...
std::map< FRAME_T, DOCUMENT_SNAPSHOT > editors
DOCUMENT_SNAPSHOT settings
On-disk identity of one file, used to tell whether a git operation rewrote it.
long long modified
Modification time, nanoseconds where the platform provides them.
bool operator!=(const FILE_STAMP &aOther) const
bool operator==(const FILE_STAMP &aOther) const