Jpp 20.0.0-195-g190c9e876
the software that should make you happy
Loading...
Searching...
No Matches
JAANET::JEvtWeightFactorProduct::JEvtWeightFactorProductHelper Struct Reference

Auxiliary class for I/O of product of event-weight factors. More...

Inheritance diagram for JAANET::JEvtWeightFactorProduct::JEvtWeightFactorProductHelper:
JEEP::JProperties std::map< std::string, JPropertiesElement > JLANG::JEquationParameters JEEP::JMessage< JProperties >

Public Types

typedef std::map< std::string, JPropertiesElement > JMap_t
 

Public Member Functions

template<class JEvtWeightFactorProduct_t >
 JEvtWeightFactorProductHelper (JEvtWeightFactorProduct_t &product, const JEquationParameters &eqpars)
 Constructor.
 
template<class T >
void put (const std::string &key, T &object)
 Put object at given key.
 
JPropertiesjoin (const JProperties &properties)
 Join properties objects.
 
JEquationParametersjoin (const JEquationParameters &value)
 Join equation parameters.
 
bool read (const JEquation &equation)
 Read equation.
 
bool read (const std::string &buffer)
 Read from input string.
 
std::istream & read (std::istream &in)
 Read from input stream.
 
std::istream & read (std::istream &in, const std::string &format)
 Read from input stream according given format.
 
template<class T >
std::istream & read (std::istream &in, T __begin, T __end)
 Read from input stream according given format.
 
std::ostream & write (std::ostream &out) const
 Write the current parameter values.
 
std::ostream & write (std::ostream &out, const std::string &format) const
 Write to output stream according given format.
 
template<class T >
std::ostream & write (std::ostream &out, T __begin, T __end) const
 Write to output stream according given format.
 
std::string sed (const std::string &format, const std::string &prefix="", const std::string &postfix="")
 Stream editing of input format.
 
template<class T >
const T & getValue (const std::string &key) const
 Get value.
 
template<class T >
T & getValue (const std::string &key)
 Get value.
 
template<class T >
void setValue (const std::string &key, const T &value)
 Set value.
 
std::string getString (const std::string &key) const
 Get string value.
 
std::ostream & print (std::ostream &out) const
 Print the current parameter values.
 
const JEquationParametersgetEquationParameters () const
 Get equation parameters.
 
void setEquationParameters (const JEquationParameters &buffer)
 Set equation parameters.
 
const char getDefaultSeparator () const
 Get default separator character.
 
const std::string & getSeparator () const
 Get separator characters.
 
std::string & getSeparator ()
 Get separator characters.
 
void setSeparator (const std::string &sep)
 Set separator character(s).
 
const char getDefaultEndOfLine () const
 Get default end of line character.
 
const char getPreferredEndOfLine (const unsigned int index) const
 Get preferred end of line character.
 
const string_typegetEndOfLine () const
 Get end of line characters.
 
string_typegetEndOfLine ()
 Get end of line characters.
 
void setEndOfLine (const std::string &eol)
 Set end of line characters.
 
const char getDefaultDivision () const
 Get default division character.
 
const std::string & getDivision () const
 Get division characters.
 
std::string & getDivision ()
 Get division characters.
 
void setDivision (const std::string &div)
 Set division characters.
 
const char getDefaultSkipLine () const
 Get default skip line character.
 
const std::string & getSkipLine () const
 Get skip line characters.
 
std::string & getSkipLine ()
 Get skip line characters.
 
void setSkipLine (const std::string &skip)
 Set skip line characters.
 
void setBrackets (const char left, const char right)
 Set brackets.
 
char getLeftBracket () const
 Get left bracket.
 
char & getLeftBracket ()
 Get left bracket.
 
char getRightBracket () const
 Get right bracket.
 
char & getRightBracket ()
 Get right bracket.
 
const char getDefaultWhiteSpace () const
 Get default white space character.
 
const string_typegetWhiteSpace () const
 Get white space characters.
 
string_typegetWhiteSpace ()
 Get white space characters.
 
