22class CLASS_DECL_ACME property_set_base :
23 public ::property_holder_array_base
31 using property_holder_array_base::property_holder_array_base;
32 using property_holder_array_base::operator =;
34 property_set_base(::std::initializer_list < ::payload >
list_base);
41 ::collection::count erase_by_name(const ::atom &
atom);
42 ::collection::count erase_by_name(string_array_base & straName);
44 virtual ::particle * source_channel();
48 string _001Replace(const ::scoped_string & scopedstr)
const;
50 inline string format(const ::scoped_string & scopedstr)
const {
return _001Replace(scopedstr); }
53 string as_string(const ::scoped_string& scopedstrSeparator1, const ::scoped_string& scopedstrSeparator2);
59 ::collection::index index_of(const ::atom&
atom, ::collection::index iStart = 0)
const;
60 ::collection::index index_of_name(const ::scoped_string &scopedstr, ::collection::index iStart = 0)
const;
61 ::property * find(const ::atom &
atom, ::collection::index iStart = 0)
const;
62 ::property & property(const ::atom &
atom);
63 const ::property& property(const ::atom&
atom)
const
66 return ((::property_set_base*)
this)->property(
atom);
72 ::property * find(const ::atom_array_base & atoma)
const;
73 ::property & property(const ::atom_array_base & atoma);
74 const ::property& property(const ::atom_array_base& atoma)
const
77 return ((::property_set_base*)
this)->property(atoma);
105 inline const ::property& operator[](const ::atom_array_base& atoma)
const {
return property(atoma); }
106 inline const ::property& operator[](const ::atom&
atom)
const {
return property(
atom); }
108 inline ::property & operator[](const ::atom_array_base & atoma) {
return property(atoma); }
109 inline ::property & operator[](const ::atom &
atom) {
return property(
atom); }
111 template < prototype_
integral INTEGRAL >
112 inline const ::property & property_at(INTEGRAL i)
const {
return *this->element_at(i); }
113 template < prototype_
integral INTEGRAL >
114 inline ::property & property_at(INTEGRAL i) {
return *this->element_at(i); }
167 ::collection::index index_of_case_insensitive_payload(const ::payload &
payload, ::collection::index iStart = 0)
const;
168 ::collection::index index_of_case_insensitive_string(const ::scoped_string & scopedstr, ::collection::index iStart = 0)
const;
170 ::collection::index index_of_payload(const ::payload &
payload, ::collection::index iStart = 0)
const;
171 ::collection::index index_of_string(const ::scoped_string & scopedstr, ::collection::index iStart = 0)
const;
175 bool case_insensitive_contains_payload(const ::payload&
payload, ::collection::index iStart = 0)
const {
return index_of_case_insensitive_payload(
payload, iStart)>= 0; }
176 bool case_insensitive_contains_string(const ::scoped_string & scopedstr, ::collection::index iStart = 0)
const {
return index_of_case_insensitive_string(scopedstr, iStart) >= 0; }
178 bool contains_payload(const ::payload &
payload, ::collection::index iStart = 0)
const {
return index_of_payload(
payload, iStart) >= 0; }
179 bool contains_string(const ::scoped_string & scopedstr, ::collection::index iStart = 0)
const {
return index_of_string(scopedstr, iStart) >= 0; }
181 bool case_insensitive_contains_payload_count(const ::payload &
payload, ::collection::count countMin = 1, ::collection::count countMax = -1)
const;
182 bool case_insensitive_contains_string_count(const ::scoped_string & scopedstr, ::collection::count countMin = 1, ::collection::count countMax = -1)
const;
184 bool contains_payload_count(const ::payload &
payload, ::collection::count countMin = 1, ::collection::count countMax = -1)
const;
185 bool contains_string_count(const ::scoped_string & scopedstr, ::collection::count countMin = 1, ::collection::count countMax = -1)
const;
187 bool payload_contains(const ::property_set_base & set)
const;
188 bool string_contains(const ::property_set_base & set)
const;
189 bool contains_keys(const ::property_set_base & set)
const;
190 bool contains(const ::property_set_base & set)
const;
192 bool case_insensitive_erase_first_payload(const ::payload &
payload, ::collection::index iStart = 0);
193 bool case_insensitive_erase_first_string(const ::scoped_string & scopedstr, ::collection::index iStart = 0);
195 bool erase_first_payload(const ::payload &
payload, ::collection::index iStart = 0);
196 bool erase_first_string(const ::scoped_string & scopedstr, ::collection::index iStart = 0);
198 ::collection::count case_insensitive_erase_payload_count(const ::payload &
payload, ::collection::count countMin = 0, ::collection::count countMax = -1);
199 ::collection::count case_insensitive_erase_string_count(const ::scoped_string & scopedstr, ::collection::count countMin = 0, ::collection::count countMax = -1);
201 ::collection::count erase_payload_count(const ::payload &
payload, ::collection::count countMin = 0, ::collection::count countMax = -1);
202 ::collection::count erase_string_count(const ::scoped_string & scopedstr, ::collection::count countMin = 0, ::collection::count countMax = -1);
204 bool has_property(const ::atom &
atom)
const;
206 bool has_replace(const ::atom&
atom, const ::payload &
payload);
208 bool is_true(const ::atom &
atom)
const;
210 bool is_true_or_empty(const ::atom &
atom)
const;
212 bool is_false(const ::atom &
atom)
const {
auto p = find(
atom);
return !p || p->is_false(); }
214 bool is_set_false(const ::atom &
atom)
const {
auto p = find(
atom);
return p && p->is_set_false(); }
216 bool is_set_empty(::collection::count countMinimum = 1)
const;
218 bool has_properties(::collection::count countMinimum = 1)
const;
224 inline ::property& set_at(const ::atom&
atom, const ::payload&
payload);
226 bool _get_string(
string& strResult, const ::atom &
atom)
const;
230 const ::payload & get(const ::atom &
atom)
const;
232 ::f32_array_base get(const ::atom &
atom, const ::f32_array_base & f32a)
const;
233 ::f64_array_base get(const ::atom&
atom, const ::f64_array_base& f64a)
const;
234 ::string get(const ::atom&
atom, const ::scoped_string & scopedstr)
const;
235 ::i32 get(const ::atom&
atom, const ::i32 & i)
const;
236 ::i64 get(const ::atom&
atom, const ::i64 & ll)
const;
237 ::f32 get(const ::atom&
atom, const ::f32 & f)
const;
238 ::f64 get(const ::atom&
atom, const ::f64 & d)
const;
240 bool get_bool(const ::atom &
atom,
bool bDefault =
false)
const;
241 ::i32 get_int(const ::atom &
atom, ::i32 iDefault = 0)
const;
242 ::u32 get_u32(const ::atom &
atom, ::u32 uDefault = 0)
const;
243 ::string get_string(const ::atom &
atom, const ::scoped_string & scopedstrDefault =
nullptr)
const;
244 ::file::path get_file_path(const ::atom &
atom, const ::file::path & pathDefault ={})
const;
313 ::collection::count unset(const ::atom &
atom);
315 bool is_new(const ::atom &
atom)
const;
317 bool is_null(const ::atom &
atom)
const;
319 bool is_new_or_null(const ::atom &
atom)
const;
324 bool is_empty(const ::atom &
atom)
const;
325 bool is_empty()
const { return ::property_holder_array_base::is_empty(); }
326 bool has_property()
const {
return this->has_element(); }
327 ::collection::count property_count()
const {
return this->get_count(); }
330 ::collection::index add_property(const ::atom &
atom) {
return this->add_item(new ::property(
atom)); }
331 ::property * add_property(const ::atom_array_base & atoma);
332 ::collection::index add_property(const ::property & property) {
return this->add_item(new ::property(property)); }
335 inline const ::property & property_at(::collection::index nIndex)
const {
return *this->element_at(nIndex); }
336 inline ::property & property_at(::collection::index nIndex) {
return *this->element_at(nIndex); }
338 inline ::collection::index erase_property_at(::collection::index iIndex) {
return this->
erase_at(iIndex); }
340 inline ::collection::count erase_all_properties() {
return this->erase_all(); }
349 template <
typename TYPE >
350 bool _get(const ::atom &
atom, TYPE & t)
353 auto pproperty = find(
atom);
369 void _008ParseCommandLine(const ::scoped_string & scopedstrCmdLine,
::payload & payloadFile);
370 void _008ParseCommandFork(const ::scoped_string & scopedstrCmdLine,
::payload & payloadFile,
string & strApp);
371 void _008Parse(
bool bApp, const ::scoped_string & scopedstrCmdLine,
::payload & payloadFile,
string & strApp);
372 void _008AddArgumentPairs(::string_array_base & straArguments);
373 void _008AddArgumentOrFile(
::payload & payloadFile, const ::scoped_string & scopedstrArgument);
374 void _008AddArgument(const ::scoped_string & scopedstrArgument);
375 void _008Add(const ::scoped_string & scopedstrKey, const ::scoped_string & scopedstrValue);
377 void _008ParseCommandArguments(string_array_base & straArguments,
::payload & payloadFile,
string & strApp);
378 void _008ParseArguments(
bool bApp, string_array_base & straArguments,
::payload & payloadFile,
string & strApp);
390 string evaluate(const ::scoped_string & scopedstr)
const;
392 bool get_evaluation(::string & str, const ::scoped_string & scopedstrExpression)
const;
395 void parse_ini(const ::scoped_string & scopedstrIni);
396 ::string get_ini()
const;
397 ::string_array_base get_ini_lines()
const;
402 void parse_network_payload(const ::scoped_string & scopedstrNetworkPayload);
403 void parse_network_payload(::ansi_range &
range);
404 void parse_network_arguments(const ::scoped_string & scopedstrUrl);
405 void _parse_network_arguments(const ::scoped_string & scopedstrUrlQuery);
406 enum_network_header parse_network_headers(const ::scoped_string & scopedstrHeaders);
407 enum_network_header parse_network_headers(
const string_array_base & straHeaders, ::collection::index i = 0);
408 void _parse_network_headers(
const string_array_base & straHeaders, ::collection::index i = 0);
411 string & get_network_arguments(
string & str)
const;
412 string & get_network_payload(
string & str,
bool bNewLine =
true)
const;
413 string get_network_arguments()
const {
string str;
return get_network_arguments(str); }
414 string get_network_payload()
const {
string str;
return get_network_payload(str); }
415 string get_command_line(
const string_array_base & straKeys)
const;
416 string get_command_line()
const;
424 virtual string implode(const ::scoped_string & scopedstrGlue)
const;
428 ::property_set_base & operator = (const ::payload &
payload);
433 ::property_set_base & operator += (const ::property_set_base & set);
434 ::property_set_base & operator |= (const ::property_set_base & set);
437 ::property_set_base & append(const ::property_set_base & set);
438 ::property_set_base & merge(const ::property_set_base & set);
440 ::property_set_base & merge(const ::property & property);
445 template < prototype_subparticle T >
446 T * cast(const ::atom &
atom, T * pDefault =
nullptr)
449 if (!has_property(
atom))
456 return operator[](
atom).cast < T > (pDefault);
461 template < prototype_subparticle T >
462 T * cast(const ::atom &
atom, T * pDefault =
nullptr)
const
465 return ((::property_set_base *)
this)->cast < T >(
atom, pDefault);
470 void parse_environment_variable(
const string_array_base & straEnvironment);
472 ::string id_payload_listing()
const;