Fesapi  2.0.0.0
This project provides C++ classes which allow an easy access in import and export to the Energistics standards.
FileRelationship.h
1 /*-----------------------------------------------------------------------
2 Licensed to the Apache Software Foundation (ASF) under one
3 or more contributor license agreements. See the NOTICE file
4 distributed with this work for additional information
5 regarding copyright ownership. The ASF licenses this file
6 to you under the Apache License, Version 2.0 (the
7 "License"; you may not use this file except in compliance
8 with the License. You may obtain a copy of the License at
9 
10  http://www.apache.org/licenses/LICENSE-2.0
11 
12 Unless required by applicable law or agreed to in writing,
13 software distributed under the License is distributed on an
14 "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 KIND, either express or implied. See the License for the
16 specific language governing permissions and limitations
17 under the License.
18 -----------------------------------------------------------------------*/
19 #ifndef FILE_RELATIONSHIP_H
20 #define FILE_RELATIONSHIP_H
21 
22 #include <vector>
23 
24 #include "Relationship.h"
25 
26 namespace epc
27 {
30  {
31  private:
33  std::string pathName;
35  std::vector<Relationship> relationship;
36 
37  public:
40 
46  FileRelationship(const Relationship & frRelationship);
47 
53  FileRelationship(const std::vector<Relationship> & frRelationship);
55  ~FileRelationship() = default;
56 
62  bool isEmpty() const;
63 
69  const std::string& getPathName() const { return pathName; }
70 
76  const std::vector<Relationship>& getAllRelationship() const { return relationship; }
77 
85  Relationship getIndexRelationship(size_t index) const;
86 
92  std::string toString() const;
93 
99  void setPathName(const std::string & frPathName) { pathName = frPathName; }
100 
106  void addRelationship(const Relationship & frRelationship);
107 
113  void readFromString(const std::string & textInput);
114  };
115 }
116 
117 #endif
Definition: FileRelationship.h:30
bool isEmpty() const
void setPathName(const std::string &frPathName)
Definition: FileRelationship.h:99
FileRelationship(const std::vector< Relationship > &frRelationship)
FileRelationship(const Relationship &frRelationship)
void readFromString(const std::string &textInput)
Relationship getIndexRelationship(size_t index) const
FileRelationship()
Definition: FileRelationship.h:39
void addRelationship(const Relationship &frRelationship)
std::string toString() const
const std::vector< Relationship > & getAllRelationship() const
Definition: FileRelationship.h:76
const std::string & getPathName() const
Definition: FileRelationship.h:69
~FileRelationship()=default
Definition: Relationship.h:28
The epc namespace.
Definition: ContentType.h:25