Jpp 21.0.0
the software that should make you happy
Loading...
Searching...
No Matches
JDETECTOR::JDetectorHeader::JDetectorHeaderHelper Class Reference

Auxiliary class for I/O of detector header. More...

Inheritance diagram for JDETECTOR::JDetectorHeader::JDetectorHeaderHelper:
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 JDetectorHeader_t >
 JDetectorHeaderHelper (JDetectorHeader_t &object, const JEquationParameters &equation)
 Constructor.
 
template<class T >
void put (const std::string &key, T &object)
 Put object at given key.
 
JProperties & join (const JProperties &properties)
 Join properties objects.
 
JEquationParameters & join (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 JEquationParameters & getEquationParameters () 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_type & getEndOfLine () const
 Get end of line characters.
 
string_type & getEndOfLine ()
 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_type & getWhiteSpace () const
 Get white space characters.
 
string_type & getWhiteSpace ()
 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 detector header.

Definition at line 219 of file JDetectorHeader.hh.

Member Typedef Documentation

◆ JMap_t

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

Definition at line 503 of file JProperties.hh.

Constructor & Destructor Documentation

◆ JDetectorHeaderHelper()

template<class JDetectorHeader_t >
JDETECTOR::JDetectorHeader::JDetectorHeaderHelper::JDetectorHeaderHelper ( JDetectorHeader_t & object,
const JEquationParameters & equation )
inline

Constructor.

Parameters
objectheader
equationequation parameters

Definition at line 230 of file JDetectorHeader.hh.

231 :
232 JProperties(equation, 1)
233 {
234 insert(gmake_property(object.first));
235 insert(gmake_property(object.second));
236 insert(gmake_property(object.east));
237 insert(gmake_property(object.north));
238 insert(gmake_property(object.z));
239 insert(gmake_property(object.key));
240 insert(gmake_property(object.wgs));
241 insert(gmake_property(object.zone));
242 }
#define gmake_property(A)
macros to convert (template) parameter to JPropertiesElement object
Utility class to parse parameter values.
std::string key
Definition JUTMGrid.hh:281
std::string wgs
Definition JUTMGrid.hh:282
std::string zone
Definition JUTMGrid.hh:283

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 515 of file JProperties.hh.

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

◆ 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 563 of file JProperties.hh.

564 {
565 this->insert(value_type(key, JPropertiesElement(object)));
566 }

◆ join() [1/2]

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

Join properties objects.

Parameters
propertiesproperties
Returns
properties

Definition at line 575 of file JProperties.hh.

576 {
577 JEquationParameters::join(properties);
578
579 insert(properties.begin(), properties.end());
580
581 return *this;
582 }
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 591 of file JProperties.hh.

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

653 {
654 std::istringstream in(buffer);
655
656 return !fail(read(in));
657 }
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 674 of file JProperties.hh.

675 {
676 using namespace std;
677 using namespace JPP;
678
679 JStringStream is(in);
680
681 is.imbue(locale(is.getloc(), new JEquationFacet(*this)));
682
683 for (JEquation equation; is >> equation && read(equation); ) {}
684
685 return in;
686 }
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.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).

◆ 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 699 of file JProperties.hh.

700 {
701 using namespace std;
702
703 istringstream is(format);
704
705 vector<string> buffer;
706
707 for (string key; is >> key; ) {
708 buffer.push_back(key);
709 }
710
711 return read(in, buffer.begin(), buffer.end());
712 }

◆ 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 727 of file JProperties.hh.

728 {
729 using namespace std;
730
731 for (T i = __begin; i != __end; ++i) {
732
733 iterator p = find(*i);
734
735 if (p != end()) {
736
737 p->second->read(in);
738
739 } else {
740
741 WARNING("JProperties::read(): unknown key <" << *i << ">" << endl);
742 }
743 }
744
745 return in;
746 }

◆ 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 762 of file JProperties.hh.

763 {
764 using namespace std;
765
766 for (const_iterator i = begin(); i != end(); ++i) {
767
768 char c = ' ';
769
770 if (i->second->is_properties()) {
771 c = getDefaultDivision ();
772 } else {
774 }
775
776 i->second->write(out, (i->first + c).c_str(), getDefaultEndOfLine());
777 }
778
779 out << flush;
780
781 return out;
782 }
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 795 of file JProperties.hh.

796 {
797 using namespace std;
798
799 istringstream is(format);
800
801 vector<string> buffer;
802
803 for (string key; is >> key; ) {
804 buffer.push_back(key);
805 }
806
807 return write(out, buffer.begin(), buffer.end());
808 }
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 823 of file JProperties.hh.

824 {
825 using namespace std;
826
827 for (T i = __begin; i != __end; ++i) {
828
829 const_iterator p = find(*i);
830
831 if (p != end()) {
832
833 out << getDefaultWhiteSpace();
834
835 p->second->write(out);
836
837 } else {
838
839 WARNING("JProperties::write(): unknown key <" << *i << ">" << endl);
840 }
841 }
842
843 return out;
844 }
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 858 of file JProperties.hh.

861 {
862 using namespace std;
863
864 string buffer = format;
865
866 for (iterator i = begin(); i != end(); ++i) {
867
868 string::size_type ipos = 0;
869
870 while ((ipos = buffer.find(prefix + i->first + postfix, ipos)) != string::npos) {
871
872 ostringstream out;
873
874 i->second->write(out);
875
876 buffer.replace(ipos, prefix.length() + i->first.length() + postfix.length(), out.str());
877 }
878 }
879
880 return buffer;
881 }

◆ 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 891 of file JProperties.hh.

892 {
893 const_iterator i = find(key);
894
895 if (i != end())
896 return i->second.getValue<T>();
897 else
898 THROW(JPropertiesException, "Key <" << key << "> not found at JPropertiesElement::getValue()");
899 }
#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 909 of file JProperties.hh.

910 {
911 iterator i = find(key);
912
913 if (i != end())
914 return i->second.getValue<T>();
915 else
916 THROW(JPropertiesException, "Key <" << key << "> not found at JPropertiesElement::getValue()");
917 }

◆ setValue()

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

Set value.

Parameters
keykey
valuevalue

Definition at line 927 of file JProperties.hh.

928 {
929 iterator i = find(key);
930
931 if (i != end())
932 return i->second.setValue<T>(value);
933 else
934 THROW(JPropertiesException, "Key <" << key << "> not found at JPropertiesElement::setValue()");
935 }

◆ getString()

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

Get string value.

Parameters
keykey
Returns
value

Definition at line 944 of file JProperties.hh.

945 {
946 const_iterator i = find(key);
947
948 if (i != end())
949 return i->second.toString();
950 else
951 THROW(JPropertiesException, "Key <" << key << "> not found at JPropertiesElement::getString()");
952 }

◆ 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 961 of file JProperties.hh.

962 {
963 write(out);
964
965 return out;
966 }

◆ 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 class was generated from the following file: