repository_infos: Enable automatic updates on the main Haiku repostiory.
[haiku.git] / src / apps / haikudepot / server / dumpexportrepository / DumpExportRepository.cpp
bloba921f10e77bfe61592af09435af00efda926a179
1 /*
2 * Generated Model Object
3 * source json-schema : dumpexport.json
4 * generated at : 2017-11-11T13:59:22.553529
5 */
6 #include "DumpExportRepository.h"
9 DumpExportRepository::DumpExportRepository()
11 fInformationUrl = NULL;
12 fCode = NULL;
13 fRepositorySources = NULL;
14 fName = NULL;
15 fDescription = NULL;
19 DumpExportRepository::~DumpExportRepository()
21 int32 i;
23 if (fInformationUrl != NULL) {
24 delete fInformationUrl;
27 if (fCode != NULL) {
28 delete fCode;
31 if (fRepositorySources != NULL) {
32 int32 count = fRepositorySources->CountItems();
33 for (i = 0; i < count; i++)
34 delete fRepositorySources->ItemAt(i);
35 delete fRepositorySources;
38 if (fName != NULL) {
39 delete fName;
42 if (fDescription != NULL) {
43 delete fDescription;
48 BString*
49 DumpExportRepository::InformationUrl()
51 return fInformationUrl;
55 void
56 DumpExportRepository::SetInformationUrl(BString* value)
58 fInformationUrl = value;
62 void
63 DumpExportRepository::SetInformationUrlNull()
65 if (!InformationUrlIsNull()) {
66 delete fInformationUrl;
67 fInformationUrl = NULL;
72 bool
73 DumpExportRepository::InformationUrlIsNull()
75 return fInformationUrl == NULL;
79 BString*
80 DumpExportRepository::Code()
82 return fCode;
86 void
87 DumpExportRepository::SetCode(BString* value)
89 fCode = value;
93 void
94 DumpExportRepository::SetCodeNull()
96 if (!CodeIsNull()) {
97 delete fCode;
98 fCode = NULL;
103 bool
104 DumpExportRepository::CodeIsNull()
106 return fCode == NULL;
110 void
111 DumpExportRepository::AddToRepositorySources(DumpExportRepositorySource* value)
113 if (fRepositorySources == NULL)
114 fRepositorySources = new List<DumpExportRepositorySource*, true>();
115 fRepositorySources->Add(value);
119 void
120 DumpExportRepository::SetRepositorySources(List<DumpExportRepositorySource*, true>* value)
122 fRepositorySources = value;
126 int32
127 DumpExportRepository::CountRepositorySources()
129 if (fRepositorySources == NULL)
130 return 0;
131 return fRepositorySources->CountItems();
135 DumpExportRepositorySource*
136 DumpExportRepository::RepositorySourcesItemAt(int32 index)
138 return fRepositorySources->ItemAt(index);
142 bool
143 DumpExportRepository::RepositorySourcesIsNull()
145 return fRepositorySources == NULL;
149 BString*
150 DumpExportRepository::Name()
152 return fName;
156 void
157 DumpExportRepository::SetName(BString* value)
159 fName = value;
163 void
164 DumpExportRepository::SetNameNull()
166 if (!NameIsNull()) {
167 delete fName;
168 fName = NULL;
173 bool
174 DumpExportRepository::NameIsNull()
176 return fName == NULL;
180 BString*
181 DumpExportRepository::Description()
183 return fDescription;
187 void
188 DumpExportRepository::SetDescription(BString* value)
190 fDescription = value;
194 void
195 DumpExportRepository::SetDescriptionNull()
197 if (!DescriptionIsNull()) {
198 delete fDescription;
199 fDescription = NULL;
204 bool
205 DumpExportRepository::DescriptionIsNull()
207 return fDescription == NULL;