• Documentation
  • Core API
  • SmartOpenHamburg API
  • Model Components API
  • Common API

    Show / Hide Table of Contents
    • Mars.Core
      • DependencyRegistrationCore
    • Mars.Core.Data
      • AbstractConfigLoader
      • AbstractEntityManager
      • AgentManagerImpl
      • DomainDataMediatorImpl
      • EntityManagerImpl
      • IAgentManager
      • IEntityManager
      • IEntityMapping
      • IGeneratedEntityLogger
      • IGeneratedLayerLogger
      • IGeneratedLogger<TModel>
      • IGeneratedTypeLogger
      • IModelCompiler
      • IOutputLogger
      • IPlatformSelector
      • ISchemaMigrationProvider
      • ISerializerManager
      • PlatformSelectorImpl
    • Mars.Core.Data.Compiler
      • AbstractEntityMapper
      • AbstractJitMapper
      • AbstractLayerMapper
      • AbstractMapper<TModel>
      • AbstractTypeMapper
      • RoslynCompilerUtils
    • Mars.Core.Data.Entities
      • CircleFilter
      • Condition
      • ConjunctiveWhere
      • DataFrame
      • DisjunctiveWhere
      • EqualityCondition
      • IntersectionFilter
      • ISelection
      • NearestFilter
      • Query
      • WindowFilter
      • WithinFilter
    • Mars.Core.Data.Exceptions
      • AgentInitializationException
    • Mars.Core.Data.Mapping
      • DefaultSourceProvider
      • ReflectiveMapping
    • Mars.Core.Data.Wrapper
      • AbstractOperationWrapper
      • AbstractWrapper
      • AbstractWrapper<TOptions>
      • GlobalRestrictions
      • ICircleQueryOperation
      • IIntersectionOperation
      • ILookupOperation
      • INearestOperation
      • IOperation
      • IPlatform
      • IQueryOperation
      • ISnapshot
      • IWindowQueryOperation
      • IWithinOperation
      • IWrapper
      • KnnGraphWrapper
      • PostGisWrapper
    • Mars.Core.Data.Wrapper.Document
      • IMongoConnection
      • IMongoWrapper
      • MongoDbIteratorHelper
      • MongoDbWrapper
    • Mars.Core.Data.Wrapper.File
      • AbstractFileWrapper<TOptions>
      • AscWrapper
      • GeoJsonWrapper
    • Mars.Core.Data.Wrapper.Memory
      • DataTableWrapper
      • GeoHashTrieWrapper
      • KdTreeWrapper
      • TripPosition
      • TripPositionCoordinateConverter
      • TripsCollection
      • TripsLineConverter
      • TripsTrajectoryWrapper
    • Mars.Core.Data.Wrapper.Relational
      • AbstractRelationalConnection
      • PostgresSqlDbConnection
      • PostgresSqlWrapper
      • RelationalMapperException
      • RelationalSqlWrapper<TOptions>
      • SqliteDbConnection
      • SqliteWrapper
    • Mars.Core.Data.Wrapper.Stream
      • MqttWrapper
      • SimulationTypeInfo
    • Mars.Core.Executor
      • IRuntimeModel
      • ISimulationProgress
      • IStepExecutor
    • Mars.Core.Executor.Entities
      • Parametrization
      • StepParam
    • Mars.Core.Executor.Implementation
      • RuntimeModelImpl
      • SimulationProgressImpl
      • StepExecutionUseCase
    • Mars.Core.Model
      • IConfigLoader
      • IModelContainer
      • IModelResolver
    • Mars.Core.Model.Entities
      • LayerInstanceContainer
    • Mars.Core.Model.Exceptions
      • InvalidMappingException
      • MissingConstructorException
      • ModelResolutionException
      • ValidationException
    • Mars.Core.Model.Implementation
      • DependencyBuilder
      • MappingHelper
      • ModelContainer
      • ValidationIssueLevel
      • ValidationResult
      • Validator
    • Mars.Core.Simulation
      • ISimulation
      • ISimulationControl
    • Mars.Core.Simulation.Entities
      • SimulationRestartArgs
      • SimulationWorkflowState

    Class AbstractTypeMapper

    Provides a base implementation of the type proxy contract in IGeneratedTypeLogger
    Inheritance
    System.Object
    AbstractJitMapper
    AbstractTypeMapper
    Implements
    IGeneratedTypeLogger
    IOutputLogger
    Inherited Members
    AbstractJitMapper.TypeName
    AbstractJitMapper.ProxyKey
    AbstractJitMapper.ConfigLoader
    AbstractJitMapper.Culture
    AbstractJitMapper.Type
    AbstractJitMapper.Mapping
    AbstractJitMapper.OutputFrequency
    AbstractJitMapper.OutputTicks
    AbstractJitMapper.HasOutputProperties
    AbstractJitMapper.Context
    AbstractJitMapper.ToString()
    AbstractJitMapper.GetHashCode()
    Namespace: Mars.Core.Data.Compiler
    Assembly: Mars.Core.dll
    Syntax
    public abstract class AbstractTypeMapper : AbstractJitMapper, IGeneratedTypeLogger, IOutputLogger

    Properties

    Entities

    Gets all registered entities of this type manager.
    Declaration
    public IEnumerable<IEntity> Entities { get; }
    Property Value
    Type Description
    IEnumerable<IEntity>

    EntityProxies

    Gets all registered entity proxies which are responsible for each de/serialization process
    Declaration
    public IEnumerable<IGeneratedEntityLogger> EntityProxies { get; }
    Property Value
    Type Description
    IEnumerable<IGeneratedEntityLogger>

    KeyContainer

    Gets or sets the index container used to assign unique keys to all new proxies, constructed by CreateIndividualLogger(IEntity).
    Declaration
    public KeyContainer KeyContainer { get; set; }
    Property Value
    Type Description
    KeyContainer

    TypeLogger

    Gets or sets the type logger responsible for this proxy
    Declaration
    public override IGeneratedTypeLogger TypeLogger { get; set; }
    Property Value
    Type Description
    IGeneratedTypeLogger
    Overrides
    AbstractJitMapper.TypeLogger

    Methods

    CreateIndividualLogger(IEntity)

    Creates an individual proxy by this type without any reflection.
    Declaration
    public abstract IGeneratedEntityLogger CreateIndividualLogger(IEntity entity)
    Parameters
    Type Name Description
    IEntity entity The entity to register
    Returns
    Type Description
    IGeneratedEntityLogger Returns a new instanceof of the IGeneratedEntityLogger serializer with type-specific serialization functions.

    CreateInstance()

    Creates a concrete instance from the managed type in this proxy without using any reflection call.
    Declaration
    public abstract IEntity CreateInstance()
    Returns
    Type Description
    IEntity Returns an instance of the entity when created, or null if creation was not possible, since missing dependencies

    DeregisterIndividual(IEntity)

    DeRegisters the specified entity from this type manager proxy so that no in/output is created more.
    Declaration
    public void DeregisterIndividual(IEntity entity)
    Parameters
    Type Name Description
    IEntity entity The to deregister from the in/output pipeline.

    Initialize()

    Performs a deferred initialization of this entity(-type) specific mapper. This makes it possible to assign properties from outside an not during the construction type of this JIT object (e.g., the concrete entity Type).
    Declaration
    public override void Initialize()
    Overrides
    AbstractJitMapper.Initialize()
    Remarks
    This method should always be used when something have to be implemented within the constructor scope.

    IsTypeOf(IEntity)

    Provides an instance of mechanism which can be used without any reflection.
    Declaration
    public virtual bool IsTypeOf(IEntity entity)
    Parameters
    Type Name Description
    IEntity entity The entity to check whether the associated type is the class for this instance.
    Returns
    Type Description
    System.Boolean Returns true when the specified entity is an instance of this associated type.
    Remarks
    This method is similar to the usage of CreateIndividualLogger(IEntity) which corresponds to the constructor call.

    RegisterIndividual(IGeneratedEntityLogger, TypeMapping)

    Registers the specified individual at this type manager proxy with the passed outputGroup with the associated type of this mapper.
    Declaration
    public virtual void RegisterIndividual(IGeneratedEntityLogger individual, TypeMapping mapping)
    Parameters
    Type Name Description
    IGeneratedEntityLogger individual The IGeneratedEntityLogger proxy wrapping an entity.
    TypeMapping mapping The type-specific configurations for this instance..

    SerializeToFrames()

    Serialize all registered entities lazy and converts them into a managed DataFrame. Optional selection or transformations can be appended and will evaluated lazy.
    Declaration
    public IEnumerable<DataFrame> SerializeToFrames()
    Returns
    Type Description
    IEnumerable<DataFrame> Returns an collection of managed agent frame.

    ToPropertyFrame(IEntity)

    Serialize the entity to an DataFrame with the type-specific implementation into a dictionary-based format
    Declaration
    public virtual DataFrame ToPropertyFrame(IEntity entity)
    Parameters
    Type Name Description
    IEntity entity The entity
    Returns
    Type Description
    DataFrame Returns a new created frame object containing the snapshot of this entity.
    Remarks
    The sense is to create the basic frame with all information available here in this scope and the assign this blank-frame with the custom snapshot.

    ToValueArray(IEntity)

    Serialize this entity instance into a fix-sized array containing the snapshot of the current simulation step.
    Declaration
    public abstract object[] ToValueArray(IEntity agent)
    Parameters
    Type Name Description
    IEntity agent The entity to serialize into a fix-sized array.
    Returns
    Type Description
    System.Object[] Returns a the array snapshot of this instance never null.

    ToValueFrame(IEntity)

    Serialize the entity to an DataFrame with the type-specific implementation into a fix array format.
    Declaration
    public virtual DataFrame ToValueFrame(IEntity entity)
    Parameters
    Type Name Description
    IEntity entity
    Returns
    Type Description
    DataFrame
    Remarks
    The sense is to create the basic frame with all information available here in this scope and the assign this blank-frame with the custom snapshot.

    Implements

    IGeneratedTypeLogger
    IOutputLogger
    Back to top Copyright © MARS GROUP.
    HAW Hamburg