Skip to content

Commit 56b70d3

Browse files
committed
Renamed functions in new interfaces according to Vlad's suggestion
1 parent 1b8b7d3 commit 56b70d3

File tree

4 files changed

+78
-78
lines changed

4 files changed

+78
-78
lines changed

src/include/firebird/FirebirdInterface.idl

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1374,18 +1374,18 @@ interface DecFloat16 : Versioned
13741374
{
13751375
const uint BCD_SIZE = 16;
13761376
const uint STRING_SIZE = 25; // includes terminating \0
1377-
void scatter(const FB_DEC16* from, int* sign, uchar* bcd, int* exp);
1378-
void toStr(const FB_DEC16* from, string to);
1379-
void gather(int sign, const uchar* bcd, int exp, FB_DEC16* to);
1380-
void fromStr(Status status, const string from, FB_DEC16* to);
1377+
void toBcd(const FB_DEC16* from, int* sign, uchar* bcd, int* exp);
1378+
void toString(const FB_DEC16* from, string to);
1379+
void fromBcd(int sign, const uchar* bcd, int exp, FB_DEC16* to);
1380+
void fromString(Status status, const string from, FB_DEC16* to);
13811381
}
13821382

13831383
interface DecFloat34 : Versioned
13841384
{
13851385
const uint BCD_SIZE = 34;
13861386
const uint STRING_SIZE = 43; // includes terminating \0
1387-
void scatter(const FB_DEC34* from, int* sign, uchar* bcd, int* exp);
1388-
void toStr(const FB_DEC34* from, string to);
1389-
void gather(int sign, const uchar* bcd, int exp, FB_DEC34* to);
1390-
void fromStr(Status status, const string from, FB_DEC34* to);
1387+
void toBcd(const FB_DEC34* from, int* sign, uchar* bcd, int* exp);
1388+
void toString(const FB_DEC34* from, string to);
1389+
void fromBcd(int sign, const uchar* bcd, int exp, FB_DEC34* to);
1390+
void fromString(Status status, const string from, FB_DEC34* to);
13911391
}

src/include/firebird/IdlFbInterfaces.h

Lines changed: 56 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -5306,10 +5306,10 @@ namespace Firebird
53065306
public:
53075307
struct VTable : public IVersioned::VTable
53085308
{
5309-
void (CLOOP_CARG *scatter)(IDecFloat16* self, const FB_DEC16* from, int* sign, unsigned char* bcd, int* exp) throw();
5310-
void (CLOOP_CARG *toStr)(IDecFloat16* self, const FB_DEC16* from, char* to) throw();
5311-
void (CLOOP_CARG *gather)(IDecFloat16* self, int sign, const unsigned char* bcd, int exp, FB_DEC16* to) throw();
5312-
void (CLOOP_CARG *fromStr)(IDecFloat16* self, IStatus* status, const char* from, FB_DEC16* to) throw();
5309+
void (CLOOP_CARG *toBcd)(IDecFloat16* self, const FB_DEC16* from, int* sign, unsigned char* bcd, int* exp) throw();
5310+
void (CLOOP_CARG *toString)(IDecFloat16* self, const FB_DEC16* from, char* to) throw();
5311+
void (CLOOP_CARG *fromBcd)(IDecFloat16* self, int sign, const unsigned char* bcd, int exp, FB_DEC16* to) throw();
5312+
void (CLOOP_CARG *fromString)(IDecFloat16* self, IStatus* status, const char* from, FB_DEC16* to) throw();
53135313
};
53145314

53155315
protected:
@@ -5328,25 +5328,25 @@ namespace Firebird
53285328
static const unsigned BCD_SIZE = 16;
53295329
static const unsigned STRING_SIZE = 25;
53305330

5331-
void scatter(const FB_DEC16* from, int* sign, unsigned char* bcd, int* exp)
5331+
void toBcd(const FB_DEC16* from, int* sign, unsigned char* bcd, int* exp)
53325332
{
5333-
static_cast<VTable*>(this->cloopVTable)->scatter(this, from, sign, bcd, exp);
5333+
static_cast<VTable*>(this->cloopVTable)->toBcd(this, from, sign, bcd, exp);
53345334
}
53355335

