/*-------------------------------------------------------------------------
* 功能描述:JBimParseContext
* 作者:xulisong
* 创建时间: 2019/6/13 16:50:43
* 版本号:v1.0
* -------------------------------------------------------------------------*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using JBIM;
using RevitExport;
namespace RevitToJBim
{
///
/// JBimParseContext解析上下文
///
public class JBimParseContext: ParseContext
{
public JBimParseContext()
{
Document = new BimDocument();
}
public BimDocument Document { get;private set; }
#region 数据缓存相关
private Dictionary m_RevitIdMap = new Dictionary();
public BimId GetBimId(string revitSourceId)
{
if (string.IsNullOrWhiteSpace(revitSourceId))
{
return null;
}
m_RevitIdMap.TryGetValue(revitSourceId, out BimId result);
return result;
}
public BimId AddBimObject(BimObject obj)
{
return this.Document.NewObject(obj)?.Id;
}
#endregion
#region 关系数据统一存储
#endregion
#region 解析方法
public List Parse(ElementWrapper wrapper)
{
return new List();
}
#endregion
}
}