DataIO
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
ECustomProperty.h
Go to the documentation of this file.
1 #ifndef E_CUSTOM_PROPERTY_H
2 #define E_CUSTOM_PROPERTY_H
3 
4 #include "dataio/DataIODefines.h"
5 #include "dataio/datainput/EBinaryRecord.h"
6 #include "dataio/datainput/ECustomPropertyValue.h"
7 #include <string>
8 
9 #include <stdint.h>
10 
11 namespace EM
12 {
13  namespace Strojcek
14  {
15  namespace VstupneUdaje
16  {
17 
18  class EFileSystem;
19 
20 #define CUSTOM_PROPERTY_VERSION 1
21 #define CUSTOM_PROPERTY_VERSIONMINOR 0
22 #define CUSTOM_PROPERTY_FILENAME "CustomProperty.dat"
23 
24 #define CUSTOM_PROPERTY_VALUE_VERSION 1
25 #define CUSTOM_PROPERTY_VALUE_VERSIONMINOR 0
26 #define CUSTOM_PROPERTY_VALUE_FILENAME "CustomPropertyValues.dat"
27 
28 
29 
30 #ifndef WINDOWS
31 #define TMPACKED __attribute__ ((packed))
32 #else
33 #define TMPACKED
34 #pragma pack(push , 1)
35 #endif
36  typedef struct _Custom_Property_struct
37  {
38  short TableID;
39  short ID1;
40  short ID2;
41  short ID3;
43  uint32_t Offset;
45 
47  {
48  public:
49  ECustomProperty( std::string fileName );
50  ECustomProperty( const ECustomProperty& rhs );
51  virtual ~ECustomProperty();
52 
53  CUSTOM_PROPERTY GetCustomProperty();
54  ECustomPropertyValue* GetValue( std::string fileName );
55 
56  static std::string ComposeKey( short tableID, short id1, short id2, short id3, short customPropertyType );
57 
58  virtual bool operator<( const std::string& key );
59  virtual bool operator>( const std::string& key );
60  virtual bool operator!=( const std::string& key );
61  virtual bool operator==( const std::string& key );
62  virtual unsigned short GetSize();
63  virtual std::string GetKey();
64  virtual void Fill( char *data );
65  virtual unsigned char *GetData();
67 
68  void SetTableID( short tableID );
69  void SetID1( short id1 );
70  void SetID2( short id2 );
71  void SetID3( short id3 );
72  void SetCustomPropertyType( short customPropertyType );
73  void SetOffset( long offset );
74 
75  void SetCustomProperty( CUSTOM_PROPERTY customProperty );
76 
77  bool Write( FILE *f );
78  static bool CompareCustomProperty( CUSTOM_PROPERTY ad1, CUSTOM_PROPERTY ad2 );
79 
80  private:
81  class DataClass;
82  DataClass *d;
83  };
84  }
85  }
86 }
87 
88 #endif // E_CUSTOM_PROPERTY_H
Definition: EBinaryRecord.h:17
short ID1
Definition: ECustomProperty.h:39
struct EM::Strojcek::VstupneUdaje::LINE_K_X_7 TMPACKED
short CustomPropertyType
Definition: ECustomProperty.h:42
struct EM::Strojcek::VstupneUdaje::_Custom_Property_struct CUSTOM_PROPERTY
uint32_t Offset
Definition: ECustomProperty.h:43
short ID3
Definition: ECustomProperty.h:41
Definition: ECustomPropertyValue.h:13
Definition: ECustomProperty.h:46
Class ECol : Objekt je predok pre vsetky nasledujuce kolekcie
Definition: ColReader.h:15
short TableID
Definition: ECustomProperty.h:38
#define DATAIO_API
Definition: DataIODefines.h:10
short ID2
Definition: ECustomProperty.h:40