HPS::DWG::ImportOptionsKit

class HPS::DWG::ImportOptionsKit : public HPS::SprocketKit

The HPS::DWG::ImportOptionsKit class is a user space object. It contains settings controlling what and how data is imported via DWG. Calling HPS::DWG::ImportOptionsKit::GetDefault() will return an options kit with values found in here.

Public Functions

virtual bool Empty() const

Indicates whether this ImportOptionsKit has any values set on it.

Returns

true if no values are set on this ImportOptionsKit, false otherwise.

bool Equals(ImportOptionsKit const &in_kit) const

Check if the source ImportOptionsKit is equivalent to this ImportOptionsKit.

Parameters

in_kit – The source ImportOptionsKit to compare to this ImportOptionsKit.

Returns

true if the objects are equivalent, false otherwise.

ImportOptionsKit()

The default constructor creates an empty ImportOptionsKit object.

ImportOptionsKit(ImportOptionsKit &&in_that)

The move constructor creates an ImportOptionsKit by transferring the underlying impl of the rvalue reference to this ImportOptionsKit thereby avoiding a copy and allocation.

Parameters

in_that – An rvalue reference to an ImportOptionsKit to take the impl from.

ImportOptionsKit(ImportOptionsKit const &in_kit)

The copy constructor creates a new ImportOptionsKit object that contains the same settings as the source ImportOptionsKit.

Parameters

in_kit – The source ImportOptionsKit to copy.

inline virtual HPS::Type ObjectType() const

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.

bool operator!=(ImportOptionsKit const &in_kit) const

Check if the source ImportOptionsKit is not equivalent to this ImportOptionsKit.

Parameters

in_kit – The source ImportOptionsKit to compare to this ImportOptionsKit.

Returns

true if the objects are not equivalent, false otherwise.

ImportOptionsKit &operator=(ImportOptionsKit &&in_that)

The move assignment operator transfers the underlying impl of the rvalue reference to this ImportOptionsKit thereby avoiding a copy.

Parameters

in_that – An rvalue reference to an ImportOptionsKit to take the impl from.

Returns

A reference to this ImportOptionsKit.

ImportOptionsKit &operator=(ImportOptionsKit const &in_kit)

Copies the source ImportOptionsKit into this ImportOptionsKit.

Parameters

in_kit – The source ImportOptionsKit to copy.

Returns

A reference to this ImportOptionsKit.

bool operator==(ImportOptionsKit const &in_kit) const

Check if the source ImportOptionsKit is equivalent to this ImportOptionsKit.

Parameters

in_kit – The source ImportOptionsKit to compare to this ImportOptionsKit.

Returns

true if the objects are equivalent, false otherwise.

void Set(ImportOptionsKit const &in_kit)

Copies the source ImportOptionsKit into this ImportOptionsKit.

Parameters

in_kit – The source ImportOptionsKit to copy.

ImportOptionsKit &SetLogging(const char *in_log_file)

Sets whether to log internal HPS::DWG calls.

Parameters

in_log_fileFile name which will contain logging information.

Returns

A reference to this ImportOptionsKit.

ImportOptionsKit &SetMaxTessellationDeviation(double in_deviation)

Sets the maximum tessellation deviation. This corresponds to the value returned by AcGiCommonDraw::deviation()

Parameters

in_deviation – Maximum deviation from tessellation.

Returns

A reference to this ImportOptionsKit.

ImportOptionsKit &SetTextureDirectories(HPS::UTF8Array const &in_texture_directories)

Sets a list of directories where the importer looks for textures.

Parameters

in_texture_directories – An array of directories the importer searches for textures.

Returns

A reference to this ImportOptionsKit.

ImportOptionsKit &SetUnreferencedRecords(bool in_state)

Sets whether to import block table records which are not referenced in the drawing.

Parameters

in_state – Whether to import block table records which are not referenced in the drawing.

Returns

A reference to this ImportOptionsKit.

void Show(ImportOptionsKit &out_kit) const

Copies this ImportOptionsKit into the given ImportOptionsKit.

Parameters

out_kit – The ImportOptionsKit to populate with the contents of this ImportOptionsKit.

bool ShowLogging(HPS::UTF8 &out_log_file) const

Shows the logging import setting.

Parameters

out_log_file – The file which will contain the logging information.

Returns

true if logging setting was specified, false otherwise.

bool ShowMaxTessellationDeviation(double &out_deviation) const

Shows the maximum tessellation deviation import setting.

Parameters

out_deviation – The maximum tessellation deviation setting for this import.

Returns

true if a maximum tessellation deviation was specified, false otherwise.

bool ShowTextureDirectories(HPS::UTF8Array &out_texture_directories) const

Shows the directories where the importer looks for textures.

Parameters

out_texture_directories – The directories in which the importer looks for textures.

Returns

true if texture directories were specified, false otherwise.

bool ShowUnreferencedRecords(bool &out_state) const

Shows the unreferenced records import setting.

Parameters

out_state – The unreferenced record setting for this import.

Returns

true if an unreferenced record setting was specified, false otherwise.

ImportOptionsKit &UnsetEverything()

Removes all settings from this ImportOptionsKit.

Returns

A reference to this ImportOptionsKit.

ImportOptionsKit &UnsetLogging()

Removes the logging import state.

Returns

A reference to this ImportOptionsKit.

ImportOptionsKit &UnsetMaxTessellationDeviation()

Removes the maximum tessellation deviation import state.

Returns

A reference to this ImportOptionsKit.

ImportOptionsKit &UnsetTextureDirectories()

Removes the texture directory state.

Returns

A reference to this ImportOptionsKit.

ImportOptionsKit &UnsetUnreferencedRecords()

Removes the unreferenced records import state.

Returns

A reference to this ImportOptionsKit.

virtual ~ImportOptionsKit()

Public Static Functions

static ImportOptionsKit GetDefault()

Creates an ImportOptionsKit which contains the default settings. The returned object will not necessarily have values set for every option, but it will have settings for those options where it is reasonable to have a default. These values will be used for import unless an option is overridden by the options passed to File::Import.

Returns

An ImportOptionsKit with the default settings.

Public Static Attributes

static const HPS::Type staticType = HPS::Type::DWGImportOptionsKit