5336-
void toStr(const FB_DEC16* from, char* to)
5336+
void toString(const FB_DEC16* from, char* to)
53375337
{
5338-
static_cast<VTable*>(this->cloopVTable)->toStr(this, from, to);
5338+
static_cast<VTable*>(this->cloopVTable)->toString(this, from, to);
53395339
}
53405340

5341-
void gather(int sign, const unsigned char* bcd, int exp, FB_DEC16* to)
5341+
void fromBcd(int sign, const unsigned char* bcd, int exp, FB_DEC16* to)
53425342
{
5343-
static_cast<VTable*>(this->cloopVTable)->gather(this, sign, bcd, exp, to);
5343+
static_cast<VTable*>(this->cloopVTable)->fromBcd(this, sign, bcd, exp, to);
53445344
}
53455345

5346-
template <typename StatusType> void fromStr(StatusType* status, const char* from, FB_DEC16* to)
5346+
template <typename StatusType> void fromString(StatusType* status, const char* from, FB_DEC16* to)
53475347
{
53485348
StatusType::clearException(status);
5349-
static_cast<VTable*>(this->cloopVTable)->fromStr(this, status, from, to);
5349+
static_cast<VTable*>(this->cloopVTable)->fromString(this, status, from, to);
53505350
StatusType::checkException(status);
53515351
}
53525352
};
@@ -5356,10 +5356,10 @@ namespace Firebird
53565356
public:
53575357
struct VTable : public IVersioned::VTable
53585358
{
5359-
void (CLOOP_CARG *scatter)(IDecFloat34* self, const FB_DEC34* from, int* sign, unsigned char* bcd, int* exp) throw();
5360-
void (CLOOP_CARG *toStr)(IDecFloat34* self, const FB_DEC34* from, char* to) throw();
5361-
void (CLOOP_CARG *gather)(IDecFloat34* self, int sign, const unsigned char* bcd, int exp, FB_DEC34* to) throw();
5362-
void (CLOOP_CARG *fromStr)(IDecFloat34* self, IStatus* status, const char* from, FB_DEC34* to) throw();
5359+
void (CLOOP_CARG *toBcd)(IDecFloat34* self, const FB_DEC34* from, int* sign, unsigned char* bcd, int* exp) throw();
5360+
void (CLOOP_CARG *toString)(IDecFloat34* self, const FB_DEC34* from, char* to) throw();
5361+
void (CLOOP_CARG *fromBcd)(IDecFloat34* self, int sign, const unsigned char* bcd, int exp, FB_DEC34* to) throw();
5362+
void (CLOOP_CARG *fromString)(IDecFloat34* self, IStatus* status, const char* from, FB_DEC34* to) throw();
53635363
};
53645364

53655365
protected:
@@ -5378,25 +5378,25 @@ namespace Firebird
53785378
static const unsigned BCD_SIZE = 34;
53795379
static const unsigned STRING_SIZE = 43;
53805380

5381-
void scatter(const FB_DEC34* from, int* sign, unsigned char* bcd, int* exp)
5381+
void toBcd(const FB_DEC34* from, int* sign, unsigned char* bcd, int* exp)
53825382
{
5383-
static_cast<VTable*>(this->cloopVTable)->scatter(this, from, sign, bcd, exp);
5383+
static_cast<VTable*>(this->cloopVTable)->toBcd(this, from, sign, bcd, exp);
53845384
}
53855385

5386-
void toStr(const FB_DEC34* from, char* to)
5386+
void toString(const FB_DEC34* from, char* to)
53875387
{
5388-
static_cast<VTable*>(this->cloopVTable)->toStr(this, from, to);
5388+
static_cast<VTable*>(this->cloopVTable)->toString(this, from, to);
53895389
}
53905390

5391-
void gather(int sign, const unsigned char* bcd, int exp, FB_DEC34* to)
5391+
void fromBcd(int sign, const unsigned char* bcd, int exp, FB_DEC34* to)
53925392
{
5393-
static_cast<VTable*>(this->cloopVTable)->gather(this, sign, bcd, exp, to);
5393+
static_cast<VTable*>(this->cloopVTable)->fromBcd(this, sign, bcd, exp, to);
53945394
}
53955395