void setWhiteSpace (const std::string &ws)
 Set white space characters.
 
const std::string & getComment () const
 Get comment string.
 
std::string & getComment ()
 Get comment string.
 
void setComment (const std::string &comment)
 Set comment string.
 
bool isSeparator (const char c) const
 Test for separator character.
 
bool isEndOfLine (const char c) const
 Test for end of line character.
 
bool isDivision (const char c) const
 Test for division character.
 
bool isSkipLine (const char c) const
 Test for skip line character.
 
bool isLeftBracket (const char c) const
 Test for left bracket character.
 
bool isRightBracket (const char c) const
 Test for right bracket character.
 
bool isWhiteSpace (const char c) const
 Test for white space character.
 

Static Public Member Functions

static std::string getKey (const std::string &buffer, const std::string &sep)
 Utility method to strip off all leading characters from a string until specified character(s).
 

Static Public Attributes

static int debug
 debug level (default is off).
 

Protected Attributes

std::string sep
 
string_type eol
 
std::string div
 
std::string skip
 
char left
 
char right
 
string_type ws
 
std::string comment
 

Detailed Description

Auxiliary class for I/O of product of event-weight factors.

Definition at line 379 of file JEvtWeightFactorProduct.hh.

Member Typedef Documentation

◆ JMap_t

std::map<std::string, JPropertiesElement> JEEP::JProperties::JMap_t
inherited

Definition at line 506 of file JProperties.hh.

Constructor & Destructor Documentation

◆ JEvtWeightFactorProductHelper()

template<class JEvtWeightFactorProduct_t >
JAANET::JEvtWeightFactorProduct::JEvtWeightFactorProductHelper::JEvtWeightFactorProductHelper ( JEvtWeightFactorProduct_t & product,
const JEquationParameters & eqpars )
inline

Constructor.

Parameters
productproduct of event-weight factors
eqparsequation parameters

Definition at line 389 of file JEvtWeightFactorProduct.hh.

390 :
391 JProperties(eqpars, 1)
392 {
393 using namespace std;
394 using namespace JPP;
395
396 (*this)[JEvtWeightFactor::getTypeKey()] = "product";
397
398 JProperties factors(eqpars, 1);
399
400 for (typename JEvtWeightFactorProduct_t::const_iterator i = product.cbegin(); i != product.cend(); ++i) {
401
402 const int index = 1 + distance(product.cbegin(), i);
403
404 const string key = MAKE_STRING("factor" << index);
405
406 JProperties sub = i->getProperties(eqpars);
407
408 (*this)[key] = sub;
409 }
410 }
#define MAKE_STRING(A)
Make string.
Definition JPrint.hh:63
std::vector< T >::difference_type distance(typename std::vector< T >::const_iterator first, typename PhysicsEvent::const_iterator< T > second)
Specialisation of STL distance.
Utility class to parse parameter values.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
static const char *const getTypeKey()
Get type keyword.

Member Function Documentation

◆ getKey()

static std::string JEEP::JProperties::getKey ( const std::string & buffer,
const std::string & sep )
inlinestaticinherited

Utility method to strip off all leading characters from a string until specified character(s).

Parameters
bufferinput string
seplast character(s) to strip
Returns
modified string

Definition at line 518 of file JProperties.hh.

519 {
520 using namespace std;
521
522 const size_type pos = buffer.find_last_of(sep);
523
524 if (pos != string::npos)
525 return buffer.substr(pos + 1);
526 else
527 return buffer;
528 }

◆ put()

template<class T >
void JEEP::JProperties::put ( const std::string & key,
T & object )
inlineinherited

Put object at given key.

Parameters
keykey
objectobject

Definition at line 566 of file JProperties.hh.

567 {
568 this->insert(value_type(key, JPropertiesElement(object)));
569 }

◆ join() [1/2]

JProperties & JEEP::JProperties::join ( const JProperties & properties)
inlineinherited

Join properties objects.

Parameters
propertiesproperties
Returns
properties

Definition at line 578 of file JProperties.hh.

