Merge from branch giga
This commit is contained in:
@@ -28,7 +28,9 @@
|
||||
//
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
using StgSharp.Modeling.Step;
|
||||
using CommunityToolkit.HighPerformance.Buffers;
|
||||
|
||||
using StgSharp.Model.Step;
|
||||
using StgSharp.Script;
|
||||
using StgSharp.Script.Express;
|
||||
|
||||
@@ -37,7 +39,7 @@ using System.Collections.Frozen;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace StgSharp.Modeling.Step
|
||||
namespace StgSharp.Model.Step
|
||||
{
|
||||
public class ExpressStepUtil : ExpSchema
|
||||
{
|
||||
@@ -58,6 +60,7 @@ namespace StgSharp.Modeling.Step
|
||||
public const string LineText = "LINE";
|
||||
public const string OrientedEdgeText = "ORIENTED_EDGE";
|
||||
public const string PlaneText = "PLANE";
|
||||
public const string RepresentationItemText = "REPRESENTATION_ITEM";
|
||||
public const string VectorText = "VECTOR";
|
||||
public const string VertexPointText = "VERTEX_POINT";
|
||||
|
||||
@@ -79,15 +82,22 @@ namespace StgSharp.Modeling.Step
|
||||
LineText,
|
||||
OrientedEdgeText,
|
||||
PlaneText,
|
||||
RepresentationItemText,
|
||||
VectorText,
|
||||
VertexPointText,
|
||||
];
|
||||
|
||||
private FrozenDictionary<string, ExpTypeSource> entitiesDefine;
|
||||
private FrozenDictionary<string, ExpEntitySource> entitiesDefine;
|
||||
private StringPool _entityNamePool = new StringPool();
|
||||
|
||||
public ExpressStepUtil()
|
||||
{
|
||||
Dictionary<string, ExpTypeSource> tIndex = new Dictionary<string, ExpTypeSource>();
|
||||
IEnumerable<KeyValuePair<string, ExpEntitySource>> defineSource = [];
|
||||
entitiesDefine = new Dictionary<string, ExpEntitySource>( defineSource )
|
||||
.ToFrozenDictionary();
|
||||
foreach( string item in names ) {
|
||||
_entityNamePool.Add( item );
|
||||
}
|
||||
}
|
||||
|
||||
internal StepModel Current { get; set; }
|
||||
@@ -105,13 +115,13 @@ namespace StgSharp.Modeling.Step
|
||||
|
||||
public override bool TryGetEntity( string name, out ExpEntitySource e )
|
||||
{
|
||||
e = null!;
|
||||
return false;
|
||||
return entitiesDefine.TryGetValue( name, out e! );
|
||||
}
|
||||
|
||||
public override bool TryGetFunction( string name, out ExpFunctionSource f )
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
f = null!;
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool TryGetProcedure( string name, out ExpProcedureSource p )
|
||||
|
||||
Reference in New Issue
Block a user