5396-
template <typename StatusType> void fromStr(StatusType* status, const char* from, FB_DEC34* to)
5396+
template <typename StatusType> void fromString(StatusType* status, const char* from, FB_DEC34* to)
53975397
{
53985398
StatusType::clearException(status);
5399-
static_cast<VTable*>(this->cloopVTable)->fromStr(this, status, from, to);
5399+
static_cast<VTable*>(this->cloopVTable)->fromString(this, status, from, to);
54005400
StatusType::checkException(status);
54015401
}
54025402
};
@@ -16536,59 +16536,59 @@ namespace Firebird
1653616536
VTableImpl()
1653716537
{
1653816538
this->version = Base::VERSION;
16539-
this->scatter = &Name::cloopscatterDispatcher;
16540-
this->toStr = &Name::clooptoStrDispatcher;
16541-
this->gather = &Name::cloopgatherDispatcher;
16542-
this->fromStr = &Name::cloopfromStrDispatcher;
16539+
this->toBcd = &Name::clooptoBcdDispatcher;
16540+
this->toString = &Name::clooptoStringDispatcher;
16541+
this->fromBcd = &Name::cloopfromBcdDispatcher;
16542+
this->fromString = &Name::cloopfromStringDispatcher;
1654316543
}
1654416544
} vTable;
1654516545

1654616546
this->cloopVTable = &vTable;
1654716547
}
1654816548

16549-
static void CLOOP_CARG cloopscatterDispatcher(IDecFloat16* self, const FB_DEC16* from, int* sign, unsigned char* bcd, int* exp) throw()
16549+
static void CLOOP_CARG clooptoBcdDispatcher(IDecFloat16* self, const FB_DEC16* from, int* sign, unsigned char* bcd, int* exp) throw()
1655016550
{
1655116551
try
1655216552
{
16553-
static_cast<Name*>(self)->Name::scatter(from, sign, bcd, exp);
16553+
static_cast<Name*>(self)->Name::toBcd(from, sign, bcd, exp);
1655416554
}
1655516555
catch (...)
1655616556
{
1655716557
StatusType::catchException(0);
1655816558
}
1655916559
}
1656016560

16561-
static void CLOOP_CARG clooptoStrDispatcher(IDecFloat16* self, const FB_DEC16* from, char* to) throw()
16561+
static void CLOOP_CARG clooptoStringDispatcher(IDecFloat16* self, const FB_DEC16* from, char* to) throw()
1656216562
{
1656316563
try
1656416564
{
16565-
static_cast<Name*>(self)->Name::toStr(from, to);
16565+
static_cast<Name*>(self)->Name::toString(from, to);
1656616566
}
1656716567
catch (...)
1656816568
{
1656916569
StatusType::catchException(0);
1657016570
}
1657116571
}
1657216572

16573-
static void CLOOP_CARG cloopgatherDispatcher(IDecFloat16* self, int sign, const unsigned char* bcd, int exp, FB_DEC16* to) throw()
16573+
static void CLOOP_CARG cloopfromBcdDispatcher(IDecFloat16* self, int sign, const unsigned char* bcd, int exp, FB_DEC16* to) throw()
1657416574
{
1657516575
try
1657616576
{
16577-
static_cast<Name*>(self)->Name::gather(sign, bcd, exp, to);
16577+
static_cast<Name*>(self)->Name::fromBcd(sign, bcd, exp, to);
1657816578
}
1657916579
catch (...)
1658016580
{
1658116581
StatusType::catchException(0);
1658216582
}
1658316583
}
1658416584

