PhoenixPresentation  2.0.0
Set of cmake function to automate presentation generation
main.cpp File Reference
+ Include dependency graph for main.cpp:

Go to the source code of this file.

Namespaces

 ShadokType
 

Enumerations

enum  ShadokType::ShadokType {
  ShadokType::NONE = 0 , ShadokType::HAUT = 1 , ShadokType::BAS = 2 , ShadokType::NONE = 0 ,
  ShadokType::HAUT = 1 , ShadokType::BAS = 2
}
 Type of the Shadok we want to serialized. More...
 

Functions

int main (int argc, char **argv)
 
void testShadokTypeFile ()
 Test the Shadok message. More...
 
void testShadokTypeMessage ()
 Test the Shadok message. More...
 
void testShadokTypeSize ()
 Test the Shadok size. More...
 

Function Documentation

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 56 of file main.cpp.

56  {
60  return 0;
61 }
void testShadokTypeFile()
Test the Shadok message.
Definition: main.cpp:74
void testShadokTypeMessage()
Test the Shadok message.
Definition: main.cpp:58
void testShadokTypeSize()
Test the Shadok size.
Definition: main.cpp:51

References testShadokTypeFile(), testShadokTypeMessage(), and testShadokTypeSize().

+ Here is the call graph for this function:

◆ testShadokTypeFile()

void testShadokTypeFile ( )

Test the Shadok message.

Load shadok from message

Definition at line 43 of file main.cpp.

43  {
45  std::string fileName("ShadokType.data");
46  data_save(fileName, type);
47 
50  data_load(fileName, out);
51 
52  data_stream_assert(checkValue("testShadokFile", out, type));
53 }
bool data_load(FILE *iter, T &data)
Load data from a message.
Definition: data_file.h:39
bool data_save(FILE *iter, const T &data)
Save data in a message.
Definition: data_file.h:18
#define data_stream_assert(isOk)
bool checkValue(const std::string &testName, const T &givenSize, const T &referenceSize)
Check given value compare to the reference value.
ShadokType
Type of the Shadok we want to serialized.
Definition: main.cpp:12

References ShadokType::BAS, checkValue(), data_load(), data_save(), and data_stream_assert.

+ Here is the call graph for this function:

◆ testShadokTypeMessage()

void testShadokTypeMessage ( )

Test the Shadok message.

Load shadok from message

Definition at line 27 of file main.cpp.

27  {
29 
30  DataStreamMsg messageIn(data_size(type));
31  DataStreamIter iter = (DataStreamIter)messageIn.data();
33 
36  DataStreamIter iterOut = (DataStreamIter)messageIn.data();
38 
39  data_stream_assert(checkValue("testShadokMessage", out, type));
40 }
bool data_message_save(DataStreamIter &iter, T &data)
Save data in a message.
Definition: data_message.h:18
bool data_message_load(DataStreamIter &iter, T &data)
Load data from a message.
Definition: data_message.h:60
size_t data_size(T &data)
Get size of data.
Definition: data_size.h:17
std::vector< DataStreamType > DataStreamMsg
DataStreamType * DataStreamIter

References ShadokType::BAS, checkValue(), data_message_load(), data_message_save(), data_size(), and data_stream_assert.

+ Here is the call graph for this function:

◆ testShadokTypeSize()

void testShadokTypeSize ( )

Test the Shadok size.

Definition at line 20 of file main.cpp.

20  {
22  size_t shadokSize(data_size(type));
23  data_stream_assert(checkValue("testShadokTypeSize", shadokSize, 4lu));
24 }
@ HAUT
Definition: main.cpp:14