MTextFileMarker.h
1 /*****************************************************************************
2 **
3 ** Header file for Muster API Text file error/warning marker
4 **
5 ** Name : MTextFileMarker.h
6 ** Author : Leonardo Bernardini
7 ** Version : Alpha 9.0 Wed May 17th 2017
8 **
9 ** Copyright 2000-2017, Virtual Vertex
10 ** All Rights Reserved.
11 **
12 ** This file contains UNPUBLISHED PROPRIETARY SOURCE CODE.
13 ** The contents of this file may not be disclosed to third parties, copied
14 ** or duplicated in any form, in whole or in part, without the prior written
15 ** permission of the author.
16 **
17 *****************************************************************************/
18 #ifndef MTEXTFILEMARKER_H
19 #define MTEXTFILEMARKER_H
20 
21 #ifdef WIN32
22 // Windows definitions
23 #ifdef MCLIENTLIB_EXPORTS
24 #define MCLIENTLIB_API __declspec(dllexport)
25 #else
26 #define MCLIENTLIB_API __declspec(dllimport)
27 #endif
28 #else
29 
30 #ifndef MCLIENTLIB_EXPORTS
31 #ifdef LINUX
32 #define MCLIENTLIB_API
33 #else
34 #define MCLIENTLIB_API
35 #endif
36 #else
37 #define MCLIENTLIB_API
38 #endif
39 #endif
40 
41 #if defined(_WIN32)
42 #pragma warning(disable: 4251)
43 #endif // _WIN32
44 
45 #include <string>
46 #include <vector>
47 
48 namespace MClientLib {
49 
60  class MCLIENTLIB_API MTextFileMarker {
61 
62  private:
63  int lineNumber;
64  int index;
65  int length;
66  int type;
67 
68  public:
69 
73  kFileMarkerPass = 0x00,
74  kFileMarkerNone = 0x01,
75  kFileMarkerError = 0x02,
76  kFileMarkerWarning = 0x03,
77  kFileMarkerSilenceError = 0x04,
78  kFileMarkerSilenceWarning = 0x05
80  };
81 
83  MTextFileMarker(int _type, int _lineNumber, int _index, int _length);
84  virtual ~MTextFileMarker();
85 
86  virtual bool getIsValid();
87  virtual int getType();
88  virtual int getLineNumber();
89  virtual int getIndex();
90  virtual int getLength();
92  virtual void setType(int _type);
93  virtual void setLineNumber(int _lineNumber);
94  virtual void setIndex(int _index);
95  virtual void setLength(int _length);
97  static std::string Marshall(std::vector<MTextFileMarker> list);
98  static void Unmarshall(std::vector<MTextFileMarker>& list, const char* encoded);
100  };
101 
103 }
104 
105 #endif
Class holding a chunk data.