AXOM
Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.
inlet_utils.hpp File Reference
#include <memory>
#include <utility>
#include "axom/sidre.hpp"
#include "axom/fmt.hpp"
#include "axom/core/utilities/StringUtilities.hpp"
#include "axom/core/Path.hpp"

Classes

struct  axom::inlet::VerificationError
 Information on an Inlet verification error. More...
 

Namespaces

 axom
 
 axom::inlet
 
 axom::inlet::detail
 

Macros

#define INLET_VERIFICATION_WARNING(path, msg, errs)
 Utility macro for selecting between logging to SLIC and logging to a list of errors. More...
 

Enumerations

enum class  axom::inlet::ReaderResult { axom::inlet::Success , axom::inlet::NotFound , axom::inlet::NotHomogeneous , axom::inlet::WrongType }
 

Functions

void axom::inlet::setWarningFlag (axom::sidre::Group *root)
 This function is used to mark if anything went wrong during the defining phase of inlet so verify() will properly fail. More...
 
void axom::inlet::setFlag (axom::sidre::Group &target, axom::sidre::Group &root, const std::string &flag, bool value)
 This function is used to add a flag to the Inlet object corresponding to the provided Sidre group. More...
 
bool axom::inlet::checkFlag (const axom::sidre::Group &target, axom::sidre::Group &root, const std::string &flag)
 This function is used to determine the value of a flag for the Inlet object corresponding to the provided Sidre group. More...
 
bool axom::inlet::verifyRequired (const axom::sidre::Group &target, const bool condition, const std::string &type, std::vector< VerificationError > *errors=nullptr)
 This function is used to verify the required-ness of the Inlet object corresponding to the provided Sidre group. More...
 
bool axom::inlet::isCollectionGroup (const std::string &name)
 Determines whether a Container is a collection group. More...
 
void axom::inlet::markAsStructCollection (axom::sidre::Group &target)
 Marks the sidre::Group as a "struct collection" by adding a corresponding flag to the group. More...
 
void axom::inlet::markRetrievalStatus (axom::sidre::Group &target, const ReaderResult result)
 Adds a ReaderResult to a sidre::Group corresponding to an inlet object. More...
 
ReaderResult axom::inlet::collectionRetrievalResult (const bool contains_other_type, const bool contains_requested_type)
 Returns the corresponding retrieval result for a collection depending on whether the collection contained any elements of the requested or of other type. More...
 

Variables

const std::string axom::inlet::detail::COLLECTION_GROUP_NAME = "_inlet_collection"
 
const std::string axom::inlet::detail::COLLECTION_INDICES_NAME = "_inlet_collection_indices"
 
const std::string axom::inlet::detail::STRUCT_COLLECTION_FLAG = "_inlet_struct_collection"
 
const std::string axom::inlet::detail::REQUIRED_FLAG = "required"
 
const std::string axom::inlet::detail::STRICT_FLAG = "strict"
 

Macro Definition Documentation

◆ INLET_VERIFICATION_WARNING

#define INLET_VERIFICATION_WARNING (   path,
  msg,
  errs 
)
Value:
if(errs) \
{ \
errs->push_back({axom::Path {path}, msg}); \
} \
else \
{ \
SLIC_WARNING(msg); \
}
Path class for performing basic path operations with a user-selectable delimiter character.
Definition: Path.hpp:21

Utility macro for selecting between logging to SLIC and logging to a list of errors.

Parameters
pathThe path within the input file to warn on
msgThe warning message
errsThe list of errors, must be of type std::vector<VerificationError>*