DataStream  1.8.8
DataStream : framework to save/load/serialize/deserialize data
DataStream< FILE *, DataStreamMode::READ, std::list< T > > Struct Template Reference

How to write a class in a file. More...

#include <data_stream_read_file.h>

Static Public Member Functions

static bool data_stream (FILE *&ds, std::list< T > &data)
 Get the size of a class std::list T. More...
 

Detailed Description

template<typename T>
struct DataStream< FILE *, DataStreamMode::READ, std::list< T > >

How to write a class in a file.

Definition at line 36 of file data_stream_read_file.h.

Member Function Documentation

◆ data_stream()

template<typename T >
static bool DataStream< FILE *, DataStreamMode::READ, std::list< T > >::data_stream ( FILE *&  ds,
std::list< T > &  data 
)
inlinestatic

Get the size of a class std::list T.

Parameters
[out]ds: file to write the class std::list T
data: data to be saved
Returns
true on success, false otherwise

Definition at line 42 of file data_stream_read_file.h.

42  {
43  //Get the number of elements
44  size_t nbElement(0lu);
46  if(nbElement == 0lu || !b){return b;} //If there is no element, quit now
47  for(size_t i(0lu); i < nbElement && b; ++i){
48  T tmp;
50  data.push_back(tmp);
51  }
52  return b;
53  }

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

+ Here is the call graph for this function:

The documentation for this struct was generated from the following file:
DataStream::data_stream
static bool data_stream(Stream &ds, T &data)
Definition: data_stream_include.h:28