PhoenixInkscape  2.0.0
Generate multiple png files with svg inkscape files
Shadok.h
Go to the documentation of this file.
1 /***************************************
2  Auteur : Pierre Aubert
3  Mail : pierre.aubert@lapp.in2p3.fr
4  Licence : CeCILL-C
5 ****************************************/
6 
7 #ifndef __SHADOK_H__
8 #define __SHADOK_H__
9 
10 #include "data_all.h"
11 
13 class Shadok{
14  public:
15  Shadok();
16  Shadok(const Shadok & other);
17  virtual ~Shadok();
18  Shadok & operator = (const Shadok & other);
19 
20  void setAge(int age);
21  void setName(const std::string & name);
22 
23  int getAge() const;
24  int getAge();
25 
26  const std::string & getName() const;
27  std::string & getName();
28 
29  template<typename Stream, DataStreamMode::DataStreamMode Mode>
30  bool data_stream(Stream & ds);
31 
32  protected:
33  void copyShadok(const Shadok & other);
34 
35  private:
36  void initialisationShadok();
37 
39  int p_age;
41  std::string p_name;
42 };
43 
45 template<typename Stream, DataStreamMode::DataStreamMode Mode>
46 struct DataStream<Stream, Mode, Shadok>{
47  static bool data_stream(Stream & ds, Shadok & data){
48  return data.data_stream<Stream, Mode>(ds);
49  }
50 };
51 
52 #include "Shadok_impl.h"
53 
54 #endif
55 
test class for the data_stream automatic api
Definition: Shadok.h:13
void setAge(int age)
Set the age of the Shadok.
Definition: Shadok.cpp:39
void copyShadok(const Shadok &other)
Copy function of Shadok.
Definition: Shadok.cpp:69
const std::string & getName() const
Get the name of the Shadok.
Definition: Shadok.cpp:59
bool data_stream(Stream &ds)
Function to load/save serialise and deserialise a Shadok in message/stream/file.
Definition: Shadok_impl.h:17
int p_age
Age the Shadok.
Definition: Shadok.h:39
Shadok & operator=(const Shadok &other)
Definition of equal operator of Shadok.
Definition: Shadok.cpp:31
int getAge() const
Get the age of the Shadok.
Definition: Shadok.cpp:49
void initialisationShadok()
Initialisation function of the class Shadok.
Definition: Shadok.cpp:75
std::string p_name
Name of the Shadok.
Definition: Shadok.h:41
void setName(const std::string &name)
Set the name of the Shadok.
Definition: Shadok.cpp:44
virtual ~Shadok()
Destructeur of Shadok.
Definition: Shadok.cpp:23
Shadok()
Default constructeur of Shadok.
Definition: Shadok.cpp:11
static bool data_stream(Stream &ds, Shadok &data)
Definition: Shadok.h:47
Generic DataStream class.