Changeset 3664


Ignore:
Timestamp:
Mar 31, 2008, 10:35:15 PM (13 years ago)
Author:
orlov
Message:
  • Added some operators to TExpr.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • to-imperative/trunk/opents/samples/trefal.hh

    r3588 r3664  
    1212public:
    1313    bool operator== (TExpr& _e);
     14    TExpr operator+ (TExpr& _e);
     15    TExpr (TExpr& _e, size_t _start, size_t len); // subexpression
     16    TExpr (TExpr& _e, size_t _pos);             // dereference
    1417};
    1518
     
    269272}
    270273
    271 bool TExpr::operator== (TExpr& _e) {
     274inline bool TExpr::operator== (TExpr& _e) {
    272275    return d.cellOffset == _e.d.cellOffset || (Expr&)*this == (Expr&)_e;
    273276}
    274277
     278inline TExpr TExpr::operator+ (TExpr& _e) {
     279    Expr*[] exprs = { &(Expr&)*this, &(Expr&)_e };
     280    TExpr e;
     281    ((Expr&)e).init_concat(exprs, 2);
     282    return e;
     283}
     284
     285inline TExpr::TExpr (TExpr& _e, size_t _start, size_t len) {
     286    ((Expr&)*this).init_subexpr(_e, _start, _len);
     287}
     288
     289inline TExpr::TExpr (TExpr& _e, size_t _pos) {
     290}
Note: See TracChangeset for help on using the changeset viewer.