Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
corpus2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Redmine
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Analysers
corpus2
Commits
6e5844fd
Commit
6e5844fd
authored
Apr 10, 2011
by
ilor
Browse files
Options
Downloads
Patches
Plain Diff
allow accesing a specific Writer's help string
parent
3f00499f
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
libcorpus2/io/writer.cpp
+11
-0
11 additions, 0 deletions
libcorpus2/io/writer.cpp
libcorpus2/io/writer.h
+5
-0
5 additions, 0 deletions
libcorpus2/io/writer.h
with
16 additions
and
0 deletions
libcorpus2/io/writer.cpp
+
11
−
0
View file @
6e5844fd
...
...
@@ -92,6 +92,17 @@ std::vector<std::string> TokenWriter::available_writer_types()
return
TokenWriterFactorySingleton
::
Instance
().
factory
.
RegisteredIds
();
}
std
::
string
TokenWriter
::
writer_help
(
const
std
::
string
&
class_id
)
{
std
::
map
<
std
::
string
,
std
::
string
>::
const_iterator
c
;
c
=
TokenWriterFactorySingleton
::
Instance
().
help
.
find
(
class_id
);
if
(
c
!=
TokenWriterFactorySingleton
::
Instance
().
help
.
end
())
{
return
c
->
second
;
}
else
{
return
""
;
}
}
std
::
vector
<
std
::
string
>
TokenWriter
::
available_writer_types_help
()
{
std
::
vector
<
std
::
string
>
v
=
available_writer_types
();
...
...
This diff is collapsed.
Click to expand it.
libcorpus2/io/writer.h
+
5
−
0
View file @
6e5844fd
...
...
@@ -90,6 +90,11 @@ public:
*/
static
std
::
vector
<
std
::
string
>
available_writer_types
();
/**
* Function to get the help string for a writer
*/
static
std
::
string
writer_help
(
const
std
::
string
&
class_id
);
/**
* Function to get a vector of available writer type strings with help
* strings appended
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment