40 #  ifdef EZC3D_API_EXPORTS    41 #    define EZC3D_API __declspec(dllexport)    43 #    define EZC3D_API __declspec(dllimport)    89         NO_PROCESSOR_TYPE = INTEL
   104     EZC3D_API std::string 
toUpper(
const std::string &str);
   109     class EZC3D_API Header;
   114     namespace ParametersNS {
   121                 class EZC3D_API 
Group;
   130         class EZC3D_API 
Data;
   136         namespace Points3dNS {
   138             class EZC3D_API 
Point;
   143         namespace AnalogsNS {
   169     c3d(
const std::string &filePath);
   188     void write(
const std::string &filePath) 
const;
   215         unsigned int nByteToRead,
   217         int nByteFromPrevious = 0,
   218         const  std::ios_base::seekdir &pos = std::ios::cur);
   226     unsigned int hex2uint(
const char * val, 
unsigned int len);
   234     int hex2int(
const char * val, 
unsigned int len);
   244                         const std::streampos& dataStartPosition,
   259                 unsigned int nByteToRead,
   260                 int nByteFromPrevious = 0,
   261                 const std::ios_base::seekdir &pos = std::ios::cur);
   274                     unsigned int nByteToRead,
   275                     int nByteFromPrevious = 0,
   276                     const std::ios_base::seekdir &pos = std::ios::cur);
   288                     int nByteFromPrevious = 0,
   289                     const std::ios_base::seekdir &pos = std::ios::cur);
   300                            unsigned int nByteToRead,
   301                            int nByteFromPrevious = 0,
   302                            const std::ios_base::seekdir &pos = std::ios::cur);
   315                    unsigned int dataLenghtInBytes,
   316                    const std::vector<size_t> &dimension,
   317                    std::vector<int> ¶m_data,
   318                    size_t currentIdx = 0);
   330                    const std::vector<size_t> &dimension,
   331                    std::vector<float> ¶m_data,
   332                    size_t currentIdx = 0);
   341                    const std::vector<size_t> &dimension,
   342                    std::vector<std::string> ¶m_data);
   355                          const std::vector<std::string> ¶m_data_in,
   356                          std::vector<std::string> ¶m_data_out,
   357                          size_t idxInParam = 0,
   358                          size_t currentIdx = 1);
   368                      const std::vector<size_t> &dimension,
   369                      std::vector<std::string> ¶m_data,
   370                      size_t currentIdx = 0);
   377     std::shared_ptr<ezc3d::DataNS::Data> 
_data; 
   404     const std::vector<std::string>& 
pointNames() 
const;
   415     size_t pointIdx(
const std::string& pointName) 
const;
   432     size_t channelIdx(
const std::string& channelName) 
const;
   455     void lockGroup(
const std::string &groupName);
   499     void point(
const std::string &name);
   514     void point(
const std::string &pointName, 
const std::vector<ezc3d::DataNS::Frame> &frames);
   529     void point(
const std::vector<std::string> &pointNames, 
const std::vector<ezc3d::DataNS::Frame> &frames);
   542     void analog(
const std::string &name);
   558     void analog(std::string channelName, 
const std::vector<ezc3d::DataNS::Frame> &frames);
   574     void analog(
const std::vector<std::string>& channelNames, 
const std::vector<ezc3d::DataNS::Frame> &frames);
   592     void updateParameters(
const std::vector<std::string> &newPoints = std::vector<std::string>(), 
const std::vector<std::string> &newAnalogs = std::vector<std::string>());
 std::shared_ptr< ezc3d::DataNS::Data > _data
