File indexing completed on 2024-05-19 05:42:06
0001 // ct_lvtldr_lakosianedge.h -*-C++-*- 0002 0003 /* 0004 // Copyright 2023 Codethink Ltd <codethink@codethink.co.uk> 0005 // SPDX-License-Identifier: Apache-2.0 0006 // 0007 // Licensed under the Apache License, Version 2.0 (the "License"); 0008 // you may not use this file except in compliance with the License. 0009 // You may obtain a copy of the License at 0010 // 0011 // http://www.apache.org/licenses/LICENSE-2.0 0012 // 0013 // Unless required by applicable law or agreed to in writing, software 0014 // distributed under the License is distributed on an "AS IS" BASIS, 0015 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 0016 // See the License for the specific language governing permissions and 0017 // limitations under the License. 0018 */ 0019 0020 #ifndef INCLUDED_CT_LVTLDR_LAKOSIANEDGE 0021 #define INCLUDED_CT_LVTLDR_LAKOSIANEDGE 0022 0023 #include <lvtldr_export.h> 0024 0025 #include <ct_lvtshr_graphenums.h> 0026 #include <ct_lvtshr_uniqueid.h> 0027 0028 #include <functional> 0029 #include <memory> 0030 #include <string> 0031 #include <vector> 0032 0033 #include <result/result.hpp> 0034 0035 namespace Codethink::lvtldr { 0036 0037 class LakosianNode; 0038 0039 // ========================== 0040 // class LakosianEdge 0041 // ========================== 0042 0043 class LVTLDR_EXPORT LakosianEdge { 0044 // Models a relation between LakosianNodes 0045 0046 private: 0047 // DATA 0048 lvtshr::LakosRelationType d_type; 0049 LakosianNode *d_other; 0050 0051 public: 0052 LakosianEdge(lvtshr::LakosRelationType type, LakosianNode *other); 0053 0054 ~LakosianEdge() noexcept = default; 0055 0056 LakosianEdge(LakosianEdge&& other) noexcept; 0057 LakosianEdge(const LakosianEdge& other); 0058 0059 // ACCESSORS 0060 [[nodiscard]] lvtshr::LakosRelationType type() const; 0061 [[nodiscard]] LakosianNode *other() const; 0062 }; 0063 0064 LVTLDR_EXPORT bool operator==(LakosianEdge const& lhs, LakosianEdge const& rhs); 0065 0066 } // namespace Codethink::lvtldr 0067 0068 #endif // INCLUDED_CT_LVTLDR_LAKOSIANEDGE