UtilityServices Class Reference
[Services]

Provides access to data objects not available in the object factory as well as other miscellaneous routines. More...

#include <UtilityServices.h>

List of all members.

Public Member Functions

virtual DateTimegetDateTime ()=0
virtual void destroyDateTime (DateTime *dt)=0
virtual ProgressgetProgress (bool threadSafe=false)=0
virtual void destroyProgress (Progress *prog)=0
virtual MessageLogMgrgetMessageLog () const =0
virtual unsigned int getNumProcessors () const =0
virtual std::string getDefaultClassification () const =0
virtual const std::vector
< std::string > & 
getFileControls () const =0
virtual const std::vector
< std::string > & 
getFileDowngrades () const =0
virtual const std::vector
< std::string > & 
getDeclassificationTypes () const =0
virtual const std::vector
< std::string > & 
getClassificationReasons () const =0
virtual const std::vector
< std::string > & 
getDeclassificationExemptions () const =0
virtual const std::vector
< std::string > & 
getFileReleasing () const =0
virtual const std::vector
< std::string > & 
getCountryCodes () const =0
virtual const std::vector
< std::string > & 
getSystems () const =0
virtual const std::vector
< std::string > & 
getCodewords () const =0
virtual ColorType getAutoColor (int color_index) const =0
virtual size_t getMaxMemoryBlockSize ()=0
virtual size_t getTotalPhysicalMemory ()=0
virtual size_t getAvailableVirtualMemory ()=0
virtual std::string getTextFromFile (const std::string &filename)=0

Protected Member Functions

virtual ~UtilityServices ()


Detailed Description

Provides access to data objects not available in the object factory as well as other miscellaneous routines.

Access to instantiation of Utilities objects found in the Interfaces. These are inherited from Serializable, and therefore cannot be created with the ObjectFactory.

See also:
ObjectFactory

Definition at line 32 of file UtilityServices.h.


Constructor & Destructor Documentation

virtual UtilityServices::~UtilityServices (  )  [protected, virtual]

This will be cleaned up during application close.

Plug-ins do not need to destroy it.

Definition at line 222 of file UtilityServices.h.


Member Function Documentation

virtual DateTime* UtilityServices::getDateTime (  )  [pure virtual]

Instantiate an object that can be used with the DateTime interface.

Returns:
Pointer to an object publicizing the DateTime interface.

virtual void UtilityServices::destroyDateTime ( DateTime dt  )  [pure virtual]

Delete an object that can be used with the DateTime interface.

Parameters:
dt Pointer to an object publicizing the DateTime interface.

virtual Progress* UtilityServices::getProgress ( bool  threadSafe = false  )  [pure virtual]

Instantiate an object that can be used with the Progress interface.

Parameters:
threadSafe should a thread safe Progress be created? This is needed for background plugins. If the plugin is not running in the background, you should use a non-thread safe version as there is less overhead
Returns:
Pointer to an object publicizing the DateTime interface.

virtual void UtilityServices::destroyProgress ( Progress prog  )  [pure virtual]

Delete an object that can be used with the Progress interface.

Parameters:
prog Pointer to an object publicizing the Progress interface.

virtual MessageLogMgr* UtilityServices::getMessageLog (  )  const [pure virtual]

Returns a pointer to the MessageLogMgr singleton.

Returns:
Pointer to the MessageLogMgr singleton.

virtual unsigned int UtilityServices::getNumProcessors (  )  const [pure virtual]

Returns the number of processors on the computer.

Returns:
The number of processors on the computer.

virtual std::string UtilityServices::getDefaultClassification (  )  const [pure virtual]

Returns the default classification level, based on the value in the first row of the SecurityMarkings/Classification.txt file.

Returns:
the default classification level.

virtual const std::vector<std::string>& UtilityServices::getFileControls (  )  const [pure virtual]

Returns the file control security codes.

Returns:
The file control security codes.

virtual const std::vector<std::string>& UtilityServices::getFileDowngrades (  )  const [pure virtual]

Returns the file downgrade security codes.

Returns:
The file downgrade security codes.

virtual const std::vector<std::string>& UtilityServices::getDeclassificationTypes (  )  const [pure virtual]

Returns the declassification type security codes.

Returns:
The declassification type security codes.

virtual const std::vector<std::string>& UtilityServices::getClassificationReasons (  )  const [pure virtual]

Returns the classification reason security codes.

Returns:
The classification reason security codes.

virtual const std::vector<std::string>& UtilityServices::getDeclassificationExemptions (  )  const [pure virtual]

Returns the declassification exemptions security codes.

Returns:
The declassification exemptions security codes.

virtual const std::vector<std::string>& UtilityServices::getFileReleasing (  )  const [pure virtual]

Returns the file releasing security codes.

Returns:
The file releasing security codes.

virtual const std::vector<std::string>& UtilityServices::getCountryCodes (  )  const [pure virtual]

Returns the country code security codes.

Returns:
The country code security codes.

virtual const std::vector<std::string>& UtilityServices::getSystems (  )  const [pure virtual]

Returns the system security codes.

Returns:
The system security codes.

virtual const std::vector<std::string>& UtilityServices::getCodewords (  )  const [pure virtual]

Returns the codeword security codes.

Returns:
The codeword security codes.

virtual ColorType UtilityServices::getAutoColor ( int  color_index  )  const [pure virtual]

Provides a color taken from a color table.

This method returns a ColorType from an autocolor.clu file based on the index

Parameters:
color_index The index value of the color in the autocolor file.
Returns:
The color in the autocolor file. A red ColorType is returned if there is a failure.

virtual size_t UtilityServices::getMaxMemoryBlockSize (  )  [pure virtual]

Returns the size of the largest free contiguous memory block.

Windows fragments memory with DLL's statically mapped throughout the process space. This method walks the virtual memory and determine the largest contiguous free block of memory. UNIX platforms do not have this limitation and for UNIX this method returns the available virtual memory.

Returns:
The size of the largest block possible in bytes.

virtual size_t UtilityServices::getTotalPhysicalMemory (  )  [pure virtual]

Returns the total amount of physical memory.

Returns:
The amount of total physical memory in bytes.

virtual size_t UtilityServices::getAvailableVirtualMemory (  )  [pure virtual]

Returns the current amount of available virtual memory.

Returns:
The amount of free virtual memory in bytes.

virtual std::string UtilityServices::getTextFromFile ( const std::string &  filename  )  [pure virtual]

Returns the contents of a file as text.

This method also works with the Qt resource system, provided that the resource can be read as text.

Parameters:
filename The name of the file to read. This file must be a text file.
Returns:
The contents of the file or an error message if the file could not be opened.


Software Development Kit - Opticks 4.9.0 Build 16218