deffiles.h
Go to the documentation of this file.
1 /*--------------------------------------------------------------------------------------+
2 |
3 | Supplied under applicable software license agreement.
4 |
5 | Copyright (c) 2018 Bentley Systems, Incorporated. All rights reserved.
6 |
7 +---------------------------------------------------------------------------------------*/
8 #pragma once
9 
11 
12 #include <DgnPlatform\DgnCoreAPI.h>
13 #include <DgnPlatform\WorkSet.h> // DgnWorkSetCR
14 
15 #include <Mstn\MstnDefs.h>
16 #include <Mstn\MicroStation.r.h>
17 
18 #include <list>
19 
20 /*----------------------------------------------------------------------+
21 | |
22 | Typedefs |
23 | |
24 +----------------------------------------------------------------------*/
26  {
27 private:
28  std::list<DgnDocumentMonikerPtr> m_documentMonikers;
29 
30 public:
31  MSCORE_EXPORT void Clear() {m_documentMonikers.clear(); }
32  MSCORE_EXPORT size_t Count() const {return m_documentMonikers.size(); }
33 
34  MSCORE_EXPORT void Add (DgnDocumentMonikerPtr m);
35  MSCORE_EXPORT void Add (WCharCP file);
36 
37  MSCORE_EXPORT bool Remove (DgnDocumentMonikerPtr m);
38  MSCORE_EXPORT bool Remove (WCharCP file);
39 
40  MSCORE_EXPORT DgnDocumentMonikerPtr GetMoniker (size_t index) const;
41  MSCORE_EXPORT BeFileName GetFileName (size_t index) const;
42  MSCORE_EXPORT BeFileName GetDisplayName (size_t index) const;
43 
44  };
45 
47  {
48 private:
49  std::list<DgnFolderMonikerPtr> m_folderMonikers;
50 
51 public:
52  MSCORE_EXPORT void Clear() {m_folderMonikers.clear(); }
53  MSCORE_EXPORT size_t Count() {return m_folderMonikers.size(); }
54 
55  MSCORE_EXPORT void Add (DgnFolderMonikerPtr m);
56  MSCORE_EXPORT void Add (WCharCP folder);
57 
58  MSCORE_EXPORT bool Remove (DgnFolderMonikerPtr m);
59  MSCORE_EXPORT bool Remove (WCharCP folder);
60 
61  MSCORE_EXPORT DgnFolderMonikerPtr GetMoniker (size_t index);
62  MSCORE_EXPORT BeFileName GetFileName (size_t index);
63 
64  };
65 
66 
68  {
69 private:
70  std::list<BeFileName> m_names;
71 
72 public:
73  MSCORE_EXPORT void Clear() { m_names.clear(); }
74  MSCORE_EXPORT size_t Count() { return m_names.size(); }
75 
76  MSCORE_EXPORT void Add (WCharCP name);
77  MSCORE_EXPORT bool Remove (WCharCP name);
78  MSCORE_EXPORT bool RemoveAtIndex (size_t index);
79 
80  MSCORE_EXPORT BeFileName GetFileName (size_t index);
81  };
82 
83 
85  {
90 
91  void Clear ()
92  {
93  documents.Clear();
94  folders.Clear();
95  filters.Clear();
96  logicals.Clear();
97  }
98 
99  };
100 
101 
103  {
104  BeFileName fileName;
105  BeFileName fileFilter;
106  BeFileName defDir;
107 
109 
111 
113 
114  void Clear ()
115  {
116  history.Clear();;
117  }
118 
119  void Format
120  (
121  WCharCP fileNameP, /* => File name to save. */
122  WCharCP fileFilterP, /* => File Filter to save. */
123  WCharCP defaultDirP, /* => Default Directory to save. */
124  WCharCP cfgVarP /* => Cfg Var to save */
125  );
126 
127  };
128 
129 /*=================================================================================**/
133  {
136  };
137 
138 /*=================================================================================**/
142  {
143 
144  private: std::list<WorkSetHistoryData> m_workSetInfoList;
145 
146  public: MSCORE_EXPORT void Add (DgnWorkSetCR workSet);
147  public: MSCORE_EXPORT bool Remove (DgnWorkSetCR workset);
148  public: MSCORE_EXPORT void Add (WorkSetHistoryData& data);
149  public: MSCORE_EXPORT bool Remove (WorkSetHistoryData& data);
150  public: MSCORE_EXPORT void GetAtIndex (size_t index, WorkSetHistoryData& data);
151  public: MSCORE_EXPORT void Clear ();
152  public: MSCORE_EXPORT size_t Count ();
153  };
154 
155 /*=================================================================================**/
169  {
170  private: WorkSetHistoryList m_workSetHistoryList;
171 
172  public: MSCORE_EXPORT void Clear ();
173  public: MSCORE_EXPORT StatusInt ToStorage ();
174  public: MSCORE_EXPORT StatusInt FromStorage ();
175  public: MSCORE_EXPORT WorkSetHistoryList& GetWorkSetHistory ();
176  public: MSCORE_EXPORT StatusInt AddWorkSet (DgnWorkSetCR workSet);
177  public: MSCORE_EXPORT StatusInt RemoveWorkSet (DgnWorkSetCR workSet);
178  };
179 
DgnFolderMonikerPtr GetMoniker(size_t index)
size_t Count()
Definition: deffiles.h:74
void Format(WCharCP fileNameP, WCharCP fileFilterP, WCharCP defaultDirP, WCharCP cfgVarP)
StatusInt AddWorkSet(DgnWorkSetCR workSet)
void Clear()
Definition: deffiles.h:73
BeFileName GetFileName(size_t index)
~DefaultFileInfo()
Definition: deffiles.h:112
BeFileName GetDisplayName(size_t index) const
bool Remove(DgnDocumentMonikerPtr m)
Definition: deffiles.h:25
BeFileName GetFileName(size_t index)
FileInfoHistory history
Definition: deffiles.h:108
void GetAtIndex(size_t index, WorkSetHistoryData &data)
Definition: deffiles.h:102
wchar_t const * WCharCP
Definition: Bentley.h:224
BeFileName GetFileName(size_t index) const
WString m_workSpaceName
Definition: deffiles.h:134
FileInfoItemHistory logicals
Definition: deffiles.h:89
WString m_workSetName
Definition: deffiles.h:135
bool Remove(DgnFolderMonikerPtr m)
Definition: deffiles.h:132
Definition: deffiles.h:46
bool Remove(DgnWorkSetCR workset)
void Clear()
Definition: deffiles.h:91
size_t Count() const
Definition: deffiles.h:32
FileInfoDocumentHistory documents
Definition: deffiles.h:86
FileInfoItemHistory filters
Definition: deffiles.h:88
Definition: deffiles.h:84
void Clear()
Definition: deffiles.h:114
StatusInt ToStorage()
size_t Count()
Definition: deffiles.h:53
BeFileName fileFilter
Definition: deffiles.h:105
DefaultFileInfo()
Definition: deffiles.h:110
FileInfoFolderHistory folders
Definition: deffiles.h:87
int StatusInt
Definition: Bentley.h:222
StatusInt FromStorage()
BeFileName fileName
Definition: deffiles.h:104
void Add(DgnDocumentMonikerPtr m)
BeFileName defDir
Definition: deffiles.h:106
ProjectHistoryInfo represents the MRU (most recently used) list of projects.
Definition: deffiles.h:168
Definition: deffiles.h:67
void Add(WCharCP name)
bool Remove(WCharCP name)
bool RemoveAtIndex(size_t index)
DgnDocumentMonikerPtr GetMoniker(size_t index) const
void Add(DgnWorkSetCR workSet)
Definition: deffiles.h:141
void Clear()
Definition: deffiles.h:31
void Add(DgnFolderMonikerPtr m)
StatusInt RemoveWorkSet(DgnWorkSetCR workSet)
void Clear()
Definition: deffiles.h:52
A string class that has many of the same capabilities as std::string, plus additional functions such ...
Definition: WString.h:51
WorkSetHistoryList & GetWorkSetHistory()

Copyright © 2017 Bentley Systems, Incorporated. All rights reserved.