MRepository.h
1 /*****************************************************************************
2  **
3  ** Header file for Muster API Repository object
4  **
5  ** Name : MRepository.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 MREPOSITORY_H
19 #define MREPOSITORY_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 
42 // Disable STL Export warning, member is private, we don't need direct access from the DLL client
43 #if defined(_WIN32)
44 #pragma warning(disable: 4251)
45 #endif // _WIN32
46 
47 #include <string>
48 #include <list>
49 #include <vector>
50 
51 namespace MClientLib {
52 
63  class MCLIENTLIB_API MRepository {
64  public:
65 
71  enum kScope {
74  kScopeClient
75  };
76  private:
77  long id;
78  std::string name;
79  std::string localSide;
80  std::string windowsSide;
81  std::string linuxSide;
82  std::string macSide;
83  int scope;
84  bool availableToWeb;
85  public:
86  MRepository();
87  virtual ~MRepository();
88 
89  virtual long getId();
90  virtual std::string getName();
91  virtual std::string getLocalSide();
92  virtual std::string getWindowsSide();
93  virtual std::string getLinuxSide();
94  virtual std::string getMacSide();
95  virtual int getScope();
96  virtual bool getAvailableToWeb();
97 
98  virtual void setId(long _id);
99  virtual void setName(const std::string& _name);
100  virtual void setLocalSide(const std::string& _localSide);
101  virtual void setWindowsSide(const std::string& _windowsSide);
102  virtual void setLinuxSide(const std::string& _linuxSide);
103  virtual void setMacSide(const std::string& _macSide);
104  virtual void setScope(int _scope);
105  virtual void setAvailableToWeb(bool _availableToWeb);
107  virtual bool Unmarshall(const std::vector<std::string>& items);
108  virtual std::string Marshall();
109  void castedRelease();
111  };
112 
114 }
115 
116 #endif
Class holding an entry of a repository.
Definition: MRepository.h:63
kScope
Enumeration of repositories scopes.
Definition: MRepository.h:71