zjf
2023-03-06 392b76515f40376b6d36f40a114850ef63650384
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
/////////////////////////////////////////////////////////////////////////////// 
// Copyright (C) 2002-2016, Open Design Alliance (the "Alliance"). 
// All rights reserved. 
// 
// This software and its documentation and related materials are owned by 
// the Alliance. The software may only be incorporated into application 
// programs owned by members of the Alliance, subject to a signed 
// Membership Agreement and Supplemental Software License Agreement with the
// Alliance. The structure and organization of this software are the valuable  
// trade secrets of the Alliance and its suppliers. The software is also 
// protected by copyright law and international treaty provisions. Application  
// programs incorporating this software must include the following statement 
// with their copyright notices:
//   
//   This application incorporates Teigha(R) software pursuant to a license 
//   agreement with Open Design Alliance.
//   Teigha(R) Copyright (C) 2002-2016 by Open Design Alliance. 
//   All rights reserved.
//
// By use of this software, its documentation or related materials, you 
// acknowledge and accept the above terms.
///////////////////////////////////////////////////////////////////////////////
 
 
 
 
#ifndef _ODDBHOSTAPPLICATIONSERVICES_INCLUDED_
#define _ODDBHOSTAPPLICATIONSERVICES_INCLUDED_
 
 
#include "TD_PackPush.h"
 
#include "SmartPtr.h"
#include "DbBaseHostAppServices.h"
#include "DbLayoutManager.h"
#include "OdStreamBuf.h"
#include "DbDatabase.h"
#include "OdFont.h"
#include "OdBinaryData.h"
#include "DbSecurity.h"
#include "DbPlotSettingsValidator.h"
 
 
class OdDbKey;
class OdDbAbstractClipBoundaryDefinition;
class ClipBoundaryArray;
class OdHatchPatternManager;
class OdDbPageController;
 
/** \details
  This template class is a specialization of the OdSmartPtr class for OdDbPageController object pointers.
*/
typedef OdSmartPtr<OdDbPageController> OdDbPageControllerPtr;
 
 
/** \details
    This class is the base class for platform specific operations within Teigha.
 
    Library: TD_Db
 
    <group OdDb_Classes>
    {noAutoLink}
*/
class ODRX_ABSTRACT TOOLKIT_EXPORT OdDbHostAppServices : public OdDbBaseHostAppServices
{
public:
  ODRX_DECLARE_MEMBERS(OdDbHostAppServices);
 
  OdDbHostAppServices();
  virtual ~OdDbHostAppServices();
 
  /** \details
    Returns the fully qualified path to the specified file.
 
    \param filename [in]  Name of the file to find.
    \param pDb [in]  Pointer to the database context.
    \param hint [in]  Hint that indicates the type of file that is required.
 
    \remarks
    Returns an empty string if the file is not found.
 
    This function is called by Teigha when access is needed to a
    file, such as a font file, a template file, etc.
 
    pDb == 0 specifies that this file search is not related to a database.
 
    If pDb != 0, call pDb->getFilename() to determine the path to the DWG
    file associated with the database.
 
    The typical search order is as follows:
 
    1.  The filename itself.
    2.  The current directory.
    3.  The drawing directory (for shx font, image, and xref files).
    4.  The directories listed in the "ACAD" environment variable.
    5.  The Windows fonts directory (only for TTF fonts on Windows).
 
    hint must be one of the following:
 
    <table>
    Name                    Value     Description Extension
    kDefault                0         Any file.                         any
    kFontFile               1         Can be either SHX or TTF file.    SHX or TTF
    kCompiledShapeFile      2         SHX file.                         SHX
    kTrueTypeFontFile       3         TTF file.                         TTF
    kEmbeddedImageFile      4         Image file.                       ISM
    kXRefDrawing            5         Drawing template file.            DWT
    kPatternFile            6         Pattern file (PAT)                PAT
    kTXApplication          7         Teigha(R) Xtension file.            TX
    kFontMapFile            8         FontMap file                      FMP
    kUnderlayFile           9         Underlay file
    kTextureMapFile        10
    </table>
 
    \note
    The client application can, in fact return any non-null string, so long as
    the application can handle that string in OdDbSystemServices::createFile.
  */
  virtual OdString findFile(
    const OdString& filename,
    OdDbBaseDatabase* pDb = 0,
    FindFileHint hint = kDefault);
 
