PhoenixClockMock  2.0.0
Tool to manipulate mock of clock (split, merge and get info)
phoenix_clock_mock.h File Reference
#include "data_file.h"
#include "phoenix_clock.h"
+ Include dependency graph for phoenix_clock_mock.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void concatenateVecTime (VecTime &vecOutput, const VecTime vecInput)
 Concatenate vector of message into an other one. More...
 
void splitVecTime (VecTime &vecOutput, const VecTime vecInput, size_t offsetPart, size_t sizePart)
 Split a vector of messages into an other. More...
 

Function Documentation

◆ concatenateVecTime()

void concatenateVecTime ( VecTime vecOutput,
const VecTime  vecInput 
)

Concatenate vector of message into an other one.

Parameters
[out]vecOutput: vector of output message
vecInput: vector to be concatenated into vecOutput

Definition at line 13 of file phoenix_clock_mock.cpp.

13  {
14  for(VecTime::const_iterator it(vecInput.begin()); it != vecInput.end(); ++it){
15  vecOutput.push_back(*it);
16  }
17 
18 }

Referenced by mergeMock().

+ Here is the caller graph for this function:

◆ splitVecTime()

void splitVecTime ( VecTime vecOutput,
const VecTime  vecInput,
size_t  offsetPart,
size_t  sizePart 
)

Split a vector of messages into an other.

Parameters
[out]vecOutput: output vector of messages
vecInput: input vector of messages
offsetPart: offset of the first message to be extracted in a split mock
sizePart: size of each split part (number of messages in each part to be split)

Definition at line 26 of file phoenix_clock_mock.cpp.

28 {
29  size_t maxIndex(std::min(offsetPart + sizePart, vecInput.size()));
30  for(size_t i(offsetPart); i < maxIndex; ++i){
31  vecOutput.push_back(vecInput[i]);
32  }
33 }

Referenced by splitMock().

+ Here is the caller graph for this function: