| Flutter Impeller |

archive_vector.h
Go to the documentation of this file.
1 // Copyright 2013 The Flutter Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef FLUTTER_IMPELLER_ARCHIVIST_ARCHIVE_VECTOR_H_
6 #define FLUTTER_IMPELLER_ARCHIVIST_ARCHIVE_VECTOR_H_
7
8 #include "impeller/archivist/archive.h"
9
10 namespace impeller {
11
12 class ArchiveVector : public Archivable {
13 public:
14 static ArchiveDef kArchiveDefinition;
15
16 PrimaryKey GetPrimaryKey() const override;
17
18 const std::vector<int64_t> GetKeys() const;
19
20 bool Write(ArchiveLocation& item) const override;
21
22 bool Read(ArchiveLocation& item) override;
23
24 private:
25 std::vector<int64_t> keys_;
26
27 friend class ArchiveLocation;
28
29 ArchiveVector();
30
31 explicit ArchiveVector(std::vector<int64_t> keys);
32
33 ArchiveVector(const ArchiveVector&) = delete;
34
35 ArchiveVector& operator=(const ArchiveVector&) = delete;
36 };
37
38 } // namespace impeller
39
40 #endif // FLUTTER_IMPELLER_ARCHIVIST_ARCHIVE_VECTOR_H_
impeller::ArchiveVector::Write
bool Write(ArchiveLocation &item) const override
Definition: archive_vector.cc:34
impeller::Archivable
Instances of Archivables can be read from and written to a persistent archive.
Definition: archivable.h:28
impeller::ArchiveVector::Read
bool Read(ArchiveLocation &item) override
Definition: archive_vector.cc:45
impeller::ArchiveDef
Definition: archivable.h:15
impeller::ArchiveVector::kArchiveDefinition
static ArchiveDef kArchiveDefinition
Definition: archive_vector.h:14
impeller::PrimaryKey
std::optional< int64_t > PrimaryKey
Definition: archivable.h:22
impeller::ArchiveVector::GetPrimaryKey
PrimaryKey GetPrimaryKey() const override
Definition: archive_vector.cc:25
impeller::ArchiveLocation
Definition: archive_location.h:21
archive.h
impeller::ArchiveVector
Definition: archive_vector.h:12
impeller::ArchiveVector::GetKeys
const std::vector< int64_t > GetKeys() const
Definition: archive_vector.cc:30
impeller
Definition: aiks_context.cc:10