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
19This file is part of CoastalME, the Coastal Modelling Environment.
20
21CoastalME 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
23This 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
25You 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 <utility>
29using std::pair;
30using std::make_pair;
31
32#include "line.h"
33
35{
36private:
38 vector<vector<pair<int, int> > > m_prVVLineSegment;
39
40protected:
41
42public:
43 CGeomMultiLine(void);
44 ~CGeomMultiLine(void) override;
45
46 void AppendLineSegment(void);
47 void AppendLineSegment(vector<pair<int, int> >*);
48// void AppendLineSegmentAndInherit(void);
49 int nGetNumLineSegments(void) const;
50 void TruncateLineSegments(int const);
51 void InsertLineSegment(int const);
52 vector<vector<pair<int, int> > > prVVGetAllLineSegAfter(int const);
53 void RemoveLineSegment(int const);
54
55 void AppendCoincidentProfileToLineSegments(pair<int, int> const);
56 void AddCoincidentProfileToExistingLineSegment(int const, int const, int const);
57 vector<pair<int, int> >* pprVGetPairedCoincidentProfilesForLineSegment(int const);
58 int nGetCoincidentProfileForLineSegment(int const, int const) const;
61// bool bFindProfileInCoincidentProfilesOfLineSegment(int const, int const);
63 void GetMostCoastwardSharedLineSegment(int const, int&, int&);
64
65 int nGetProf(int const, int const) const;
66 int nGetProfsLineSeg(int const, int const) const;
67 void SetProfsLineSeg(int const, int const, int const);
68
69 // int nFindProfilesLastSeg(int const) const;
70};
71#endif // MULTILINE_H
72
CGeomLine(void)
Constructor.
Definition line.cpp:34
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.
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:38
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.