Public Member Functions | Static Public Member Functions | Friends | List of all members
PlotFileSpec Struct Reference

Represents a file specification in the printing system. More...

#include <PlotApi.h>

Public Member Functions

 PlotFileSpec ()
 Default constructor. More...
 
 PlotFileSpec (WStringCR ufs)
 Constructs a PlotFileSpec from a universal file specification. More...
 
 PlotFileSpec (WStringCR ufs, bool isHfs)
 Constructs a PlotFileSpec from a universal file specification, while also optionally setting the host file specification to the same value. More...
 
 PlotFileSpec (WCharCP ufs)
 Constructs a PlotFileSpec from a universal file specification. More...
 
 PlotFileSpec (WCharCP ufs, bool isHfs)
 Constructs a PlotFileSpec from a universal file specification, while also optionally setting the host file specification to the same value. More...
 
 PlotFileSpec (DgnDocumentCP document)
 Constructs a PlotFileSpec from a DgnDocument. More...
 
 PlotFileSpec (DgnFolderCP folder)
 Constructs a PlotFileSpec from a DgnDocument. More...
 
 PlotFileSpec (PlotFileSpecCR source)
 Copy constructor. More...
 
PlotFileSpecR operator= (PlotFileSpecCR source)
 Assigns from another PlotFileSpec instance. More...
 
 ~PlotFileSpec ()
 Destructor. More...
 
BeFileNameCR Ufs () const
 Gets the universal file specification, without any embedded suffix. More...
 
BeFileName GetUfs (bool includeEmbeddedSuffix=false) const
 Gets the universal file specification. More...
 
void SetUfs (WCharCP value)
 Sets the universal file specification. More...
 
void SetUfsOnly (WStringCR value)
 Sets the universal file specification without clearing anything. More...
 
void SetUfsAndHfs (WCharCP value)
 Sets both the universal and host file specifications. More...
 
BeFileNameCR Hfs () const
 Gets the host file specification, without any embedded suffix. More...
 
BeFileName GetHfs (bool includeEmbeddedSuffix=false) const
 Gets the host file specification. More...
 
void SetHfs (WCharCP value)
 Sets the host file specification. More...
 
void ClearHfs ()
 Clears the host file specification. More...
 
BeFileNameCR HfsOrUfs () const
 Gets the host file specification if defined, otherwise the universal file specification. More...
 
BeFileName GetHfsOrUfs (bool includeEmbeddedSuffix=false) const
 Gets the host file specification if defined, otherwise the universal file specification. More...
 
WStringCR Moniker () const
 Gets the externalized DMS moniker string. More...
 
void SetMoniker (WCharCP value)
 Sets the externalized DMS moniker string. More...
 
void SetMoniker (WStringCR value)
 Sets the externalized DMS moniker string. More...
 
void ClearMoniker ()
 Clears the externalized DMS moniker string. More...
 
WStringCR EmbeddedSuffix () const
 Gets the embedded suffix string. More...
 
void SetEmbeddedSuffix (WCharCP value)
 Sets the embedded suffix string. More...
 
void SetEmbeddedSuffix (WStringCR value)
 Sets the embedded suffix string. More...
 
void ClearEmbeddedSuffix ()
 Clears the embedded suffix string. More...
 
bool IsFolder () const
 Gets flag indicating if this specification is for a folder. More...
 
void SetIsFolder (bool value)
 Sets flag indicating if this specification is for a folder. More...
 
bool IsReadOnly () const
 Gets flag indicating if this specification represents a read-only file or folder. More...
 
void SetIsReadOnly (bool value)
 Sets flag indicating if this specification represents a read-only file or folder. More...
 
bool IsNew () const
 Gets flag indicating if this specification represents a file or folder being created. More...
 
void SetIsNew (bool value)
 Sets flag indicating if this specification represents a file or folder being created. More...
 
DgnDocumentP Document () const
 DgnDocument pointer. May be undefined. More...
 
void SetDocument (DgnDocumentCP value)
 Set the DgnDocument for this file specification. Adds reference to document. More...
 
DgnFolderP Folder () const
 DgnFolder pointer. May be undefined. More...
 
void SetFolder (DgnFolderCP value)
 Set the DgnFolder for this folder specification. Adds reference to folder. More...
 
bool IsValid () const
 True if the universal file specification is defined. More...
 
bool IsEmpty () const
 True if the universal file specification is not defined. More...
 
bool IsHfsDefined () const
 True if the host file specification is defined. More...
 
bool IsMonikerDefined () const
 True if the externalized moniker string is defined. More...
 
bool IsEmbeddedSuffixDefined () const
 True if the embedded suffix is defined. More...
 
bool IsHandleDefined () const
 True if DgnDocument or DgnFolder is defined. More...
 
bool IsDms () const
 True if this file is DMS managed. More...
 
BeFileNameCR DisplayFullName () const
 Gets the Ufs if DMS managed, otherwise HfsOrUfs(). More...
 
BeFileName GetDisplayFullName (bool includeEmbeddedSuffix=false) const
 Gets the Ufs if DMS managed, otherwise GetHfsOrUfs (includeEmbeddedSuffix). More...
 
WString GetFileName (bool includeEmbeddedSuffix=false) const
 Gets the file name and extension of the Hfs if defined, otherwise that of the Ufs. More...
 
WString ToString () const
 Gets the display full name, including embedded suffix. More...
 
void SetFromDgnDocument (DgnDocumentCP document)
 Populates FileSpec from a DgnDocument. More...
 
void SetFromDgnFolder (DgnFolderCP folder)
 Populates FileSpec from a DgnFolder. More...
 
void UpdateFromHandle ()
 Updates the FolderSpec from its contained handle, if defined. More...
 
void ClearHandle ()
 Clears the document or folder handle, if defined. More...
 
void Clear ()
 Clears Ufs, Hfs, moniker, and handle. More...
 

Static Public Member Functions

static bool ContainsEmbeddedSuffix (WStringCR path)
 True if the given path contains an embedded file specification. More...
 
static WString GetEmbeddedSuffix (WStringCR path)
 Returns any embedded suffix from the given path. More...
 
static WString RemoveEmbeddedSuffix (WStringCR path)
 Removes any embedded suffix from the given path. More...
 
static bool Equals (PlotFileSpecCR comparand1, PlotFileSpecCR comparand2)
 Tests two PlotFileSpec instances for equality. More...
 

Friends

void swap (PlotFileSpecR a, PlotFileSpecR b)
 Swaps two PlotFileSpec instances. More...
 

Detailed Description

Represents a file specification in the printing system.

Remarks
A file specification is composed of two primary strings: a UFS and an HFS.

"UFS" stands for "universal file specification" and may be a normal file name, a logical file name (i.e. MS_PENTABLE:sample.tbl), a pseudo file name (a UNC share or TCP/IP address), or a ProjectWise document or folder URL.

"HFS" stands for "host file specification" and is always a file specification suitable to the current operating system. The HFS may or may not be fully qualified. In the case where the UFS is a ProjectWise URL, the HFS will be the file path in the user's local working directory. In the case where the UFS is a logical file name, the HFS will be a fully-qualified file path with the logical name resolved to the appropriate directory.

The Moniker property is the externalized moniker string for a DMS file specification.

The UFS must be defined for the file specification to be valid. The HFS may be defined later, after calling a Find method. It is not possible for a file specification to have an HFS defined but not a UFS.

A file specification may refer to an embedded file, i.e. "file.i.dgn<id>embedded.dgn". The embedded suffix is stored separately from the physical file specification and may optionally be appended when requesting the UFS, HFS, or display name.


The documentation for this struct was generated from the following file:

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