579 {
580 JEquationParameters::join(properties);
581
582 insert(properties.begin(), properties.end());
583
584 return *this;
585 }
JEquationParameters & join(const JEquationParameters &value)
Join equation parameters.

◆ join() [2/2]

JEquationParameters & JLANG::JEquationParameters::join ( const JEquationParameters & value)
inlineinherited

Join equation parameters.

Parameters
valueequation parameters

Definition at line 514 of file JEquationParameters.hh.

515 {
516 using namespace std;
517
518 for (string::const_iterator i = value.sep.begin(); i != value.sep.end(); ++i) {
519 if (!isSeparator(*i)) {
520 sep += *i;
521 }
522 }
523
524 for (string::const_iterator i = value.eol.begin(); i != value.eol.end(); ++i) {
525 if (!isEndOfLine(*i)) {
526 eol += *i;
527 }
528 }
529
530 for (string::const_iterator i = value.div.begin(); i != value.div.end(); ++i) {
531 if (!isDivision(*i)) {
532 div += *i;
533 }
534 }
535
536 for (string::const_iterator i = value.skip.begin(); i != value.skip.end(); ++i) {
537 if (!isSkipLine(*i)) {
538 skip += *i;
539 }
540 }
541
542 for (string::const_iterator i = value.ws.begin(); i != value.ws.end(); ++i) {
543 if (!isWhiteSpace(*i)) {
544 ws += *i;
545 }
546 }
547
548 return *this;
549 }
bool isSeparator(const char c) const
Test for separator character.
bool isDivision(const char c) const
Test for division character.
bool isEndOfLine(const char c) const
Test for end of line character.
bool isSkipLine(const char c) const
Test for skip line character.
bool isWhiteSpace(const char c) const
Test for white space character.

◆ read() [1/5]

bool JEEP::JProperties::read ( const JEquation & equation)
inlineinherited

Read equation.

Parameters
equationequation
Returns
status

Definition at line 594 of file JProperties.hh.

595 {
596 using namespace std;
597
598 iterator p = find(equation.getKey());
599
600 DEBUG("Processing key: " << equation.getKey() << ' ' << (p != end()) << endl);
601
602 if (p != end()) {
603
604 istringstream is(equation.getValue());
605
606 if (isDivision(equation.getSeparator())) {
607
608 if (p->second->is_properties()) {
609
610 p->second->read(is);
611
612 } else {
613
614 ERROR("JProperties::read(): no properties object after division <" << equation.getKey() << ">" << endl);
615 }
616
617 } else if (isSeparator(equation.getSeparator())) {
618
619 try {
620 p->second->read(is);
621 }
622 catch(const exception& error) {
623 ERROR("JProperties::read(): read error at key <" << equation.getKey() << "> " << error.what() << endl);
624 }
625
626 } else {
627
628 ERROR("JProperties::read(): illegal character following key <" << equation.getKey() << "> " << equation.getSeparator() << endl);
629 }
630
631 if (p->second.getEndMarker()) {
632 return false;
633 }
634
635 if (fail(is)) {
636
637 ERROR("JProperties::read(): error reading data for key <" << equation.getKey() << "> " << equation.getValue() << endl);
638 }
639
640 } else {
641
642 WARNING("JProperties::read(): unknown key <" << equation.getKey() << ">" << endl);
643 }
644
645 return true;
646 }
#define DEBUG(A)
Message macros.
Definition JMessage.hh:62
#define ERROR(A)
Definition JMessage.hh:66
#define WARNING(A)
Definition JMessage.hh:65
bool fail(std::istream &in)
Check for stream state.

◆ read() [2/5]

bool JEEP::JProperties::read ( const std::string & buffer)
inlineinherited

Read from input string.

Parameters
bufferinput string
Returns
read status

Definition at line 655 of file JProperties.hh.

656 {
657 std::istringstream in(buffer);
658
659 return !fail(read(in));
660 }
bool read(const JEquation &equation)
Read equation.

◆ read() [3/5]

std::istream & JEEP::JProperties::read ( std::istream & in)
inlineinherited

