Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-10-04 09:16:41

0001 // Created on: 2007-08-01
0002 // Created by: Alexander GRIGORIEV
0003 // Copyright (c) 2007-2014 OPEN CASCADE SAS
0004 //
0005 // This file is part of Open CASCADE Technology software library.
0006 //
0007 // This library is free software; you can redistribute it and/or modify it under
0008 // the terms of the GNU Lesser General Public License version 2.1 as published
0009 // by the Free Software Foundation, with special exception defined in the file
0010 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0011 // distribution for complete text of the license and disclaimer of any warranty.
0012 //
0013 // Alternatively, this file may be used under the terms of Open CASCADE
0014 // commercial license or contractual agreement.
0015 
0016 #ifndef VrmlData_WorldInfo_HeaderFile
0017 #define VrmlData_WorldInfo_HeaderFile
0018 
0019 #include <VrmlData_Node.hxx>
0020 
0021 /**
0022  * Data type for WorldInfo node
0023  */
0024 
0025 class VrmlData_WorldInfo : public VrmlData_Node
0026 {
0027 public:
0028   // ---------- PUBLIC METHODS ----------
0029 
0030   /**
0031    * Empty Constructor.
0032    */
0033   inline VrmlData_WorldInfo()
0034       : myTitle(nullptr)
0035   {
0036   }
0037 
0038   /**
0039    * Constructor.
0040    */
0041   Standard_EXPORT VrmlData_WorldInfo(const VrmlData_Scene& theScene,
0042                                      const char*           theName  = nullptr,
0043                                      const char*           theTitle = nullptr);
0044 
0045   /**
0046    * Set or modify the title.
0047    */
0048   Standard_EXPORT void SetTitle(const char* theString);
0049 
0050   /**
0051    * Add a string to the list of info strings.
0052    */
0053   Standard_EXPORT void AddInfo(const char* theString);
0054 
0055   /**
0056    * Query the title string.
0057    */
0058   inline const char* Title() const { return myTitle; }
0059 
0060   /**
0061    * Return the iterator of Info strings.
0062    */
0063   inline NCollection_List<const char*>::Iterator InfoIterator() const { return myInfo; }
0064 
0065   /**
0066    * Create a copy of this node.
0067    * If the parameter is null, a new copied node is created. Otherwise new node
0068    * is not created, but rather the given one is modified.
0069    */
0070   Standard_EXPORT occ::handle<VrmlData_Node> Clone(
0071     const occ::handle<VrmlData_Node>& theOther) const override;
0072 
0073   /**
0074    * Read the Node from input stream.
0075    */
0076   Standard_EXPORT VrmlData_ErrorStatus Read(VrmlData_InBuffer& theBuffer) override;
0077 
0078   /**
0079    * Write the Node to the Scene output.
0080    */
0081   Standard_EXPORT VrmlData_ErrorStatus Write(const char* thePrefix) const override;
0082 
0083   /**
0084    * Returns True if the node is default, then it would not be written.
0085    */
0086   Standard_EXPORT bool IsDefault() const override;
0087 
0088 private:
0089   // ---------- PRIVATE FIELDS ----------
0090 
0091   const char*                   myTitle;
0092   NCollection_List<const char*> myInfo;
0093 
0094 public:
0095   // Declaration of CASCADE RTTI
0096   DEFINE_STANDARD_RTTIEXT(VrmlData_WorldInfo, VrmlData_Node)
0097 };
0098 
0099 // Definition of HANDLE object using Standard_DefineHandle.hxx
0100 #endif