-
Notifications
You must be signed in to change notification settings - Fork 197
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4296 from vgteam/read-lr-giraffe
Allow reading GAMs with embedded JSON metadata
- Loading branch information
Showing
4 changed files
with
53 additions
and
1 deletion.
There are no files selected for viewing
Submodule libvgio
updated
8 files
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/** | ||
* \file register_loader_params_json.cpp | ||
* Defines IO for a VG graph from stream files of Graph objects. | ||
*/ | ||
|
||
#include <vg/io/registry.hpp> | ||
#include "register_loader_params_json.hpp" | ||
|
||
#include <iterator> | ||
|
||
|
||
namespace vg { | ||
|
||
namespace io { | ||
|
||
using namespace std; | ||
using namespace vg::io; | ||
|
||
void register_loader_params_json() { | ||
Registry::register_loader<std::string>("PARAMS_JSON", wrap_bare_loader([](std::istream& stream) -> void* { | ||
// Read the whole stream with an iterator. See <https://stackoverflow.com/a/3203502>. | ||
return new std::string(std::istreambuf_iterator<char>(stream), {}); | ||
})); | ||
} | ||
|
||
} | ||
|
||
} | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#ifndef VG_IO_REGISTER_LOADER_PARAMS_JSON_HPP_INCLUDED | ||
#define VG_IO_REGISTER_LOADER_PARAMS_JSON_HPP_INCLUDED | ||
|
||
/** | ||
* \file register_loader_params_json.hpp | ||
* Defines IO for embedded parameters. | ||
*/ | ||
|
||
namespace vg { | ||
|
||
namespace io { | ||
|
||
using namespace std; | ||
|
||
void register_loader_params_json(); | ||
|
||
} | ||
|
||
} | ||
|
||
#endif |
db574a5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
vg CI tests complete for merge to master. View the full report here.
16 tests passed, 0 tests failed and 0 tests skipped in 17091 seconds