Read from input stream.

The input format is:

   [<key><sub>]<key><sep><value><eol>
   [<key><sub>]<key><sep><value><eol>

In this, white spaces are ignored. The reading of key and value pairs is controlled by the JLANG::JEquationFacet class.

Parameters
ininput stream
Returns
input stream

Definition at line 677 of file JProperties.hh.

678 {
679 using namespace std;
680 using namespace JPP;
681
682 JStringStream is(in);
683
684 if (getFileStatus(is.str().c_str())) {
685 is.load();
686 }
687
688 is.imbue(locale(is.getloc(), new JEquationFacet(*this)));
689
690 for (JEquation equation; is >> equation && read(equation); ) {}
691
692 return in;
693 }
Facet class to specify parsing of equations in currect locale (see class JLANG::JEquation).
General purpose equation class.
Definition JEquation.hh:47
Wrapper class around STL stringstream class to facilitate optional loading of data from file.

◆ read() [4/5]

std::istream & JEEP::JProperties::read ( std::istream & in,
const std::string & format )
inlineinherited

Read from input stream according given format.

For each key in the format specification, a corresponding value will be read from the input stream.

Parameters
ininput stream
formatformat
Returns
input stream

Definition at line 706 of file JProperties.hh.

707 {
708 using namespace std;
709
710 istringstream is(format);
711
712 vector<string> buffer;
713
714 for (string key; is >> key; ) {
715 buffer.push_back(key);
716 }
717
718 return read(in, buffer.begin(), buffer.end());
719 }

◆ read() [5/5]

template<class T >
std::istream & JEEP::JProperties::read ( std::istream & in,
T __begin,
T __end )
inlineinherited

Read from input stream according given format.

For each key in the format specification, a corresponding value will be read from the input stream.

Parameters
ininput stream
__beginbegin of format
__endend of format
Returns
input stream

Definition at line 734 of file JProperties.hh.

735 {
736 using namespace std;
737
738 for (T i = __begin; i != __end; ++i) {
739
740 iterator p = find(*i);
741
742 if (p != end()) {
743
744 p->second->read(in);
745
746 } else {
747
748 WARNING("JProperties::read(): unknown key <" << *i << ">" << endl);
749 }
750 }
751
752 return in;
753 }

◆ write() [1/3]

std::ostream & JEEP::JProperties::write ( std::ostream & out) const
inlineinherited

Write the current parameter values.

The output format is

[<key><sub>]<key><sep><value><eol> [<key><sub>]<key><sep><value><eol>

in this, white spaces are omitted.

Parameters
outoutput stream
Returns
output stream

Definition at line 769 of file JProperties.hh.

770 {
771 using namespace std;
772
773 for (const_iterator i = begin(); i != end(); ++i) {
774
775 char c = ' ';
776
777 if (i->second->is_properties()) {
778 c = getDefaultDivision ();
779 } else {
781 }
782
783 i->second->write(out, (i->first + c).c_str(), getDefaultEndOfLine());
784 }
785
786 out << flush;
787
788 return out;
789 }
const char getDefaultSeparator() const
Get default separator character.
const char getDefaultEndOfLine() const
Get default end of line character.
const char getDefaultDivision() const
Get default division character.

◆ write() [2/3]

std::ostream & JEEP::JProperties::write ( std::ostream & out,
const std::string & format ) const
inlineinherited

Write to output stream according given format.

For each key in the format specification, a corresponding value will be written to the output stream.

Parameters
outoutput stream
formatformat
Returns
output stream

Definition at line 802 of file JProperties.hh.

803 {
804 using namespace std;
805
806 istringstream is(format);
807
808 vector<string> buffer;
809
810 for (string key; is >> key; ) {
811 buffer.push_back(key);
812 }
813
814 return write(out, buffer.begin(), buffer.end());
815 }
std::ostream & write(std::ostream &out) const
Write the current parameter values.

◆ write() [3/3]

template<class T >
std::ostream & JEEP::JProperties::write ( std::ostream & out,
T __begin,
T __end ) const
inlineinherited