  /** \details
    Returns an instance of an OdDbHostAppProgressMeter.
  */
  virtual OdDbHostAppProgressMeter* newProgressMeter();
 
  /** \details
    Notification function called whenever Teigha no longer needs the specified
    ProgressMeter object.
 
    \param pProgressMeter [in]  Pointer to the ProgressMeter object no longer needed by Teigha.
 
    \note
    The default implementation of this function does nothing but return.
  */
  virtual void releaseProgressMeter(
    OdDbHostAppProgressMeter* pProgressMeter);
 
  /** \details
    Returns the static OdRxClass description object associated with the database.
 
    \remarks
    Returns OdDbDatabase::desc();
  */
  virtual OdRxClass* databaseClass() const;
 
  /** \details
    Creates an instance of an OdDbDatabase object.
 
    \param createDefault [in]  If and only if true, the newly created database
            will be populated with the default set of objects (all tables, ModelSpace and PaperSpace blocks
            etc.)
    \param measurement [in] Units of measurement for creating the database.
 
    \remarks
    Returns the newly created database.
 
    This HostAppServices object will be associated with the newly created database.
 
    measurement must be one of the following:
 
    <table>
    Name              Value   Description
    OdDb::kEnglish    0       English
    OdDb::kMetric     1       Metric
    </table>
 
  */
  virtual OdDbDatabasePtr createDatabase(
    bool createDefault = true,
    OdDb::MeasurementValue measurement = OdDb::kEnglish) const;
 
  /** \details
    Loads the contents of the specified StreamBuf or DWG/DXF file into the
    database with which this HostAppServices object is associated.
 
    \param pStreamBuf [in]  Pointer to the StreamBuf object from which the data are to be read.
    \param partialLoad [in]  Controls the partial loading of .dwg files.
    \param password [in]  Password for file.
    \param allowCPConversion [in]  If and only if true, allows code page conversion.
 
    \remarks
    Returns a SmartPointer to the database containing the contents of the file.
  */
  virtual OdDbDatabasePtr readFile(
    OdStreamBuf* pStreamBuf,
    bool allowCPConversion = false,
    bool partialLoad = false,
    const OdPassword& password = OdPassword());
 
  /** \details
    Performs a recover operation on the specified StreamBuf file.
 
    \param pStreamBuf [in]  Pointer to the StreamBuf object from which the data are to be read.
    \param pAuditInfo [in]  Pointer to an OdDbAuditInfo object.
    \param password [in]  Password for file.
 
 
    \remarks
    The specified AuditInfo object controls the audit, and receives the audit status.
 
    When overriding this function for a custom class, first call OdDbObject::audit(pAuditInfo)
    to validate the audit operation.
  */
  virtual OdDbDatabasePtr recoverFile(
    OdStreamBuf* pStreamBuf,
    OdDbAuditInfo *pAuditInfo = 0,
    const OdPassword& password = OdPassword());
 
  /** \details
    \param filename [in]  Path of the DWG/DXF file to read.
    \param shareMode [in]  Sharing mode to use when opening the file.
 
    \remarks
    shareMode must be one of the following:
 
    <table>
    Name                         Value       Description
    Oda::kShareDenyReadWrite     0x10        deny read/write mode
    Oda::kShareDenyWrite         0x20        deny write mode
    Oda::kShareDenyRead          0x30        deny read mode
    Oda::kShareDenyNo            0x40        deny none mode
    </table>
  */
  virtual OdDbDatabasePtr readFile(
    const OdString& filename,
    bool allowCPConversion = false,
    bool partialLoad = false,
    Oda::FileShareMode shareMode = Oda::kShareDenyNo,
    const OdPassword& password = OdPassword())
  {
    Oda::FileAccessMode nDesiredAccess = Oda::kFileRead;
    return readFile(odSystemServices()->createFile(filename, nDesiredAccess, shareMode),
      allowCPConversion, partialLoad, password);
  }
 
 
  /** \details
    Returns the name of the client program.
 
    \remarks
    This function is typically used for populating "About" information.
 
    \note
    The default implementation of this function returns oddbGetLibraryInfo()->getLibName()
  */
  virtual const OdString program();
 
  /** \details
    Returns the name of the client product.
 
    \remarks
    This function is typically used for populating "About" information.
 
    \note
    The default implementation of this function returns program().
  */
  virtual const OdString product();
 
  /** \details
    Returns the name of the client company.
 
    \remarks
    This function is typically used for populating "About" information.
 
    \note
    The default implementation of this function returns oddbGetLibraryInfo()->getCompanyName().
  */
  virtual const OdString companyName();
 
