PhoenixPresentation  2.0.0
Set of cmake function to automate presentation generation
Shadok Class Reference

test class for the data_stream automatic api More...

#include <Shadok.h>

Public Member Functions

template<typename Stream , DataStreamMode::DataStreamMode Mode>
bool data_stream (Stream &ds)
 Function to load/save serialise and deserialise a Shadok in message/stream/file. More...
 
int getAge ()
 Get the age of the Shadok. More...
 
int getAge () const
 Get the age of the Shadok. More...
 
std::string & getName ()
 Get the name of the Shadok. More...
 
const std::string & getName () const
 Get the name of the Shadok. More...
 
Shadokoperator= (const Shadok &other)
 Definition of equal operator of Shadok. More...
 
void setAge (int age)
 Set the age of the Shadok. More...
 
void setName (const std::string &name)
 Set the name of the Shadok. More...
 
 Shadok ()
 Default constructeur of Shadok. More...
 
 Shadok (const Shadok &other)
 Copy constructor of Shadok. More...
 
virtual ~Shadok ()
 Destructeur of Shadok. More...
 

Protected Member Functions

void copyShadok (const Shadok &other)
 Copy function of Shadok. More...
 

Private Member Functions

void initialisationShadok ()
 Initialisation function of the class Shadok. More...
 

Private Attributes

int p_age
 Age the Shadok. More...
 
std::string p_name
 Name of the Shadok. More...
 

Detailed Description

test class for the data_stream automatic api

Definition at line 13 of file Shadok.h.

Constructor & Destructor Documentation

◆ Shadok() [1/2]

Shadok::Shadok ( )

Default constructeur of Shadok.

Definition at line 11 of file Shadok.cpp.

11  {
13 }
void initialisationShadok()
Initialisation function of the class Shadok.
Definition: Shadok.cpp:75

References initialisationShadok().

+ Here is the call graph for this function:

◆ Shadok() [2/2]

Shadok::Shadok ( const Shadok other)

Copy constructor of Shadok.

Parameters
other: class to copy

Definition at line 18 of file Shadok.cpp.

18  {
19  copyShadok(other);
20 }
void copyShadok(const Shadok &other)
Copy function of Shadok.
Definition: Shadok.cpp:69

References copyShadok().

+ Here is the call graph for this function:

◆ ~Shadok()

Shadok::~Shadok ( )
virtual

Destructeur of Shadok.

Definition at line 23 of file Shadok.cpp.

23  {
24 
25 }

Member Function Documentation

◆ copyShadok()

void Shadok::copyShadok ( const Shadok other)
protected

Copy function of Shadok.

Parameters
other: class to copy

Definition at line 69 of file Shadok.cpp.

69  {
70  p_age = other.p_age;
71  p_name = other.p_name;
72 }
int p_age
Age the Shadok.
Definition: Shadok.h:39
std::string p_name
Name of the Shadok.
Definition: Shadok.h:41

References p_age, and p_name.

Referenced by operator=(), and Shadok().

+ Here is the caller graph for this function:

◆ data_stream()

template<typename Stream , DataStreamMode::DataStreamMode Mode>
bool Shadok::data_stream ( Stream &  ds)

Function to load/save serialise and deserialise a Shadok in message/stream/file.

Parameters
[out]ds: Stream to be used (message, File, etc)
Returns
true on success, false otherwise

Definition at line 17 of file Shadok_impl.h.

17  {
20  return b;
21 }
static bool data_stream(Stream &ds, T &data)
Dummy function to catch if a type is not specialised.

References DataStream< Stream, Mode, T >::data_stream(), p_age, and p_name.

Referenced by DataStream< Stream, Mode, Shadok >::data_stream().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getAge() [1/2]

int Shadok::getAge ( )

Get the age of the Shadok.

Returns
age of the Shadok

Definition at line 54 of file Shadok.cpp.

54 {return p_age;}

References p_age.

◆ getAge() [2/2]

int Shadok::getAge ( ) const

Get the age of the Shadok.

Returns
age of the Shadok

Definition at line 49 of file Shadok.cpp.

49 {return p_age;}

References p_age.

Referenced by checkEqualityConst(), testShadok(), testShadokFile(), and testShadokMessage().

+ Here is the caller graph for this function:

◆ getName() [1/2]

std::string & Shadok::getName ( )

Get the name of the Shadok.

Returns
name of the Shadok

Definition at line 64 of file Shadok.cpp.

64 {return p_name;}

References p_name.

◆ getName() [2/2]

const std::string & Shadok::getName ( ) const

Get the name of the Shadok.

Returns
name of the Shadok

Definition at line 59 of file Shadok.cpp.

59 {return p_name;}

References p_name.

Referenced by checkEqualityConst(), testShadokFile(), and testShadokMessage().

+ Here is the caller graph for this function:

◆ initialisationShadok()

void Shadok::initialisationShadok ( )
private

Initialisation function of the class Shadok.

Definition at line 75 of file Shadok.cpp.

75  {
76  p_age = 0;
77  p_name = "";
78 }

References p_age, and p_name.

Referenced by Shadok().

+ Here is the caller graph for this function:

◆ operator=()

Shadok & Shadok::operator= ( const Shadok other)

Definition of equal operator of Shadok.

Parameters
other: class to copy
Returns
copied class

Definition at line 31 of file Shadok.cpp.

31  {
32  copyShadok(other);
33  return *this;
34 }

References copyShadok().

+ Here is the call graph for this function:

◆ setAge()

void Shadok::setAge ( int  age)

Set the age of the Shadok.

Parameters
age: age of the Shadok

Definition at line 39 of file Shadok.cpp.

39 {p_age = age;}

References p_age.

Referenced by testShadokFile(), testShadokMessage(), and testShadokSize().

+ Here is the caller graph for this function:

◆ setName()

void Shadok::setName ( const std::string &  name)

Set the name of the Shadok.

Parameters
name: name of the Shadok

Definition at line 44 of file Shadok.cpp.

44 {p_name = name;}

References p_name.

Referenced by testShadokFile(), testShadokMessage(), and testShadokSize().

+ Here is the caller graph for this function:

Member Data Documentation

◆ p_age

int Shadok::p_age
private

Age the Shadok.

Definition at line 39 of file Shadok.h.

Referenced by copyShadok(), data_stream(), getAge(), initialisationShadok(), and setAge().

◆ p_name

std::string Shadok::p_name
private

Name of the Shadok.

Definition at line 41 of file Shadok.h.

Referenced by copyShadok(), data_stream(), getName(), initialisationShadok(), and setName().


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