0031362: Inspectors - MessageView plugin for message alerts
[occt.git] / tools / DFBrowserPane / DFBrowserPane_AttributePaneCreator.cxx
1 // Created on: 2017-06-16
2 // Created by: Natalia ERMOLAEVA
3 // Copyright (c) 2017 OPEN CASCADE SAS
4 //
5 // This file is part of Open CASCADE Technology software library.
6 //
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.
12 //
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement. 
15
16 #include <inspector/DFBrowserPane_AttributePaneCreator.hxx>
17
18 #include <TDF_Attribute.hxx>
19 #include <TDF_Reference.hxx>
20
21 #include <TDataStd_TreeNode.hxx>
22 #include <TDataStd_ReferenceList.hxx>
23 #include <TDataStd_ReferenceArray.hxx>
24
25 #include <TNaming_NamedShape.hxx>
26 #include <TNaming_Naming.hxx>
27 #include <TNaming_UsedShapes.hxx>
28
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>
36
37 // =======================================================================
38 // function : Constructor
39 // purpose :
40 // =======================================================================
41 DFBrowserPane_AttributePaneAPI* DFBrowserPane_AttributePaneCreator::CreateAttributePane (Standard_CString theAttributeName)
42 {
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();
58
59   return aPane;
60 }