236class CLASS_DECL_ACME atom
243 enum enum_type : ::i32
262 e_type_dialog_result,
271 e_type_not_an_atom = 127,
274 e_type_text = 1ull << 8,
275 e_type_id_text = e_type_id | e_type_text,
276 e_type_factory_text = e_type_factory | e_type_text,
277 e_type_task_tool_text = e_type_task_tool | e_type_text,
278 e_type_timer_text = e_type_timer | e_type_text,
279 e_type_message_text = e_type_message | e_type_text,
280 e_type_property_text = e_type_property | e_type_text,
281 e_type_command_text = e_type_command | e_type_text,
284 e_type_update_text = e_type_update | e_type_text,
285 e_type_impact_text = e_type_impact | e_type_text,
286 e_type_happening_text = e_type_happening | e_type_text,
287 e_type_element_text = e_type_element | e_type_text,
290 e_type_range = 1ull << 16,
291 e_type_id_range = e_type_id | e_type_range,
292 e_type_factory_range = e_type_factory | e_type_range,
293 e_type_task_tool_range = e_type_task_tool | e_type_range,
294 e_type_timer_range = e_type_timer | e_type_range,
295 e_type_message_range = e_type_message | e_type_range,
296 e_type_property_range = e_type_property | e_type_range,
297 e_type_command_range = e_type_command | e_type_range,
300 e_type_update_range = e_type_update | e_type_range,
301 e_type_impact_range = e_type_impact | e_type_range,
302 e_type_happening_range = e_type_happening | e_type_range,
303 e_type_element_range = e_type_element | e_type_range,
313 enum_impact m_eimpact;
314 enum_property m_eproperty;
315 enum_factory m_efactory;
316 enum_task_tool m_etasktool;
318 ::user::enum_message m_eusermessage;
319 ::enum_message m_emessage;
320 enum_dialog_result m_edialogresult;
321 enum_happening m_ehappening;
322 enum_element m_eelement;
324 e_command m_ecommand;
328 ::ansi_range m_range;
347 inline atom(enum_type etype);
348 inline atom(enum_id eid);
349 inline atom(enum_element eelement);
352 inline atom(::user::enum_message eusermessage);
353 inline atom(::enum_message emessage);
355 inline atom(enum_impact eimpact);
356 inline atom(ENUM_IMPACT EIMPACT);
357 inline atom(enum_property eproperty);
358 inline atom(enum_factory efactory);
359 inline atom(enum_task_tool etasktool);
360 inline atom(enum_timer etimer);
361 inline atom(enum_dialog_result edialogresult);
362 inline atom(enum_happening ehappening);
363 inline atom(enum_check echeck);
364 inline atom(enum_status estatus);
366 inline atom(enum_type etypeAdd,
const atom & atom);
367 inline atom(
const atom & atom);
369 atom(const_char_pointer psz);
370 atom(
const inline_number_string & inlinenumberstring);
371 atom(const ::platform::type & type);
376 template < prototype_
signed SIGNED >
378 template < prototype_
unsigned UNSIGNED >
380 template < prototype_raw_enum ENUM >
382 template<prototype_enumeration ENUMERATION>
383 atom(
const ENUMERATION & e);
384 atom(const ::scoped_string &scopedstr);
389 template < prototype_
character_range RANGE >
390 atom(
const RANGE &
range);
396 template < prototype_payload PAYLOAD >
399 atom(::atom && atom);
405 m_etype = e_type_null;
412 if (is_text() && !is_range())
415 m_str.::string::~string();
431 else if(m_etype < e_type_text)
434 return e_type_integer;
448 enum_type compounded_type(enum_type etypeAdd)
const
452 (((::iptr) m_etype) & (~(::iptr)0xffff)) |
453 ((::iptr)etypeAdd & (::iptr)0xffff)
459 ::atom compounded(enum_type etype)
const
462 return {compounded_type(etype), *
this};
467 void set_compounded_type2(enum_type etype)
470 m_etype = compounded_type(etype);
475 void set_type(enum_type etype)
481 if(!is_text(etype) || is_range(etype))
494 enum_type get_type()
const
502 bool _is_compounded(enum_type etype)
const {
return (m_etype & 0xffff) == etype;}
506 bool is_message()
const {
return m_etype == e_type_message; }
509 bool is_command()
const {
return _is_compounded(e_type_command); }
512 bool is_update()
const {
return _is_compounded(e_type_update); }
515 bool is_true(
bool bDefault =
false)
const;
517 inline bool operator == (
const atom& atom)
const;
518 inline ::std::strong_ordering operator <=> (
const atom & atom)
const;
520 template < prototype_
character_range RANGE >
521 inline bool operator == (
const RANGE & str)
const;
522 template < prototype_
character_range RANGE >
523 inline ::std::strong_ordering operator <=> (
const RANGE & str)
const;
525 template <
character_po
inter CHARACTER_POINTER >
526 inline bool operator == (CHARACTER_POINTER p)
const;
527 template <
character_po
inter CHARACTER_POINTER >
528 inline ::std::strong_ordering operator <=> (CHARACTER_POINTER p)
const;
530 template <
character_count n >
531 inline bool operator == (const ::ansi_character (&cha)[n])
const;
532 template <
character_count n >
533 inline ::std::strong_ordering operator <=> (const ::ansi_character (&cha)[n])
const;
560 template < prototype_
integral INTEGRAL >
561 inline bool operator == (INTEGRAL i)
const;
563 template < prototype_
integral INTEGRAL >
564 inline ::std::strong_ordering operator <=> (INTEGRAL i)
const;
579 inline bool operator == (::enum_id eid)
const;
580 inline ::std::strong_ordering operator <=> (::enum_id eid)
const;
595 inline bool operator == (::enum_command ecommand)
const;
596 inline ::std::strong_ordering operator <=> (::enum_command ecommand)
const;
598 inline bool operator == (::enum_impact eimpact)
const;
599 inline ::std::strong_ordering operator <=> (::enum_impact eid)
const;
601 inline bool operator == (const ::domain_id & domainid)
const;
602 inline ::std::strong_ordering operator <=> (const ::domain_id & domainid)
const;
604 inline bool operator == (::ENUM_IMPACT EIMPACT)
const {
return *
this == (::enum_impact)EIMPACT; }
605 inline ::std::strong_ordering operator <=> (::ENUM_IMPACT EIMPACT)
const {
return *this <=> (::enum_impact)EIMPACT; }
608 inline bool operator == (::user::enum_message eusermessage)
const;
609 inline ::std::strong_ordering operator <=> (::user::enum_message eusermessage)
const;
610 inline bool operator==(::enum_message emessage)
const;
611 inline ::std::strong_ordering operator<=>(::enum_message emessage)
const;
637 inline bool operator == (::enum_dialog_result edialogresult)
const;
638 inline ::std::strong_ordering operator <=> (::enum_dialog_result edialogresult)
const;
646 inline bool operator == (::enum_happening ehappening)
const;
647 inline ::std::strong_ordering operator <=> (::enum_happening ehappening)
const;
654 atom & operator = (
const atom & atom);
685 inline ::i64 as_i64()
const;
686 inline ::iptr as_iptr()
const;
687 inline ::i32 as_i32()
const {
return (::i32) as_i64(); }
688 inline ::u32 as_u32()
const {
return (::u32) as_i64(); }
689 inline ::collection::index as_index()
const {
return (::collection::index)as_i64(); }
690 inline ::u32 as_umessage()
const {
return as_u32(); }
691 inline ::user::enum_message as_eusermessage()
const;
692 inline ::enum_message as_emessage1()
const;
693 inline ::enum_id as_eid()
const;
698#define IMPLEMENT_ATOM_ENUMERATION(ENUMTYPE) \
699 constexpr ::e_ ## ENUMTYPE as_e ## ENUMTYPE() const { return (m_etype == e_type_ ## ENUMTYPE) ? m_e ## ENUMTYPE : (::e_ ## ENUMTYPE) (::enum_ ## ENUMTYPE) 0; } \
700 ::e_ ## ENUMTYPE & e ## ENUMTYPE ## _reference() { set_type(e_type_ ## ENUMTYPE); return m_e ## ENUMTYPE; } \
701 constexpr atom(const ::e_ ## ENUMTYPE & e):m_etype(e_type_ ## ENUMTYPE), m_iLargest((::iptr)e) { }
709 IMPLEMENT_ATOM_ENUMERATION(
status);
710 IMPLEMENT_ATOM_ENUMERATION(command);
711 IMPLEMENT_ATOM_ENUMERATION(check);
712#undef IMPLEMENT_ATOM_ENUMERATION
722 ::string as_string()
const;
729 inline bool is_null()
const;
730 inline bool is_empty()
const;
731 inline bool has_character()
const;
732 inline bool is_set()
const {
return !is_empty(); }
739 inline ::std::strong_ordering case_insensitive_order(const ::scoped_string & scopedstr)
const;
742 inline bool begins(const ::scoped_string & scopedstrPrefix)
const;
743 inline bool case_insensitive_begins(const ::scoped_string & scopedstrPrefix)
const;
745 inline bool ends(const ::scoped_string & scopedstrSuffix)
const;
746 inline bool case_insensitive_ends(const ::scoped_string & scopedstrSuffix)
const;
749 constexpr static bool is_text(enum_type etype) {
return etype >= e_type_text; }
750 constexpr static bool is_range(enum_type etype) {
return etype >= e_type_range; }
751 constexpr static bool is_integer(enum_type etype) {
return etype >= 0 && etype < e_type_text; }
754 constexpr bool is_text()
const {
return is_text(m_etype); }
755 constexpr bool is_range()
const {
return is_range(m_etype); }
756 constexpr bool is_integer()
const {
return is_integer(m_etype); }
764 inline ::string operator +(const_char_pointer psz)
const;
765 inline ::string operator +(const ::scoped_string & scopedstr)
const;
768 operator ::hash32()
const
772 (((::u32)m_etype) << 24)
776 ::as_hash32(m_str.c_str()).m_u :
777 ((((::u32)m_uLargest) >> 8) & 0xffffffffu)