1 // Created on: 1994-08-26
2 // Created by: Christian CAILLET
3 // Copyright (c) 1994-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #ifndef _IGESSelect_AddFileComment_HeaderFile
18 #define _IGESSelect_AddFileComment_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
23 #include <TColStd_HSequenceOfHAsciiString.hxx>
24 #include <IGESSelect_FileModifier.hxx>
25 #include <Standard_CString.hxx>
26 #include <Standard_Integer.hxx>
27 class IFSelect_ContextWrite;
28 class IGESData_IGESWriter;
29 class TCollection_AsciiString;
32 class IGESSelect_AddFileComment;
33 DEFINE_STANDARD_HANDLE(IGESSelect_AddFileComment, IGESSelect_FileModifier)
35 //! This class allows to add comment lines on writing an IGES File
36 //! These lines are added to Start Section, instead of the only
37 //! one blank line written by default.
38 class IGESSelect_AddFileComment : public IGESSelect_FileModifier
44 //! Creates a new emoty AddFileComment. Use AddLine to complete it
45 Standard_EXPORT IGESSelect_AddFileComment();
47 //! Clears the list of file comment lines already stored
48 Standard_EXPORT void Clear();
50 //! Adds a line for file comment
51 //! Remark : Lines are limited to 72 useful char.s . A line of more than
52 //! 72 char.s will be splited into several ones of 72 max each.
53 Standard_EXPORT void AddLine (const Standard_CString line);
55 //! Adds a list of lines for file comment
56 //! Each of them must comply with demand of AddLine
57 Standard_EXPORT void AddLines (const Handle(TColStd_HSequenceOfHAsciiString)& lines);
59 //! Returns the count of stored lines
60 Standard_EXPORT Standard_Integer NbLines() const;
62 //! Returns a stored line given its rank
63 Standard_EXPORT Standard_CString Line (const Standard_Integer num) const;
65 //! Returns the complete list of lines in once
66 Standard_EXPORT Handle(TColStd_HSequenceOfHAsciiString) Lines() const;
68 //! Sends the comment lines to the file (Start Section)
69 Standard_EXPORT void Perform (IFSelect_ContextWrite& ctx, IGESData_IGESWriter& writer) const Standard_OVERRIDE;
71 //! Returns specific Label, which is
72 //! "Add <nn> Comment Lines (Start Section)"
73 Standard_EXPORT TCollection_AsciiString Label() const Standard_OVERRIDE;
78 DEFINE_STANDARD_RTTIEXT(IGESSelect_AddFileComment,IGESSelect_FileModifier)
88 Handle(TColStd_HSequenceOfHAsciiString) thelist;
99 #endif // _IGESSelect_AddFileComment_HeaderFile