0024925: Enabling OCAF persistence without setting environment variables
[occt.git] / src / BRepMesh / BRepMesh_DiscretFactory.cdl
1 -- Created on: 2008-04-10
2 -- Created by: Peter KURNEV <pkv@irinox>
3 -- Copyright (c) 2008-2014 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 class DiscretFactory from BRepMesh
17
18     ---Purpose:
19     -- This class intended to setup / retrieve default triangulation algorithm.
20     -- Use BRepMesh_DiscretFactory::Get() static method to retrieve global Factory instance.
21     -- Use BRepMesh_DiscretFactory::Discret() method to retrieve meshing tool.
22
23 uses
24     DiscretRoot      from BRepMesh,
25     FactoryError     from BRepMesh,
26     PluginEntryType  from BRepMesh,
27     AsciiString      from TCollection,
28     MapOfAsciiString from TColStd,
29     Shape            from TopoDS,
30     MapOfFunctions   from Plugin
31
32 --raises
33
34 is
35     Create
36         returns DiscretFactory from BRepMesh
37         is protected;
38     ---C++: alias "Standard_EXPORT virtual ~BRepMesh_DiscretFactory();"
39
40     Get (myclass)
41         returns DiscretFactory from BRepMesh;
42     ---C++: return &
43     ---Purpose:
44     -- Returns the global factory instance.
45
46     Names (me)
47         returns MapOfAsciiString from TColStd;
48     ---C++: return const &
49     ---Purpose:
50     -- Returns the list of registered meshing algorithms.
51
52     SetDefaultName (     me : out;
53                     theName : AsciiString from TCollection)
54         returns Boolean from Standard;
55     ---Purpose:
56     -- Setup meshing algorithm by name.
57     -- Returns true if requested tool is available.
58     -- On fail Factory will continue to use previous algo.
59
60     DefaultName (me)
61         returns AsciiString from TCollection;
62     ---C++: return const &
63     ---Purpose:
64     -- Returns name for current meshing algorithm.
65
66     SetFunctionName (         me : out;
67                      theFuncName : AsciiString from TCollection)
68         returns Boolean from Standard;
69     ---Purpose:
70     -- Advanced function. Changes function name to retrieve from plugin.
71     -- Returns true if requested tool is available.
72     -- On fail Factory will continue to use previous algo.
73
74     SetDefault (         me : out;
75                     theName : AsciiString from TCollection;
76                 theFuncName : AsciiString from TCollection = "DISCRETALGO")
77         returns Boolean from Standard;
78     ---Purpose:
79     -- Setup meshing algorithm that should be created by this Factory.
80     -- Returns true if requested tool is available.
81     -- On fail Factory will continue to use previous algo.
82     -- Call ::ErrorStatus() method to retrieve fault reason.
83
84     FunctionName (me)
85         returns AsciiString from TCollection;
86     ---C++: return const &
87     ---Purpose:
88     -- Returns function name that should be exported by plugin.
89
90     Discret (me            : out;
91              theShape      : Shape from TopoDS;
92              theDeflection : Real  from Standard;
93              theAngle      : Real  from Standard)
94         returns DiscretRoot from BRepMesh;
95     ---Purpose:
96     -- Returns triangulation algorithm instance.
97
98     ErrorStatus (me)
99         returns FactoryError from BRepMesh;
100     ---Purpose:
101     -- Returns error status for last meshing algorithm switch.
102
103     Clear (me : out)
104         is protected;
105
106 fields
107     myPluginEntry    : PluginEntryType from BRepMesh is protected;
108     myErrorStatus    : FactoryError from BRepMesh is protected;
109     myNames          : MapOfAsciiString from TColStd is protected;
110     myDefaultName    : AsciiString from TCollection is protected;
111     myFunctionName   : AsciiString from TCollection is protected;
112     myFactoryMethods : MapOfFunctions from Plugin is protected;
113
114 end DiscretFactory;