FFSM++ 1.1.0
French Forest Sector Model ++
Loading...
Searching...
No Matches
iisskey Class Reference

Class to provide a simple integer-integer-string-string key in std maps. More...

#include <BaseClass.h>

Collaboration diagram for iisskey:

Public Member Functions

 iisskey ()
 iisskey class (note the double ii and double ss) ///
 
 iisskey (int i_h, int i2_h, string s_h, string s2_h)
 
 ~iisskey ()
 
bool filter (const iisskey &key_h) const
 
string print () const
 
bool operator== (const iisskey &op2) const
 
bool operator!= (const iisskey &op2) const
 
bool operator< (const iisskey &op2) const
 
bool operator> (const iisskey &op2) const
 
bool operator<= (const iisskey &op2) const
 
bool operator>= (const iisskey &op2) const
 

Public Attributes

int i
 
int i2
 
string s
 
string s2
 

Detailed Description

Class to provide a simple integer-integer-string-string key in std maps.

Definition at line 213 of file BaseClass.h.

Constructor & Destructor Documentation

◆ iisskey() [1/2]

iisskey ( )

iisskey class (note the double ii and double ss) ///

Definition at line 554 of file BaseClass.cpp.

554 {
555 i = 0;
556 i2 = 0;
557 s = "";
558 s2= "";
559}
string s
Definition BaseClass.h:228
string s2
Definition BaseClass.h:229

◆ iisskey() [2/2]

iisskey ( int  i_h,
int  i2_h,
string  s_h,
string  s2_h 
)

Definition at line 560 of file BaseClass.cpp.

560 {
561 i = i_h;
562 i2 = i2_h;
563 s = s_h;
564 s2 = s2_h;
565}

◆ ~iisskey()

~iisskey ( )

Definition at line 567 of file BaseClass.cpp.

567 {
568
569}

Member Function Documentation

◆ filter()

bool filter ( const iisskey key_h) const

Definition at line 648 of file BaseClass.cpp.

648 {
649 if( (key_h.i == NULL || key_h.i==i) &&
650 (key_h.i2 == NULL || key_h.i2==i2) &&
651 (key_h.s == "" || key_h.s==s) &&
652 (key_h.s2 == "" || key_h.s2==s2) ) return true;
653 return false;
654}

◆ operator!=()

bool operator!= ( const iisskey op2) const

Definition at line 580 of file BaseClass.cpp.

580 {
581 if(op2.i == i && op2.i2 == i2 && op2.s == s && op2.s2 == s2){
582 return false;
583 }
584 return true;
585}

◆ operator<()

bool operator< ( const iisskey op2) const

Definition at line 587 of file BaseClass.cpp.

588 {
589 if (i < op2.i ) {return true;}
590 if (i == op2.i) {
591 if (i2 < op2.i2 ) {return true;}
592 if (i2 == op2.i2){
593 if (s < op2.s) {return true;}
594 if (s == op2.s){
595 if (s2 < op2.s2) {return true;}
596 }
597 }
598 }
599 return false;
600}

◆ operator<=()

bool operator<= ( const iisskey op2) const

Definition at line 617 of file BaseClass.cpp.

618 {
619 if (i < op2.i ) {return true;}
620 if (i == op2.i) {
621 if (i2 < op2.i2 ) {return true;}
622 if (i2 == op2.i2){
623 if (s < op2.s) {return true;}
624 if (s == op2.s){
625 if (s2 <= op2.s2) {return true;}
626 }
627 }
628 }
629 return false;
630}

◆ operator==()

bool operator== ( const iisskey op2) const

Definition at line 572 of file BaseClass.cpp.

572 {
573 if(op2.i == i && op2.i2 == i2 && op2.s == s && op2.s2 == s2){
574 return true;
575 }
576 return false;
577}

◆ operator>()

bool operator> ( const iisskey op2) const

Definition at line 603 of file BaseClass.cpp.

603 {
604 if (i > op2.i ) {return true;}
605 if (i == op2.i) {
606 if (i2 > op2.i2 ) {return true;}
607 if (i2 == op2.i2){
608 if (s > op2.s) {return true;}
609 if (s == op2.s){
610 if (s2 > op2.s2) {return true;}
611 }
612 }
613 }
614 return false;
615}

◆ operator>=()

bool operator>= ( const iisskey op2) const

Definition at line 633 of file BaseClass.cpp.

633 {
634 if (i > op2.i ) {return true;}
635 if (i == op2.i) {
636 if (i2 > op2.i2 ) {return true;}
637 if (i2 == op2.i2){
638 if (s > op2.s) {return true;}
639 if (s == op2.s){
640 if (s2 >= op2.s2) {return true;}
641 }
642 }
643 }
644 return false;
645}

◆ print()

string print ( ) const

Definition at line 657 of file BaseClass.cpp.

657 {
658 char outChar1[24];
659 char outChar2[24];
660 snprintf ( outChar1, sizeof(outChar1), "%d", i);
661 snprintf ( outChar2, sizeof(outChar2), "%d", i2);
662 return string(outChar1)+'\t'+string(outChar2)+'\t'+s+'\t'+s2;
663
664}

Member Data Documentation

◆ i

◆ i2

◆ s

string s

◆ s2

string s2

The documentation for this class was generated from the following files: