mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-05-01 10:26:12 +03:00
- append new MessageView plugin to display content of Message_Report; - correct DumpJson of TDataStd array attributes to print Lower/Upper values; - correct remove level of Message_Report to store stop time during removing all levels; - append DumpJson for TFunction, TPrsStd attributes; - correct DumpJson of XCAFDoc tools due to simplify performance of it; - move AttributeInfo functionality from XDEDRAW into a static public method of XCAFDoc to call it outside; - remove obsolete pane classes in DFBrowser plugin, now we may use DumpJSon panel to visualize this content of attributes; - add new property panel in DFBrowser (synchronized with the same in other plugins); - add button to switch ON DumpJson in DFBrowser(OFF by default, for better performance), also there is a context menu item in tree view; - rename in DFBrowser "Property Panel" into "Property Panel (custom)"; - implement ViewControl_ColorSeletor and setting color in TreeModel_ItemProperties. Use only for light in VInspector now; - implement setting false for all created AIS_Shape presentation to don't modify source TopoDS_Shape; - remove not use VInspector_CallBack. It's possible using Message_Report/MessageView to track commands way; - remove History panel in VInspector as not used, MessageView will be better solution for this; - implement item and actions in VInspector for setting Lights in the view.
147 lines
4.4 KiB
C++
147 lines
4.4 KiB
C++
// Created on: 1999-06-11
|
|
// Created by: Sergey RUIN
|
|
// Copyright (c) 1999-1999 Matra Datavision
|
|
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
|
//
|
|
// This file is part of Open CASCADE Technology software library.
|
|
//
|
|
// This library is free software; you can redistribute it and/or modify it under
|
|
// the terms of the GNU Lesser General Public License version 2.1 as published
|
|
// by the Free Software Foundation, with special exception defined in the file
|
|
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
|
// distribution for complete text of the license and disclaimer of any warranty.
|
|
//
|
|
// Alternatively, this file may be used under the terms of Open CASCADE
|
|
// commercial license or contractual agreement.
|
|
|
|
#include <TDataStd_UAttribute.hxx>
|
|
|
|
#include <Standard_Dump.hxx>
|
|
#include <Standard_GUID.hxx>
|
|
#include <Standard_Type.hxx>
|
|
#include <TDataStd.hxx>
|
|
#include <TDF_Attribute.hxx>
|
|
#include <TDF_DataSet.hxx>
|
|
#include <TDF_Label.hxx>
|
|
#include <TDF_RelocationTable.hxx>
|
|
|
|
IMPLEMENT_STANDARD_RTTIEXT(TDataStd_UAttribute,TDF_Attribute)
|
|
|
|
//=======================================================================
|
|
//function : Set
|
|
//purpose :
|
|
//=======================================================================
|
|
Handle(TDataStd_UAttribute) TDataStd_UAttribute::Set (const TDF_Label& label, const Standard_GUID& guid )
|
|
{
|
|
Handle(TDataStd_UAttribute) A;
|
|
if (!label.FindAttribute(guid, A)) {
|
|
A = new TDataStd_UAttribute ();
|
|
A->SetID(guid);
|
|
label.AddAttribute(A);
|
|
}
|
|
return A;
|
|
}
|
|
|
|
|
|
//=======================================================================
|
|
//function : TDataStd_UAttribute
|
|
//purpose :
|
|
//=======================================================================
|
|
|
|
TDataStd_UAttribute::TDataStd_UAttribute()
|
|
{
|
|
}
|
|
|
|
//=======================================================================
|
|
//function : ID
|
|
//purpose :
|
|
//=======================================================================
|
|
|
|
const Standard_GUID& TDataStd_UAttribute::ID() const
|
|
{ return myID; }
|
|
|
|
|
|
//=======================================================================
|
|
//function : SetID
|
|
//purpose :
|
|
//=======================================================================
|
|
|
|
void TDataStd_UAttribute::SetID( const Standard_GUID& guid)
|
|
{
|
|
// OCC2932 correction
|
|
if(myID == guid) return;
|
|
|
|
Backup();
|
|
myID = guid;
|
|
}
|
|
|
|
|
|
//=======================================================================
|
|
//function : NewEmpty
|
|
//purpose :
|
|
//=======================================================================
|
|
|
|
Handle(TDF_Attribute) TDataStd_UAttribute::NewEmpty () const
|
|
{
|
|
Handle(TDataStd_UAttribute) A = new TDataStd_UAttribute();
|
|
A->SetID(myID);
|
|
return A;
|
|
}
|
|
|
|
//=======================================================================
|
|
//function : Restore
|
|
//purpose :
|
|
//=======================================================================
|
|
|
|
void TDataStd_UAttribute::Restore(const Handle(TDF_Attribute)& with)
|
|
{
|
|
Handle(TDataStd_UAttribute) A = Handle(TDataStd_UAttribute)::DownCast(with);
|
|
SetID( A->ID() );
|
|
}
|
|
|
|
//=======================================================================
|
|
//function : Paste
|
|
//purpose :
|
|
//=======================================================================
|
|
|
|
void TDataStd_UAttribute::Paste (const Handle(TDF_Attribute)& into,
|
|
const Handle(TDF_RelocationTable)& /*RT*/) const
|
|
{
|
|
Handle(TDataStd_UAttribute) A = Handle(TDataStd_UAttribute)::DownCast(into);
|
|
A->SetID( myID );
|
|
}
|
|
|
|
//=======================================================================
|
|
//function : References
|
|
//purpose :
|
|
//=======================================================================
|
|
|
|
void TDataStd_UAttribute::References (const Handle(TDF_DataSet)& /*DS*/) const
|
|
{
|
|
}
|
|
|
|
//=======================================================================
|
|
//function : Dump
|
|
//purpose :
|
|
//=======================================================================
|
|
|
|
Standard_OStream& TDataStd_UAttribute::Dump (Standard_OStream& anOS) const
|
|
{
|
|
anOS << "UAttribute";
|
|
TDF_Attribute::Dump(anOS);
|
|
return anOS;
|
|
}
|
|
|
|
//=======================================================================
|
|
//function : DumpJson
|
|
//purpose :
|
|
//=======================================================================
|
|
void TDataStd_UAttribute::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
|
|
{
|
|
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
|
|
|
|
OCCT_DUMP_FIELD_VALUE_GUID (theOStream, myID)
|
|
|
|
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
|
|
}
|