16585-
static void CLOOP_CARG cloopfromStrDispatcher(IDecFloat16* self, IStatus* status, const char* from, FB_DEC16* to) throw()
16585+
static void CLOOP_CARG cloopfromStringDispatcher(IDecFloat16* self, IStatus* status, const char* from, FB_DEC16* to) throw()
1658616586
{
1658716587
StatusType status2(status);
1658816588

1658916589
try
1659016590
{
16591-
static_cast<Name*>(self)->Name::fromStr(&status2, from, to);
16591+
static_cast<Name*>(self)->Name::fromString(&status2, from, to);
1659216592
}
1659316593
catch (...)
1659416594
{
@@ -16610,10 +16610,10 @@ namespace Firebird
1661016610
{
1661116611
}
1661216612

16613-
virtual void scatter(const FB_DEC16* from, int* sign, unsigned char* bcd, int* exp) = 0;
16614-
virtual void toStr(const FB_DEC16* from, char* to) = 0;
16615-
virtual void gather(int sign, const unsigned char* bcd, int exp, FB_DEC16* to) = 0;
16616-
virtual void fromStr(StatusType* status, const char* from, FB_DEC16* to) = 0;
16613+
virtual void toBcd(const FB_DEC16* from, int* sign, unsigned char* bcd, int* exp) = 0;
16614+
virtual void toString(const FB_DEC16* from, char* to) = 0;
16615+
virtual void fromBcd(int sign, const unsigned char* bcd, int exp, FB_DEC16* to) = 0;
16616+
virtual void fromString(StatusType* status, const char* from, FB_DEC16* to) = 0;
1661716617
};
1661816618

1661916619
template <typename Name, typename StatusType, typename Base>
@@ -16629,59 +16629,59 @@ namespace Firebird
1662916629
VTableImpl()
1663016630
{
1663116631
this->version = Base::VERSION;
16632-
this->scatter = &Name::cloopscatterDispatcher;
16633-
this->toStr = &Name::clooptoStrDispatcher;
16634-
this->gather = &Name::cloopgatherDispatcher;
16635-
this->fromStr = &Name::cloopfromStrDispatcher;
16632+
this->toBcd = &Name::clooptoBcdDispatcher;
16633+
this->toString = &Name::clooptoStringDispatcher;
16634+
this->fromBcd = &Name::cloopfromBcdDispatcher;
16635+
this->fromString = &Name::cloopfromStringDispatcher;
1663616636
}
1663716637
} vTable;
1663816638

1663916639
this->cloopVTable = &vTable;
1664016640
}
1664116641

16642-
static void CLOOP_CARG cloopscatterDispatcher(IDecFloat34* self, const FB_DEC34* from, int* sign, unsigned char* bcd, int* exp) throw()
16642+
static void CLOOP_CARG clooptoBcdDispatcher(IDecFloat34* self, const FB_DEC34* from, int* sign, unsigned char* bcd, int* exp) throw()
1664316643
{
1664416644
try
1664516645
{
16646-
static_cast<Name*>(self)->Name::scatter(from, sign, bcd, exp);
16646+
static_cast<Name*>(self)->Name::toBcd(from, sign, bcd, exp);
1664716647
}
1664816648
catch (...)
1664916649
{
1665016650
StatusType::catchException(0);
1665116651
}
1665216652
}
1665316653

16654-
static void CLOOP_CARG clooptoStrDispatcher(IDecFloat34* self, const FB_DEC34* from, char* to) throw()
16654+
static void CLOOP_CARG clooptoStringDispatcher(IDecFloat34* self, const FB_DEC34* from, char* to) throw()
1665516655
{
1665616656
try
1665716657
{
16658-
static_cast<Name*>(self)->Name::toStr(from, to);
16658+
static_cast<Name*>(self)->Name::toString(from, to);
1665916659
}
1666016660
catch (...)
1666116661
{
1666216662
StatusType::catchException(0);
1666316663
}
1666416664
}
1666516665

16666-
static void CLOOP_CARG cloopgatherDispatcher(IDecFloat34* self, int sign, const unsigned char* bcd, int exp, FB_DEC34* to) throw()
16666+
static void CLOOP_CARG cloopfromBcdDispatcher(IDecFloat34* self, int sign, const unsigned char* bcd, int exp, FB_DEC34* to) throw()
1666716667
{
1666816668
try
1666916669
{
16670-
static_cast<Name*>(self)->Name::gather(sign, bcd, exp, to);
16670+
static_cast<Name*>(self)->Name::fromBcd(sign, bcd, exp, to);
1667116671
}
1667216672
catch (...)
1667316673
{
1667416674
StatusType::catchException(0);
1667516675
}
1667616676
}
1667716677