Pointer that holds the data of the C3D. 
std::string _filePath
The file path if the C3D was opened from a file. 
std::shared_ptr< ezc3d::Header > _header
Pointer that holds the header of the C3D. 
size_t _dispatchMatrix(const std::vector< size_t > &dimension, const std::vector< std::string > ¶m_data_in, std::vector< std::string > ¶m_data_out, size_t idxInParam=0, size_t currentIdx=1)
Internal function to dispatch a string array to a matrix of strings. 
void resizeCharHolder(unsigned int nByteToRead)
Resize the too small char to read. 
Analog holder for C3D analogous data. 
Group holder of C3D parameters. 
int hex2int(const char *val, unsigned int len)
Convert an hexadecimal value to a integer. 
size_t readUint(PROCESSOR_TYPE processorType, std::fstream &file, unsigned int nByteToRead, int nByteFromPrevious=0, const std::ios_base::seekdir &pos=std::ios::cur)
Read a unsigned integer of nByteToRead bytes at the position current + nByteFromPrevious from a file...
Points holder for C3D data 3D points data. 
void point(const std::string &name)
Create a point to the data set of name name. 
PROCESSOR_TYPE
The type of processor used to store the data. 
void unlockGroup(const std::string &groupName)
Unlock a particular group named groupName. 
c3d()
Create a valid minimalistic C3D structure. 
Group of parameter of a C3D file. 
void _readMatrix(std::fstream &file, const std::vector< size_t > &dimension, std::vector< std::string > ¶m_data, size_t currentIdx=0)
Internal function to read a string array to a matrix of strings. 
void readParam(PROCESSOR_TYPE processorType, std::fstream &file, unsigned int dataLenghtInBytes, const std::vector< size_t > &dimension, std::vector< int > ¶m_data, size_t currentIdx=0)
Read a matrix of integer parameters of dimensions dimension with each integer of length dataLengthInB...
char * c_int_tp
Char to be used by the read function with the specific size of a int preventing to allocate it at eac...
void parameter(const std::string &groupName, const ezc3d::ParametersNS::GroupNS::Parameter ¶meter)
Add/replace a parameter to a group named groupName. 
void print() const
Print the C3D by calling print method of header, parameter and data. 
Subframe for the analogous data. 
const std::vector< std::string > & pointNames() const
Get a reference to the names of the points. 
char * c_int
Char to be used by the read function with the specific size of a int preventing to allocate it at eac...
Channel of an analogous data. 
void updateHeader()
Update the header according to the parameters and the data. 
virtual ~c3d()
Destroy the class properly. 
size_t channelIdx(const std::string &channelName) const
Get the index of a analog channel in the subframe. 
std::shared_ptr< ezc3d::ParametersNS::Parameters > _parameters
Pointer that holds the parameters of the C3D. 
const ezc3d::Header & header() const
The header of the C3D. 
const ezc3d::ParametersNS::Parameters & parameters() const
The parameters of the C3D. 
void frame(const ezc3d::DataNS::Frame &frame, size_t idx=SIZE_MAX)
Add/replace a frame to the data set. 
char * c_float_tp
Char to be used by the read function with the specific size of a float preventing to allocate it at e...
Main class for C3D holder. 
void analog(const std::string &name)
Create a channel of analog data to the data set of name name. 
void lockGroup(const std::string &groupName)
Lock a particular group named groupName. 
const std::vector< std::string > & channelNames() const
Get a reference to the names of the analog channels. 
size_t pointIdx(const std::string &pointName) const
Get the index of a point in the points holder. 
char * c_float
Char to be used by the read function with the specific size of a float preventing to allocate it at e...
Frame holder for C3D data. 
void write(const std::string &filePath) const
Write the C3D to an opened file by calling write method of header, parameter and data. 
std::string toUpper(const std::string &str)
Swap all characters of a string to capital letters. 
int readInt(PROCESSOR_TYPE processorType, std::fstream &file, unsigned int nByteToRead, int nByteFromPrevious=0, const std::ios_base::seekdir &pos=std::ios::cur)
Read an integer of nByteToRead bytes at the position current + nByteFromPrevious from a file...
const ezc3d::DataNS::Data & data() const
The points and analogous data of the C3D. 
void readFile(std::fstream &file, unsigned int nByteToRead, char *c, int nByteFromPrevious=0, const std::ios_base::seekdir &pos=std::ios::cur)
The function that reads the file, it returns the value into a generic char pointer that must be pre-a...
unsigned int m_nByteToRead_float
Declaration of the size of a float. 
std::string readString(std::fstream &file, unsigned int nByteToRead, int nByteFromPrevious=0, const std::ios_base::seekdir &pos=std::ios::cur)
Read a string (array of char of nByteToRead bytes) at the position current + nByteFromPrevious from a...
DATA_TYPE
Enum that describes the size of different types. 
void writeDataStart(std::fstream &file, const std::streampos &dataStartPosition, const DATA_TYPE &type) const
Write the data_start parameter where demanded. 
void removeTrailingSpaces(std::string &str)
Remove the spaces at the end of a string. 
void updateParameters(const std::vector< std::string > &newPoints=std::vector< std::string >(), const std::vector< std::string > &newAnalogs=std::vector< std::string >())
Update parameters according to the data. 
unsigned int hex2uint(const char *val, unsigned int len)
Convert an hexadecimal value to an unsigned integer. 
unsigned int m_nByteToReadMax_int
Declaration of the max size of a int. 
float readFloat(PROCESSOR_TYPE processorType, std::fstream &file, int nByteFromPrevious=0, const std::ios_base::seekdir &pos=std::ios::cur)
Read a float at the position current + nByteFromPrevious from a file.