Write to output stream according given format.

For each key in the format specification, a corresponding value will be written to the output stream.

Parameters
outoutput stream
__beginbegin of format
__endend of format
Returns
output stream

Definition at line 830 of file JProperties.hh.

831 {
832 using namespace std;
833
834 for (T i = __begin; i != __end; ++i) {
835
836 const_iterator p = find(*i);
837
838 if (p != end()) {
839
840 out << getDefaultWhiteSpace();
841
842 p->second->write(out);
843
844 } else {
845
846 WARNING("JProperties::write(): unknown key <" << *i << ">" << endl);
847 }
848 }
849
850 return out;
851 }
const char getDefaultWhiteSpace() const
Get default white space character.

◆ sed()

std::string JEEP::JProperties::sed ( const std::string & format,
const std::string & prefix = "",
const std::string & postfix = "" )
inlineinherited

Stream editing of input format.

For each key in the format specification, a corresponding value will be written to the output stream.

Parameters
formatformat
prefixprefix key word
postfixpostfix key word
Returns
output stream

Definition at line 865 of file JProperties.hh.

868 {
869 using namespace std;
870
871 string buffer = format;
872
873 for (iterator i = begin(); i != end(); ++i) {
874
875 string::size_type ipos = 0;
876
877 while ((ipos = buffer.find(prefix + i->first + postfix, ipos)) != string::npos) {
878
879 ostringstream out;
880
881 i->second->write(out);
882
883 buffer.replace(ipos, prefix.length() + i->first.length() + postfix.length(), out.str());
884 }
885 }
886
887 return buffer;
888 }

◆ getValue() [1/2]

template<class T >
const T & JEEP::JProperties::getValue ( const std::string & key) const
inlineinherited

Get value.

Parameters
keykey
Returns
value of this JPropertiesElement

Definition at line 898 of file JProperties.hh.

899 {
900 const_iterator i = find(key);
901
902 if (i != end())
903 return i->second.getValue<T>();
904 else
905 THROW(JPropertiesException, "Key <" << key << "> not found at JPropertiesElement::getValue()");
906 }
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.

◆ getValue() [2/2]

template<class T >
T & JEEP::JProperties::getValue ( const std::string & key)
inlineinherited

Get value.

Parameters
keykey
Returns
value of this JPropertiesElement

Definition at line 916 of file JProperties.hh.

917 {
918 iterator i = find(key);
919
920 if (i != end())
921 return i->second.getValue<T>();
922 else
923 THROW(JPropertiesException, "Key <" << key << "> not found at JPropertiesElement::getValue()");
924 }

◆ setValue()

template<class T >
void JEEP::JProperties::setValue ( const std::string & key,
const T & value )
inlineinherited

Set value.

Parameters
keykey
valuevalue

Definition at line 934 of file JProperties.hh.

935 {
936 iterator i = find(key);
937
938 if (i != end())
939 return i->second.setValue<T>(value);
940 else
941 THROW(JPropertiesException, "Key <" << key << "> not found at JPropertiesElement::setValue()");
942 }

◆ getString()

std::string JEEP::JProperties::getString ( const std::string & key) const
inlineinherited

Get string value.

Parameters
keykey
Returns
value

Definition at line 951 of file JProperties.hh.

952 {
953 const_iterator i = find(key);
954
955 if (i != end())
956 return i->second.toString();
957 else
958 THROW(JPropertiesException, "Key <" << key << "> not found at JPropertiesElement::getString()");
959 }

◆ print()

std::ostream & JEEP::JProperties::print ( std::ostream & out) const
inlineinherited

Print the current parameter values.

Parameters
outoutput stream
Returns
output stream

Definition at line 968 of file JProperties.hh.

969 {
970 write(out);
971
972 return out;
973 }

◆ getEquationParameters()

const JEquationParameters & JLANG::JEquationParameters::getEquationParameters ( ) const
inlineinherited

Get equation parameters.

Returns
equation parameters

Definition at line 150 of file JEquationParameters.hh.

151 {
152 return *this;
153 }

