0033661: Data Exchange, Step Import - Tessellated GDTs are not imported
[occt.git] / src / XCAFApp / XCAFApp_Application.cxx
CommitLineData
b311480e 1// Created on: 2000-05-24
2// Created by: data exchange team
973c2be1 3// Copyright (c) 2000-2014 OPEN CASCADE SAS
b311480e 4//
973c2be1 5// This file is part of Open CASCADE Technology software library.
b311480e 6//
d5f74e42 7// This library is free software; you can redistribute it and/or modify it under
8// the terms of the GNU Lesser General Public License version 2.1 as published
973c2be1 9// by the Free Software Foundation, with special exception defined in the file
10// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11// distribution for complete text of the license and disclaimer of any warranty.
b311480e 12//
973c2be1 13// Alternatively, this file may be used under the terms of Open CASCADE
14// commercial license or contractual agreement.
7fd59977 15
42cf5bc1 16
6fe96f84 17#include <Resource_Manager.hxx>
bc73b006 18#include <Standard_Dump.hxx>
42cf5bc1 19#include <TDF_Label.hxx>
7fd59977 20#include <TPrsStd_DriverTable.hxx>
42cf5bc1 21#include <XCAFApp_Application.hxx>
7fd59977 22#include <XCAFDoc_DocumentTool.hxx>
42cf5bc1 23#include <XCAFPrs_Driver.hxx>
7fd59977 24
92efcf78 25IMPLEMENT_STANDARD_RTTIEXT(XCAFApp_Application,TDocStd_Application)
26
7fd59977 27//=======================================================================
28//function : GetApplication
29//purpose :
30//=======================================================================
7fd59977 31Handle(XCAFApp_Application) XCAFApp_Application::GetApplication()
32{
33 static Handle(XCAFApp_Application) locApp;
34 if ( locApp.IsNull() ) locApp = new XCAFApp_Application;
35 return locApp;
36}
37
38//=======================================================================
39//function : XCAFApp_Application
40//purpose :
41//=======================================================================
42
43XCAFApp_Application::XCAFApp_Application()
44{
45 // register driver for presentation
46 Handle(TPrsStd_DriverTable) table = TPrsStd_DriverTable::Get();
47 table->AddDriver (XCAFPrs_Driver::GetID(), new XCAFPrs_Driver);
48}
49
7fd59977 50//=======================================================================
51//function : ResourcesName
52//purpose :
53//=======================================================================
54
55Standard_CString XCAFApp_Application::ResourcesName()
56{
57 return Standard_CString("XCAF");
58// return Standard_CString("Standard");
59}
60
61//=======================================================================
62//function : InitDocument
63//purpose :
64//=======================================================================
65
5fd0b800 66void XCAFApp_Application::InitDocument(const Handle(CDM_Document)& aDoc) const
7fd59977 67{
5fd0b800 68 XCAFDoc_DocumentTool::Set(Handle(TDocStd_Document)::DownCast(aDoc)->Main());
7fd59977 69}
bc73b006 70
71//=======================================================================
72//function : DumpJson
73//purpose :
74//=======================================================================
75void XCAFApp_Application::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
76{
77 OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
78
79 OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDocStd_Application)
80}