b311480e |
1 | // Created on: 2007-08-01 |
2 | // Created by: Alexander GRIGORIEV |
973c2be1 |
3 | // Copyright (c) 2007-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 | |
16 | #ifndef VrmlData_WorldInfo_HeaderFile |
17 | #define VrmlData_WorldInfo_HeaderFile |
18 | |
19 | #include <VrmlData_Node.hxx> |
20 | |
21 | /** |
22 | * Data type for WorldInfo node |
23 | */ |
24 | |
25 | class VrmlData_WorldInfo : public VrmlData_Node |
26 | { |
27 | public: |
28 | // ---------- PUBLIC METHODS ---------- |
29 | |
30 | /** |
31 | * Empty Constructor. |
32 | */ |
33 | inline VrmlData_WorldInfo () : myTitle (0L) {} |
34 | |
35 | /** |
36 | * Constructor. |
37 | */ |
38 | Standard_EXPORT VrmlData_WorldInfo (const VrmlData_Scene& theScene, |
39 | const char * theName = 0L, |
40 | const char * theTitle = 0L); |
41 | |
42 | /** |
43 | * Set or modify the title. |
44 | */ |
45 | Standard_EXPORT void SetTitle (const char * theString); |
46 | |
47 | /** |
48 | * Add a string to the list of info strings. |
49 | */ |
50 | Standard_EXPORT void AddInfo (const char * theString); |
51 | |
52 | /** |
53 | * Query the title string. |
54 | */ |
55 | inline const char * Title () const |
56 | { return myTitle; } |
57 | |
58 | /** |
59 | * Return the iterator of Info strings. |
60 | */ |
61 | inline NCollection_List <const char *>::Iterator |
62 | InfoIterator () const |
63 | { return myInfo; } |
64 | |
65 | /** |
66 | * Create a copy of this node. |
67 | * If the parameter is null, a new copied node is created. Otherwise new node |
68 | * is not created, but rather the given one is modified. |
69 | */ |
70 | Standard_EXPORT virtual Handle(VrmlData_Node) |
71 | Clone (const Handle(VrmlData_Node)& theOther) const; |
72 | |
73 | /** |
74 | * Read the Node from input stream. |
75 | */ |
76 | Standard_EXPORT virtual VrmlData_ErrorStatus |
77 | Read (VrmlData_InBuffer& theBuffer); |
78 | |
79 | /** |
80 | * Write the Node to the Scene output. |
81 | */ |
82 | Standard_EXPORT virtual VrmlData_ErrorStatus |
83 | Write (const char * thePrefix) const; |
84 | |
85 | /** |
86 | * Returns True if the node is default, then it would not be written. |
87 | */ |
88 | Standard_EXPORT virtual Standard_Boolean |
89 | IsDefault() const; |
90 | |
91 | private: |
92 | // ---------- PRIVATE FIELDS ---------- |
93 | |
94 | const char * myTitle; |
95 | NCollection_List <const char *> myInfo; |
96 | |
97 | public: |
98 | // Declaration of CASCADE RTTI |
ec357c5c |
99 | DEFINE_STANDARD_RTTI (VrmlData_WorldInfo, VrmlData_Node) |
7fd59977 |
100 | }; |
101 | |
102 | // Definition of HANDLE object using Standard_DefineHandle.hxx |
103 | DEFINE_STANDARD_HANDLE (VrmlData_WorldInfo, VrmlData_Node) |
104 | |
105 | |
106 | #endif |