Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
corpus2
Manage
Activity
Members
Labels
Plan
Issues
4
Issue boards
Milestones
Wiki
Redmine
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Analysers
corpus2
Commits
322d2ca9
Commit
322d2ca9
authored
12 years ago
by
Adam Radziszewski
Browse files
Options
Downloads
Patches
Plain Diff
ann sent rm chan, use with care
parent
9da40d48
Branches
Branches containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CMakeLists.txt
+2
-2
2 additions, 2 deletions
CMakeLists.txt
libcorpus2/ann/annotatedsentence.h
+8
-0
8 additions, 0 deletions
libcorpus2/ann/annotatedsentence.h
swig/annotatedsentence.i
+6
-0
6 additions, 0 deletions
swig/annotatedsentence.i
with
16 additions
and
2 deletions
CMakeLists.txt
+
2
−
2
View file @
322d2ca9
PROJECT
(
Corpus2Library
)
set
(
corpus2_ver_major
"1"
)
set
(
corpus2_ver_minor
"
2
"
)
set
(
corpus2_ver_patch
"
3
"
)
set
(
corpus2_ver_minor
"
3
"
)
set
(
corpus2_ver_patch
"
0
"
)
cmake_minimum_required
(
VERSION 2.8.0
)
...
...
This diff is collapsed.
Click to expand it.
libcorpus2/ann/annotatedsentence.h
+
8
−
0
View file @
322d2ca9
...
...
@@ -125,6 +125,14 @@ public:
return
true
;
}
/**
* Remove channel having a given name. Returns whether removed
* (will return false if no channel of the given name exists).
*/
bool
remove_channel
(
const
std
::
string
&
name
)
{
return
(
channels_
.
erase
(
name
)
>
0
);
}
const
chan_map_t
&
all_channels
()
const
{
return
channels_
;
}
...
...
This diff is collapsed.
Click to expand it.
swig/annotatedsentence.i
+
6
−
0
View file @
322d2ca9
...
...
@@ -50,6 +50,12 @@ namespace Corpus2 {
AnnotationChannel& get_channel(const std::string& name);
const AnnotationChannel& get_channel(const std::string& name) const;
bool add_channel(const std::string& name, const AnnotationChannel& chan);
/* Use with care. Note that get_channel returns a reference to the original
channel, hence it is strongly recommended to del the channel ref object
before attempting to call remove_channel. */
bool remove_channel(const std::string& name);
const chan_map_t& all_channels() const;
/* --------------------------------------------------------------------- */
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
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