#include <hps.h>

Inheritance diagram for HPS::World:
HPS::Object

Public Member Functions

HPS::Type ObjectType () const
 
WorldSetDriverConfigFile (char const *in_filename)
 
WorldSetExchangeLibraryDirectory (char const *in_directory)
 
WorldSetFontDirectories (size_t in_count, UTF8 const in_directories[])
 
WorldSetFontDirectories (UTF8Array const &in_directories)
 
WorldSetFontDirectory (char const *in_directory)
 
WorldSetMaterialLibraryDirectory (char const *in_directory)
 
WorldSetParasolidBodyshopDirectory (char const *in_directory)
 
WorldSetParasolidSchemaDirectory (char const *in_directory)
 
WorldSetPublishResourceDirectory (char const *in_directory)
 
bool ShowDriverConfigFile (UTF8 &out_filename) const
 
bool ShowExchangeLibraryDirectory (UTF8 &out_directory) const
 
bool ShowFontDirectories (UTF8Array &out_directories) const
 
bool ShowMaterialLibraryDirectory (UTF8 &out_directory) const
 
bool ShowParasolidBodyshopDirectory (UTF8 &out_directory) const
 
bool ShowParasolidSchemaDirectory (UTF8 &out_directory) const
 
bool ShowPublishResourceDirectory (UTF8 &out_directory) const
 
WorldUnsetDriverConfigFile ()
 
WorldUnsetExchangeLibraryDirectory ()
 
WorldUnsetFontDirectories ()
 
WorldUnsetMaterialLibraryDirectory ()
 
WorldUnsetParasolidBodyshopDirectory ()
 
WorldUnsetParasolidSchemaDirectory ()
 
WorldUnsetPublishResourceDirectory ()
 
 World (char const *in_license, char const *in_code_generation_directory=nullptr)
 
 ~World ()
 
- Public Member Functions inherited from HPS::Object
virtual bool Empty () const
 
intptr_t GetClassID () const
 
intptr_t GetInstanceID () const
 
bool HasType (HPS::Type in_mask) const
 
 Object (Object const &that)
 
 Object (Object &&in_that)
 
Objectoperator= (Object const &other_object)
 
Objectoperator= (Object &&in_that)
 
virtual HPS::Type Type () const
 

Static Public Member Functions

static void AddCodeGenerationComment (UTF8 const &in_comment)
 
static void StopCodeGeneration ()
 
- Static Public Member Functions inherited from HPS::Object
template<typename T >
static intptr_t ClassID ()
 

Static Public Attributes

static const HPS::Type staticType = HPS::Type::World
 
- Static Public Attributes inherited from HPS::Object
static const HPS::Type staticType = HPS::Type::None
 

Detailed Description

The World class is a special object that must be constructed prior to making any database calls and must exist for the life of the application.

Constructor & Destructor Documentation

◆ World()

HPS::World::World ( char const *  in_license,
char const *  in_code_generation_directory = nullptr 
)

This constructor creates a new World object with the given license. The license string determines what functionality is available in Visualize. There should only be one World object that is constructed during the life of the application. Optionally it is possible to start Code Generation, which logs every call to the HPS API for debugging purposes. While Code Generation is active, HPS performance will be slower than usual.

Parameters
in_licenseUTF8-encoded license string for Visualize.
in_code_generation_directoryUTF8-encoded directory where the output of Code Generation will be stored. The directory must already exist.

◆ ~World()

HPS::World::~World ( )

The destructor will shutdown the database and invalidate all objects within it.

Member Function Documentation

◆ AddCodeGenerationComment()

static void HPS::World::AddCodeGenerationComment ( UTF8 const &  in_comment)
static

Adds a comment to the generated code. Useful to guide a developer towards the source of a problem. Code Generation must be started before this function can be called.

Parameters
in_commentA comment to be embedded in the code generation.

◆ ObjectType()

HPS::Type HPS::World::ObjectType ( ) const
inlinevirtual

This function returns the type the object, as declared (if the object is derived, this does not give the true type of the derived object).

Returns
The declared type of the object in question, which may differ from the true, underlying type.

Reimplemented from HPS::Object.

◆ SetDriverConfigFile()

World& HPS::World::SetDriverConfigFile ( char const *  in_filename)

Sets the driver configuration file (i.e., a plain text file which can force device specific behavior) for Visualize. To ensure the settings within the configuration file take effect, this file must be specified prior to creating a driver which will be affected by the settings.

Parameters
in_filenameUTF8-encoded file name.
Returns
A reference to this World object.

◆ SetExchangeLibraryDirectory()

World& HPS::World::SetExchangeLibraryDirectory ( char const *  in_directory)

Sets the directory which contains the Exchange and Publish libraries. If this is set, the Exchange and Publish Visualize modules will try to load the libraries from this directory. If this is not set, those modules will try to load the libraries from the directories in the application's PATH. Note that this function will append the given directory to the PATH.

Parameters
in_directoryUTF8-encoded directory name.
Returns
A reference to this World object.

◆ SetFontDirectories() [1/2]

World& HPS::World::SetFontDirectories ( size_t  in_count,
UTF8 const  in_directories[] 
)

Sets the directories which contain fonts for use by Visualize. This must be specified for Visualize to make use of any fonts beyond those Visualize defines itself.

Parameters
in_countSize of the following array.
in_directoriesArray of UTF8-encoded directory names.
Returns
A reference to this World object.

◆ SetFontDirectories() [2/2]

World& HPS::World::SetFontDirectories ( UTF8Array const &  in_directories)

