// types
/** Symbols as keys to expressions - only for ginsh. */
- class assigned_ex_info {
- friend class ptr<assigned_ex_info>;
+ class assigned_ex_info : public refcounted {
public:
- assigned_ex_info(); ///< Default ctor
- bool is_assigned; ///< True if there is an expression assigned
- ex assigned_expression; ///< The actual expression
- private:
- size_t refcount; ///< Reference counter, managed by ptr<assigned_ex_info>
+ assigned_ex_info() throw(); ///< Default ctor
+ bool is_assigned; ///< True if there is an expression assigned
+ ex assigned_expression; ///< The actual expression
};
// member functions
// other constructors
public:
explicit symbol(const std::string & initname);
- explicit symbol(const std::string & initname, const std::string & texname);
+ symbol(const std::string & initname, const std::string & texname);
+ symbol(const std::string & initname, unsigned rt, unsigned rtt);
+ symbol(const std::string & initname, const std::string & texname, unsigned rt, unsigned rtt);
// functions overriding virtual functions from base classes
public:
ex series(const relational & s, int order, unsigned options = 0) const;
ex subs(const exmap & m, unsigned options = 0) const { return subs_one_level(m, options); } // overwrites basic::subs() for performance reasons
ex normal(exmap & repl, exmap & rev_lookup, int level = 0) const;
- ex to_rational(lst &repl_lst) const;
- ex to_polynomial(lst &repl_lst) const;
+ ex to_rational(exmap & repl) const;
+ ex to_polynomial(exmap & repl) const;
+ unsigned return_type() const { return ret_type; }
+ unsigned return_type_tinfo() const { return ret_type_tinfo; }
protected:
ex derivative(const symbol & s) const;
bool is_equal_same_type(const basic & other) const;
unsigned serial; ///< unique serial number for comparison
std::string name; ///< printname of this symbol
std::string TeX_name; ///< LaTeX name of this symbol
+ unsigned ret_type; ///< value returned by return_type()
+ unsigned ret_type_tinfo; ///< value returned by return_type_tinfo()
private:
static unsigned next_serial;
};