PhoenixSwarm  6.1.0
Persistent processing programs exchanging data over sockets
Loading...
Searching...
No Matches
Shadok Class Reference

Test Shadok. More...

#include <Shadok.h>

Public Member Functions

int & getAge ()
 Gets the age of the Shadok.
int getAge () const
 Gets the age of the Shadok.
std::string & getName ()
 Gets the name of the Shadok.
const std::string & getName () const
 Gets the name of the Shadok.
Shadok & operator= (const Shadok &other)
 Operator = of class Shadok.
template<typename Stream, DataStreamMode::DataStreamMode Mode>
bool readWriteStream (Stream &ds)
 Load the current Shadok with a stream.
void setAge (int age)
 Sets the age of the Shadok.
void setName (const std::string &name)
 Sets the name of the Shadok.
 Shadok ()
 Constructor of class Shadok.
 Shadok (const Shadok &other)
 Copy Constructor of class Shadok.
virtual ~Shadok ()
 Destructor of class Shadok.

Protected Member Functions

void copyShadok (const Shadok &other)
 Copy Function of class Shadok.

Private Member Functions

void initialisationShadok ()
 Initialisation Function of class Shadok.

Private Attributes

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

Detailed Description

Test Shadok.

Definition at line 15 of file Shadok.h.

Constructor & Destructor Documentation

◆ Shadok() [1/2]

Shadok::Shadok ( )

Constructor of class Shadok.

Definition at line 19 of file Shadok.cpp.

19 {
21}
void initialisationShadok()
Initialisation Function of class Shadok.
Definition Shadok.cpp:95

References initialisationShadok().

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

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

◆ Shadok() [2/2]

Shadok::Shadok ( const Shadok & other)

Copy Constructor of class Shadok.

Parameters
other: Shadok we want ot copy

Definition at line 26 of file Shadok.cpp.

26 {
27 copyShadok(other);
28}
void copyShadok(const Shadok &other)
Copy Function of class Shadok.
Definition Shadok.cpp:89

References copyShadok(), and Shadok().

Here is the call graph for this function:

◆ ~Shadok()

Shadok::~Shadok ( )
virtual

Destructor of class Shadok.

Definition at line 31 of file Shadok.cpp.

31 {
32
33}

Member Function Documentation

◆ copyShadok()

void Shadok::copyShadok ( const Shadok & other)
protected

Copy Function of class Shadok.

Parameters
other: Shadok we want ot copy

Definition at line 89 of file Shadok.cpp.

89 {
90 p_age = other.p_age;
91 p_name = other.p_name;
92}
int p_age
Age of the Shadok.
Definition Shadok.h:45
std::string p_name
Name of the Shadok.
Definition Shadok.h:47

References p_age, p_name, and Shadok().

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

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

◆ getAge() [1/2]

int & Shadok::getAge ( )

Gets the age of the Shadok.

Returns
age of the Shadok

Definition at line 68 of file Shadok.cpp.

68 {
69 return p_age;
70}

References p_age.

◆ getAge() [2/2]

int Shadok::getAge ( ) const

Gets the age of the Shadok.

Returns
age of the Shadok

Definition at line 61 of file Shadok.cpp.

61 {
62 return p_age;
63}

References p_age.

Referenced by checkShadokEquality(), and checkShadokEqualityConst().

Here is the caller graph for this function:

◆ getName() [1/2]

std::string & Shadok::getName ( )

Gets the name of the Shadok.

Returns
name of the Shadok

Definition at line 82 of file Shadok.cpp.

82 {
83 return p_name;
84}

References p_name.

◆ getName() [2/2]

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

Gets the name of the Shadok.

Returns
name of the Shadok

Definition at line 75 of file Shadok.cpp.

75 {
76 return p_name;
77}

References p_name.

◆ initialisationShadok()

void Shadok::initialisationShadok ( )
private

Initialisation Function of class Shadok.

Definition at line 95 of file Shadok.cpp.

95 {
96 p_age = 0;
97}

References p_age.

Referenced by Shadok().

Here is the caller graph for this function:

◆ operator=()

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

Operator = of class Shadok.

Parameters
other: Shadok we want ot copy
Returns
copied class Shadok

Definition at line 39 of file Shadok.cpp.

39 {
40 copyShadok(other);
41 return *this;
42}

References copyShadok(), and Shadok().

Here is the call graph for this function:

◆ readWriteStream()

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

Load the current Shadok with a stream.

Parameters
[out]ds: stream to be used
Returns
true on success, false otherwise

Definition at line 33 of file Shadok.h.

33 {
34 bool b(true);
35 b &= DataStream<Stream, Mode, int >::data_stream(ds, p_age);
36 b &= DataStream<Stream, Mode, std::string >::data_stream(ds, p_name);
37 return b;
38 }

References p_age, and p_name.

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

Here is the caller graph for this function:

◆ setAge()

void Shadok::setAge ( int age)

Sets the age of the Shadok.

Parameters
age: age of the Shadok

Definition at line 47 of file Shadok.cpp.

47 {
48 p_age = age;
49}

References p_age.

Referenced by checkShadokCopy(), and testBaseDaemonLoadConfig().

Here is the caller graph for this function:

◆ setName()

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

Sets the name of the Shadok.

Parameters
name: name of the Shadok

Definition at line 54 of file Shadok.cpp.

54 {
55 p_name = name;
56}

References p_name.

Referenced by testBaseDaemonLoadConfig().

Here is the caller graph for this function:

Member Data Documentation

◆ p_age

int Shadok::p_age
private

Age of the Shadok.

Definition at line 45 of file Shadok.h.

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

◆ p_name

std::string Shadok::p_name
private

Name of the Shadok.

Definition at line 47 of file Shadok.h.

Referenced by copyShadok(), getName(), getName(), readWriteStream(), and setName().


The documentation for this class was generated from the following files:
  • /builds/CTA-LAPP/PHOENIX_LIBS2/network/PhoenixSwarm/build/doc/platex/TESTS/TEST_FUNCTIONS/TEST_DATA_PROCESSING/Shadok.h
  • /builds/CTA-LAPP/PHOENIX_LIBS2/network/PhoenixSwarm/build/doc/platex/TESTS/TEST_FUNCTIONS/TEST_DATA_PROCESSING/Shadok.cpp