added some development tools
[windows-sources.git] / developer / VSSDK / VisualStudioIntegration / Common / Source / CPP / VSL / MockInterfaces / VSLMockIVsTextBufferCoordinator.h
blobbc87ef63195c6cb2a5383448c823676533d132bb
1 /***************************************************************************
3 Copyright (c) Microsoft Corporation. All rights reserved.
4 This code is licensed under the Visual Studio SDK license terms.
5 THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
6 ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
7 IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
8 PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
10 This code is a part of the Visual Studio Library.
12 ***************************************************************************/
14 #ifndef IVSTEXTBUFFERCOORDINATOR_H_10C49CA1_2F46_11D3_A504_00C04F5E0BA5
15 #define IVSTEXTBUFFERCOORDINATOR_H_10C49CA1_2F46_11D3_A504_00C04F5E0BA5
17 #if _MSC_VER > 1000
18 #pragma once
19 #endif
21 #include "singlefileeditor.h"
23 #pragma warning(push)
24 #pragma warning(disable : 4510) // default constructor could not be generated
25 #pragma warning(disable : 4610) // can never be instantiated - user defined constructor required
26 #pragma warning(disable : 4512) // assignment operator could not be generated
27 #pragma warning(disable : 6011) // Dereferencing NULL pointer (a NULL derference is just another kind of failure for a unit test
29 namespace VSL
32 class IVsTextBufferCoordinatorNotImpl :
33 public IVsTextBufferCoordinator
36 VSL_DECLARE_NONINSTANTIABLE_BASE_CLASS(IVsTextBufferCoordinatorNotImpl)
38 public:
40 typedef IVsTextBufferCoordinator Interface;
42 STDMETHOD(SetBuffers)(
43 /*[in]*/ IVsTextLines* /*pPrimaryBuffer*/,
44 /*[in]*/ IVsTextLines* /*pSecondaryBuffer*/)VSL_STDMETHOD_NOTIMPL
46 STDMETHOD(SetSpanMappings)(
47 /*[in]*/ long /*cSpans*/,
48 /*[in,size_is(cSpans)]*/ NewSpanMapping* /*rgSpans*/)VSL_STDMETHOD_NOTIMPL
50 STDMETHOD(MapPrimaryToSecondarySpan)(
51 /*[in]*/ TextSpan /*tsPrimary*/,
52 /*[out]*/ TextSpan* /*ptsSecondary*/)VSL_STDMETHOD_NOTIMPL
54 STDMETHOD(MapSecondaryToPrimarySpan)(
55 /*[in]*/ TextSpan /*tsSecondary*/,
56 /*[out]*/ TextSpan* /*ptsPrimary*/)VSL_STDMETHOD_NOTIMPL
58 STDMETHOD(GetPrimaryBuffer)(
59 /*[out]*/ IVsTextLines** /*ppBuffer*/)VSL_STDMETHOD_NOTIMPL
61 STDMETHOD(GetSecondaryBuffer)(
62 /*[out]*/ IVsTextLines** /*ppBuffer*/)VSL_STDMETHOD_NOTIMPL
64 STDMETHOD(EnableReplication)(
65 /*[in]*/ DWORD /*bcrd*/,
66 /*[in]*/ BOOL /*fEnable*/)VSL_STDMETHOD_NOTIMPL
68 STDMETHOD(GetMappingOfPrimaryPosition)(
69 /*[in]*/ long /*lPosition*/,
70 /*[out]*/ TextSpan* /*ptsPrimary*/,
71 /*[out]*/ TextSpan* /*ptsSecondary*/)VSL_STDMETHOD_NOTIMPL
73 STDMETHOD(SetBufferMappingModes)(
74 /*[in]*/ DWORD /*bcmmPrimary*/,
75 /*[in]*/ DWORD /*bcmmSecondary*/)VSL_STDMETHOD_NOTIMPL
77 STDMETHOD(EnumSpans)(
78 /*[in]*/ IVsEnumBufferCoordinatorSpans** /*ppEnum*/)VSL_STDMETHOD_NOTIMPL
81 class IVsTextBufferCoordinatorMockImpl :
82 public IVsTextBufferCoordinator,
83 public MockBase
86 VSL_DECLARE_NONINSTANTIABLE_BASE_CLASS(IVsTextBufferCoordinatorMockImpl)
88 public:
90 VSL_DEFINE_MOCK_CLASS_TYPDEFS(IVsTextBufferCoordinatorMockImpl)
92 typedef IVsTextBufferCoordinator Interface;
93 struct SetBuffersValidValues
95 /*[in]*/ IVsTextLines* pPrimaryBuffer;
96 /*[in]*/ IVsTextLines* pSecondaryBuffer;
97 HRESULT retValue;
100 STDMETHOD(SetBuffers)(
101 /*[in]*/ IVsTextLines* pPrimaryBuffer,
102 /*[in]*/ IVsTextLines* pSecondaryBuffer)
104 VSL_DEFINE_MOCK_METHOD(SetBuffers)
106 VSL_CHECK_VALIDVALUE_INTERFACEPOINTER(pPrimaryBuffer);
108 VSL_CHECK_VALIDVALUE_INTERFACEPOINTER(pSecondaryBuffer);
110 VSL_RETURN_VALIDVALUES();
112 struct SetSpanMappingsValidValues
114 /*[in]*/ long cSpans;
115 /*[in,size_is(cSpans)]*/ NewSpanMapping* rgSpans;
116 HRESULT retValue;
119 STDMETHOD(SetSpanMappings)(
120 /*[in]*/ long cSpans,
121 /*[in,size_is(cSpans)]*/ NewSpanMapping* rgSpans)
123 VSL_DEFINE_MOCK_METHOD(SetSpanMappings)
125 VSL_CHECK_VALIDVALUE(cSpans);
127 VSL_CHECK_VALIDVALUE_MEMCMP(rgSpans, cSpans*sizeof(rgSpans[0]), validValues.cSpans*sizeof(validValues.rgSpans[0]));
129 VSL_RETURN_VALIDVALUES();
131 struct MapPrimaryToSecondarySpanValidValues
133 /*[in]*/ TextSpan tsPrimary;
134 /*[out]*/ TextSpan* ptsSecondary;
135 HRESULT retValue;
138 STDMETHOD(MapPrimaryToSecondarySpan)(
139 /*[in]*/ TextSpan tsPrimary,
140 /*[out]*/ TextSpan* ptsSecondary)
142 VSL_DEFINE_MOCK_METHOD(MapPrimaryToSecondarySpan)
144 VSL_CHECK_VALIDVALUE(tsPrimary);
146 VSL_SET_VALIDVALUE(ptsSecondary);
148 VSL_RETURN_VALIDVALUES();
150 struct MapSecondaryToPrimarySpanValidValues
152 /*[in]*/ TextSpan tsSecondary;
153 /*[out]*/ TextSpan* ptsPrimary;
154 HRESULT retValue;
157 STDMETHOD(MapSecondaryToPrimarySpan)(
158 /*[in]*/ TextSpan tsSecondary,
159 /*[out]*/ TextSpan* ptsPrimary)
161 VSL_DEFINE_MOCK_METHOD(MapSecondaryToPrimarySpan)
163 VSL_CHECK_VALIDVALUE(tsSecondary);
165 VSL_SET_VALIDVALUE(ptsPrimary);
167 VSL_RETURN_VALIDVALUES();
169 struct GetPrimaryBufferValidValues
171 /*[out]*/ IVsTextLines** ppBuffer;
172 HRESULT retValue;
175 STDMETHOD(GetPrimaryBuffer)(
176 /*[out]*/ IVsTextLines** ppBuffer)
178 VSL_DEFINE_MOCK_METHOD(GetPrimaryBuffer)
180 VSL_SET_VALIDVALUE_INTERFACE(ppBuffer);
182 VSL_RETURN_VALIDVALUES();
184 struct GetSecondaryBufferValidValues
186 /*[out]*/ IVsTextLines** ppBuffer;
187 HRESULT retValue;
190 STDMETHOD(GetSecondaryBuffer)(
191 /*[out]*/ IVsTextLines** ppBuffer)
193 VSL_DEFINE_MOCK_METHOD(GetSecondaryBuffer)
195 VSL_SET_VALIDVALUE_INTERFACE(ppBuffer);
197 VSL_RETURN_VALIDVALUES();
199 struct EnableReplicationValidValues
201 /*[in]*/ DWORD bcrd;
202 /*[in]*/ BOOL fEnable;
203 HRESULT retValue;
206 STDMETHOD(EnableReplication)(
207 /*[in]*/ DWORD bcrd,
208 /*[in]*/ BOOL fEnable)
210 VSL_DEFINE_MOCK_METHOD(EnableReplication)
212 VSL_CHECK_VALIDVALUE(bcrd);
214 VSL_CHECK_VALIDVALUE(fEnable);
216 VSL_RETURN_VALIDVALUES();
218 struct GetMappingOfPrimaryPositionValidValues
220 /*[in]*/ long lPosition;
221 /*[out]*/ TextSpan* ptsPrimary;
222 /*[out]*/ TextSpan* ptsSecondary;
223 HRESULT retValue;
226 STDMETHOD(GetMappingOfPrimaryPosition)(
227 /*[in]*/ long lPosition,
228 /*[out]*/ TextSpan* ptsPrimary,
229 /*[out]*/ TextSpan* ptsSecondary)
231 VSL_DEFINE_MOCK_METHOD(GetMappingOfPrimaryPosition)
233 VSL_CHECK_VALIDVALUE(lPosition);
235 VSL_SET_VALIDVALUE(ptsPrimary);
237 VSL_SET_VALIDVALUE(ptsSecondary);
239 VSL_RETURN_VALIDVALUES();
241 struct SetBufferMappingModesValidValues
243 /*[in]*/ DWORD bcmmPrimary;
244 /*[in]*/ DWORD bcmmSecondary;
245 HRESULT retValue;
248 STDMETHOD(SetBufferMappingModes)(
249 /*[in]*/ DWORD bcmmPrimary,
250 /*[in]*/ DWORD bcmmSecondary)
252 VSL_DEFINE_MOCK_METHOD(SetBufferMappingModes)
254 VSL_CHECK_VALIDVALUE(bcmmPrimary);
256 VSL_CHECK_VALIDVALUE(bcmmSecondary);
258 VSL_RETURN_VALIDVALUES();
260 struct EnumSpansValidValues
262 /*[in]*/ IVsEnumBufferCoordinatorSpans** ppEnum;
263 HRESULT retValue;
266 STDMETHOD(EnumSpans)(
267 /*[in]*/ IVsEnumBufferCoordinatorSpans** ppEnum)
269 VSL_DEFINE_MOCK_METHOD(EnumSpans)
271 VSL_CHECK_VALIDVALUE_INTERFACEPOINTER(ppEnum);
273 VSL_RETURN_VALIDVALUES();
278 } // namespace VSL
280 #pragma warning(pop)
282 #endif // IVSTEXTBUFFERCOORDINATOR_H_10C49CA1_2F46_11D3_A504_00C04F5E0BA5