Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
Algorithms Library Toolkit Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Container Registry
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Algorithms Library Toolkit
Algorithms Library Toolkit Core
Commits
808b1cd7
Commit
808b1cd7
authored
10 years ago
by
Jan Trávníček
Browse files
Options
Downloads
Patches
Plain Diff
blank symbol
parent
a777d44a
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
alib2/src/alphabet/Blank.cpp
+16
-0
16 additions, 0 deletions
alib2/src/alphabet/Blank.cpp
alib2/src/alphabet/Blank.h
+30
-0
30 additions, 0 deletions
alib2/src/alphabet/Blank.h
alib2/src/alphabet/Symbol.cpp
+5
-2
5 additions, 2 deletions
alib2/src/alphabet/Symbol.cpp
with
51 additions
and
2 deletions
alib2/src/alphabet/Blank.cpp
0 → 100644
+
16
−
0
View file @
808b1cd7
/*
*
Blank
.
cpp
*
*
Created
on
:
Mar
26
,
2013
*
Author
:
Jan
Travnicek
*/
#include
"Blank.h"
namespace
alphabet
{
Blank
::
Blank
()
:
Symbol
(
""
)
{
}
}
/* namespace alphabet */
This diff is collapsed.
Click to expand it.
alib2/src/alphabet/Blank.h
0 → 100644
+
30
−
0
View file @
808b1cd7
/*
* Blank.h
*
* Created on: Mar 26, 2013
* Author: Jan Trávníček
*/
#ifndef BLANK_H_
#define BLANK_H_
#include "Symbol.h"
namespace alphabet {
/**
* Represents blank symbol in an alphabet.
*/
class Blank : public Symbol {
public:
/**
* Creates a blank symbol.
* @param symbol name of the symbol
*/
Blank();
};
} /* namespace alphabet */
#endif /* BLANK_H_ */
This diff is collapsed.
Click to expand it.
alib2/src/alphabet/Symbol.cpp
+
5
−
2
View file @
808b1cd7
...
@@ -38,8 +38,11 @@ bool Symbol::operator !=(const Symbol& other) const {
...
@@ -38,8 +38,11 @@ bool Symbol::operator !=(const Symbol& other) const {
}
}
std
::
ostream
&
operator
<<
(
std
::
ostream
&
out
,
const
Symbol
&
symbol
)
{
std
::
ostream
&
operator
<<
(
std
::
ostream
&
out
,
const
Symbol
&
symbol
)
{
if
(
symbol
.
symbol
.
size
()
==
0
)
{
out
<<
"(Symbol "
<<
symbol
.
symbol
<<
")"
;
out
<<
"(Blank)"
;
}
else
{
out
<<
"(Symbol "
<<
symbol
.
symbol
<<
")"
;
}
return
out
;
return
out
;
}
}
...
...
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