Sets the directories which contain fonts for use by Visualize. This must be specified for Visualize to make use of any fonts beyond those Visualize defines itself.

Parameters
in_directoriesArray of UTF8-encoded directory names.
Returns
A reference to this World object.

◆ SetFontDirectory()

World& HPS::World::SetFontDirectory ( char const *  in_directory)

Sets the directory which contains fonts for use by Visualize. This must be specified for Visualize to make use of any fonts beyond those Visualize defines itself.

Parameters
in_directoryUTF8-encoded directory name.
Returns
A reference to this World object.

◆ SetMaterialLibraryDirectory()

World& HPS::World::SetMaterialLibraryDirectory ( char const *  in_directory)

Sets the directory which contains the material library for Visualize. This must be specified to ensure any files which use the material library display correctly.

Parameters
in_directoryUTF8-encoded directory name.
Returns
A reference to this World object.

◆ SetParasolidBodyshopDirectory()

World& HPS::World::SetParasolidBodyshopDirectory ( char const *  in_directory)

Sets the Parasolid Bodyshop directory. If this directory is specified, Exchange will use the Parasolid Bodyshop to translate files to Parasolid parts.

Parameters
in_directoryUTF8-encoded directory name.
Returns
A reference to this World object.

◆ SetParasolidSchemaDirectory()

World& HPS::World::SetParasolidSchemaDirectory ( char const *  in_directory)

Sets the schema directory for Parasolid. This directory must be specified to make use of the Parasolid module.

Note
Using this function will set the P_SCHEMA environment variable to the given directory as well.
Parameters
in_directoryUTF8-encoded directory name.
Returns
A reference to this World object.

◆ SetPublishResourceDirectory()

World& HPS::World::SetPublishResourceDirectory ( char const *  in_directory)

Sets the resource directory for Publish. This is not the directory which contains the libraries (see World::SetExchangeLibraryDirectory), but rather the directory which contains fonts and associated mappings and files used during PDF generation. This directory must be specified to make use of the Publish module.

Parameters
in_directoryUTF8-encoded directory name.
Returns
A reference to this World object.

◆ ShowDriverConfigFile()

bool HPS::World::ShowDriverConfigFile ( UTF8 out_filename) const

Shows the driver configuration file for Visualize.

Parameters
out_filenameUTF8-encoded file names.
Returns
true if font directories were specified, false otherwise.

◆ ShowExchangeLibraryDirectory()

bool HPS::World::ShowExchangeLibraryDirectory ( UTF8 out_directory) const

Shows the Exchange and Publish library directory.

Parameters
out_directoryUTF8-encoded directory name.
Returns
true if an Exchange and Publish directory was specified, false otherwise.

◆ ShowFontDirectories()

bool HPS::World::ShowFontDirectories ( UTF8Array out_directories) const

Shows the font directories for Visualize.

Parameters
out_directoriesArray of UTF8-encoded directory names.
Returns
true if font directories were specified, false otherwise.

◆ ShowMaterialLibraryDirectory()

bool HPS::World::ShowMaterialLibraryDirectory ( UTF8 out_directory) const

Shows the material library directory for Visualize.

Parameters
out_directoryUTF8-encoded directory name.
Returns
true if a material library directory was specified, false otherwise.

◆ ShowParasolidBodyshopDirectory()

bool HPS::World::ShowParasolidBodyshopDirectory ( UTF8 out_directory) const

Shows the Parasolid Bodyshop directory.

Parameters
out_directoryUTF8-encoded directory name.
Returns
true if a Parasolid Bodyshop directory was specified, false otherwise.

◆ ShowParasolidSchemaDirectory()

bool HPS::World::ShowParasolidSchemaDirectory ( UTF8 out_directory) const

Shows the Parasolid schema directory.

Parameters
out_directoryUTF8-encoded directory name.
Returns
true if a Parasolid schema directory was specified, false otherwise.

◆ ShowPublishResourceDirectory()

bool HPS::World::ShowPublishResourceDirectory ( UTF8 out_directory) const

Shows the Publish resource directory.

Parameters
out_directoryUTF8-encoded directory name.
Returns
true if a Publish resource directory was specified, false otherwise.

◆ StopCodeGeneration()

static void HPS::World::StopCodeGeneration ( )
static

Stops Code Generation.

◆ UnsetDriverConfigFile()

World& HPS::World::UnsetDriverConfigFile ( )

Removes the driver configuration file for Visualize.

Returns
A reference to this World object.

◆ UnsetExchangeLibraryDirectory()

World& HPS::World::UnsetExchangeLibraryDirectory ( )

Removes the Exchange and Publish library directory. Note, this will remove the previously specified directory from the PATH.

Returns
A reference to this World object.

◆ UnsetFontDirectories()

World& HPS::World::UnsetFontDirectories ( )

Removes the font directories for Visualize.

Returns
A reference to this World object.

◆ UnsetMaterialLibraryDirectory()

World& HPS::World::UnsetMaterialLibraryDirectory ( )

Removes the material library directory for Visualize.

Returns
A reference to this World object.

◆ UnsetParasolidBodyshopDirectory()

World& HPS::World::UnsetParasolidBodyshopDirectory ( )

Removes the Parasolid Bodyshop directory.

Returns
A reference to this World object.

◆ UnsetParasolidSchemaDirectory()

World& HPS::World::UnsetParasolidSchemaDirectory ( )

Removes the Parasolid schema directory.

Returns
A reference to this World object.

◆ UnsetPublishResourceDirectory()

World& HPS::World::UnsetPublishResourceDirectory ( )

Removes the Publish resource directory.

Returns
A reference to this World object.

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