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
2380e8ea
Commit
2380e8ea
authored
13 years ago
by
ilor
Browse files
Options
Downloads
Patches
Plain Diff
re-add nonconst tokens() accesor. Fix indentation
parent
d521f08f
Branches
Branches containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libcorpus2/sentence.h
+10
-10
10 additions, 10 deletions
libcorpus2/sentence.h
with
10 additions
and
10 deletions
libcorpus2/sentence.h
+
10
−
10
View file @
2380e8ea
...
...
@@ -39,28 +39,28 @@ namespace Corpus2 {
class
Sentence
:
private
boost
::
noncopyable
{
public:
/// Convenience typedef for a shared pointer to a Sentence
/// Convenience typedef for a shared pointer to a Sentence
typedef
boost
::
shared_ptr
<
Sentence
>
Ptr
;
/// Convenience typedef for a shared pointer to a const Sentence
/// Convenience typedef for a shared pointer to a const Sentence
typedef
boost
::
shared_ptr
<
const
Sentence
>
ConstPtr
;
/// Empty constructor. Creates a Sentence with no tokens.
Sentence
();
/// Sentence cloning. All the tokens are duplicated.
/// Sentence cloning. All the tokens are duplicated.
virtual
Ptr
clone_shared
()
const
;
/// Destructor. Deletes contained tokens.
virtual
~
Sentence
();
/// Releases ownership of all tokens, makes the sentence empty.
/// Warning: This will cause an obvious memory leak if the tokens are
/// not stored somewhere first (e.g. append()ed to another Sentence).
/// Releases ownership of all tokens, makes the sentence empty.
/// Warning: This will cause an obvious memory leak if the tokens are
/// not stored somewhere first (e.g. append()ed to another Sentence).
void
release_tokens
();
/// Convenience function to check if the sentence is empty
bool
empty
()
const
{
bool
empty
()
const
{
return
tokens_
.
empty
();
}
...
...
@@ -95,9 +95,9 @@ public:
}
/// Underlying vector accessor, nonconst (dangerous)
//
std::vector<Token*>& tokens() {
//
return tokens_;
//
}
std
::
vector
<
Token
*>&
tokens
()
{
return
tokens_
;
}
/// Helper function for appending tokens. Prefer using this.
/// Might be overriden in a child class to make adding a token keep
...
...
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