[REDMINE1D-132] [RM-7475] [refactor] derive CLineCatalog from TLineVector Created: 13/Jun/23  Updated: 24/Aug/23  Resolved: 24/Aug/23

Status: Won't Fix
Project: 1D Redmine
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Normal
Reporter: Redmine-Jira Migtation Assignee: Redmine-Jira Migtation
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Created on 2022-09-01 15:14:57 by Didier Vibert. % Done: 0

CLineCatalog is essentially a container for one member :

<pre><code class="cpp">
TLineVector m_list;
</code></pre>

it would be better to try to redeclare it as a derived class of TLineVector which is an STL vector (std::vector<CLine>)

it then enables to pass the full CLineCatalog instance where we pass only a TLineVector, and will avoid code duplication to manipulate the TLineVector....



 Comments   
Comment by Redmine-Jira Migtation [ 24/Aug/23 ]

Comment by Ali Allaoui on 2022-09-08 08:39:27:
Deriving containers is not advised, because they do not have a virtual constructor.
Most important, whatever CLineCatalog structure, it should be used instead of TLineVector

Generated at Sat Feb 10 15:29:37 JST 2024 using Jira 8.3.4#803005-sha1:1f96e09b3c60279a408a2ae47be3c745f571388b.