0031668: Visualization - WebGL sample doesn't work on Emscripten 1.39
[occt.git] / src / HeaderSection / HeaderSection_FileName.cxx
... / ...
CommitLineData
1// Copyright (c) 1999-2014 OPEN CASCADE SAS
2//
3// This file is part of Open CASCADE Technology software library.
4//
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.
10//
11// Alternatively, this file may be used under the terms of Open CASCADE
12// commercial license or contractual agreement.
13
14
15#include <HeaderSection_FileName.hxx>
16#include <Standard_Type.hxx>
17#include <TCollection_HAsciiString.hxx>
18
19IMPLEMENT_STANDARD_RTTIEXT(HeaderSection_FileName,Standard_Transient)
20
21HeaderSection_FileName::HeaderSection_FileName () {}
22
23void 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)
31{
32 // --- class own fields ---
33 name = aName;
34 timeStamp = aTimeStamp;
35 author = aAuthor;
36 organization = aOrganization;
37 preprocessorVersion = aPreprocessorVersion;
38 originatingSystem = aOriginatingSystem;
39 authorisation = aAuthorisation;
40}
41
42
43void HeaderSection_FileName::SetName(const Handle(TCollection_HAsciiString)& aName)
44{
45 name = aName;
46}
47
48Handle(TCollection_HAsciiString) HeaderSection_FileName::Name() const
49{
50 return name;
51}
52
53void HeaderSection_FileName::SetTimeStamp(const Handle(TCollection_HAsciiString)& aTimeStamp)
54{
55 timeStamp = aTimeStamp;
56}
57
58Handle(TCollection_HAsciiString) HeaderSection_FileName::TimeStamp() const
59{
60 return timeStamp;
61}
62
63void HeaderSection_FileName::SetAuthor(const Handle(Interface_HArray1OfHAsciiString)& aAuthor)
64{
65 author = aAuthor;
66}
67
68Handle(Interface_HArray1OfHAsciiString) HeaderSection_FileName::Author() const
69{
70 return author;
71}
72
73Handle(TCollection_HAsciiString) HeaderSection_FileName::AuthorValue(const Standard_Integer num) const
74{
75 return author->Value(num);
76}
77
78Standard_Integer HeaderSection_FileName::NbAuthor () const
79{
80 if (author.IsNull()) return 0;
81 return author->Length();
82}
83
84void HeaderSection_FileName::SetOrganization(const Handle(Interface_HArray1OfHAsciiString)& aOrganization)
85{
86 organization = aOrganization;
87}
88
89Handle(Interface_HArray1OfHAsciiString) HeaderSection_FileName::Organization() const
90{
91 return organization;
92}
93
94Handle(TCollection_HAsciiString) HeaderSection_FileName::OrganizationValue(const Standard_Integer num) const
95{
96 return organization->Value(num);
97}
98
99Standard_Integer HeaderSection_FileName::NbOrganization () const
100{
101 if (organization.IsNull()) return 0;
102 return organization->Length();
103}
104
105void HeaderSection_FileName::SetPreprocessorVersion(const Handle(TCollection_HAsciiString)& aPreprocessorVersion)
106{
107 preprocessorVersion = aPreprocessorVersion;
108}
109
110Handle(TCollection_HAsciiString) HeaderSection_FileName::PreprocessorVersion() const
111{
112 return preprocessorVersion;
113}
114
115void HeaderSection_FileName::SetOriginatingSystem(const Handle(TCollection_HAsciiString)& aOriginatingSystem)
116{
117 originatingSystem = aOriginatingSystem;
118}
119
120Handle(TCollection_HAsciiString) HeaderSection_FileName::OriginatingSystem() const
121{
122 return originatingSystem;
123}
124
125void HeaderSection_FileName::SetAuthorisation(const Handle(TCollection_HAsciiString)& aAuthorisation)
126{
127 authorisation = aAuthorisation;
128}
129
130Handle(TCollection_HAsciiString) HeaderSection_FileName::Authorisation() const
131{
132 return authorisation;
133}