Zaibon

Untitled

Oct 15th, 2011
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.27 KB | None | 0 0
  1. #ifndef CARTE_H
  2. #define CARTE_H
  3.  
  4. #include <iostream>
  5. #include "CaracteristiqueScore.h"
  6.  
  7. class Carte{
  8.    
  9.  
  10.   private :
  11.     char nom[30];
  12.     char* serie;
  13.     int numero;
  14.     CaracteristiqueScore  caraScore;
  15.      
  16.   public :
  17.     //constructeur par default
  18.     Carte();
  19.     //constructeur d'initilisation
  20.     Carte(const char* n,const char* s,const int num, const CaracteristiqueScore cs);
  21.     Carte(const char* n,const char* s,const int num, const char* caraNom,const int caraScore);
  22.     //constructeur de copy
  23.     Carte(const Carte& c);
  24.  
  25.     //destructeur
  26.     ~Carte();
  27.    
  28.     //Surcharge des opérateur
  29.     Carte& operator=(const Carte& c);
  30.     Carte  operator+(int add);
  31.     Carte  operator-(int less);
  32.     int  operator-(Carte c);
  33.     bool operator<(const Carte c);
  34.     bool operator>(const Carte c);
  35.     friend std::ostream& operator<<(std::ostream& s,const Carte& c);
  36.     Carte operator++();//préfixé
  37.     Carte operator++(int);//préfixé
  38.  
  39.     //getter - setter
  40.     void setNom(const char* n);
  41.     const char* getNom() const;
  42.  
  43.     void setSerie(const char* s);
  44.     char* getSerie() const;
  45.    
  46.     void setNumero(int n);
  47.     int getNumero() const;
  48.  
  49.     void setCaracteristiqueScore(const CaracteristiqueScore cs);
  50.     CaracteristiqueScore getCaracteristiqueScore() const;
  51.    
  52.     void affiche(std::ostream& stream = std::cout) const;
  53.    
  54.    
  55. };
  56. #endif
Advertisement
Add Comment
Please, Sign In to add comment