  /** \details
    Returns the name of the client product code.
 
    \remarks
    This function is typically used for populating "About" information.
 
    prodcode() returns one of the following:
 
    <table>
    Name          Value   Description
    kProd_ACAD    1       Plain
    kProd_LT      2       Lite
    kProd_OEM     3       OEM
    kProd_OdDb    4       ..
    </table>
 
    \note
    The default implementation of this function returns kProd_OEM, and should not be overridden.
  */
  virtual ProdIdCode prodcode();
 
  /** \details
    Returns the release major and minor version string of the client application.
 
    \note
    The default implementation of this function returns oddbGetLibraryInfo()->getLibVersion().
  */
  virtual const OdString releaseMajorMinorString();
 
  /** \details
    Returns the release major version of the client application.
 
    \note
    The default implementation of this function returns TD_MAJOR_VERSION.
  */
  virtual int releaseMajorVersion();
 
  /** \details
    Returns the release minor version of the client application.
 
    \note
    The default implementation of this function returns TD_MINOR_VERSION.
  */
  virtual int releaseMinorVersion();
 
  /** \details
    Returns the release version string of the client application.
 
    \note
    The default implementation of this function returns oddbGetLibraryInfo()->getLibVersion().
  */
  virtual const OdString versionString();
 
  /** \details
    Displays the specified warning message.
 
    \param warnVisGroup [in]  Group of warning message visibility (always visible if empty).
    \param message [in]  Warning message.
    \param warningOb [in]  Warning object.
    \param objectId [in]  Object ID of the object associated with the warning.
 
    \note
    These functions call odSystemServices()->warning(message) to display the warning.
  */
  TD_USING(OdDbBaseHostAppServices::warning);
  //virtual void warning(
  //  const OdString& message) { odSystemServices()->warning(NULL, message); };
  //virtual void warning(
  //  const char* warnVisGroup,
  //  const OdString& message) { odSystemServices()->warning(warnVisGroup, message); };
  //virtual void warning(
  //  OdWarning warningOb) { warning(NULL, getErrorDescription(warningOb)); }
  //virtual void warning(
  //  const char* warnVisGroup,
  //  OdWarning warningOb) { warning(warnVisGroup, getErrorDescription(warningOb)); }
  virtual void warning(
    OdWarning warningOb,
    OdDbObjectId objectId) { warning(NULL, warningOb, objectId); }
  virtual void warning(
    const char* warnVisGroup,
    OdWarning warningOb,
    OdDbObjectId objectId);
  virtual void warning(
    const OdError& err)  { warning(NULL, err.description()); }
  virtual void warning(
    const char* warnVisGroup,
    const OdError& err)  { warning(warnVisGroup, err.description()); }
 
  /** \details
    Returns the error description associated with the specified error code.
    \param errorCode [in]  Error code.
 
    \note
    The default implementation of this function returns formatMessage(errorCode).
  */
  virtual OdString getErrorDescription(
    unsigned int errorCode);
 
  /** \details
    Returns a formatted message corresponding to the specified error code(s).
    \param errorCode [in]  Error code.
  */
  virtual OdString formatMessage(
    unsigned int errorCode,...);
#ifdef ODA_FORMAT
  virtual OdString formatMessage(unsigned int errorCode, long i, const OdString& str) { return formatMessage(errorCode, i, (void*)str.c_str()); }
#endif
 
 
  /** \details
    Returns true if and only if Teigha is to do full-time CRC checking on database filing operations.
 
    \remarks
    The default implementation of this function always returns false.
    Override this function to return true or false as desired to control this checking.
  */
  virtual bool doFullCRCCheck();
 
  /** \details
    Returns an alternate UndoController object for Teigha.
 
    \remarks
    The default implementation of this function always returns a null SmartPointer.
 
    Each database requires at most 2 undo controllers (for undo and redo).
  */
  virtual OdDbUndoControllerPtr newUndoController();
 
  /** \details
    Print the audit report for the specified AuditInfo object.
 
    \param pAuditInfo [in]  Pointer to an OdDbAuditInfo object.
    \param strLine [in]  The string to print.
    \param printDest [in]  Print destination.
 
    \remarks
    The default implementation of this function does nothing but return.
  */
  virtual void auditPrintReport(
    OdAuditInfo* pAuditInfo,
    const OdString& strLine,
    int printDest) const;
 
