8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 02:03:04 +01:00

Allow QualifiedName to interact with StatusArg.

This commit is contained in:
robocop 2010-01-26 07:32:12 +00:00
parent ccf439399b
commit 94b6451014
3 changed files with 22 additions and 0 deletions

View File

@ -183,6 +183,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fb2control", "fb2control.vc
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fbrmclib", "fbrmclib.vcproj", "{FAF9AD25-8238-49E9-9AC9-8C56E190440A}"
ProjectSection(ProjectDependencies) = postProject
{15605F44-BFFD-444F-AD4C-55DC9D704465} = {15605F44-BFFD-444F-AD4C-55DC9D704465}
{492E7BDA-8948-408D-A43E-4C0A5B86AFB8} = {492E7BDA-8948-408D-A43E-4C0A5B86AFB8}
EndProjectSection
EndProject

View File

@ -31,6 +31,7 @@
#include "../common/classes/fb_string.h"
#include "../common/classes/MetaName.h"
#include "../common/classes/QualifiedName.h"
#include "../common/classes/alloc.h"
#include "fb_exception.h"
#include "gen/iberror.h"
@ -181,6 +182,11 @@ void StatusVector::ImplStatusVector::shiftLeft(const MetaName& text) throw()
shiftLeft(Str(text));
}
void StatusVector::ImplStatusVector::shiftLeft(const QualifiedName& text) throw()
{
shiftLeft(Str(text));
}
void StatusVector::raise() const
{
if (hasData())
@ -229,6 +235,7 @@ Windows::Windows(ISC_STATUS s) throw() :
Warning::Warning(ISC_STATUS s) throw() :
StatusVector(isc_arg_warning, s) { }
// Str overloading.
Str::Str(const char* text) throw() :
Base(isc_arg_string, (ISC_STATUS)(IPTR) text) { }
@ -238,6 +245,10 @@ Str::Str(const AbstractString& text) throw() :
Str::Str(const MetaName& text) throw() :
Base(isc_arg_string, (ISC_STATUS)(IPTR) text.c_str()) { }
Str::Str(const QualifiedName& text) throw() :
Base(isc_arg_string, (ISC_STATUS)(IPTR) text.toString().c_str()) { }
SqlState::SqlState(const char* text) throw() :
Base(isc_arg_sql_state, (ISC_STATUS)(IPTR) text) { }

View File

@ -33,6 +33,7 @@ namespace Firebird {
class AbstractString;
class MetaName;
class QualifiedName;
namespace Arg {
@ -71,6 +72,7 @@ protected:
virtual void shiftLeft(const char*) throw() { }
virtual void shiftLeft(const AbstractString&) throw() { }
virtual void shiftLeft(const MetaName&) throw() { }
virtual void shiftLeft(const QualifiedName&) throw() { }
ImplBase(ISC_STATUS k, ISC_STATUS c) throw() : kind(k), code(c) { }
virtual ~ImplBase() { }
@ -114,6 +116,7 @@ protected:
virtual void shiftLeft(const char* text) throw();
virtual void shiftLeft(const AbstractString& text) throw();
virtual void shiftLeft(const MetaName& text) throw();
virtual void shiftLeft(const QualifiedName& text) throw();
ImplStatusVector(ISC_STATUS k, ISC_STATUS c) throw() : ImplBase(k, c)
{
@ -174,6 +177,12 @@ public:
return *this;
}
StatusVector& operator<<(const QualifiedName& text) throw()
{
implementation->shiftLeft(text);
return *this;
}
private:
};
@ -190,6 +199,7 @@ public:
explicit Str(const char* text) throw();
explicit Str(const AbstractString& text) throw();
explicit Str(const MetaName& text) throw();
explicit Str(const QualifiedName& text) throw();
};
class Num : public Base