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 #pragma once
6 
7 #include "flutter/fml/macros.h"
9 
10 namespace impeller {
11 
12 class ArchiveVector : public Archivable {
13  public:
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  ArchiveVector(std::vector<int64_t> keys);
32 
33  FML_DISALLOW_COPY_AND_ASSIGN(ArchiveVector);
34 };
35 
36 } // namespace impeller
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:27
impeller::ArchiveVector::Read
bool Read(ArchiveLocation &item) override
Definition: archive_vector.cc:45
impeller::ArchiveDef
Definition: archivable.h:14
impeller::ArchiveVector::kArchiveDefinition
static ArchiveDef kArchiveDefinition
Definition: archive_vector.h:14
impeller::PrimaryKey
std::optional< int64_t > PrimaryKey
Definition: archivable.h:21
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