Loading include/Field.h +11 −4 Original line number Original line Diff line number Diff line Loading @@ -19,6 +19,7 @@ #define _FIELD_H_H #define _FIELD_H_H #include "PacketLibDefinition.h" #include "PacketLibDefinition.h" #include <string> namespace PacketLib namespace PacketLib { { Loading @@ -42,7 +43,7 @@ public: int predefinedValue; int predefinedValue; /// Name of the field. /// Name of the field. char* name; std::string name; /// Logical type - NOT USED FOR NOW /// Logical type - NOT USED FOR NOW enum LogicalFieldDataType type; enum LogicalFieldDataType type; Loading @@ -56,7 +57,7 @@ class Field public: public: /// Constructor of class. /// Constructor of class. Field(char* name, char* dimension, char* predefinedValue, int progressiv); Field(std::string name, std::string dimension, std::string predefinedValue, int progressiv); /// Destructor of class. /// Destructor of class. ~Field(); ~Field(); Loading @@ -83,11 +84,17 @@ public: }; }; /// Name of the field. /// Name of the field. inline char* getName() std::string getName() { { return type->name; return type->name.c_str(); }; }; /// Return the logical field data type. LogicalFieldDataType getType() { return type->type; } inline int getProgressiv() inline int getProgressiv() { { return progressiv; return progressiv; Loading include/Packet.h +8 −6 Original line number Original line Diff line number Diff line Loading @@ -55,6 +55,8 @@ public: /// Distruttore /// Distruttore virtual ~Packet(); virtual ~Packet(); void createPacketType(pugi::xml_document& doc, pugi::xml_node hNode, int plPhysicalIndex, int plSize, pugi::xml_node pNode, bool isprefix, word dimprefix, std::map<pugi::xml_node, int>& physicalIndex); virtual bool createPacketType(char* fileName, bool prefix, word dimprefix) throw (PacketException*); virtual bool createPacketType(char* fileName, bool prefix, word dimprefix) throw (PacketException*); /// Decode the packet /// Decode the packet Loading Loading @@ -174,16 +176,16 @@ public: ByteStreamPtr getOutputStream(); ByteStreamPtr getOutputStream(); /// Gets the name of packet. /// Gets the name of packet. virtual char* getName() virtual const char* getName() { { return name; return (char*) name.c_str(); } } /// The name of the file .packet that contains the structure of the packet /// The name of the file .packet that contains the structure of the packet virtual char* getFileName() virtual const char* getFileName() { { return filename; return filename.c_str(); } } Loading Loading @@ -289,7 +291,7 @@ protected: byte packetID; byte packetID; /// The name of the packet /// The name of the packet char* name; std::string name; /// List of identifiers. This identifiers permits to identify if the stream contains /// List of identifiers. This identifiers permits to identify if the stream contains /// a particular type of packet /// a particular type of packet Loading Loading @@ -319,7 +321,7 @@ protected: bool thereisprefix; bool thereisprefix; /// The name of the file .packet that contains the structure of the packet /// The name of the file .packet that contains the structure of the packet char* filename; std::string filename; private: private: Loading include/PacketBufferQ.h +1 −1 Original line number Original line Diff line number Diff line Loading @@ -28,7 +28,7 @@ namespace PacketLib { class PacketBufferQ { class PacketBufferQ { public: public: PacketBufferQ(const string& configFile, const string& inputFile); PacketBufferQ(string configFile, string inputFile); ~PacketBufferQ(); ~PacketBufferQ(); Loading include/PacketBufferV.h +1 −1 Original line number Original line Diff line number Diff line Loading @@ -30,7 +30,7 @@ class PacketBufferV { public: public: PacketBufferV(const string& configFile, const string& inputFile); PacketBufferV(string configFile, string inputFile); ~PacketBufferV(); ~PacketBufferV(); Loading include/PacketHeader.h +2 −0 Original line number Original line Diff line number Diff line Loading @@ -39,6 +39,8 @@ public: name = n; name = n; }; }; void loadHeader(pugi::xml_node hNode, int plPhysicalIndex, int plSize); /// Loads data header from configuration file. /// Loads data header from configuration file. bool loadHeader(char* fileName) throw(PacketException*); bool loadHeader(char* fileName) throw(PacketException*); Loading Loading
include/Field.h +11 −4 Original line number Original line Diff line number Diff line Loading @@ -19,6 +19,7 @@ #define _FIELD_H_H #define _FIELD_H_H #include "PacketLibDefinition.h" #include "PacketLibDefinition.h" #include <string> namespace PacketLib namespace PacketLib { { Loading @@ -42,7 +43,7 @@ public: int predefinedValue; int predefinedValue; /// Name of the field. /// Name of the field. char* name; std::string name; /// Logical type - NOT USED FOR NOW /// Logical type - NOT USED FOR NOW enum LogicalFieldDataType type; enum LogicalFieldDataType type; Loading @@ -56,7 +57,7 @@ class Field public: public: /// Constructor of class. /// Constructor of class. Field(char* name, char* dimension, char* predefinedValue, int progressiv); Field(std::string name, std::string dimension, std::string predefinedValue, int progressiv); /// Destructor of class. /// Destructor of class. ~Field(); ~Field(); Loading @@ -83,11 +84,17 @@ public: }; }; /// Name of the field. /// Name of the field. inline char* getName() std::string getName() { { return type->name; return type->name.c_str(); }; }; /// Return the logical field data type. LogicalFieldDataType getType() { return type->type; } inline int getProgressiv() inline int getProgressiv() { { return progressiv; return progressiv; Loading
include/Packet.h +8 −6 Original line number Original line Diff line number Diff line Loading @@ -55,6 +55,8 @@ public: /// Distruttore /// Distruttore virtual ~Packet(); virtual ~Packet(); void createPacketType(pugi::xml_document& doc, pugi::xml_node hNode, int plPhysicalIndex, int plSize, pugi::xml_node pNode, bool isprefix, word dimprefix, std::map<pugi::xml_node, int>& physicalIndex); virtual bool createPacketType(char* fileName, bool prefix, word dimprefix) throw (PacketException*); virtual bool createPacketType(char* fileName, bool prefix, word dimprefix) throw (PacketException*); /// Decode the packet /// Decode the packet Loading Loading @@ -174,16 +176,16 @@ public: ByteStreamPtr getOutputStream(); ByteStreamPtr getOutputStream(); /// Gets the name of packet. /// Gets the name of packet. virtual char* getName() virtual const char* getName() { { return name; return (char*) name.c_str(); } } /// The name of the file .packet that contains the structure of the packet /// The name of the file .packet that contains the structure of the packet virtual char* getFileName() virtual const char* getFileName() { { return filename; return filename.c_str(); } } Loading Loading @@ -289,7 +291,7 @@ protected: byte packetID; byte packetID; /// The name of the packet /// The name of the packet char* name; std::string name; /// List of identifiers. This identifiers permits to identify if the stream contains /// List of identifiers. This identifiers permits to identify if the stream contains /// a particular type of packet /// a particular type of packet Loading Loading @@ -319,7 +321,7 @@ protected: bool thereisprefix; bool thereisprefix; /// The name of the file .packet that contains the structure of the packet /// The name of the file .packet that contains the structure of the packet char* filename; std::string filename; private: private: Loading
include/PacketBufferQ.h +1 −1 Original line number Original line Diff line number Diff line Loading @@ -28,7 +28,7 @@ namespace PacketLib { class PacketBufferQ { class PacketBufferQ { public: public: PacketBufferQ(const string& configFile, const string& inputFile); PacketBufferQ(string configFile, string inputFile); ~PacketBufferQ(); ~PacketBufferQ(); Loading
include/PacketBufferV.h +1 −1 Original line number Original line Diff line number Diff line Loading @@ -30,7 +30,7 @@ class PacketBufferV { public: public: PacketBufferV(const string& configFile, const string& inputFile); PacketBufferV(string configFile, string inputFile); ~PacketBufferV(); ~PacketBufferV(); Loading
include/PacketHeader.h +2 −0 Original line number Original line Diff line number Diff line Loading @@ -39,6 +39,8 @@ public: name = n; name = n; }; }; void loadHeader(pugi::xml_node hNode, int plPhysicalIndex, int plSize); /// Loads data header from configuration file. /// Loads data header from configuration file. bool loadHeader(char* fileName) throw(PacketException*); bool loadHeader(char* fileName) throw(PacketException*); Loading