70 typedef std::pair<std::string, Ex::iterator>
kvpair_t;
159 virtual void latex(std::ostream&)
const;
161 virtual std::string
name()
const=0;
207 virtual std::string
name()
const
209 return std::string(
"Stay Away");
218 virtual std::string
name()
const
220 return std::string(
"PropertyInherit");
242 typedef internal_property_map_t::iterator
iterator;
262 typedef std::multimap<nset_t::iterator, pat_prop_pair_t, nset_it_less>
property_map_t;
283 template<
class T>
const T*
get(Ex::iterator,
const std::string& label)
const;
284 template<
class T>
const T*
get(Ex::iterator,
int&
serialnum,
const std::string& label,
bool doserial=
true)
const;
287 template<
class T>
const T*
get(Ex::iterator, Ex::iterator,
int&,
int&,
bool ignore_parent_rel=
false)
const;
294 const std::string& label,
299 const std::string& label,
358 int&
serialnum,
const std::string& label,
361 std::pair<const T*, const pattern *>
ret;
368 std::pair<property_map_t::const_iterator, property_map_t::const_iterator>
pit=
props.equal_range(it->name_only());
379 if(std::is_same<T, Accent>::value)
383 property_map_t::const_iterator walk=
pit.first;
384 while(walk!=
pit.second) {
385 if(
wildcards==(*walk).second.first->children_wildcard()) {
387 ret.first=
dynamic_cast<const T *
>((*walk).second.second);
390 ret.second=(*walk).second.first;
403 else if(
dynamic_cast<const Inherit<T> *
>((*walk).second.second))
417 if(std::is_same<T, LaTeXForm>::value)
423 Ex::sibling_iterator
sib=it.begin();
424 while(
sib!=it.end()) {
467 std::pair<property_map_t::const_iterator, property_map_t::const_iterator>
pit1=
props.equal_range(
it1->name_only());
468 std::pair<property_map_t::const_iterator, property_map_t::const_iterator>
pit2=
props.equal_range(
it2->name_only());
470 property_map_t::const_iterator
walk1=
pit1.first;
473 ret1=
dynamic_cast<const T *
>((*walk1).second.second);
475 property_map_t::const_iterator
walk2=
pit2.first;
478 ret2=
dynamic_cast<const T *
>((*walk2).second.second);
websocketpp::client< websocketpp::config::asio_client > client
Definition ComputeThread.cc:15
A generic tree comparison class which will take into account index contractions and will also keep tr...
Definition Compare.hh:192
Basic storage class for symbolic mathemematical expressions.
Definition Storage.hh:142
If a property X derives from Inherit<Y>, and get<Y> is called on an object which has an X property (b...
Definition Props.hh:204
virtual ~Inherit()
Definition Props.hh:206
virtual std::string name() const
Definition Props.hh:207
internal_property_map_t store
Definition Props.hh:244
internal_property_map_t::iterator iterator
Definition Props.hh:242
std::map< std::string, property *(*)() internal_property_map_t)
Definition Props.hh:241
~registered_property_map_t()
Definition Props.cc:175
Class holding a collection of properties attached to expressions.
Definition Props.hh:234
void insert_list_prop(const std::vector< Ex > &, const list_property *)
Definition Props.cc:435
Ex::iterator head(Ex::iterator, bool ignore_parent_rel=false) const
Definition Props.hh:532
std::pair< pattern *, const property * > pat_prop_pair_t
Definition Props.hh:253
std::string master_insert(Ex proptree, const property *thepropbase)
Register a property for the indicated Ex.
Definition Props.cc:580
std::pair< const T *, const pattern * > get_with_pattern_ext(Ex::iterator, Ex_comparator &, int &serialnum, const std::string &label, bool doserial=true, bool ignore_parent_rel=false) const
Definition Props.hh:357
pattern_map_t pats
Definition Props.hh:277
registered_property_map_t registered_properties
Definition Props.hh:252
bool check_label(const property *, const std::string &) const
Definition Props.cc:643
std::multimap< const property *, pattern * > pattern_map_t
Definition Props.hh:263
void register_property(property *(*)(), const std::string &name)
Registering properties.
Definition Props.cc:180
std::multimap< nset_t::iterator, pat_prop_pair_t, nset_it_less > property_map_t
We keep two multi-maps: one from the pattern to the property (roughly) and one from the property to t...
Definition Props.hh:262
bool has(const property *, Ex::iterator)
Definition Props.cc:140
Ex_comparator * create_comparator() const
Definition Props.cc:653
std::pair< const T *, const pattern * > get_with_pattern(Ex::iterator, int &serialnum, const std::string &label, bool doserial=true, bool ignore_parent_rel=false) const
General property finder, which will return not only the property but also the pattern which matched t...
Definition Props.hh:346
void destroy_comparator(Ex_comparator *) const
Definition Props.cc:658
const T * get(Ex::iterator, bool ignore_parent_rel=false) const
Normal search: given a pattern, get its property if any.
Definition Props.hh:332
void insert_prop(const Ex &, const property *)
Definition Props.cc:349
property_map_t props
The following two maps own the pointers to the properties and patterns stored in them; use clear() to...
Definition Props.hh:276
int serial_number(const property *, const pattern *) const
Definition Props.cc:530
void clear()
Definition Props.cc:156
PropertyInherit is like Inherit<T> for all properties.
Definition Props.hh:216
virtual std::string name() const
Definition Props.hh:218
Arguments to properties get parsed into a keyval_t structure.
Definition Props.hh:68
kvlist_t::const_iterator const_iterator
Definition Props.hh:73
std::list< kvpair_t > kvlist_t
Definition Props.hh:71
void push_back(const kvpair_t &)
Definition Props.cc:217
const_iterator end() const
Definition Props.cc:212
kvlist_t keyvals
Definition Props.hh:85
kvlist_t::iterator iterator
Definition Props.hh:74
const_iterator begin() const
Definition Props.cc:207
std::pair< std::string, Ex::iterator > kvpair_t
Definition Props.hh:70
kvpair_t value_type
Definition Props.hh:75
void erase(iterator)
Definition Props.cc:222
const_iterator find(const std::string &) const
Definition Props.cc:185
std::string label
Definition Props.hh:187
virtual bool parse(Kernel &, std::shared_ptr< Ex >, keyval_t &) override
Definition Props.cc:320
Something cannot be both a list property and a normal property at the same time, so we can safely inh...
Definition Props.hh:193
bool match(const Properties &, const Ex::iterator &, bool ignore_parent_rel=false, bool ignore_properties=false) const
Match a pattern to an expression.
Definition Props.cc:43
bool match_ext(const Properties &, const Ex::iterator &, Ex_comparator &comp, bool ignore_parent_rel=false, bool ignore_properties=false) const
As match, but using a comparator object which is externally provided, so that the caller can use the ...
Definition Props.cc:49
Ex obj
Definition Props.hh:63
bool children_wildcard() const
Definition Props.cc:132
pattern()
Definition Props.cc:34
Base class for all properties, handling argument parsing and defining the interface.
Definition Props.hh:127
virtual match_t equals(const property *) const
Definition Props.cc:315
property(bool hidden=false)
Definition Props.cc:228
virtual bool parse(Kernel &, keyval_t &keyvals)
Definition Props.cc:243
virtual void latex(std::ostream &) const
Display the property on the stream.
Definition Props.cc:305
bool parse_to_keyvals(const Ex &, keyval_t &)
Definition Props.cc:279
virtual std::string unnamed_argument() const
Definition Props.cc:310
bool parse_one_argument(Ex::iterator arg, keyval_t &keyvals)
Definition Props.cc:259
bool hidden(void) const
Definition Props.cc:238
bool hidden_
Definition Props.hh:181
virtual ~property()
Definition Props.hh:130
virtual std::string name() const =0
match_t
Definition Props.hh:170
@ exact_match
Definition Props.hh:170
@ no_match
Definition Props.hh:170
@ id_match
Definition Props.hh:170
virtual void validate(const Kernel &, const Ex &) const
Definition Props.cc:255
Functions to handle the exchange properties of two or more symbols in a product.
Definition Adjform.cc:83