1 // Copyright (c) 1999-2014 OPEN CASCADE SAS
3 // This file is part of Open CASCADE Technology software library.
5 // This library is free software; you can redistribute it and/or modify it under
6 // the terms of the GNU Lesser General Public License version 2.1 as published
7 // by the Free Software Foundation, with special exception defined in the file
8 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
9 // distribution for complete text of the license and disclaimer of any warranty.
11 // Alternatively, this file may be used under the terms of Open CASCADE
12 // commercial license or contractual agreement.
15 #include <HeaderSection_FileName.hxx>
16 #include <Standard_Type.hxx>
17 #include <TCollection_HAsciiString.hxx>
19 IMPLEMENT_STANDARD_RTTIEXT(HeaderSection_FileName,Standard_Transient)
21 HeaderSection_FileName::HeaderSection_FileName () {}
23 void HeaderSection_FileName::Init(
24 const Handle(TCollection_HAsciiString)& aName,
25 const Handle(TCollection_HAsciiString)& aTimeStamp,
26 const Handle(Interface_HArray1OfHAsciiString)& aAuthor,
27 const Handle(Interface_HArray1OfHAsciiString)& aOrganization,
28 const Handle(TCollection_HAsciiString)& aPreprocessorVersion,
29 const Handle(TCollection_HAsciiString)& aOriginatingSystem,
30 const Handle(TCollection_HAsciiString)& aAuthorisation)
32 // --- class own fields ---
34 timeStamp = aTimeStamp;
36 organization = aOrganization;
37 preprocessorVersion = aPreprocessorVersion;
38 originatingSystem = aOriginatingSystem;
39 authorisation = aAuthorisation;
43 void HeaderSection_FileName::SetName(const Handle(TCollection_HAsciiString)& aName)
48 Handle(TCollection_HAsciiString) HeaderSection_FileName::Name() const
53 void HeaderSection_FileName::SetTimeStamp(const Handle(TCollection_HAsciiString)& aTimeStamp)
55 timeStamp = aTimeStamp;
58 Handle(TCollection_HAsciiString) HeaderSection_FileName::TimeStamp() const
63 void HeaderSection_FileName::SetAuthor(const Handle(Interface_HArray1OfHAsciiString)& aAuthor)
68 Handle(Interface_HArray1OfHAsciiString) HeaderSection_FileName::Author() const
73 Handle(TCollection_HAsciiString) HeaderSection_FileName::AuthorValue(const Standard_Integer num) const
75 return author->Value(num);
78 Standard_Integer HeaderSection_FileName::NbAuthor () const
80 if (author.IsNull()) return 0;
81 return author->Length();
84 void HeaderSection_FileName::SetOrganization(const Handle(Interface_HArray1OfHAsciiString)& aOrganization)
86 organization = aOrganization;
89 Handle(Interface_HArray1OfHAsciiString) HeaderSection_FileName::Organization() const
94 Handle(TCollection_HAsciiString) HeaderSection_FileName::OrganizationValue(const Standard_Integer num) const
96 return organization->Value(num);
99 Standard_Integer HeaderSection_FileName::NbOrganization () const
101 if (organization.IsNull()) return 0;
102 return organization->Length();
105 void HeaderSection_FileName::SetPreprocessorVersion(const Handle(TCollection_HAsciiString)& aPreprocessorVersion)
107 preprocessorVersion = aPreprocessorVersion;
110 Handle(TCollection_HAsciiString) HeaderSection_FileName::PreprocessorVersion() const
112 return preprocessorVersion;
115 void HeaderSection_FileName::SetOriginatingSystem(const Handle(TCollection_HAsciiString)& aOriginatingSystem)
117 originatingSystem = aOriginatingSystem;
120 Handle(TCollection_HAsciiString) HeaderSection_FileName::OriginatingSystem() const
122 return originatingSystem;
125 void HeaderSection_FileName::SetAuthorisation(const Handle(TCollection_HAsciiString)& aAuthorisation)
127 authorisation = aAuthorisation;
130 Handle(TCollection_HAsciiString) HeaderSection_FileName::Authorisation() const
132 return authorisation;