  /** \details
    Returns the PlotSettingsValidator object associated with HostAppServices object.
 
    \remarks
    If no PlotSettingsValidator object is associated with this HostAppServices object, one is created and
    associated with it.
  */
  virtual OdDbPlotSettingsValidator* plotSettingsValidator();
 
  /** \details
    Locates the TTF or TTC file containing the specified font description.
 
    \param description [in]  Font description.
    \param filename [out]  Receives the name of the TrueType font file.
 
    \remarks
    Returns true and the filename if and only if the font file was found.
 
    \note
    The non-Windows builds of this function do nothing but return.
  */
  virtual bool ttfFileNameByDescriptor(
    const OdTtfDescriptor& description,
    OdString& filename) = 0;
 
#define REGVAR_DEF(type, name, unused3, unused4, unused5)\
protected:\
  /*!DOM*/ \
  type  m_##name;\
public:\
  /*!DOM*/ \
  SVARS_FUNC_MODIFIER type get##name() const;\
  \
  /*!DOM*/ \
  SVARS_FUNC_MODIFIER void set##name(type val);
 
#include "SysVarDefs.h"
 
#undef REGVAR_DEF
 
 
  virtual OdString getAlternateFontName() const;
 
  /** \details
    Returns the name of the font mapping file used by the getPreferableFont function.
 
    \sa
    Font Handling
 
    \note
    The default implementation of this function does nothing but return an empty string.
    It will be fully implemented in a future release.
  */
  virtual OdString getFontMapFileName() const;
 
  /** \details
    Returns the preferable font name for the specified font name and type.
 
 
    \param fontName [in]  Font name.
    \param fontType [in]  Font type.
 
    \remarks
    This function is called as the first step in the process of resolving a font file.
    The default implementation tries to locate a font mapping file by calling
    getFontMapFileName, and substitutes the font name based on the contents of this
    file.
 
    fontType must be one of the following:
 
    <table>
    Name                    Value    Description
    kFontTypeUnknown        0        Unknown.
    kFontTypeShx            1        SHX font.
    kFontTypeTrueType       2        TrueType font.
    kFontTypeShape          3        Shape file.
    kFontTypeBig            4        BigFont file.
    </table>
 
    \sa
    Font Handling
  */
  virtual OdString getPreferableFont(
    const OdString& fontName,
    OdFontType fontType);
 
  /** \details
    Returns the font to be used when the specified font is not found.
 
    \param fontName [in]  Font name.
    \param fontType [in]  Font type.
 
    \remarks
    fontType must be one of the following:
 
    <table>
    Name                    Value    Description
    kFontTypeUnknown        0        Unknown.
    kFontTypeShx            1        SHX font.
    kFontTypeTrueType       2        TrueType font.
    kFontTypeShape          3        Shape file.
    kFontTypeBig            4        BigFont file.
    </table>
 
    The default implementation of this function calls getAlternateFontName for
    fonts that are not of type kFontTypeShape or kFontTypeBig. When they are,
    and empty string is returned.
 
    Client code could override this function to perform custom substitution
    for these types of fonts.
 
    \sa
    Font Handling
  */
  virtual OdString getSubstituteFont(
    const OdString& fontName,
    OdFontType fontType);
 
  /** \details
    Returns the typeface name of the TTF font which has the character.
 
    \param pFont [in]        Current font.
    \param unicodeChar [in]  Current symbol.
    \param pDb [in]          Pointer to the database context.
 
    \sa
    Font Handling
 
    \note
    The default implementation uses Windows API for getting the font.
  */
  virtual OdString getSubstituteFontByChar(
    const OdFont& pFont,
    OdChar unicodeChar, OdDbDatabase *pDb);
 
  /** \details
    Collects folders with TrueType fonts.
 
    \param aDirs [out]   Array names of folders.
 
    \sa
    Font Handling
  */
  virtual bool getSystemFontFolders(
     OdStringArray& aDirs);
 
  /** \details
    Collects TrueType font paths.
 
    \param res [out]      Array of full file names of TrueType fonts.
    \param sPath [in]    Array of folders paths with TrueType files.
    \param sFilter [in]  File name filter.
 
    \sa
    Font Handling
  */
  virtual void collectFilePathsInDirectory(OdStringArray& res, // out
    const OdString& sPath, // in
    const OdString& sFilter = L"*.*");
 
