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 <Standard_Type.hxx>
16 #include <StepBasic_Person.hxx>
17 #include <StepBasic_PersonalAddress.hxx>
18 #include <TCollection_HAsciiString.hxx>
20 IMPLEMENT_STANDARD_RTTIEXT(StepBasic_PersonalAddress,StepBasic_Address)
22 StepBasic_PersonalAddress::StepBasic_PersonalAddress () {}
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)
52 // --- classe own fields ---
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);
60 void StepBasic_PersonalAddress::SetPeople(const Handle(StepBasic_HArray1OfPerson)& aPeople)
65 Handle(StepBasic_HArray1OfPerson) StepBasic_PersonalAddress::People() const
70 Handle(StepBasic_Person) StepBasic_PersonalAddress::PeopleValue(const Standard_Integer num) const
72 return people->Value(num);
75 Standard_Integer StepBasic_PersonalAddress::NbPeople () const
77 if (people.IsNull()) return 0;
78 return people->Length();
81 void StepBasic_PersonalAddress::SetDescription(const Handle(TCollection_HAsciiString)& aDescription)
83 description = aDescription;
86 Handle(TCollection_HAsciiString) StepBasic_PersonalAddress::Description() const