Search Results for

    Show / Hide Table of Contents

    Class HeuristicModelProvider

    The HeuristicModelProvider encapsulates the underlying IModel implementations we use to provide different persistance performance characteristics, depending on the use-case and the consumer's inputs.

    Inheritance
    System.Object
    BaseModelProvider
    HeuristicModelProvider
    Implements
    IModelProvider
    Inherited Members
    BaseModelProvider.GetFactory(XbimSchemaVersion)
    BaseModelProvider.EntityFactoryResolver
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Xbim.Ifc
    Assembly: Xbim.IO.Esent.dll
    Syntax
    public class HeuristicModelProvider : BaseModelProvider, IModelProvider
    Remarks

    This store permits a MemoryModel to be used where it's appropriate, while switching to an EsentModel when persistance is required, or a source model is above a size threshold. The store also permits a MemoryModel to persisted.

    Fields

    | Improve this Doc View Source

    DefaultIfcDatabaseSizeThreshHoldMb

    The default largest size in MB for an IFC file to be loaded into memory, above this size the store will choose to use the database storage media to minimise the memory footprint. This size can be set in the config file or in the open statement of this store

    Declaration
    public static double DefaultIfcDatabaseSizeThreshHoldMb
    Field Value
    Type Description
    System.Double

    Properties

    | Improve this Doc View Source

    Capabilities

    Describes the capabilities of the provider

    Declaration
    public override StoreCapabilities Capabilities { get; }
    Property Value
    Type Description
    StoreCapabilities
    Overrides
    BaseModelProvider.Capabilities

    Methods

    | Improve this Doc View Source

    Close(IModel)

    Closes a Model store, releasing any resources

    Declaration
    public override void Close(IModel model)
    Parameters
    Type Name Description
    IModel model
    Overrides
    BaseModelProvider.Close(IModel)
    | Improve this Doc View Source

    Create(XbimSchemaVersion, String)

    Creates a new Persistent model store

    Declaration
    public override IModel Create(XbimSchemaVersion ifcVersion, string dbPath)
    Parameters
    Type Name Description
    XbimSchemaVersion ifcVersion
    System.String dbPath
    Returns
    Type Description
    IModel
    Overrides
    BaseModelProvider.Create(XbimSchemaVersion, String)
    | Improve this Doc View Source

    Create(XbimSchemaVersion, XbimStoreType)

    Creates a new model store, with the consumer choosing the implementation

    Declaration
    public override IModel Create(XbimSchemaVersion ifcVersion, XbimStoreType storageType)
    Parameters
    Type Name Description
    XbimSchemaVersion ifcVersion
    XbimStoreType storageType
    Returns
    Type Description
    IModel
    Overrides
    BaseModelProvider.Create(XbimSchemaVersion, XbimStoreType)
    | Improve this Doc View Source

    GetLocation(IModel)

    Gets the location of a model, where it is a persisted model store.

    Declaration
    public override string GetLocation(IModel model)
    Parameters
    Type Name Description
    IModel model
    Returns
    Type Description
    System.String
    Overrides
    BaseModelProvider.GetLocation(IModel)
    | Improve this Doc View Source

    GetXbimSchemaVersion(String)

    Gets the IFC Schema version for a model

    Declaration
    public override XbimSchemaVersion GetXbimSchemaVersion(string modelPath)
    Parameters
    Type Name Description
    System.String modelPath

    Path to a model in any supported format (IFC, IfcXml, IfcZip, or XBIM)

    Returns
    Type Description
    XbimSchemaVersion
    Overrides
    BaseModelProvider.GetXbimSchemaVersion(String)
    | Improve this Doc View Source

    Open(Stream, StorageType, XbimSchemaVersion, XbimModelType, XbimDBAccess, ReportProgressDelegate, Int32)

    Opens a model from the provided stream

    Declaration
    public override IModel Open(Stream stream, StorageType dataType, XbimSchemaVersion schema, XbimModelType modelType, XbimDBAccess accessMode = XbimDBAccess.Read, ReportProgressDelegate progDelegate = null, int codePageOverride = -1)
    Parameters
    Type Name Description
    System.IO.Stream stream
    StorageType dataType
    XbimSchemaVersion schema
    XbimModelType modelType
    XbimDBAccess accessMode
    ReportProgressDelegate progDelegate
    System.Int32 codePageOverride
    Returns
    Type Description
    IModel
    Overrides
    BaseModelProvider.Open(Stream, StorageType, XbimSchemaVersion, XbimModelType, XbimDBAccess, ReportProgressDelegate, Int32)
    | Improve this Doc View Source

    Open(String, XbimSchemaVersion, Nullable<Double>, ReportProgressDelegate, XbimDBAccess, Int32)

    Opens a model from the provided path, inferring model implementation based on format and model size

    Declaration
    public override IModel Open(string path, XbimSchemaVersion schemaVersion, double? ifcDatabaseSizeThreshHold = null, ReportProgressDelegate progDelegate = null, XbimDBAccess accessMode = XbimDBAccess.Read, int codePageOverride = -1)
    Parameters
    Type Name Description
    System.String path

    Path to the model file, in any support IFC or XBIM format

    XbimSchemaVersion schemaVersion
    System.Nullable<System.Double> ifcDatabaseSizeThreshHold
    ReportProgressDelegate progDelegate
    XbimDBAccess accessMode
    System.Int32 codePageOverride
    Returns
    Type Description
    IModel
    Overrides
    BaseModelProvider.Open(String, XbimSchemaVersion, Nullable<Double>, ReportProgressDelegate, XbimDBAccess, Int32)
    | Improve this Doc View Source

    Persist(IModel, String, ReportProgressDelegate)

    Persists the model to a permanent store

    Declaration
    public override void Persist(IModel model, string fileName, ReportProgressDelegate progDelegate = null)
    Parameters
    Type Name Description
    IModel model
    System.String fileName
    ReportProgressDelegate progDelegate
    Overrides
    BaseModelProvider.Persist(IModel, String, ReportProgressDelegate)

    Implements

    IModelProvider
    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © 2022 xbim