◆ setEquationParameters()

void JLANG::JEquationParameters::setEquationParameters ( const JEquationParameters & buffer)
inlineinherited

Set equation parameters.

Parameters
bufferequation parameters

Definition at line 161 of file JEquationParameters.hh.

162 {
163 static_cast<JEquationParameters&>(*this) = buffer;
164 }
JEquationParameters()
Default constructor.

◆ getDefaultSeparator()

const char JLANG::JEquationParameters::getDefaultSeparator ( ) const
inlineinherited

Get default separator character.

Returns
separator between parameter and its value

Definition at line 172 of file JEquationParameters.hh.

173 {
174 if (sep.empty())
175 return '=';
176 else
177 return sep[0];
178 }

◆ getSeparator() [1/2]

const std::string & JLANG::JEquationParameters::getSeparator ( ) const
inlineinherited

Get separator characters.

Returns
separator between parameter and its value

Definition at line 186 of file JEquationParameters.hh.

187 {
188 return sep;
189 }

◆ getSeparator() [2/2]

std::string & JLANG::JEquationParameters::getSeparator ( )
inlineinherited

Get separator characters.

Returns
separator between parameter and its value

Definition at line 197 of file JEquationParameters.hh.

198 {
199 return sep;
200 }

◆ setSeparator()

void JLANG::JEquationParameters::setSeparator ( const std::string & sep)
inlineinherited

Set separator character(s).

Parameters
sepseparator between parameter and its value

Definition at line 208 of file JEquationParameters.hh.

209 {
210 this->sep = sep;
211 }

◆ getDefaultEndOfLine()

const char JLANG::JEquationParameters::getDefaultEndOfLine ( ) const
inlineinherited

Get default end of line character.

Returns
end of line character

Definition at line 219 of file JEquationParameters.hh.

220 {
221 if (eol.empty())
222 return '\n';
223 else
224 return eol[0];
225 }

◆ getPreferredEndOfLine()

const char JLANG::JEquationParameters::getPreferredEndOfLine ( const unsigned int index) const
inlineinherited

Get preferred end of line character.

Parameters
indexindex
Returns
end of line character

Definition at line 234 of file JEquationParameters.hh.

235 {
236 if (eol.empty())
237 return '\n';
238 else if (index < eol.size())
239 return eol[index];
240 else
241 return eol[0];
242 }

◆ getEndOfLine() [1/2]

const string_type & JLANG::JEquationParameters::getEndOfLine ( ) const
inlineinherited

Get end of line characters.

Returns
end of line characters

Definition at line 250 of file JEquationParameters.hh.

251 {
252 return eol;
253 }

◆ getEndOfLine() [2/2]

string_type & JLANG::JEquationParameters::getEndOfLine ( )
inlineinherited

Get end of line characters.

Returns
end of line characters

Definition at line 261 of file JEquationParameters.hh.

262 {
263 return eol;
264 }

◆ setEndOfLine()

void JLANG::JEquationParameters::setEndOfLine ( const std::string & eol)
inlineinherited

Set end of line characters.

Parameters
eolend of line character

Definition at line 272 of file JEquationParameters.hh.

273 {
274 this->eol = eol;
275 }

◆ getDefaultDivision()

const char JLANG::JEquationParameters::getDefaultDivision ( ) const
inlineinherited

Get default division character.

Returns
division character

Definition at line 283 of file JEquationParameters.hh.

284 {
285 if (div.empty())
286 return '.';
287 else
288 return div[0];
289 }

◆ getDivision() [1/2]

const std::string & JLANG::JEquationParameters::getDivision ( ) const
inlineinherited

Get division characters.

Returns
division characters

Definition at line 297 of file JEquationParameters.hh.

298 {
299 return div;
300 }

◆ getDivision() [2/2]

std::string & JLANG::JEquationParameters::getDivision ( )
inlineinherited

Get division characters.

Returns
division characters

Definition at line 308 of file JEquationParameters.hh.

309 {
310 return div;
311 }

◆ setDivision()

