Add a factory class for Directory objects. - #6561
Open
jbroadus wants to merge 1 commit into
Open
Conversation
Contributor
Author
|
Consider this an RFC. This is a pattern that isn't really used anywhere else in the code base, as far as I can tell. An alternative would be to pass around a non-factory object (DirectoryManager?) that can be queried for this information when a Directory is created. |
jbroadus
force-pushed
the
library-factory
branch
from
January 31, 2020 21:08
9369eb6 to
41a446a
Compare
Contributor
Author
|
Also, if you're trying to stabilize a 1.4 release, this is probably 1.4.1. |
jbroadus
force-pushed
the
library-factory
branch
3 times, most recently
from
February 11, 2020 20:37
0538a7d to
4e4036e
Compare
Contributor
Author
|
Renamed DirectoryFactory -> DirectoryManager to be more general. |
jbroadus
force-pushed
the
library-factory
branch
from
February 11, 2020 20:47
4e4036e to
13731e0
Compare
jbroadus
force-pushed
the
library-factory
branch
from
March 12, 2020 19:58
13731e0 to
909cac3
Compare
jbroadus
force-pushed
the
library-factory
branch
from
June 19, 2020 18:19
909cac3 to
7a97c8a
Compare
Create a DirectorManager class that is owned by the Library or Device objects and provided to methods that need to create Directory objects. This will allow information to be provided through the Directory object. For example: - If the directory is on a removable device. - A mount point that may change on future uses. - Whether paths should be relative or absolute.
jbroadus
force-pushed
the
library-factory
branch
from
March 29, 2021 17:58
7a97c8a to
03dae63
Compare
kentsangkm
reviewed
Jul 7, 2021
| } | ||
|
|
||
| ConnectedDevice::~ConnectedDevice() {} | ||
| ConnectedDevice::~ConnectedDevice() { delete directory_manager_; } |
Contributor
There was a problem hiding this comment.
why not to use the unique_ptr?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Create a DirectoryFactory class that is owned by the Library or Device objects
and provided to methods that need to create Directory objects. This will allow
information to be provided through the Directory object. For example: