CoastalME (Coastal Modelling Environment)
Simulates the long-term behaviour of complex coastlines
Loading...
Searching...
No Matches
multi_line.h
Go to the documentation of this file.
1
14
15#ifndef MULTILINE_H
16#define MULTILINE_H
17/* ===============================================================================================================================
18
19 This file is part of CoastalME, the Coastal Modelling Environment.
20
21 CoastalME is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
22
23 This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
24
25 You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
26
27===============================================================================================================================*/
28#include <vector>
29using std::vector;
30
31#include <utility>
32using std::pair;
33using std::make_pair;
34
35#include "line.h"
36
38{
39 private:
41 vector<vector<pair<int, int>>> m_prVVLineSegment;
42
43 protected:
44 public:
45 CGeomMultiLine(void);
46 ~CGeomMultiLine(void) override;
47
48 void AppendLineSegment(void);
49 void AppendLineSegment(vector<pair<int, int>> *);
50 // void AppendLineSegmentAndInherit(void);
51 int nGetNumLineSegments(void) const;
52 void TruncateLineSegments(int const);
53 void InsertLineSegment(int const);
54 vector<vector<pair<int, int>>> prVVGetAllLineSegAfter(int const);
55 void RemoveLineSegment(int const);
56
57 void AppendCoincidentProfileToLineSegments(pair<int, int> const);
58 void AddCoincidentProfileToExistingLineSegment(int const, int const, int const);
59 vector<pair<int, int>> *pprVGetPairedCoincidentProfilesForLineSegment(int const);
60 int nGetCoincidentProfileForLineSegment(int const, int const) const;
63 // bool bFindProfileInCoincidentProfilesOfLineSegment(int const, int const);
65 void GetMostCoastwardSharedLineSegment(int const, int &, int &);
66
67 int nGetProf(int const, int const) const;
68 int nGetProfsLineSeg(int const, int const) const;
69 void SetProfsLineSeg(int const, int const, int const);
70
71 // int nFindProfilesLastSeg(int const) const;
72};
73#endif // MULTILINE_H
CGeomLine(void)
Constructor.
Definition line.cpp:35
int nGetProfsLineSeg(int const, int const) const
Returns the profile's own line segment, given a line segment and the index of the co-incident profile...
bool bFindProfileInCoincidentProfilesOfLastLineSegment(int const)
Returns true if the given profile number is amongst the coincident profiles of the CGeomMultiLine obj...
int nGetNumCoincidentProfilesInLineSegment(int const)
Returns the count of coincident profiles in a specified line segment, or -1 if the line segment does ...
bool bFindProfileInCoincidentProfiles(int const)
Returns true if the given profile number is one of the coincident profiles of the a specified line se...
void AppendLineSegment(void)
Appends a new empty line segment.
int nGetCoincidentProfileForLineSegment(int const, int const) const
Returns the numbers of coincident profiles.
int nGetProf(int const, int const) const
Returns the profile number, given a line segment and the index of the co-incident profile for that li...
void TruncateLineSegments(int const)
Cuts short the number of line segments.
void RemoveLineSegment(int const)
Removes a line segment.
vector< vector< pair< int, int > > > prVVGetAllLineSegAfter(int const)
Returns a vector of the line segments which succeed the specified line segment number.
void AppendCoincidentProfileToLineSegments(pair< int, int > const)
Appends a coincident profile pair to the CGeomMultiLine object's final line segment.
void GetMostCoastwardSharedLineSegment(int const, int &, int &)
Finds the number of the most coastward line segment for which the two profiles are coincident,...
void SetProfsLineSeg(int const, int const, int const)
Sets a profile's own line segment number, given a line segment and the index of the co-incident profi...
vector< pair< int, int > > * pprVGetPairedCoincidentProfilesForLineSegment(int const)
Returns a vector of pairs (a line segment)
CGeomMultiLine(void)
Constructor, no parameters.
void InsertLineSegment(int const)
Inserts a line segment, inheriting from preceding line segments.
~CGeomMultiLine(void) override
Destructor.
vector< vector< pair< int, int > > > m_prVVLineSegment
A vector of line segments, each element is a vector of pairs. The first of the pair is a co-incident ...
Definition multi_line.h:41
void AddCoincidentProfileToExistingLineSegment(int const, int const, int const)
Adds a coincident profile to a pre-existing line segment of the CGeomMultiLine object.
int nGetNumLineSegments(void) const
Appends a line segment which then inherits from the preceding line segments.
Contains CGeomLine definitions.