0022048: Visualization, AIS_InteractiveContext - single object selection should alway...
[occt.git] / src / StepBasic / StepBasic_PersonalAddress.cxx
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 <Standard_Type.hxx>
16 #include <StepBasic_Person.hxx>
17 #include <StepBasic_PersonalAddress.hxx>
18 #include <TCollection_HAsciiString.hxx>
19
20 IMPLEMENT_STANDARD_RTTIEXT(StepBasic_PersonalAddress,StepBasic_Address)
21
22 StepBasic_PersonalAddress::StepBasic_PersonalAddress ()  {}
23
24 void StepBasic_PersonalAddress::Init(
25         const Standard_Boolean hasAinternalLocation,
26         const Handle(TCollection_HAsciiString)& aInternalLocation,
27         const Standard_Boolean hasAstreetNumber,
28         const Handle(TCollection_HAsciiString)& aStreetNumber,
29         const Standard_Boolean hasAstreet,
30         const Handle(TCollection_HAsciiString)& aStreet,
31         const Standard_Boolean hasApostalBox,
32         const Handle(TCollection_HAsciiString)& aPostalBox,
33         const Standard_Boolean hasAtown,
34         const Handle(TCollection_HAsciiString)& aTown,
35         const Standard_Boolean hasAregion,
36         const Handle(TCollection_HAsciiString)& aRegion,
37         const Standard_Boolean hasApostalCode,
38         const Handle(TCollection_HAsciiString)& aPostalCode,
39         const Standard_Boolean hasAcountry,
40         const Handle(TCollection_HAsciiString)& aCountry,
41         const Standard_Boolean hasAfacsimileNumber,
42         const Handle(TCollection_HAsciiString)& aFacsimileNumber,
43         const Standard_Boolean hasAtelephoneNumber,
44         const Handle(TCollection_HAsciiString)& aTelephoneNumber,
45         const Standard_Boolean hasAelectronicMailAddress,
46         const Handle(TCollection_HAsciiString)& aElectronicMailAddress,
47         const Standard_Boolean hasAtelexNumber,
48         const Handle(TCollection_HAsciiString)& aTelexNumber,
49         const Handle(StepBasic_HArray1OfPerson)& aPeople,
50         const Handle(TCollection_HAsciiString)& aDescription)
51 {
52         // --- classe own fields ---
53         people = aPeople;
54         description = aDescription;
55         // --- classe inherited fields ---
56         StepBasic_Address::Init(hasAinternalLocation, aInternalLocation, hasAstreetNumber, aStreetNumber, hasAstreet, aStreet, hasApostalBox, aPostalBox, hasAtown, aTown, hasAregion, aRegion, hasApostalCode, aPostalCode, hasAcountry, aCountry, hasAfacsimileNumber, aFacsimileNumber, hasAtelephoneNumber, aTelephoneNumber, hasAelectronicMailAddress, aElectronicMailAddress, hasAtelexNumber, aTelexNumber);
57 }
58
59
60 void StepBasic_PersonalAddress::SetPeople(const Handle(StepBasic_HArray1OfPerson)& aPeople)
61 {
62         people = aPeople;
63 }
64
65 Handle(StepBasic_HArray1OfPerson) StepBasic_PersonalAddress::People() const
66 {
67         return people;
68 }
69
70 Handle(StepBasic_Person) StepBasic_PersonalAddress::PeopleValue(const Standard_Integer num) const
71 {
72         return people->Value(num);
73 }
74
75 Standard_Integer StepBasic_PersonalAddress::NbPeople () const
76 {
77         if (people.IsNull()) return 0;
78         return people->Length();
79 }
80
81 void StepBasic_PersonalAddress::SetDescription(const Handle(TCollection_HAsciiString)& aDescription)
82 {
83         description = aDescription;
84 }
85
86 Handle(TCollection_HAsciiString) StepBasic_PersonalAddress::Description() const
87 {
88         return description;
89 }