52 class CLASS_DECL_ACME table :
53 virtual public ::particle
60 atom_map_base < locale > m_map;
67 inline const locale * get_locale(const ::atom & idLocale)
const
70 return m_map.defer_get(idLocale);
75 virtual void initialize(::particle * pparticle)
override;
78 inline auto& operator[](const ::atom&
atom) {
return m_map[
atom]; }
79 inline auto& operator[](const ::atom&
atom)
const {
return m_map[
atom]; }
81 void set(const ::atom &
atom, const ::atom & idLocale, const ::atom & idSchema, const ::scoped_string & scopedstr);
82 bool _get(::string & str, const ::text::context* pcontext, const ::atom&
atom)
const;
83 string get(const ::text::context * pcontext, const ::atom &
atom,
bool bIdAsDefaultValue =
true)
const;
84 string get(const ::text::context * pcontext,const ::atom &
atom,const ::scoped_string & scopedstrLocale,const ::scoped_string & scopedstrSchema,
bool bIdAsDefaultValue =
true)
const;
85 void get(string_array_base & stra, const ::text::context * pcontext, const ::atom &
atom)
const;
86 void _get(string_array_base & stra, const ::text::context * pcontext, const ::atom &
atom)
const ;
88 bool load(const ::scoped_string & scopedstrBaseDir);
89 bool load_uistr_file(const ::atom & idLocale, const ::atom & idSchema,
::file::file * pfile);
91 string body(const ::scoped_string & scopedstr);
93 bool matches(const ::text::context * pcontext, const ::atom &
atom, const ::scoped_string & scopedstr)
const;
94 bool begins(const ::text::context * pcontext, const ::scoped_string & scopedstr, const ::atom &
atom)
const;
95 bool begins_eat(const ::text::context * pcontext,
string & str, const ::atom &
atom)
const;
101 class CLASS_DECL_ACME context :
102 virtual public ::particle
109 ::pointer<::text::international::locale_schema> m_plocaleschema;
111 ::pointer<table> m_ptable;
113 ::pointer<locale> m_plocale;
115 ::pointer<schema> m_pschema;
116 ::pointer<schema> m_pschemaLocale;
117 ::pointer<schema> m_pschemaSchemaEn;
118 ::pointer<schema> m_pschemaSchemaStd;
122 pointer_array < schema > m_schemaptra;
133 ::i64 increment_reference_count()
override
136 return ::particle::increment_reference_count();
141 ::i64 decrement_reference_count()
override
144 return ::particle::decrement_reference_count();
151 inline void defer_ok(table * ptable)
154 if (ptable != m_ptable)
166 void set_table(table* ptable);
171 const string_array_base & locale_ex()
const;
173 const string_array_base & schema_ex()
const;
176 inline ::text::international::locale_schema * localeschema()
179 return m_plocaleschema;
184 inline const ::text::international::locale_schema & localeschema()
const
187 return *m_plocaleschema;
192 inline bool matches(const ::atom &
atom, const ::scoped_string & scopedstr)
const
195 return m_ptable->matches(
this,
atom, scopedstr);
200 inline bool begins(const ::atom &
atom, const ::scoped_string & scopedstr)
const
203 return m_ptable->begins(
this, scopedstr,
atom);
208 inline bool begins_eat(
string & str, const ::atom &
atom)
const
211 return m_ptable->begins_eat(
this, str,
atom);
216 inline void get(string_array_base & stra, const ::atom &
atom)
const
219 return m_ptable->get(stra,
this,
atom);
225 inline string get(const ::atom&
atom)
const
228 if (m_ptable ==
nullptr)
231 return atom.as_string();
235 return m_ptable->get(
this,
atom);