• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2025 The Chromium 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 #include "gn/graph/include/node.h"
6 
Node(const std::string & name,const std::string & path)7 Node::Node(const std::string& name, const std::string& path)
8 {
9     name_ = name;
10     path_ = path;
11 }
12 
GetName() const13 const std::string& Node::GetName() const
14 {
15     return name_;
16 }
17 
GetPath() const18 const std::string& Node::GetPath() const
19 {
20     return path_;
21 }
22 
GetFromList() const23 const std::vector<Node*>& Node::GetFromList() const
24 {
25     return from_;
26 }
27 
GetToList() const28 const std::vector<Node*>& Node::GetToList() const
29 {
30     return to_;
31 }
32 
AddFrom(Node * node)33 void Node::AddFrom(Node* node)
34 {
35     from_.push_back(node);
36 }
37 
AddTo(Node * node)38 void Node::AddTo(Node* node)
39 {
40     to_.push_back(node);
41 }