Skip to content

Commit f705be9

Browse files
author
Dan Smith
committed
add overloads for other code
1 parent d613234 commit f705be9

4 files changed

Lines changed: 22 additions & 4 deletions

File tree

six/modules/c++/six.sicd/include/six/sicd/NITFReadComplexXMLControl.h

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,10 @@ namespace six
6565
six::NITFReadControl& NITFReadControl() { return reader; }
6666

6767
void load(const std::string& fromFile, const std::vector<std::string>* pSchemaPaths);
68+
void load(const std::string& fromFile, const std::vector<std::string>& schemaPaths)
69+
{
70+
load(fromFile, &schemaPaths);
71+
}
6872
void load(const std::filesystem::path& fromFile, const std::vector<std::filesystem::path>* pSchemaPaths);
6973
void load(const std::filesystem::path& fromFile, const std::vector<std::filesystem::path>& schemaPaths)
7074
{
@@ -74,7 +78,11 @@ namespace six
7478
{
7579
load(fromFile, nullptr /*schemaPaths*/);
7680
}
77-
void load(io::FileInputStream&, const std::vector<std::string>& schemaPaths);
81+
void load(io::FileInputStream&, const std::vector<std::string>* pSchemaPaths);
82+
void load(io::FileInputStream& fis, const std::vector<std::string>& schemaPaths)
83+
{
84+
load(fis, &schemaPaths);
85+
}
7886

7987
std::shared_ptr<const six::Container> getContainer() const;
8088
std::shared_ptr<six::Container> getContainer();

six/modules/c++/six.sicd/source/NITFReadComplexXMLControl.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,11 @@ void six::sicd::NITFReadComplexXMLControl::load(const std::filesystem::path& fro
5555
}
5656
load(fromFile.string(), pSchemaPaths_);
5757
}
58+
void six::sicd::NITFReadComplexXMLControl::load(io::FileInputStream& fis, const std::vector<std::string>* pSchemaPaths)
59+
{
60+
reader.load(fis, pSchemaPaths);
61+
}
62+
5863

5964
std::shared_ptr<const six::Container> six::sicd::NITFReadComplexXMLControl::getContainer() const
6065
{

six/modules/c++/six/include/six/NITFReadControl.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,12 @@ struct NITFReadControl : public ReadControl
136136
* \param schemaPaths Directories or files of schema locations.
137137
*/
138138
void load(io::SeekableInputStream& ioStream,
139-
const std::vector<std::string>& schemaPaths);
139+
const std::vector<std::string>* pSchemaPaths);
140+
void load(io::SeekableInputStream& ioStream,
141+
const std::vector<std::string>& schemaPaths)
142+
{
143+
load(ioStream, &schemaPaths);
144+
}
140145

141146
void load(std::shared_ptr<nitf::IOInterface> ioInterface);
142147
void load(std::shared_ptr<nitf::IOInterface> ioInterface,

six/modules/c++/six/source/NITFReadControl.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,10 +264,10 @@ void NITFReadControl::load(const std::string& fromFile,
264264
}
265265

266266
void NITFReadControl::load(io::SeekableInputStream& stream,
267-
const std::vector<std::string>& schemaPaths)
267+
const std::vector<std::string>* pSchemaPaths)
268268
{
269269
auto handle(std::make_shared<nitf::IOStreamReader>(stream));
270-
load(handle, schemaPaths);
270+
load(handle, pSchemaPaths);
271271
}
272272

273273
void NITFReadControl::load(std::shared_ptr<nitf::IOInterface> ioInterface)

0 commit comments

Comments
 (0)