• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2016 The PDFium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 
7 #include "core/fxge/cfx_graphstatedata.h"
8 
9 #include <utility>
10 
11 CFX_GraphStateData::CFX_GraphStateData() = default;
12 
13 CFX_GraphStateData::CFX_GraphStateData(const CFX_GraphStateData& src) = default;
14 
15 CFX_GraphStateData::CFX_GraphStateData(CFX_GraphStateData&& src) noexcept =
16     default;
17 
18 CFX_GraphStateData::~CFX_GraphStateData() = default;
19 
20 CFX_GraphStateData& CFX_GraphStateData::operator=(
21     const CFX_GraphStateData& that) = default;
22 
23 CFX_GraphStateData& CFX_GraphStateData::operator=(
24     CFX_GraphStateData&& that) noexcept = default;
25 
set_dash_array(std::vector<float> dash_array)26 void CFX_GraphStateData::set_dash_array(std::vector<float> dash_array) {
27   dash_array_ = std::move(dash_array);
28 }
29 
30 CFX_RetainableGraphStateData::CFX_RetainableGraphStateData() = default;
31 
32 // Note: can't default the copy constructor since Retainable has a deleted
33 // copy constructor (as it should). Instead, we want the default Retainable
34 // constructor to be invoked so as to create a copy with a ref-count of 1 as
35 // of the time it is created, then populate the remainder of the members from
36 // the |src| object.
CFX_RetainableGraphStateData(const CFX_RetainableGraphStateData & src)37 CFX_RetainableGraphStateData::CFX_RetainableGraphStateData(
38     const CFX_RetainableGraphStateData& src)
39     : CFX_GraphStateData(src) {}
40 
41 CFX_RetainableGraphStateData::~CFX_RetainableGraphStateData() = default;
42 
Clone() const43 RetainPtr<CFX_RetainableGraphStateData> CFX_RetainableGraphStateData::Clone()
44     const {
45   return pdfium::MakeRetain<CFX_RetainableGraphStateData>(*this);
46 }
47