void JLANG::JEquationParameters::setDivision ( const std::string & div)
inlineinherited

Set division characters.

Parameters
divdivision characters

Definition at line 319 of file JEquationParameters.hh.

320 {
321 this->div = div;
322 }

◆ getDefaultSkipLine()

const char JLANG::JEquationParameters::getDefaultSkipLine ( ) const
inlineinherited

Get default skip line character.

Returns
skip line character

Definition at line 330 of file JEquationParameters.hh.

331 {
332 if (skip.empty())
333 return '#';
334 else
335 return skip[0];
336 }

◆ getSkipLine() [1/2]

const std::string & JLANG::JEquationParameters::getSkipLine ( ) const
inlineinherited

Get skip line characters.

Returns
skip line characters

Definition at line 344 of file JEquationParameters.hh.

345 {
346 return skip;
347 }

◆ getSkipLine() [2/2]

std::string & JLANG::JEquationParameters::getSkipLine ( )
inlineinherited

Get skip line characters.

Returns
skip line characters

Definition at line 355 of file JEquationParameters.hh.

356 {
357 return skip;
358 }

◆ setSkipLine()

void JLANG::JEquationParameters::setSkipLine ( const std::string & skip)
inlineinherited

Set skip line characters.

Parameters
skipskip line characters

Definition at line 366 of file JEquationParameters.hh.

367 {
368 this->skip = skip;
369 }

◆ setBrackets()

void JLANG::JEquationParameters::setBrackets ( const char left,
const char right )
inlineinherited

Set brackets.

Parameters
leftleft bracket
rightright bracket

Definition at line 378 of file JEquationParameters.hh.

◆ getLeftBracket() [1/2]

char JLANG::JEquationParameters::getLeftBracket ( ) const
inlineinherited

Get left bracket.

Returns
left bracket

Definition at line 390 of file JEquationParameters.hh.

391 {
392 return left;
393 }

◆ getLeftBracket() [2/2]

char & JLANG::JEquationParameters::getLeftBracket ( )
inlineinherited

Get left bracket.

Returns
left bracket

Definition at line 401 of file JEquationParameters.hh.

402 {
403 return left;
404 }

◆ getRightBracket() [1/2]

char JLANG::JEquationParameters::getRightBracket ( ) const
inlineinherited

Get right bracket.

Returns
right bracket

Definition at line 412 of file JEquationParameters.hh.

413 {
414 return right;
415 }

◆ getRightBracket() [2/2]

char & JLANG::JEquationParameters::getRightBracket ( )
inlineinherited

Get right bracket.

Returns
right bracket

Definition at line 423 of file JEquationParameters.hh.

424 {
425 return right;
426 }

◆ getDefaultWhiteSpace()

const char JLANG::JEquationParameters::getDefaultWhiteSpace ( ) const
inlineinherited

Get default white space character.

Returns
white space character

Definition at line 434 of file JEquationParameters.hh.

435 {
436 if (ws.empty())
437 return ' ';
438 else
439 return ws[0];
440 }

◆ getWhiteSpace() [1/2]

const string_type & JLANG::JEquationParameters::getWhiteSpace ( ) const
inlineinherited

Get white space characters.

Returns
white space characters

Definition at line 448 of file JEquationParameters.hh.

449 {
450 return ws;
451 }

◆ getWhiteSpace() [2/2]

string_type & JLANG::JEquationParameters::getWhiteSpace ( )
inlineinherited

Get white space characters.

Returns
white space characters

Definition at line 459 of file JEquationParameters.hh.

460 {
461 return ws;
462 }

◆ setWhiteSpace()

void JLANG::JEquationParameters::setWhiteSpace ( const std::string & ws)
inlineinherited

Set white space characters.

Parameters
wswhite space characters

Definition at line 470 of file JEquationParameters.hh.

471 {
472 this->ws = ws;
473 }

◆ getComment() [1/2]

const std::string & JLANG::JEquationParameters::getComment ( ) const
inlineinherited

Get comment string.

Returns
comment string

Definition at line 481 of file JEquationParameters.hh.