  /** \details
    Returns the PatternManager associated with this HostAppServices object.
 
    \remarks
    If no PatternManager object is associated with this HostAppServices object, one is created and
    associated with it.
  */
  virtual OdHatchPatternManager* patternManager() = 0;
 
  /** \details
    Notification function called whenever a drawing file requires a *password.*
 
    \param dwgName [in]  Drawing file requiring the password.
    \param isXref [in]  True if and only if the drawing file is being opened as an Xref.
    \param password [out]  Password.
 
    \remarks
    Prompts the user for a password and returns said password.
 
    Returns false if the user cancels the password entry, or
    if there is no user.
 
    \note
    The default implementation of this function does nothing but return false.
  */
  virtual bool getPassword(
    const OdString& dwgName,
    bool isXref,
    OdPassword& password);
 
  /* { Secret } */
  virtual OdPwdCachePtr getPasswordCache();
 
  /** \details
    Returns an alternate PageController object for Teigha.
 
    \remarks
    The paging type will be determined by the overridden OdDbPageController::pagingType
    function in the returned instance.
 
    A null SmartPointer indicates no paging of database objects is to be done.
 
    \note
    The default implementation of this function always returns a null SmartPointer.
  */
  virtual OdDbPageControllerPtr newPageController();
 
  /** \details
  Callback method to use with paging functionality.
 
  \remarks
  Return eInvalidInput in case if pDb is null.
 
  \note
  The default implementation of this function calls odDbPageObjects.
  */
  virtual OdResult pageObjects(OdDbDatabase* pDb);
 
  /** \details
    Prompts the user for a filename, and returns their response.
 
    \param flags [in]  Dialog behavior.
    \param dialogCaption [in]  Dialog caption.
    \param defExt [in]  Default file extension without "."
    \param defFilename [in]  Default filename.
    \param filter [in]  Filter pattern.
 
    \remarks
    flags must be one of the following:
 
    <table>
    Name                  Value   Description
    kGfpForOpen           0       For Open.
    kGfpForSave           1       For Save.
    kGfpOverwritePrompt   2       Enable overwrite prompt displaying when exist file selected for saving.
    </table>
 
    This function is intended for the selection of filenames via dialog boxes,
    although other methods may be used.
 
    * Returns "canceled" if the user cancels the request.
    * Returns "unsupported" if the application does not support this user input.
 
    \note
    The default implementation of this function does nothing but return "unsupported".
  */
  virtual OdString fileDialog(
    int flags,
    const OdString& dialogCaption = OdString::kEmpty,
    const OdString& defExt = OdString::kEmpty,
    const OdString& defFilename = OdString::kEmpty,
    const OdString& filter = OdString::kEmpty);
 
  virtual OdDbLayoutManagerPtr layoutManager() const;
 
  /** \details
  Returns non-zero if the application copy is educational.
  */
  virtual OdUInt32 educationalPlotStamp() const;
 
  /** \details
    Returns the OdDgHostAppServices object used for reading dgn files.
  */
  virtual OdDbBaseHostAppServices* getDgnHostAppServices() const;
 
  /** \details
    Returns thumbnail preview size. Default implementation returns sizes based on THUMBSIZE Registry variable.
  */
  virtual void getThumbSize(unsigned int& nWidth, unsigned int& nHeight);
 
  /** \details
    Returns the path to the temporary files folder.
  */
  virtual OdString getTempPath() const;
 
  virtual OdStreamBufPtr getHistoryFile(OdDbDatabase*);
#ifdef SWIG
  friend class OdDbHostAppServices2;
private:
#endif
  virtual OdDbKey* key() const = 0;
protected:
  OdMutex                       m_LayoutManagerMutex;
  OdMutex                       m_ValidatorMutex;
  OdMutex                       m_PwdCacheMutex;
//  OdMutex                       m_WarningMutex;
  OdDbLayoutManagerPtr          m_pLayoutManager;
  OdDbPlotSettingsValidatorPtr  m_pValidator;
  OdPwdCachePtr                 m_pPwdCache;
};
 
/** \details
    This class implements platform-dependent operations and progress metering.
 
    \sa
    TD_Db
 
    <group OdDb_Classes>
*/
class ODRX_ABSTRACT OdDbHostAppServices2 : public OdDbHostAppServices
{
  virtual OdDbKey* key() const;
protected:
  mutable OdMutex               m_KeyMutex;
};
 
#include "TD_PackPop.h"
 
#endif /* _ODDBHOSTAPPLICATIONSERVICES_INCLUDED_ */