CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
OdRxSystemServices Class Referenceabstract

#include <RxSystemServices.h>

Inheritance diagram for OdRxSystemServices:
OdRxObject

Public Member Functions

 OdRxSystemServices ()
 
virtual OdStreamBufPtr createFile (const OdString &filename, Oda::FileAccessMode accessMode=Oda::kFileRead, Oda::FileShareMode shareMode=Oda::kShareDenyNo, Oda::FileCreationDisposition creationDisposition=Oda::kOpenExisting)
 
virtual bool accessFile (const OdString &filename, int accessMode)
 
virtual OdInt64 getFileCTime (const OdString &filename)=0
 
virtual OdInt64 getFileMTime (const OdString &filename)=0
 
virtual OdInt64 getFileSize (const OdString &filename)=0
 
virtual OdString formatMessage (unsigned int formatId, va_list *argList=0)=0
 
virtual OdString formatMsg (unsigned int formatId,...)
 
virtual OdCodePageId systemCodePage () const =0
 
virtual OdString createGuid ()
 
virtual OdGUID createOdGUID ()
 
virtual OdRxModuleloadModule (const OdString &moduleFileName, bool silent)
 
virtual void unloadModule (OdRxModule *pModuleObj)
 
virtual OdString findModule (const OdString &applicationName)
 
virtual void warning (const OdString &message)
 
virtual void warning (const char *warnVisGroup, const OdString &message)
 
virtual OdResult initModelerLibrary (OdRxDictionary *pDict)
 
virtual OdResult uninitModelerLibrary (OdRxDictionary *pDict)
 
virtual OdResult getEnvVar (const OdString &varName, OdString &value)=0
 
virtual OdResult setEnvVar (const OdString &varName, const OdString &newValue)=0
 
virtual OdString getTemporaryPath () const
 
virtual OdString getUserName (Oda::UserNameFormat unFormat=Oda::kUserId)
 
virtual OdString getTempFileName ()
 
- Public Member Functions inherited from OdRxObject
 ODRX_HEAP_OPERATORS ()
 
 OdRxObject ()
 
virtual ~OdRxObject ()
 
virtual OdRxObjectqueryX (const OdRxClass *pClass) const
 
virtual OdRxObjectx (const OdRxClass *pClass) const
 
virtual OdRxClassisA () const
 
virtual void addRef ()=0
 
virtual void release ()=0
 
virtual long numRefs () const
 
bool isKindOf (const OdRxClass *pClass) const
 
virtual OdRxObjectPtr clone () const
 
virtual void copyFrom (const OdRxObject *pSource)
 
virtual OdRx::Ordering comparedTo (const OdRxObject *pOther) const
 
virtual bool isEqualTo (const OdRxObject *pOther) const
 

Static Public Member Functions

static OdRxModuleloadModuleLib (const OdString &moduleFileName, bool silent)
 
- Static Public Member Functions inherited from OdRxObject
static OdRxObjectPtr cast (const OdRxObject *pointer)
 
static OdRxClassdesc ()
 

Detailed Description

This class is the base class for classes that provide platform-dependent file operations for Teigha.

Corresponding C++ library: TD_Root

<group OdRx_Classes>

Definition at line 186 of file RxSystemServices.h.

Constructor & Destructor Documentation

◆ OdRxSystemServices()

OdRxSystemServices::OdRxSystemServices ( )
inline

Definition at line 190 of file RxSystemServices.h.

Member Function Documentation

◆ accessFile()

virtual bool OdRxSystemServices::accessFile ( const OdString filename,
int  accessMode 
)
virtual

Returns true if and only if the specified file can be accessed in the specified mode.

Parameters
filename[in] Filename.
accessMode[in] Access mode.
Remarks
accessMode must be a combination of one or more of the following:

Value Description .. 0 File exists. Oda::kFileRead 0x80000000 Read access. Oda::kFileWrite 0x40000000 Write access.

◆ createFile()

virtual OdStreamBufPtr OdRxSystemServices::createFile ( const OdString filename,
Oda::FileAccessMode  accessMode = Oda::kFileRead,
Oda::FileShareMode  shareMode = Oda::kShareDenyNo,
Oda::FileCreationDisposition  creationDisposition = Oda::kOpenExisting 
)
virtual

Creates and/or opens the specified file.

Parameters
filename[in] Filename.
accessMode[in] Access mode.
shareMode[in] Share mode.
creationDisposition[in] Creation disposition.
Returns
Returns a SmartPointer to an OdStreamBuf object for the file.
Remarks
accessMode must be a combination of one or more of the following:

Value Description Oda::kFileRead 0x80000000 Read access. Oda::kFileWrite 0x40000000 Write access.

shareMode must be one of the following:

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

Creation disposition must be one of the following:

Value Description Oda::kCreateNew 1 Creates a new file; fails if the specified file already exists. Oda::kCreateAlways 2 Creates a new file; overwrites any existing file. Oda::kOpenExisting 3 Opens the file; fails if the file does not exist. Oda::kOpenAlways 4 Opens the file; creates the file if it does not exist. Oda::kTruncateExisting 5 Truncates the file; fails if the file does not exist. The file must be open at least Oda::kFileWrite.

◆ createGuid()

virtual OdString OdRxSystemServices::createGuid ( )
virtual