482 {
483 return comment;
484 }

◆ getComment() [2/2]

std::string & JLANG::JEquationParameters::getComment ( )
inlineinherited

Get comment string.

Returns
comment string

Definition at line 492 of file JEquationParameters.hh.

493 {
494 return comment;
495 }

◆ setComment()

void JLANG::JEquationParameters::setComment ( const std::string & comment)
inlineinherited

Set comment string.

Parameters
commentcomment string

Definition at line 503 of file JEquationParameters.hh.

504 {
505 this->comment = comment;
506 }

◆ isSeparator()

bool JLANG::JEquationParameters::isSeparator ( const char c) const
inlineinherited

Test for separator character.

Parameters
ccharacter
Returns
true if separator; else false

Definition at line 558 of file JEquationParameters.hh.

559 {
560 return sep .find(c) != std::string::npos;
561 }

◆ isEndOfLine()

bool JLANG::JEquationParameters::isEndOfLine ( const char c) const
inlineinherited

Test for end of line character.

Parameters
ccharacter
Returns
true if end of line; else false

Definition at line 570 of file JEquationParameters.hh.

570{ return eol .find(c) != std::string::npos; }

◆ isDivision()

bool JLANG::JEquationParameters::isDivision ( const char c) const
inlineinherited

Test for division character.

Parameters
ccharacter
Returns
true if division; else false

Definition at line 579 of file JEquationParameters.hh.

580 {
581 return div .find(c) != std::string::npos;
582 }

◆ isSkipLine()

bool JLANG::JEquationParameters::isSkipLine ( const char c) const
inlineinherited

Test for skip line character.

Parameters
ccharacter
Returns
true if skip line; else false

Definition at line 591 of file JEquationParameters.hh.

592 {
593 return skip.find(c) != std::string::npos;
594 }

◆ isLeftBracket()

bool JLANG::JEquationParameters::isLeftBracket ( const char c) const
inlineinherited

Test for left bracket character.

Parameters
ccharacter
Returns
true if left bracket; else false

Definition at line 603 of file JEquationParameters.hh.

604 {
605 return c == left;
606 }

◆ isRightBracket()

bool JLANG::JEquationParameters::isRightBracket ( const char c) const
inlineinherited

Test for right bracket character.

Parameters
ccharacter
Returns
true if right bracket; else false

Definition at line 615 of file JEquationParameters.hh.

616 {
617 return c == right;
618 }

◆ isWhiteSpace()

bool JLANG::JEquationParameters::isWhiteSpace ( const char c) const
inlineinherited

Test for white space character.

Parameters
ccharacter
Returns
true if white space; else false

Definition at line 627 of file JEquationParameters.hh.

628 {
629 return ws .find(c) != std::string::npos;
630 }

Member Data Documentation

◆ sep

std::string JLANG::JEquationParameters::sep
protectedinherited

Definition at line 633 of file JEquationParameters.hh.

◆ eol

string_type JLANG::JEquationParameters::eol
protectedinherited

Definition at line 634 of file JEquationParameters.hh.

◆ div

std::string JLANG::JEquationParameters::div
protectedinherited

Definition at line 635 of file JEquationParameters.hh.

◆ skip

std::string JLANG::JEquationParameters::skip
protectedinherited

Definition at line 636 of file JEquationParameters.hh.

◆ left

char JLANG::JEquationParameters::left
protectedinherited

Definition at line 637 of file JEquationParameters.hh.

◆ right

char JLANG::JEquationParameters::right
protectedinherited

Definition at line 638 of file JEquationParameters.hh.

◆ ws

string_type JLANG::JEquationParameters::ws
protectedinherited

Definition at line 639 of file JEquationParameters.hh.

◆ comment

std::string JLANG::JEquationParameters::comment
protectedinherited

Definition at line 640 of file JEquationParameters.hh.

◆ debug

int JEEP::JMessage< JProperties >::debug
staticinherited

debug level (default is off).

Definition at line 45 of file JMessage.hh.


The documentation for this struct was generated from the following file: