Aggiunto metodo set_link
git-svn-id: svn://10.65.10.50/trunk@647 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
55fc8fb766
commit
c6ea2b6adb
@ -1,4 +1,4 @@
|
|||||||
// $Id: relapp.cpp,v 1.29 1994-11-16 15:51:05 guy Exp $
|
// $Id: relapp.cpp,v 1.30 1994-11-17 12:15:01 alex Exp $
|
||||||
#include <mailbox.h>
|
#include <mailbox.h>
|
||||||
#include <sheet.h>
|
#include <sheet.h>
|
||||||
#include <urldefid.h>
|
#include <urldefid.h>
|
||||||
@ -892,3 +892,31 @@ bool TRelation_application::filter()
|
|||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void TRelation_application::set_link(TMask * m, const char * keyexpr)
|
||||||
|
|
||||||
|
{
|
||||||
|
CHECK(m != NULL, "Invalid mask pointer");
|
||||||
|
CHECK(keyexpr != NULL, "Invalid expression");
|
||||||
|
TToken_string body(keyexpr);
|
||||||
|
const int key = body.get_int();
|
||||||
|
|
||||||
|
_lnflag = TRUE;
|
||||||
|
|
||||||
|
const char* v = body.get();
|
||||||
|
|
||||||
|
const int max = m->fields();
|
||||||
|
for (int i = 0; i < max && v != NULL; i++)
|
||||||
|
{
|
||||||
|
TMask_field& f = m->fld(i);
|
||||||
|
|
||||||
|
if (f.active() && f.dlg() > 0 && f.in_key(key))
|
||||||
|
{
|
||||||
|
const TString s(v);
|
||||||
|
_fixed.add(format("%d=%s", f.dlg(), (const char*) s));
|
||||||
|
v = body.get();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -104,6 +104,7 @@ public:
|
|||||||
virtual ~TRelation_application();
|
virtual ~TRelation_application();
|
||||||
bool filtered() const { return _fixed.not_empty(); }
|
bool filtered() const { return _fixed.not_empty(); }
|
||||||
bool find(byte key = 0);
|
bool find(byte key = 0);
|
||||||
|
void set_link(TMask * m, const char * keyexpr);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user