Returns a string representation for newly generated Globally Unique IDentifier (GUID) for this SystemServices object.

◆ createOdGUID()

virtual OdGUID OdRxSystemServices::createOdGUID ( )
virtual

Returns a newly generated Globally Unique IDentifier (GUID) for this SystemServices object.

◆ findModule()

virtual OdString OdRxSystemServices::findModule ( const OdString applicationName)
virtual

Returns the filename associated with the specified application name.

Parameters
applicationName[in] TX application name.

◆ formatMessage()

virtual OdString OdRxSystemServices::formatMessage ( unsigned int  formatId,
va_list *  argList = 0 
)
pure virtual

Returns a message string formatted using a vsprintf-style format string and argument list.

Parameters
formatID[in] String resource identifier containing the format string.
argList[in] Argument list.

◆ formatMsg()

virtual OdString OdRxSystemServices::formatMsg ( unsigned int  formatId,
  ... 
)
virtual

Assigns a value to this String object using a printf-style format string and arguments.

Parameters
formatID[in] String resource identifier containing the format string.
Returns
Returns a reference to this String Object.

◆ getEnvVar()

virtual OdResult OdRxSystemServices::getEnvVar ( const OdString varName,
OdString value 
)
pure virtual

Get environment variable value.

Parameters
varName[in] Environment variable name.
value[out] Environment variable value.

◆ getFileCTime()

virtual OdInt64 OdRxSystemServices::getFileCTime ( const OdString filename)
pure virtual

Returns the creation time of the specified file.

Parameters
filename[in] Filename.
Remarks
On most platforms, this function will be implemented with the stat function (stat::st_ctime).

◆ getFileMTime()

virtual OdInt64 OdRxSystemServices::getFileMTime ( const OdString filename)
pure virtual

Returns the modification time of the specified file.

Parameters
filename[in] Filename.
Remarks
On most platforms, this function will be implemented with the stat function (stat::st_mtime).

◆ getFileSize()

virtual OdInt64 OdRxSystemServices::getFileSize ( const OdString filename)
pure virtual

Returns the size of the specified file.

Parameters
filename[in] Filename.
Remarks
On most platforms, this function will be implemented with the stat function (stat::st_size).

◆ getTempFileName()

virtual OdString OdRxSystemServices::getTempFileName ( )
virtual

Returns the unique name for temporary file.

◆ getTemporaryPath()

virtual OdString OdRxSystemServices::getTemporaryPath ( ) const
virtual

Returns the path to the temporary files folder.

◆ getUserName()

virtual OdString OdRxSystemServices::getUserName ( Oda::UserNameFormat  unFormat = Oda::kUserId)
virtual

Returns user name in the requested format

◆ initModelerLibrary()

virtual OdResult OdRxSystemServices::initModelerLibrary ( OdRxDictionary pDict)
virtual

Inits/Uninits the modeler library (platform-dependent) module.

Returns
Should return eOk, if (un)initialization is implemented inside (un)initModelerLibrary. Or eNotImplemented if default module (un)initialization required.
Remarks
Used for custom initialization/uninitialization of Spatial ACIS library.

◆ loadModule()

virtual OdRxModule * OdRxSystemServices::loadModule ( const OdString moduleFileName,
bool  silent 
)
virtual

Loads the specified physical (platform-dependent) module.

Remarks
Appends the appropriate version suffix onto the supplied module name. Returns the abstract (platform independent) module object,
which represents module functionality in Teigha.
Parameters
moduleFileName[in] Module filename to load.
silent[in] If true, no load status message will be printed.

◆ loadModuleLib()

static OdRxModule * OdRxSystemServices::loadModuleLib ( const OdString moduleFileName,
bool  silent 
)
static

Loads the specified physical (platform-dependent) module.

Returns
Returns the abstract (platform independent) module object,
which represents module functionality in Teigha.
Parameters
moduleFileName[in] Module filename to load.
silent[in] If true, no load status message will be printed.

◆ setEnvVar()

virtual OdResult OdRxSystemServices::setEnvVar ( const OdString varName,
const OdString newValue 
)
pure virtual

Set environment variable value.

Parameters
varName[in] Environment variable name.
newValue[in] The new value of the environment variable.

◆ systemCodePage()

virtual OdCodePageId OdRxSystemServices::systemCodePage ( ) const
pure virtual

Returns the system code page.

◆ uninitModelerLibrary()

virtual OdResult OdRxSystemServices::uninitModelerLibrary ( OdRxDictionary pDict)
virtual

◆ unloadModule()

virtual void OdRxSystemServices::unloadModule ( OdRxModule pModuleObj)
virtual

Unloads the specified physical (platform-dependent) module.

Parameters
pModuleObj[in] Pointer to the module object to be unloaded.

◆ warning() [1/2]

virtual void OdRxSystemServices::warning ( const char *  warnVisGroup,
const OdString message 
)
virtual

Displays in some manner the specified warning message.

Parameters
warnVisGroup[in] Group of warning message visibility (always visible if it is an empty).
message[in] Warning message.

◆ warning() [2/2]

virtual void OdRxSystemServices::warning ( const OdString message)
virtual

Displays in some manner the specified warning message.

Parameters
message[in] Warning message.

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