gparted/include
Mike Fleetwood fdbd86f1ea Add adoption methods for adding items into a PartitionVector (#759726)
The current code uses push_back() and insert() to copy Partition objects
into the vector of pointers.  This has a few issues:
1) Unnecessary copying of Partition objects;
2) Hides the nature of the PartitionVector class as a manager of
   pointers to Partition objects by providing copy semantics to add
   items.  It is generally better to be explicit;
3) C++ doesn't provide polymorphic copy construction directly, but this
   is easily worked around by following the Virtual Constructor idiom
   [1], which would allow PartitionLUKS derived class objects to be
   copied into the vector.

Add push_back_adopt() and insert_adopt() methods which add a pointer to
a Partition object into the PartitionVector adopting ownership.

[1] Wikibooks: More C++ Idioms / Virtual Constructor
    https://en.wikibooks.org/wiki/More_C%2B%2B_Idioms/Virtual_Constructor

Bug 759726 - Implement Partition object polymorphism
2016-01-26 10:11:35 -07:00
..
.cvsignore added *.swp some modifications to pass 'make distcheck' minor cleanups 2005-11-25 12:59:47 +00:00
Copy_Blocks.h Replace obsolete FSF postal address in copyright notices (#721565) 2014-01-26 10:53:23 +00:00
DMRaid.h Replace obsolete FSF postal address in copyright notices (#721565) 2014-01-26 10:53:23 +00:00
Device.h Use PartitionVector class throughout the code (#759726) 2016-01-26 10:11:35 -07:00
DialogFeatures.h Make the File System Support dialog resizable (#342682) 2014-01-27 10:54:48 -07:00
DialogManageFlags.h Stop copying selected partition object in Manage Flags dialog (#750168) 2015-06-10 10:44:33 -06:00
Dialog_Base_Partition.h Return reference from Get_New_Partition() (#757671) 2015-11-11 10:12:18 -07:00
Dialog_Disklabel.h Replace obsolete FSF postal address in copyright notices (#721565) 2014-01-26 10:53:23 +00:00
Dialog_FileSystem_Label.h Rename class to Dialog_FileSystem_Label (#741424) 2015-02-01 10:08:23 -07:00
Dialog_Partition_Copy.h Include Partition.h header everywhere it's used 2016-01-26 10:11:35 -07:00
Dialog_Partition_Info.h Stop copying selected partition object in Information dialog (#750168) 2015-06-10 10:43:43 -06:00
Dialog_Partition_Name.h Make support of naming for other partition table types possible (#746214) 2015-03-25 10:02:42 -06:00
Dialog_Partition_New.h Include Partition.h header everywhere it's used 2016-01-26 10:11:35 -07:00
Dialog_Partition_Resize_Move.h Use PartitionVector class throughout the code (#759726) 2016-01-26 10:11:35 -07:00
Dialog_Progress.h Change OperationDetail to not store complex objects in STL containers (#729139) 2014-05-18 10:07:45 -06:00
Dialog_Rescue_Data.h Use PartitionVector class throughout the code (#759726) 2016-01-26 10:11:35 -07:00
DrawingAreaVisualDisk.h Use PartitionVector class throughout the code (#759726) 2016-01-26 10:11:35 -07:00
FS_Info.h Workaround older blkid not distinguishing between FAT16 and FAT32 (#743181) 2015-03-09 11:04:13 -06:00
FileSystem.h Include Partition.h header everywhere it's used 2016-01-26 10:11:35 -07:00
Frame_Resizer_Base.h Replace obsolete FSF postal address in copyright notices (#721565) 2014-01-26 10:53:23 +00:00
Frame_Resizer_Extended.h Replace obsolete FSF postal address in copyright notices (#721565) 2014-01-26 10:53:23 +00:00
GParted_Core.h Use PartitionVector class throughout the code (#759726) 2016-01-26 10:11:35 -07:00
HBoxOperations.h Replace obsolete FSF postal address in copyright notices (#721565) 2014-01-26 10:53:23 +00:00
LVM2_PV_Info.h Display list of Logical Volumes in the Partition Information dialog (754649) 2015-09-15 20:12:12 +01:00
Makefile.am Create PartitionVector class (#759726) 2016-01-26 10:11:34 -07:00
Operation.h Use PartitionVector class throughout the code (#759726) 2016-01-26 10:11:35 -07:00
OperationChangeUUID.h Use PartitionVector class throughout the code (#759726) 2016-01-26 10:11:35 -07:00
OperationCheck.h Use PartitionVector class throughout the code (#759726) 2016-01-26 10:11:35 -07:00
OperationCopy.h Use PartitionVector class throughout the code (#759726) 2016-01-26 10:11:35 -07:00
OperationCreate.h Use PartitionVector class throughout the code (#759726) 2016-01-26 10:11:35 -07:00
OperationDelete.h Use PartitionVector class throughout the code (#759726) 2016-01-26 10:11:35 -07:00
OperationDetail.h Change OperationDetail to not store complex objects in STL containers (#729139) 2014-05-18 10:07:45 -06:00
OperationFormat.h Use PartitionVector class throughout the code (#759726) 2016-01-26 10:11:35 -07:00
OperationLabelFileSystem.h Use PartitionVector class throughout the code (#759726) 2016-01-26 10:11:35 -07:00
OperationNamePartition.h Use PartitionVector class throughout the code (#759726) 2016-01-26 10:11:35 -07:00
OperationResizeMove.h Use PartitionVector class throughout the code (#759726) 2016-01-26 10:11:35 -07:00
Partition.h Use PartitionVector class throughout the code (#759726) 2016-01-26 10:11:35 -07:00
PartitionVector.h Add adoption methods for adding items into a PartitionVector (#759726) 2016-01-26 10:11:35 -07:00
PipeCapture.h Prevent cross thread write after free in _OnReadable() (#731752) 2014-07-06 10:22:40 -06:00
Proc_Partitions_Info.h Replace obsolete FSF postal address in copyright notices (#721565) 2014-01-26 10:53:23 +00:00
SWRaid_Info.h Ensure SWRaid_Info cache is loaded at least once (#756829) 2015-11-02 10:03:45 -07:00
TreeView_Detail.h Use PartitionVector class throughout the code (#759726) 2016-01-26 10:11:35 -07:00
Utils.h Move busy detection of SWRaid members into the new module (#756829) 2015-11-02 10:03:45 -07:00
Win_GParted.h Use PartitionVector class throughout the code (#759726) 2016-01-26 10:11:35 -07:00
btrfs.h Include Partition.h header everywhere it's used 2016-01-26 10:11:35 -07:00
exfat.h Replace obsolete FSF postal address in copyright notices (#721565) 2014-01-26 10:53:23 +00:00
ext2.h Include Partition.h header everywhere it's used 2016-01-26 10:11:35 -07:00
f2fs.h Include Partition.h header everywhere it's used 2016-01-26 10:11:35 -07:00
fat16.h Include Partition.h header everywhere it's used 2016-01-26 10:11:35 -07:00
hfs.h Include Partition.h header everywhere it's used 2016-01-26 10:11:35 -07:00
hfsplus.h Include Partition.h header everywhere it's used 2016-01-26 10:11:35 -07:00
i18n.h Make include guards unique (#539297) 2013-06-05 10:57:39 -06:00
jfs.h Include Partition.h header everywhere it's used 2016-01-26 10:11:35 -07:00
linux_swap.h Include Partition.h header everywhere it's used 2016-01-26 10:11:35 -07:00
lvm2_pv.h Include Partition.h header everywhere it's used 2016-01-26 10:11:35 -07:00
nilfs2.h Include Partition.h header everywhere it's used 2016-01-26 10:11:35 -07:00
ntfs.h Include Partition.h header everywhere it's used 2016-01-26 10:11:35 -07:00
reiser4.h Include Partition.h header everywhere it's used 2016-01-26 10:11:35 -07:00
reiserfs.h Include Partition.h header everywhere it's used 2016-01-26 10:11:35 -07:00
ufs.h Replace obsolete FSF postal address in copyright notices (#721565) 2014-01-26 10:53:23 +00:00
xfs.h Include Partition.h header everywhere it's used 2016-01-26 10:11:35 -07:00