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