//
// (C) Copyright 2003-2013 by Autodesk, Inc.
//
// Permission to use, copy, modify, and distribute this software in
// object code form for any purpose and without fee is hereby granted,
// provided that the above copyright notice appears in all copies and
// that both that copyright notice and the limited warranty and
// restricted rights notice below appear in all supporting
// documentation.
//
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
// UNINTERRUPTED OR ERROR FREE.
//
// Use, duplication, or disclosure by the U.S. Government is subject to
// restrictions set forth in FAR 52.227-19 (Commercial Computer
// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
// (Rights in Technical Data and Computer Software), as applicable.
//
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Autodesk.Revit.DB;
using Autodesk.Revit.DB.CodeChecking.Engineering;
namespace CodeCheckingConcreteExample.Engine
{
///
/// Represents a base of cref"ElementDataBase" or cref="SectionDataBase".
///
public class ObjectDataBase
{
///
/// Initializes a new instance of the ObjectDataBase object with list of parameters.
///
/// Element identificator.
/// Element category.
/// Element material.
/// Element label.
public ObjectDataBase(ElementId elementId,
Autodesk.Revit.DB.BuiltInCategory elementCategory,
StructuralAssetClass elementMaterial,
Autodesk.Revit.DB.ExtensibleStorage.Framework.SchemaClass elementLabel)
{
category = elementCategory;
material = elementMaterial;
elemId = new ElementId(elementId.IntegerValue); ;
label = elementLabel;
}
///
/// Initializes a new instance of the ObjectDataBase from an existing one.
///
/// Object data to copy
public ObjectDataBase(ObjectDataBase data)
{
category = data.Category;
material = data.Material;
elemId = data.ElementId;
label = data.Label;
}
///
/// Initializes a new instance of the ObjectDataBase.
///
public ObjectDataBase() { }
///
/// Gets the element's category.
///
public Autodesk.Revit.DB.BuiltInCategory Category
{
get { return category; }
}
///
/// Gets the element's material.
///
public StructuralAssetClass Material
{
get { return material; }
}
///
/// Gets the element's identificator.
///
public ElementId ElementId
{
get { return elemId; }
}
///
/// Gets the element's label schema.
///
public Autodesk.Revit.DB.ExtensibleStorage.Framework.SchemaClass Label
{
get { return label; }
}
private Autodesk.Revit.DB.BuiltInCategory category;
private StructuralAssetClass material;
private ElementId elemId;
private Autodesk.Revit.DB.ExtensibleStorage.Framework.SchemaClass label;
}
}