Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
mantid
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mantidproject
mantid
Commits
82cc7dfb
Commit
82cc7dfb
authored
14 years ago
by
Peterson, Peter
Browse files
Options
Downloads
Patches
Plain Diff
Exposing simple static function to the outside. Refs #1466.
parent
82e1b6a8
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Code/Mantid/Kernel/inc/MantidKernel/FileValidator.h
+4
-1
4 additions, 1 deletion
Code/Mantid/Kernel/inc/MantidKernel/FileValidator.h
Code/Mantid/Kernel/src/FileValidator.cpp
+1
-1
1 addition, 1 deletion
Code/Mantid/Kernel/src/FileValidator.cpp
with
5 additions
and
2 deletions
Code/Mantid/Kernel/inc/MantidKernel/FileValidator.h
+
4
−
1
View file @
82cc7dfb
...
@@ -11,6 +11,9 @@ namespace Mantid
...
@@ -11,6 +11,9 @@ namespace Mantid
{
{
namespace
Kernel
namespace
Kernel
{
{
bool
has_ending
(
const
std
::
string
&
value
,
const
std
::
string
&
ending
);
/** FileValidator is a validator that checks that a filepath is valid.
/** FileValidator is a validator that checks that a filepath is valid.
@author Matt Clarke, ISIS.
@author Matt Clarke, ISIS.
...
@@ -44,7 +47,7 @@ public:
...
@@ -44,7 +47,7 @@ public:
virtual
~
FileValidator
();
virtual
~
FileValidator
();
std
::
set
<
std
::
string
>
allowedValues
()
const
;
std
::
set
<
std
::
string
>
allowedValues
()
const
;
IValidator
<
std
::
string
>*
clone
();
IValidator
<
std
::
string
>*
clone
();
private:
private:
/// The list of permitted extensions
/// The list of permitted extensions
const
std
::
set
<
std
::
string
>
m_extensions
;
const
std
::
set
<
std
::
string
>
m_extensions
;
...
...
This diff is collapsed.
Click to expand it.
Code/Mantid/Kernel/src/FileValidator.cpp
+
1
−
1
View file @
82cc7dfb
...
@@ -102,7 +102,7 @@ std::string FileValidator::checkValidity(const std::string &value) const
...
@@ -102,7 +102,7 @@ std::string FileValidator::checkValidity(const std::string &value) const
* @param value The string to check the ending for.
* @param value The string to check the ending for.
* @param ending The ending the string should have.
* @param ending The ending the string should have.
*/
*/
static
bool
has_ending
(
const
std
::
string
&
value
,
const
std
::
string
&
ending
)
bool
has_ending
(
const
std
::
string
&
value
,
const
std
::
string
&
ending
)
{
{
if
(
ending
.
empty
())
// always match against an empty extension
if
(
ending
.
empty
())
// always match against an empty extension
return
true
;
return
true
;
...
...
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