1 // Created on: 2017-06-16
2 // Created by: Natalia ERMOLAEVA
3 // Copyright (c) 2017 OPEN CASCADE SAS
5 // This file is part of Open CASCADE Technology software library.
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
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.
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
16 #include <inspector/DFBrowserPane_AttributePaneCreator.hxx>
18 #include <TDF_Attribute.hxx>
19 #include <TDF_Reference.hxx>
21 #include <TDataStd_TreeNode.hxx>
22 #include <TDataStd_ReferenceList.hxx>
23 #include <TDataStd_ReferenceArray.hxx>
25 #include <TNaming_NamedShape.hxx>
26 #include <TNaming_Naming.hxx>
27 #include <TNaming_UsedShapes.hxx>
29 #include <inspector/DFBrowserPane_TDFReference.hxx>
30 #include <inspector/DFBrowserPane_TDataStdReferenceList.hxx>
31 #include <inspector/DFBrowserPane_TDataStdReferenceArray.hxx>
32 #include <inspector/DFBrowserPane_TDataStdTreeNode.hxx>
33 #include <inspector/DFBrowserPane_TNamingNamedShape.hxx>
34 #include <inspector/DFBrowserPane_TNamingNaming.hxx>
35 #include <inspector/DFBrowserPane_TNamingUsedShapes.hxx>
37 // =======================================================================
38 // function : Constructor
40 // =======================================================================
41 DFBrowserPane_AttributePaneAPI* DFBrowserPane_AttributePaneCreator::CreateAttributePane (Standard_CString theAttributeName)
43 DFBrowserPane_AttributePaneAPI* aPane = 0;
44 if (theAttributeName == STANDARD_TYPE (TDF_Reference)->Name())
45 aPane = new DFBrowserPane_TDFReference();
46 else if (theAttributeName == STANDARD_TYPE (TDataStd_TreeNode)->Name())
47 aPane = new DFBrowserPane_TDataStdTreeNode();
48 else if (theAttributeName == STANDARD_TYPE (TDataStd_ReferenceList)->Name())
49 aPane = new DFBrowserPane_TDataStdReferenceList();
50 else if (theAttributeName == STANDARD_TYPE (TDataStd_ReferenceArray)->Name())
51 aPane = new DFBrowserPane_TDataStdReferenceArray();
52 else if (theAttributeName == STANDARD_TYPE (TNaming_NamedShape)->Name())
53 aPane = new DFBrowserPane_TNamingNamedShape();
54 else if (theAttributeName == STANDARD_TYPE (TNaming_Naming)->Name())
55 aPane = new DFBrowserPane_TNamingNaming();
56 else if (theAttributeName == STANDARD_TYPE (TNaming_UsedShapes)->Name())
57 aPane = new DFBrowserPane_TNamingUsedShapes();