00001
00002
00011 #ifndef Fennel_FennelResource_Included
00012 #define Fennel_FennelResource_Included
00013
00014 #include <ctime>
00015 #include <string>
00016
00017 #include "Locale.h"
00018 #include "ResourceDefinition.h"
00019 #include "ResourceBundle.h"
00020
00021
00022
00023
00024 namespace fennel {
00025
00026
00027 class FennelResource;
00028 typedef map<Locale, FennelResource*> FennelResourceBundleCache;
00029
00030 class FENNEL_COMMON_EXPORT FennelResource : ResourceBundle
00031 {
00032 protected:
00033 explicit FennelResource(Locale locale);
00034
00035 public:
00036 virtual ~FennelResource()
00037 {
00038 }
00039
00040 static const FennelResource &instance();
00041 static const FennelResource &instance(const Locale &locale);
00042
00043 static void setResourceFileLocation(const std::string &location);
00044
00048 std::string sysCallFailed(const std::string &p0) const;
00049
00053 std::string duplicateKeyDetected(const std::string &p0) const;
00054
00058 std::string internalError(const std::string &p0) const;
00059
00063 std::string executionAborted() const;
00064
00068 std::string rowTooLong(int p0, int p1, const std::string &p2) const;
00069
00073 std::string invalidParam(const std::string &p0, const std::string &p1) const;
00074
00078 std::string scalarQueryReturnedMultipleRows() const;
00079
00083 std::string scratchMemExhausted() const;
00084
00088 std::string uniqueConstraintViolated() const;
00089
00093 std::string incompatibleDataFormat() const;
00094
00098 std::string libaioRequired() const;
00099
00103 std::string unsupportedOperation(const std::string &p0) const;
00104
00108 std::string outOfBackupSpace() const;
00109
00113 std::string mismatchedRestore() const;
00114
00118 std::string openBackupFileFailed(const std::string &p0) const;
00119
00123 std::string readBackupFileFailed(const std::string &p0) const;
00124
00128 std::string writeBackupFileFailed(const std::string &p0) const;
00129
00133 std::string readDataPageFailed() const;
00134
00138 std::string writeDataPageFailed() const;
00139
00143 std::string outOfSpaceDuringRestore() const;
00144
00148 std::string bitmapEntryTooLong(int p0, int p1, const std::string &p2) const;
00149
00153 std::string readDataFailed(const std::string &p0) const;
00154
00158 std::string dataTransferFailed(const std::string &p0, int p1) const;
00159
00163 std::string writeLogFailed(const std::string &p0) const;
00164
00168 std::string noRowsReturned(const std::string &p0, const std::string &p1) const;
00169
00173 std::string errorsEncountered(const std::string &p0, const std::string &p1) const;
00174
00178 std::string noRowDelimiter(const std::string &p0) const;
00179
00183 std::string incompleteColumn() const;
00184
00188 std::string noColumnDelimiter() const;
00189
00193 std::string tooFewColumns() const;
00194
00198 std::string tooManyColumns() const;
00199
00203 std::string rowTextTooLong() const;
00204
00208 std::string flatfileDescribeFailed(const std::string &p0) const;
00209
00213 std::string flatfileNoHeader(const std::string &p0, const std::string &p1) const;
00214
00218 std::string flatfileMappedRequiresLenient() const;
00219
00223 std::string flatfileNoMappedColumns(const std::string &p0, const std::string &p1) const;
00224
00225 private:
00226 ResourceDefinition _sysCallFailed;
00227 ResourceDefinition _duplicateKeyDetected;
00228 ResourceDefinition _internalError;
00229 ResourceDefinition _executionAborted;
00230 ResourceDefinition _rowTooLong;
00231 ResourceDefinition _invalidParam;
00232 ResourceDefinition _scalarQueryReturnedMultipleRows;
00233 ResourceDefinition _scratchMemExhausted;
00234 ResourceDefinition _uniqueConstraintViolated;
00235 ResourceDefinition _incompatibleDataFormat;
00236 ResourceDefinition _libaioRequired;
00237 ResourceDefinition _unsupportedOperation;
00238 ResourceDefinition _outOfBackupSpace;
00239 ResourceDefinition _mismatchedRestore;
00240 ResourceDefinition _openBackupFileFailed;
00241 ResourceDefinition _readBackupFileFailed;
00242 ResourceDefinition _writeBackupFileFailed;
00243 ResourceDefinition _readDataPageFailed;
00244 ResourceDefinition _writeDataPageFailed;
00245 ResourceDefinition _outOfSpaceDuringRestore;
00246 ResourceDefinition _bitmapEntryTooLong;
00247 ResourceDefinition _readDataFailed;
00248 ResourceDefinition _dataTransferFailed;
00249 ResourceDefinition _writeLogFailed;
00250 ResourceDefinition _noRowsReturned;
00251 ResourceDefinition _errorsEncountered;
00252 ResourceDefinition _noRowDelimiter;
00253 ResourceDefinition _incompleteColumn;
00254 ResourceDefinition _noColumnDelimiter;
00255 ResourceDefinition _tooFewColumns;
00256 ResourceDefinition _tooManyColumns;
00257 ResourceDefinition _rowTextTooLong;
00258 ResourceDefinition _flatfileDescribeFailed;
00259 ResourceDefinition _flatfileNoHeader;
00260 ResourceDefinition _flatfileMappedRequiresLenient;
00261 ResourceDefinition _flatfileNoMappedColumns;
00262
00263 template<class _GRB, class _BC, class _BC_ITER>
00264 friend _GRB *makeInstance(_BC &bundleCache, const Locale &locale);
00265 };
00266
00267 }
00268
00269 #endif // Fennel_FennelResource_Included
00270
00271