Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Static Public Member Functions | List of all members
Nektar::ParseUtils Class Reference

#include <ParseUtils.hpp>

Classes

struct  fctor1
struct  fctor2
struct  fctor3
struct  fctor4
struct  fctor5
struct  SymbolFunctor
struct  ValueFunctor

Static Public Member Functions

static bool ParseRealAssignment (const char *const str, std::string &symbol, NekDouble &value)
static bool GenerateSeqVector (const char *const str, std::vector< unsigned int > &vec)
static bool GenerateOrderedVector (const char *const str, std::vector< unsigned int > &vec)
static bool GenerateOrderedVector (const char *const str, std::vector< NekDouble > &vec)
static bool GenerateUnOrderedVector (const char *const str, std::vector< NekDouble > &vec)
static bool GenerateOrderedStringVector (const char *const str, std::vector< std::string > &vec)

Detailed Description

Definition at line 59 of file ParseUtils.hpp.

Member Function Documentation

static bool Nektar::ParseUtils::GenerateOrderedStringVector ( const char *const  str,
std::vector< std::string > &  vec 
)
inlinestatic

Definition at line 142 of file ParseUtils.hpp.

Referenced by Nektar::LibUtilities::FieldIO::ImportFieldDefs(), Nektar::Utilities::InputDat::Process(), Nektar::Utilities::InputPts::Process(), Nektar::LibUtilities::MeshPartition::ReadExpansions(), and Nektar::SpatialDomains::MeshGraph::ReadExpansions().

{
// Functors used to parse the sequence.
fctor3 functor3(&vec);
return parse(str,
// Begin grammar
(
(+(print_p - ','))[functor3] >> *(',' >> (+(print_p - ','))[functor3])
)
,
// End grammar
space_p).full;
}
static bool Nektar::ParseUtils::GenerateOrderedVector ( const char *const  str,
std::vector< unsigned int > &  vec 
)
inlinestatic

Definition at line 96 of file ParseUtils.hpp.

Referenced by Nektar::LibUtilities::FieldIO::ImportFieldDefs(), Nektar::Utilities::ProcessBoundaryExtract::Process(), Nektar::Utilities::ProcessC0Projection::Process(), Nektar::LibUtilities::MeshPartition::ReadExpansions(), and Nektar::SpatialDomains::MeshGraph::ReadExpansions().

{
// Functors used to parse the sequence.
fctor1 functor1(&vec);
return parse(str,
// Begin grammar
(
uint_p[functor1] >> *(',' >> uint_p[functor1])
)
,
// End grammar
space_p).full;
}
static bool Nektar::ParseUtils::GenerateOrderedVector ( const char *const  str,
std::vector< NekDouble > &  vec 
)
inlinestatic

Definition at line 112 of file ParseUtils.hpp.

{
// Functors used to parse the sequence.
fctor4 functor4(&vec);
return parse(str,
// Begin grammar
(
real_p[functor4] >> *(',' >> real_p[functor4])
)
,
// End grammar
space_p).full;
}
static bool Nektar::ParseUtils::GenerateSeqVector ( const char *const  str,
std::vector< unsigned int > &  vec 
)
inlinestatic
static bool Nektar::ParseUtils::GenerateUnOrderedVector ( const char *const  str,
std::vector< NekDouble > &  vec 
)
inlinestatic

Definition at line 127 of file ParseUtils.hpp.

Referenced by Nektar::LibUtilities::FieldIO::ImportFieldDefs(), Nektar::Utilities::InputXml::Process(), Nektar::Utilities::ProcessInterpPoints::Process(), and Nektar::Utilities::ProcessSpherigon::Process().

{
// Functors used to parse the sequence.
fctor5 functor5(&vec);
return parse(str,
// Begin grammar
(
real_p[functor5] >> *(',' >> real_p[functor5])
)
,
// End grammar
space_p).full;
}
static bool Nektar::ParseUtils::ParseRealAssignment ( const char *const  str,
std::string &  symbol,
NekDouble value 
)
inlinestatic

Definition at line 62 of file ParseUtils.hpp.

{
SymbolFunctor symbolFunctor(&symbol);
ValueFunctor valueFunctor(&value);
return parse(str,
// Begin grammar
(
lexeme_d[alpha_p >> *alnum_p][symbolFunctor] >> "=" >> real_p[valueFunctor]
)
,
// End grammar
space_p).full;
}