-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1879 from AllenInstitute/feature/1879-various-upd…
…ates Extracted parts from #1860
- Loading branch information
Showing
9 changed files
with
201 additions
and
124 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
#pragma TextEncoding = "UTF-8" | ||
#pragma rtGlobals=3 // Use modern global access method and strict wave access. | ||
#pragma rtFunctionErrors=1 | ||
|
||
#ifdef AUTOMATED_TESTING | ||
#pragma ModuleName=MIES_Checks | ||
#endif | ||
|
||
/// @file MIES_Utilities_Checks.ipf | ||
/// @brief Threadsafe check functions which comply with either SFH_NumericChecker_Prototype or SFH_StringChecker_Prototype | ||
|
||
/// @brief Check if a name for an object adheres to the strict naming rules | ||
/// | ||
/// @see `DisplayHelpTopic "Standard Object Names"` | ||
/// | ||
/// UTF_NOINSTRUMENTATION | ||
threadsafe Function IsValidObjectName(string name) | ||
return NameChecker(name, 0) | ||
End | ||
|
||
/// @brief Check if a name for an object adheres to the liberal naming rules | ||
/// | ||
/// @see `DisplayHelpTopic "Liberal Object Names"` | ||
/// | ||
/// UTF_NOINSTRUMENTATION | ||
threadsafe Function IsValidLiberalObjectName(string name) | ||
return NameChecker(name, 1) | ||
End | ||
|
||
/// UTF_NOINSTRUMENTATION | ||
threadsafe static Function NameChecker(string name, variable liberal) | ||
return !cmpstr(name, CleanupName(name, !!liberal, MAX_OBJECT_NAME_LENGTH_IN_BYTES)) | ||
End | ||
|
||
/// UTF_NOINSTRUMENTATION | ||
threadsafe Function IsStrictlyPositiveAndFinite(variable var) | ||
|
||
return var > 0 && var < inf | ||
End | ||
|
||
/// UTF_NOINSTRUMENTATION | ||
threadsafe Function IsNullOrPositiveAndFinite(variable var) | ||
|
||
return var >= 0 && var < inf | ||
End | ||
|
||
/// @brief Return the truth if `val` is in the range `]0, 1[` | ||
/// | ||
/// UTF_NOINSTRUMENTATION | ||
threadsafe Function BetweenZeroAndOneExc(variable val) | ||
return val > 0.0 && val < 1.0 | ||
End | ||
|
||
/// @brief Return the truth if `val` is in the range `[0, 1]` | ||
/// | ||
/// UTF_NOINSTRUMENTATION | ||
threadsafe Function BetweenZeroAndOne(variable val) | ||
return val >= 0.0 && val <= 1.0 | ||
End | ||
|
||
/// @brief Return the truth if `val` is in the range `]0, 100[` | ||
/// | ||
/// UTF_NOINSTRUMENTATION | ||
threadsafe Function BetweenZeroAndOneHoundredExc(variable val) | ||
return val > 0.0 && val < 100.0 | ||
End | ||
|
||
/// @brief Return the truth if `val` is in the range `[0, 100]` | ||
/// | ||
/// UTF_NOINSTRUMENTATION | ||
threadsafe Function BetweenZeroAndOneHoundred(variable val) | ||
return val >= 0.0 && val <= 100.0 | ||
End |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.