Aggiunti metodi sget() per ottenere oggetti TString completi anziche'
reference. git-svn-id: svn://10.65.10.50/trunk@2091 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
383d6b0feb
commit
f8f3f0b241
@ -100,6 +100,7 @@ public:
|
|||||||
const char* get_str(const char* fieldname) const ;
|
const char* get_str(const char* fieldname) const ;
|
||||||
#ifndef FOXPRO
|
#ifndef FOXPRO
|
||||||
const TString& get(const char* fieldname) const ;
|
const TString& get(const char* fieldname) const ;
|
||||||
|
TString sget(const char* fieldname) const { return ((TString)get(fieldname)); }
|
||||||
int get_int(const char* fieldname) const ;
|
int get_int(const char* fieldname) const ;
|
||||||
long get_long(const char* fieldname) const ;
|
long get_long(const char* fieldname) const ;
|
||||||
word get_word(const char* fieldname) const ;
|
word get_word(const char* fieldname) const ;
|
||||||
@ -134,6 +135,8 @@ public:
|
|||||||
void zero(); // Vuota tutto il record
|
void zero(); // Vuota tutto il record
|
||||||
void zero(char c); // Vuota tutto il record usando il carattere c
|
void zero(char c); // Vuota tutto il record usando il carattere c
|
||||||
|
|
||||||
|
void blank(const char * fieldname) { put(fieldname, " "); } // Riempie il campo di spazi
|
||||||
|
|
||||||
TRectype& operator =(const TRectype& rec); // assegnazione tra TRectype
|
TRectype& operator =(const TRectype& rec); // assegnazione tra TRectype
|
||||||
TRectype& operator =(const char* rec); // assegnazione tra TRectype
|
TRectype& operator =(const char* rec); // assegnazione tra TRectype
|
||||||
TRectype& operator =(const TBaseisamfile& f);
|
TRectype& operator =(const TBaseisamfile& f);
|
||||||
@ -274,6 +277,8 @@ public:
|
|||||||
#ifndef FOXPRO
|
#ifndef FOXPRO
|
||||||
const TString& get(const char* fieldname) const
|
const TString& get(const char* fieldname) const
|
||||||
{ return curr().get(fieldname);}
|
{ return curr().get(fieldname);}
|
||||||
|
TString sget(const char* fieldname) const
|
||||||
|
{ return ((TString)get(fieldname)); }
|
||||||
void put(const char* fieldname, int val)
|
void put(const char* fieldname, int val)
|
||||||
{ curr().put(fieldname, val);}
|
{ curr().put(fieldname, val);}
|
||||||
void put(const char* fieldname, long val)
|
void put(const char* fieldname, long val)
|
||||||
@ -303,6 +308,7 @@ public:
|
|||||||
void zero(const char * fieldname) { curr().zero(fieldname);}
|
void zero(const char * fieldname) { curr().zero(fieldname);}
|
||||||
void zero() { curr().zero();}
|
void zero() { curr().zero();}
|
||||||
void zero(char c) { curr().zero(c);}
|
void zero(char c) { curr().zero(c);}
|
||||||
|
void blank(const char * fieldname) { curr().blank(fieldname); }
|
||||||
TRectype& operator =(const TRectype& rec) { return curr() = rec;}
|
TRectype& operator =(const TRectype& rec) { return curr() = rec;}
|
||||||
|
|
||||||
TBaseisamfile(int logicnum, bool linkrecinst = FALSE);
|
TBaseisamfile(int logicnum, bool linkrecinst = FALSE);
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// $Id: relapp.cpp,v 1.68 1995-10-25 09:43:44 guy Exp $
|
// $Id: relapp.cpp,v 1.69 1995-11-06 10:41:25 gianluca Exp $
|
||||||
#include <mailbox.h>
|
#include <mailbox.h>
|
||||||
#include <sheet.h>
|
#include <sheet.h>
|
||||||
#include <urldefid.h>
|
#include <urldefid.h>
|
||||||
@ -745,7 +745,7 @@ bool TRelation_application::remove()
|
|||||||
bool TRelation_application::firm_change_enabled() const
|
bool TRelation_application::firm_change_enabled() const
|
||||||
{
|
{
|
||||||
bool ok = TApplication::firm_change_enabled();
|
bool ok = TApplication::firm_change_enabled();
|
||||||
if (ok) ok = curr_mask().query_mode();
|
if (ok) ok = _mask == NULL || _mask->query_mode();
|
||||||
return ok;
|
return ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -110,6 +110,15 @@ public:
|
|||||||
// @cmember Ritorna l'oggetto TString composto dai count caratteri da destra
|
// @cmember Ritorna l'oggetto TString composto dai count caratteri da destra
|
||||||
const TString& right(int count) const;
|
const TString& right(int count) const;
|
||||||
|
|
||||||
|
// @cmember Ritorna un oggetto TString temporaneo composto dai count caratteri da sinistra
|
||||||
|
TString sleft(int count) const { return ((TString)left(count)); }
|
||||||
|
// @cmember Ritorna un oggetto TString temporaneo composto dai count caratteri a partire da from
|
||||||
|
TString smid(int from, int count = -1) const { return ((TString)mid(from, count)); }
|
||||||
|
// @cmember Ritorna un oggetto TString temporaneo composto dai caratteri da from a to (escluso)
|
||||||
|
TString ssub(int from, int to = -1) const { return ((TString)sub(from, to)); }
|
||||||
|
// @cmember Ritorna un oggetto TString temporaneo composto dai count caratteri da destra
|
||||||
|
TString sright(int count) const { return ((TString)right(count)); }
|
||||||
|
|
||||||
// @cmember Riempe la stringa con n caratteri c
|
// @cmember Riempe la stringa con n caratteri c
|
||||||
TString& fill(char c, int n = -1);
|
TString& fill(char c, int n = -1);
|
||||||
// @cmember Riempe la stringa con n caratteri spazio (chiama <mf TString::resize>)
|
// @cmember Riempe la stringa con n caratteri spazio (chiama <mf TString::resize>)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user