16678-
static void CLOOP_CARG cloopfromStrDispatcher(IDecFloat34* self, IStatus* status, const char* from, FB_DEC34* to) throw()
16678+
static void CLOOP_CARG cloopfromStringDispatcher(IDecFloat34* self, IStatus* status, const char* from, FB_DEC34* to) throw()
1667916679
{
1668016680
StatusType status2(status);
1668116681

1668216682
try
1668316683
{
16684-
static_cast<Name*>(self)->Name::fromStr(&status2, from, to);
16684+
static_cast<Name*>(self)->Name::fromString(&status2, from, to);
1668516685
}
1668616686
catch (...)
1668716687
{
@@ -16703,10 +16703,10 @@ namespace Firebird
1670316703
{
1670416704
}
1670516705

16706-
virtual void scatter(const FB_DEC34* from, int* sign, unsigned char* bcd, int* exp) = 0;
16707-
virtual void toStr(const FB_DEC34* from, char* to) = 0;
16708-
virtual void gather(int sign, const unsigned char* bcd, int exp, FB_DEC34* to) = 0;
16709-
virtual void fromStr(StatusType* status, const char* from, FB_DEC34* to) = 0;
16706+
virtual void toBcd(const FB_DEC34* from, int* sign, unsigned char* bcd, int* exp) = 0;
16707+
virtual void toString(const FB_DEC34* from, char* to) = 0;
16708+
virtual void fromBcd(int sign, const unsigned char* bcd, int exp, FB_DEC34* to) = 0;
16709+
virtual void fromString(StatusType* status, const char* from, FB_DEC34* to) = 0;
1671016710
};
1671116711
};
1671216712

src/isql/isql.epp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2304,7 +2304,7 @@ static processing_state add_row(TEXT* tabname)
23042304
case SQL_DEC16:
23052305
d64value = (FB_DEC16*) datap;
23062306
if (isqlGlob.df16)
2307-
isqlGlob.df16->fromStr(fbStatus, lastInputLine, d64value);
2307+
isqlGlob.df16->fromString(fbStatus, lastInputLine, d64value);
23082308
if ((!isqlGlob.df16) || (fbStatus->getState() & Firebird::IStatus::STATE_ERRORS))
23092309
{
23102310
STDERROUT("Input parsing problem");
@@ -2315,7 +2315,7 @@ static processing_state add_row(TEXT* tabname)
23152315
case SQL_DEC34:
23162316
d128value = (FB_DEC34*) datap;
23172317
if (isqlGlob.df34)
2318-
isqlGlob.df34->fromStr(fbStatus, lastInputLine, d128value);
2318+
isqlGlob.df34->fromString(fbStatus, lastInputLine, d128value);
23192319
if ((!isqlGlob.df34) || (fbStatus->getState() & Firebird::IStatus::STATE_ERRORS))
23202320
{
23212321
STDERROUT("Input parsing problem");
@@ -3076,7 +3076,7 @@ static processing_state bulk_insert_hack(const char* command)
30763076
case SQL_DEC16:
30773077
d64value = (FB_DEC16*) datap;
30783078
if (isqlGlob.df16)
3079-
isqlGlob.df16->fromStr(fbStatus, lastInputLine, d64value);
3079+
isqlGlob.df16->fromString(fbStatus, lastInputLine, d64value);
30803080
if ((!isqlGlob.df16) || (fbStatus->getState() & Firebird::IStatus::STATE_ERRORS))
30813081
{
30823082
STDERROUT("Input parsing problem");
@@ -3087,7 +3087,7 @@ static processing_state bulk_insert_hack(const char* command)
30873087
case SQL_DEC34:
30883088
d128value = (FB_DEC34*) datap;
30893089
if (isqlGlob.df34)
3090-
isqlGlob.df34->fromStr(fbStatus, lastInputLine, d128value);
3090+
isqlGlob.df34->fromString(fbStatus, lastInputLine, d128value);
30913091
if ((!isqlGlob.df34) || (fbStatus->getState() & Firebird::IStatus::STATE_ERRORS))
30923092
{
30933093
STDERROUT("Input parsing problem");
@@ -7236,7 +7236,7 @@ static unsigned print_item(TEXT** s, const IsqlVar* var, const unsigned length)
72367236
{
72377237
char decStr[Firebird::IDecFloat16::STRING_SIZE];
72387238
if (isqlGlob.df16)
7239-
isqlGlob.df16->toStr(var->value.asDec16, decStr);
7239+
isqlGlob.df16->toString(var->value.asDec16, decStr);
72407240
else
72417241
strcpy(decStr, "Conversion error");
72427242

@@ -7251,7 +7251,7 @@ static unsigned print_item(TEXT** s, const IsqlVar* var, const unsigned length)
72517251
{
72527252
char decStr[Firebird::IDecFloat34::STRING_SIZE];
72537253
if (isqlGlob.df34)
7254-
isqlGlob.df34->toStr(var->value.asDec34, decStr);
7254+
isqlGlob.df34->toString(var->value.asDec34, decStr);
72557255
else
72567256
strcpy(decStr, "Conversion error");
72577257

0 commit comments

Comments
 (0)