static inline v8::Handle<v8::Value> Open() { v8::HandleScope scope; Class<FileBase> fileBase; fileBase.Set<void (), &FileBase::Close>("close") .Set<bool (), &FileBase::Good>("good") .Set<bool (), &FileBase::IsOpen>("is_open") .Set<bool (), &FileBase::Eof>("eof") ; Class<FileWriter, V8ArgFactory> fileWriter(fileBase); fileWriter.Set<bool(const char *), &FileWriter::Open>("open") .Set<void, &FileWriter::Print>("print") .Set<void, &FileWriter::Println>("println") ; Class<FileReader, V8ArgFactory> fileReader(fileBase); fileReader.Set<bool(const char *), &FileReader::Open>("open") .Set<v8::Handle<v8::Value>(), &FileReader::GetLine>("getln") ; Module mod; return mod ("Writer", fileWriter) ("Reader", fileReader) .Set<bool(char const *, char const *), &Rename>("rename") .Set<bool(char const *), &Mkdir>("mkdir") .NewInstance(); }
void calcError(const BayesianClassifier &classifier, const Matrix &points1, const Matrix &points2, std::string filename){ // for writing to files Debugger fileWriter(filename, true); std::remove(filename.c_str()); std::stringstream ss; // calc errors int label, error1 = 0, error2 = 0; for(int point = 0; point < points1.size(); point++){ label = classifier.predict(points1[point]); if(label != 0){ error1++; } ss << label << "\n"; } for(int point = 0; point < points2.size(); point++){ label = classifier.predict(points2[point]); if(label != 1){ error2++; } ss << label << "\n"; } fileWriter.debug(ss.str()); std::cout << "Error classification for class1: " << error1 << std::endl; std::cout << "Error classification for class2: " << error2 << std::endl; std::cout << "Total error classification : " << error1 + error2 << std::endl; }
void mitk::CoreObjectFactory::RegisterLegacyWriters(mitk::CoreObjectFactoryBase *factory) { // Get all external Writers mitk::CoreObjectFactory::FileWriterList writers = factory->GetFileWriters(); // We are not really interested in the string, just call the method since // many writers initialize the map the first time when this method is called factory->GetSaveFileExtensions(); MultimapType fileExtensionMap = factory->GetSaveFileExtensionsMap(); for (mitk::CoreObjectFactory::FileWriterList::iterator it = writers.begin(); it != writers.end(); ++it) { std::vector<std::string> extensions = (*it)->GetPossibleFileExtensions(); if (extensions.empty()) continue; std::string description; for (std::vector<std::string>::iterator ext = extensions.begin(); ext != extensions.end(); ++ext) { if (ext->empty()) continue; std::string extension = *ext; std::string extensionWithStar = extension; if (extension.find_first_of('*') == 0) { // remove "*." extension = extension.substr(0, extension.size() - 2); } else { extensionWithStar.insert(extensionWithStar.begin(), '*'); } for (MultimapType::iterator fileExtensionIter = fileExtensionMap.begin(); fileExtensionIter != fileExtensionMap.end(); ++fileExtensionIter) { if (fileExtensionIter->first == extensionWithStar) { description = fileExtensionIter->second; break; } } if (!description.empty()) break; } if (description.empty()) { description = std::string("Legacy ") + (*it)->GetNameOfClass() + " Reader"; } mitk::FileWriter::Pointer fileWriter(it->GetPointer()); mitk::LegacyFileWriterService *lfws = new mitk::LegacyFileWriterService(fileWriter, description); m_LegacyWriters[factory].push_back(lfws); } }
FileWriterErrorType FileWriter::errorOfOpenFileForWriting(const string& aFileName) { FileWriterErrorType result = kFileWriterErrorNone; { FileWriter fileWriter(aFileName); if (fileWriter.open()) { if (!fileWriter.close()) { result = fileWriter.getLastError(); } else { remove(aFileName.c_str()); } } else { result = fileWriter.getLastError(); } } return result; }
void FileCreator(const std::string path, const std::string destFileName, const std::string outline ) { std::vector<std::string> files = util::listDir(path); if (files.size() <= 0)return; std::sort(std::begin(files), std::end(files)); /////////////////////////// HPDF_Doc pdf; pdf = HPDF_New(error_handler, NULL); if (!pdf) { std::cout<<"error: cannot create PdfDoc object"<<std::endl; return; } if (setjmp(env)) { HPDF_Free(pdf); return; } /* const char *font_name1; const char *font_name2; const char *font_name3; font_name1 = HPDF_LoadTTFontFromFile(pdf, "C:\\Windows\\Fonts\\Arial.ttf", HPDF_TRUE); font_name2 = HPDF_LoadTTFontFromFile(pdf, R"(C:\Windows\Fonts\simsunb.ttf)", HPDF_TRUE); font_name3 = HPDF_LoadTTFontFromFile2(pdf, "C:\\Windows\\Fonts\\simsun.ttc", 1, HPDF_TRUE); */ HPDF_Outline root; root = HPDF_CreateOutline(pdf, NULL, outline.c_str(), NULL); HPDF_Outline_SetOpened(root, HPDF_TRUE); HPDF_SetInfoAttr(pdf, HPDF_INFO_AUTHOR, config::AUTHOR); HPDF_SetInfoAttr(pdf, HPDF_INFO_TITLE, path.c_str()); HPDF_Font font; switch (config::LANG_TYPE) { case pdf::config::CN: HPDF_UseCNSFonts(pdf); HPDF_UseCNSEncodings(pdf); font = HPDF_GetFont(pdf, "SimHei", "GB-EUC-H"); // SimSun SimHei break; case pdf::config::TW: HPDF_UseCNTFonts(pdf); HPDF_UseCNTEncodings(pdf); font = HPDF_GetFont(pdf, "MingLiU", "ETen-B5-H"); break; default: font = HPDF_GetFont(pdf, "Helvetica", NULL); break; } /////////////////////////// std::string contents; std::vector<std::string> vec; for (std::string file : files) { contents = util::getFileContents(file); vec = util::split(contents, '\n'); fileWriter(pdf, root, font, file.substr(path.length()), vec); } /////////////////////////// std::string destFile(path); destFile.append("/"); destFile.append(destFileName); HPDF_SaveToFile(pdf, destFile.c_str()); HPDF_Free(pdf); }//end FileCreator()
PassRefPtr<FileWriter> FileWriter::create(ScriptExecutionContext* context) { RefPtr<FileWriter> fileWriter(adoptRef(new FileWriter(context))); fileWriter->suspendIfNeeded(); return fileWriter.release(); }
void main(void) { char menuChoice; header(); do { matrixMaker(1); matrixMaker(2); menuChoice = menu(); do { switch (menuChoice) { case 'A': //addition matrixAdder(); break; case 'S'://subtraction matrixSub(); break; case 'M'://matrix multiplication matrixMultiply(); break; case 'E'://Element by element multiplication matrixElemMultiply(); break; case 'N': // move to next case or exit(?) //what do we put here? Instructions unclear. break; } display(menuChoice); fileWriter(menuChoice); // option loop operation code printf("\n\nWould you like to run a different operation with the same sets of data? (Y/N) "); scanf(" %c", &loopOperations); loopOperations = toupper(loopOperations); while(loopOperations != 'Y' && loopOperations != 'N') { printf("Input must be either Y or N!\n"); printf("\n\nWould you like to run a different operation with the same sets of data? (Y/N) "); scanf(" %c", &loopOperations); loopOperations = toupper(loopOperations); } } while(loopOperations == 'Y'); // option loop code with new data printf("\n\nWould you like to use new files for a different data set? (Y/N) "); scanf(" %c", &loopProgram); loopProgram = toupper(loopProgram); while(loopProgram != 'Y' && loopProgram != 'N') { printf("Input must be either Y or N!\n"); printf("\n\nWould you like to use new files for a different data set? (Y/N) "); scanf(" %c", &loopProgram); loopProgram = toupper(loopProgram); } } while(loopProgram == 'Y'); }
int main(int argc, char* argv[]) { int testsignal = 0; bool runSpeedTest = false; bool connectAudio = false; std::vector<std::string> midiConnections; std::map<unsigned, unsigned> patchFromCmdline; struct option longopts[] = { { "testsignal", 1, 0, 't' }, { "speedtest", 0, 0, 's' }, { "connect-audio", 0, 0, 'C' }, { "connect-midi", 1, 0, 'M' }, { "patch", 1, 0, 'p' }, { "help", no_argument, 0, 'h' }, { 0, 0, 0, 0 } }; int opt; while ((opt = getopt_long(argc, argv, "st:CM:p:h", longopts, 0)) != -1) { switch (opt) { case 't': testsignal = atoi(optarg); break; case 's': runSpeedTest = true; break; case 'C': connectAudio = true; break; case 'M': midiConnections.push_back(optarg); break; case 'p': unsigned channel, program; sscanf(optarg, "%u:%u", &channel, &program); patchFromCmdline[channel] = program; break; default: case 'h': printHelp(); return 0; } } if (testsignal) { TGlobal::SampleRate = 44100; TGlobal::NyquistFrequency = TGlobal::SampleRate / 2; TAudioFileWriter fileWriter("testsignal.wav", 2, TGlobal::SampleRate); TFileAudioPort inputPortL("", TFileAudioPort::INPUT); TFileAudioPort inputPortR("", TFileAudioPort::INPUT); TAudioPortCollection inputPorts( { &inputPortL, &inputPortR }); TFileAudioPort intOutPort1("/dev/null", TFileAudioPort::OUTPUT); TFileAudioPort intOutPort2("/dev/null", TFileAudioPort::OUTPUT); TFileAudioPort intOutPort3("/dev/null", TFileAudioPort::OUTPUT); TFileAudioPort intOutPort4("/dev/null", TFileAudioPort::OUTPUT); TAudioPortCollection intOutPorts( { &intOutPort1, &intOutPort2, &intOutPort3, &intOutPort4 }); TAudioPortCollection outputPorts = fileWriter.GetPorts(); TJackSynth synth(inputPorts, outputPorts, intOutPorts); switch (testsignal) { case 1: testSignalSawSweep(synth); break; case 2: testSignalFilterSweep(synth); break; case 3: testSignalDelay(synth); break; case 4: testSignalReverb(synth); break; } } else if (runSpeedTest) { speedTest(); } else { signal(SIGINT, sigterm); signal(SIGTERM, sigterm); runInJack(connectAudio, midiConnections, patchFromCmdline); } return 0; }
PassRefPtrWillBeRawPtr<FileWriter> FileWriter::create(ExecutionContext* context) { RefPtrWillBeRawPtr<FileWriter> fileWriter(adoptRefWillBeRefCountedGarbageCollected(new FileWriter(context))); fileWriter->suspendIfNeeded(); return fileWriter.release(); }
QByteArray* QgsWCSServer::getCoverage() { QStringList wcsLayersId = mConfigParser->wcsLayers(); QList<QgsMapLayer*> layerList; QStringList mErrors = QStringList(); //defining coverage name QString coveName = ""; //read COVERAGE QMap<QString, QString>::const_iterator cove_name_it = mParameters.find( "COVERAGE" ); if ( cove_name_it != mParameters.end() ) { coveName = cove_name_it.value(); } if ( coveName == "" ) { QMap<QString, QString>::const_iterator cove_name_it = mParameters.find( "IDENTIFIER" ); if ( cove_name_it != mParameters.end() ) { coveName = cove_name_it.value(); } } if ( coveName == "" ) { mErrors << QString( "COVERAGE is mandatory" ); } layerList = mConfigParser->mapLayerFromCoverage( coveName ); if ( layerList.size() < 1 ) { mErrors << QString( "The layer for the COVERAGE '%1' is not found" ).arg( coveName ); } bool conversionSuccess; // BBOX bool bboxOk = false; double minx = 0.0, miny = 0.0, maxx = 0.0, maxy = 0.0; // WIDTh and HEIGHT int width = 0, height = 0; // CRS QString crs = ""; // read BBOX QMap<QString, QString>::const_iterator bbIt = mParameters.find( "BBOX" ); if ( bbIt == mParameters.end() ) { minx = 0; miny = 0; maxx = 0; maxy = 0; } else { bboxOk = true; QString bbString = bbIt.value(); minx = bbString.section( ",", 0, 0 ).toDouble( &conversionSuccess ); if ( !conversionSuccess ) {bboxOk = false;} miny = bbString.section( ",", 1, 1 ).toDouble( &conversionSuccess ); if ( !conversionSuccess ) {bboxOk = false;} maxx = bbString.section( ",", 2, 2 ).toDouble( &conversionSuccess ); if ( !conversionSuccess ) {bboxOk = false;} maxy = bbString.section( ",", 3, 3 ).toDouble( &conversionSuccess ); if ( !conversionSuccess ) {bboxOk = false;} } if ( !bboxOk ) { mErrors << QString( "The BBOX is mandatory and has to be xx.xxx,yy.yyy,xx.xxx,yy.yyy" ); } // read WIDTH width = mParameters.value( "WIDTH", "0" ).toInt( &conversionSuccess ); if ( !conversionSuccess ) width = 0; // read HEIGHT height = mParameters.value( "HEIGHT", "0" ).toInt( &conversionSuccess ); if ( !conversionSuccess ) { height = 0; } if ( width < 0 || height < 0 ) { mErrors << QString( "The WIDTH and HEIGHT are mandatory and have to be integer" ); } crs = mParameters.value( "CRS", "" ); if ( crs == "" ) { mErrors << QString( "The CRS is mandatory" ); } if ( mErrors.count() != 0 ) { throw QgsMapServiceException( "RequestNotWellFormed", mErrors.join( ". " ) ); } QgsCoordinateReferenceSystem requestCRS = QgsCRSCache::instance()->crsByAuthId( crs ); if ( !requestCRS.isValid() ) { mErrors << QString( "Could not create request CRS" ); throw QgsMapServiceException( "RequestNotWellFormed", mErrors.join( ". " ) ); } QgsRectangle rect( minx, miny, maxx, maxy ); QgsMapLayer* layer = layerList.at( 0 ); QgsRasterLayer* rLayer = dynamic_cast<QgsRasterLayer*>( layer ); if ( rLayer && wcsLayersId.contains( rLayer->id() ) ) { // RESPONSE_CRS QgsCoordinateReferenceSystem responseCRS = rLayer->crs(); crs = mParameters.value( "RESPONSE_CRS", "" ); if ( crs != "" ) { responseCRS = QgsCRSCache::instance()->crsByAuthId( crs ); if ( !responseCRS.isValid() ) { responseCRS = rLayer->crs(); } } // transform rect if ( requestCRS != rLayer->crs() ) { QgsCoordinateTransform t( requestCRS, rLayer->crs() ); rect = t.transformBoundingBox( rect ); } QTemporaryFile tempFile; tempFile.open(); QgsRasterFileWriter fileWriter( tempFile.fileName() ); // clone pipe/provider QgsRasterPipe* pipe = new QgsRasterPipe(); if ( !pipe->set( rLayer->dataProvider()->clone() ) ) { mErrors << QString( "Cannot set pipe provider" ); throw QgsMapServiceException( "RequestNotWellFormed", mErrors.join( ". " ) ); } // add projector if necessary if ( responseCRS != rLayer->crs() ) { QgsRasterProjector * projector = new QgsRasterProjector; projector->setCRS( rLayer->crs(), responseCRS ); if ( !pipe->insert( 2, projector ) ) { mErrors << QString( "Cannot set pipe projector" ); throw QgsMapServiceException( "RequestNotWellFormed", mErrors.join( ". " ) ); } } QgsRasterFileWriter::WriterError err = fileWriter.writeRaster( pipe, width, height, rect, responseCRS ); if ( err != QgsRasterFileWriter::NoError ) { mErrors << QString( "Cannot write raster error code: %1" ).arg( err ); throw QgsMapServiceException( "RequestNotWellFormed", mErrors.join( ". " ) ); } delete pipe; QByteArray* ba = 0; ba = new QByteArray(); *ba = tempFile.readAll(); return ba; } return 0; }
void AsciiToUniMapping::exportArmenianASCII_Unicode( const string_t& mapFile ) { MappingRaw map[] = { { 0x00B2 , 0x0531, "Ա ARMENIAN CAPITAL LETTER AYB" }, { 0x00B4 , 0x0532, "Բ ARMENIAN CAPITAL LETTER BEN" }, { 0x00B6 , 0x0533, "Գ ARMENIAN CAPITAL LETTER GIM" }, { 0x00B8 , 0x0534, "Դ ARMENIAN CAPITAL LETTER DA" }, { 0x00BA , 0x0535, "Ե ARMENIAN CAPITAL LETTER ECH" }, { 0x00BC , 0x0536, "Զ ARMENIAN CAPITAL LETTER ZA" }, { 0x00BE , 0x0537, "Է ARMENIAN CAPITAL LETTER EH" }, { 0x00C0 , 0x0538, "Ը ARMENIAN CAPITAL LETTER ET" }, { 0x00C2 , 0x0539, "Թ ARMENIAN CAPITAL LETTER TO" }, { 0x00C4 , 0x053A, "Ժ ARMENIAN CAPITAL LETTER ZHE" }, { 0x00C6 , 0x053B, "Ի ARMENIAN CAPITAL LETTER INI" }, { 0x00C8 , 0x053C, "Լ ARMENIAN CAPITAL LETTER LIWN" }, { 0x00CA , 0x053D, "Խ ARMENIAN CAPITAL LETTER XEH" }, { 0x00CC , 0x053E, "Ծ ARMENIAN CAPITAL LETTER CA" }, { 0x00CE , 0x053F, "Կ ARMENIAN CAPITAL LETTER KEN" }, { 0x00D0 , 0x0540, "Հ ARMENIAN CAPITAL LETTER HO" }, { 0x00D2 , 0x0541, "Ձ ARMENIAN CAPITAL LETTER JA" }, { 0x00D4 , 0x0542, "Ղ ARMENIAN CAPITAL LETTER GHAD" }, { 0x00D6 , 0x0543, "Ճ ARMENIAN CAPITAL LETTER CHEH" }, { 0x00D8 , 0x0544, "Մ ARMENIAN CAPITAL LETTER MEN" }, { 0x00DA , 0x0545, "Յ ARMENIAN CAPITAL LETTER YI" }, { 0x00DC , 0x0546, "Ն ARMENIAN CAPITAL LETTER NOW" }, { 0x00DE , 0x0547, "Շ ARMENIAN CAPITAL LETTER SHA" }, { 0x00E0 , 0x0548, "Ո ARMENIAN CAPITAL LETTER VO" }, { 0x00E2 , 0x0549, "Չ ARMENIAN CAPITAL LETTER CHA" }, { 0x00E4 , 0x054A, "Պ ARMENIAN CAPITAL LETTER PEH" }, { 0x00E6 , 0x054B, "Ջ ARMENIAN CAPITAL LETTER JHEH" }, { 0x00E8 , 0x054C, "Ռ ARMENIAN CAPITAL LETTER RA" }, { 0x00EA , 0x054D, "Ս ARMENIAN CAPITAL LETTER SEH" }, { 0x00EC , 0x054E, "Վ ARMENIAN CAPITAL LETTER VEW" }, { 0x00EE , 0x054F, "Տ ARMENIAN CAPITAL LETTER TIWN" }, { 0x00F0 , 0x0550, "Ր ARMENIAN CAPITAL LETTER REH" }, { 0x00F2 , 0x0551, "Ց ARMENIAN CAPITAL LETTER CO" }, { 0x00F4 , 0x0552, "Ւ ARMENIAN CAPITAL LETTER YIWN" }, { 0x00F6 , 0x0553, "Փ ARMENIAN CAPITAL LETTER PIWR" }, { 0x00F8 , 0x0554, "Ք ARMENIAN CAPITAL LETTER KEH" }, { 0x00FA , 0x0555, "Օ ARMENIAN CAPITAL LETTER OH" }, { 0x00FC , 0x0556, "Ֆ ARMENIAN CAPITAL LETTER FEH" }, { 0x00A0 , 0x00A0, " NO-BREAK SPACE" }, { 0x00A1 , 0x00A9, "© COPYRIGHT SIGN" }, { 0x00A2 , 0x00A7, "§ SECTION SIGN" }, { 0x00A4 , 0x0029, ") RIGHT PARENTHESIS" }, { 0x00A5 , 0x0028, "( LEFT PARENTHESIS" }, { 0x00A6 , 0x00BB, "» RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK" }, { 0x00A7 , 0x00AB, "« LEFT-POINTING DOUBLE ANGLE QUOTATION MARK" }, { 0x00A9 , 0x002E, ". FULL STOP" }, { 0x00AB , 0x002C, ", COMMA" }, { 0x00AC , 0x002D, "- HYPHEN-MINUS" }, //{ 0x00AD , 0x002D, "- HYPHEN-MINUS" }, //{ 0x00AD , 0x058A, "֊ ARMENIAN HYPHEN" }, { 0x00AE , 0x2026, "… HORIZONTAL ELLIPSIS" }, { 0x00FE , 0x055A, "՚ ARMENIAN APOSTROPHE" }, { 0x00FF , 0x055A, "՚ ARMENIAN APOSTROPHE" }, { 0x00B0 , 0x055B, "՛ ARMENIAN EMPHASIS MARK" }, { 0x00AF , 0x055C, "՜ ARMENIAN EXCLAMATION MARK" }, { 0x00AA , 0x055D, "՝ ARMENIAN COMMA" }, { 0x00B1 , 0x055E, "՞ ARMENIAN QUESTION MARK" }, { 0x00B3 , 0x0561, "ա ARMENIAN SMALL LETTER AYB" }, { 0x00B5 , 0x0562, "բ ARMENIAN SMALL LETTER BEN" }, { 0x00B7 , 0x0563, "գ ARMENIAN SMALL LETTER GIM" }, { 0x00B9 , 0x0564, "դ ARMENIAN SMALL LETTER DA" }, { 0x00BB , 0x0565, "ե ARMENIAN SMALL LETTER ECH" }, { 0x00BD , 0x0566, "զ ARMENIAN SMALL LETTER ZA" }, { 0x00BF , 0x0567, "է ARMENIAN SMALL LETTER EH" }, { 0x00C1 , 0x0568, "ը ARMENIAN SMALL LETTER ET" }, { 0x00C3 , 0x0569, "թ ARMENIAN SMALL LETTER TO" }, { 0x00C5 , 0x056A, "ժ ARMENIAN SMALL LETTER ZHE" }, { 0x00C7 , 0x056B, "ի ARMENIAN SMALL LETTER INI" }, { 0x00C9 , 0x056C, "լ ARMENIAN SMALL LETTER LIWN" }, { 0x00CB , 0x056D, "խ ARMENIAN SMALL LETTER XEH" }, { 0x00CD , 0x056E, "ծ ARMENIAN SMALL LETTER CA" }, { 0x00CF , 0x056F, "կ ARMENIAN SMALL LETTER KEN" }, { 0x00D1 , 0x0570, "հ ARMENIAN SMALL LETTER HO" }, { 0x00D3 , 0x0571, "ձ ARMENIAN SMALL LETTER JA" }, { 0x00D5 , 0x0572, "ղ ARMENIAN SMALL LETTER GHAD" }, { 0x00D7 , 0x0573, "ճ ARMENIAN SMALL LETTER CHEH" }, { 0x00D9 , 0x0574, "մ ARMENIAN SMALL LETTER MEN" }, { 0x00DB , 0x0575, "յ ARMENIAN SMALL LETTER YI" }, { 0x00DD , 0x0576, "ն ARMENIAN SMALL LETTER NOW" }, { 0x00DF , 0x0577, "շ ARMENIAN SMALL LETTER SHA" }, { 0x00E1 , 0x0578, "ո ARMENIAN SMALL LETTER VO" }, { 0x00E3 , 0x0579, "չ ARMENIAN SMALL LETTER CHA" }, { 0x00E5 , 0x057A, "պ ARMENIAN SMALL LETTER PEH" }, { 0x00E7 , 0x057B, "ջ ARMENIAN SMALL LETTER JHEH" }, { 0x00E9 , 0x057C, "ռ ARMENIAN SMALL LETTER RA" }, { 0x00EB , 0x057D, "ս ARMENIAN SMALL LETTER SEH" }, { 0x00ED , 0x057E, "վ ARMENIAN SMALL LETTER VEW" }, { 0x00EF , 0x057F, "տ ARMENIAN SMALL LETTER TIWN" }, { 0x00F1 , 0x0580, "ր ARMENIAN SMALL LETTER REH" }, { 0x00F3 , 0x0581, "ց ARMENIAN SMALL LETTER CO" }, { 0x00F5 , 0x0582, "ւ ARMENIAN SMALL LETTER YIWN" }, { 0x00F7 , 0x0583, "փ ARMENIAN SMALL LETTER PIWR" }, { 0x00F9 , 0x0584, "ք ARMENIAN SMALL LETTER KEH" }, { 0x00FB , 0x0585, "օ ARMENIAN SMALL LETTER OH" }, { 0x00FD , 0x0586, "ֆ ARMENIAN SMALL LETTER FEH" }, { 0x00A8 , 0x0587, "և ARMENIAN SMALL LIGATURE ECH YIWN" }, { 0x00A3 , 0x0589, "։ ARMENIAN FULL STOP" }, { 0x02CA , 0x055B, "՛ ARMENIAN EMPHASIS MARK" }, { 0x0301 , 0x0301, "՛ ARMENIAN EMPHASIS MARK" }, { 0x0374 , 0x0374, "՛ ARMENIAN EMPHASIS MARK" }, { 0x2020 , 0x2020, "† CROSS" }, { 0x03BC , 0x0562, "բ ARMENIAN SMALL LETTER BEN" } // { 0x0000 , 0x058A, L"֊ ARMENIAN HYPHEN" }, // { 0x0000 , 0x058F, L"֏ ARMENIAN DRAM SIGN" }, // { 0x0000 , 0x0559, L"ՙ ARMENIAN MODIFIER LETTER LEFT HALF RING" }, // // { 0x0000 , 0x055F, L"՟ ARMENIAN ABBREVIATION MARK" }, }; fileWriter(map, sizeof (map) / sizeof(MappingRaw), mapFile); }
void AsciiToUniMapping::createArafi_UnicodeMapping( const string_t& mapFile ) { MappingRaw map[] = { { 0x47 , 0x0531, "Ա ARMENIAN CAPITAL LETTER AYB" }, { 0x45 , 0x0532, "Բ ARMENIAN CAPITAL LETTER BEN" }, { 0x44 , 0x0533, "Գ ARMENIAN CAPITAL LETTER GIM" }, { 0x58 , 0x0534, "Դ ARMENIAN CAPITAL LETTER DA" }, { 0x46 , 0x0535, "Ե ARMENIAN CAPITAL LETTER ECH" }, { 0x42 , 0x0536, "Զ ARMENIAN CAPITAL LETTER ZA" }, { 0x2B , 0x0537, "Է ARMENIAN CAPITAL LETTER EH" }, { 0x4F , 0x0538, "Ը ARMENIAN CAPITAL LETTER ET" }, { 0x50 , 0x0539, "Թ ARMENIAN CAPITAL LETTER TO" }, { 0x5A , 0x053A, "Ժ ARMENIAN CAPITAL LETTER ZHE" }, { 0x4A , 0x053B, "Ի ARMENIAN CAPITAL LETTER INI" }, { 0x4E , 0x053C, "Լ ARMENIAN CAPITAL LETTER LIWN" }, { 0x23 , 0x053D, "Խ ARMENIAN CAPITAL LETTER XEH" }, { 0x29 , 0x053E, "Ծ ARMENIAN CAPITAL LETTER CA" }, { 0x49 , 0x053F, "Կ ARMENIAN CAPITAL LETTER KEN" }, { 0x4C , 0x0540, "Հ ARMENIAN CAPITAL LETTER HO" }, { 0x5E , 0x0541, "Ձ ARMENIAN CAPITAL LETTER JA" }, { 0x2A , 0x0542, "Ղ ARMENIAN CAPITAL LETTER GHAD" }, { 0x51 , 0x0543, "Ճ ARMENIAN CAPITAL LETTER CHEH" }, { 0x54 , 0x0544, "Մ ARMENIAN CAPITAL LETTER MEN" }, { 0x26 , 0x0545, "Յ ARMENIAN CAPITAL LETTER YI" }, { 0x48 , 0x0546, "Ն ARMENIAN CAPITAL LETTER NOW" }, { 0x24 , 0x0547, "Շ ARMENIAN CAPITAL LETTER SHA" }, { 0x59 , 0x0548, "Ո ARMENIAN CAPITAL LETTER VO" }, { 0x43 , 0x0549, "Չ ARMENIAN CAPITAL LETTER CHA" }, { 0x3A , 0x054A, "Պ ARMENIAN CAPITAL LETTER PEH" }, { 0x41 , 0x054B, "Ջ ARMENIAN CAPITAL LETTER JHEH" }, { 0x25 , 0x054C, "Ռ ARMENIAN CAPITAL LETTER RA" }, { 0x52 , 0x054D, "Ս ARMENIAN CAPITAL LETTER SEH" }, { 0x53 , 0x054E, "Վ ARMENIAN CAPITAL LETTER VEW" }, { 0x4B , 0x054F, "Տ ARMENIAN CAPITAL LETTER TIWN" }, { 0x28 , 0x0550, "Ր ARMENIAN CAPITAL LETTER REH" }, { 0x56 , 0x0551, "Ց ARMENIAN CAPITAL LETTER CO" }, { 0x55 , 0x0552, "Ւ ARMENIAN CAPITAL LETTER YIWN" }, { 0x57 , 0x0553, "Փ ARMENIAN CAPITAL LETTER PIWR" }, { 0x40 , 0x0554, "Ք ARMENIAN CAPITAL LETTER KEH" }, { 0x21 , 0x0555, "Օ ARMENIAN CAPITAL LETTER OH" }, { 0x7E , 0x0556, "Ֆ ARMENIAN CAPITAL LETTER FEH" }, // { 0x , 0x00A0, " NO-BREAK SPACE" }, // { 0x , 0x00A7, "§ SECTION SIGN" }, { 0x7D , 0x0029, ") RIGHT PARENTHESIS" }, { 0x22 , 0x0028, "( LEFT PARENTHESIS" }, { 0xF7 , 0x00BB, "» RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK" }, { 0x2265, 0x00AB, "« LEFT-POINTING DOUBLE ANGLE QUOTATION MARK" }, { 0x3E , 0x002E, ". FULL STOP" }, { 0x2C , 0x002C, ", COMMA" }, { 0x2D , 0x002D, "- HYPHEN-MINUS" }, { 0xB5 , 0x2026, "… HORIZONTAL ELLIPSIS" }, { 0x5F , 0x005F, "_ LOW LINE" }, { 0x27 , 0x055A, "՚ ARMENIAN APOSTROPHE" }, { 0x5D , 0x055B, "՛ ARMENIAN EMPHASIS MARK" }, { 0x3F , 0x055C, "՜ ARMENIAN EXCLAMATION MARK" }, { 0x6D , 0x055D, "՝ ARMENIAN COMMA" }, { 0x2E , 0x055E, "՞ ARMENIAN QUESTION MARK" }, { 0x67 , 0x0561, "ա ARMENIAN SMALL LETTER AYB" }, { 0x65 , 0x0562, "բ ARMENIAN SMALL LETTER BEN" }, { 0x64 , 0x0563, "գ ARMENIAN SMALL LETTER GIM" }, { 0x78 , 0x0564, "դ ARMENIAN SMALL LETTER DA" }, { 0x66 , 0x0565, "ե ARMENIAN SMALL LETTER ECH" }, { 0x62 , 0x0566, "զ ARMENIAN SMALL LETTER ZA" }, { 0x3D , 0x0567, "է ARMENIAN SMALL LETTER EH" }, { 0x6F , 0x0568, "ը ARMENIAN SMALL LETTER ET" }, { 0x70 , 0x0569, "թ ARMENIAN SMALL LETTER TO" }, { 0x7A , 0x056A, "ժ ARMENIAN SMALL LETTER ZHE" }, { 0x6A , 0x056B, "ի ARMENIAN SMALL LETTER INI" }, { 0x6E , 0x056C, "լ ARMENIAN SMALL LETTER LIWN" }, { 0x33 , 0x056D, "խ ARMENIAN SMALL LETTER XEH" }, { 0x30 , 0x056E, "ծ ARMENIAN SMALL LETTER CA" }, { 0x69 , 0x056F, "կ ARMENIAN SMALL LETTER KEN" }, { 0x6C , 0x0570, "հ ARMENIAN SMALL LETTER HO" }, { 0x36 , 0x0571, "ձ ARMENIAN SMALL LETTER JA" }, { 0x38 , 0x0572, "ղ ARMENIAN SMALL LETTER GHAD" }, { 0x71 , 0x0573, "ճ ARMENIAN SMALL LETTER CHEH" }, { 0x74 , 0x0574, "մ ARMENIAN SMALL LETTER MEN" }, { 0x37 , 0x0575, "յ ARMENIAN SMALL LETTER YI" }, { 0x68 , 0x0576, "ն ARMENIAN SMALL LETTER NOW" }, { 0x34 , 0x0577, "շ ARMENIAN SMALL LETTER SHA" }, { 0x79 , 0x0578, "ո ARMENIAN SMALL LETTER VO" }, { 0x63 , 0x0579, "չ ARMENIAN SMALL LETTER CHA" }, { 0x3B , 0x057A, "պ ARMENIAN SMALL LETTER PEH" }, { 0x61 , 0x057B, "ջ ARMENIAN SMALL LETTER JHEH" }, { 0x35 , 0x057C, "ռ ARMENIAN SMALL LETTER RA" }, { 0x72 , 0x057D, "ս ARMENIAN SMALL LETTER SEH" }, { 0x73 , 0x057E, "վ ARMENIAN SMALL LETTER VEW" }, { 0x6B , 0x057F, "տ ARMENIAN SMALL LETTER TIWN" }, { 0x39 , 0x0580, "ր ARMENIAN SMALL LETTER REH" }, { 0x76 , 0x0581, "ց ARMENIAN SMALL LETTER CO" }, { 0x75 , 0x0582, "ւ ARMENIAN SMALL LETTER YIWN" }, { 0x77 , 0x0583, "փ ARMENIAN SMALL LETTER PIWR" }, { 0x32 , 0x0584, "ք ARMENIAN SMALL LETTER KEH" }, { 0x31 , 0x0585, "օ ARMENIAN SMALL LETTER OH" }, { 0x60 , 0x0586, "ֆ ARMENIAN SMALL LETTER FEH" }, { 0x5B , 0x0587, "և ARMENIAN SMALL LIGATURE ECH YIWN" }, { 0x2F , 0x0589, "։ ARMENIAN FULL STOP" }, { 0xD8 , 0x7B, "{" }, { 0x220F, 0x7D, "}" }, { 0xDA , 0x7C, "|" }, { 0xE5 , 0x2A, "*" }, { 0xE6 , 0x2F, "/" }, { 0xBA , 0x30, "0" }, { 0xA1 , 0x31, "1" }, { 0x2122, 0x32, "2" }, { 0xA3 , 0x33, "3" }, { 0xA2 , 0x34, "4" }, { 0x221E, 0x35, "5" }, { 0xA7 , 0x36, "6" }, { 0xB6 , 0x37, "7" }, { 0x2022, 0x38, "8" }, { 0xAA , 0x39, "9" }, { 0x3C , 0x2D, "-" } // { 0x , 0x, "" }, // { 0x , 0x, "" }, // { 0x , 0x, "" }, // { 0x , 0x, "" }, // { 0x , 0x, "" }, // { 0x , 0x055B, "՛ ARMENIAN EMPHASIS MARK" }, // { 0x , 0x0301, "՛ ARMENIAN EMPHASIS MARK" }, // { 0x , 0x0374, "՛ ARMENIAN EMPHASIS MARK" }, // { 0x , 0x0562, "բ ARMENIAN SMALL LETTER BEN" } }; fileWriter(map, sizeof (map) / sizeof(MappingRaw), mapFile); }
void AsciiToUniMapping::exportRussianASCII_Unicode( const string_t& mapFile ) { MappingRaw map[] = { { 0x00C0 , 0x0410, "А CYRILLIC CAPITAL LETTER A" }, { 0x00C1 , 0x0411, "Б CYRILLIC CAPITAL LETTER BE" }, { 0x00C2 , 0x0412, "В CYRILLIC CAPITAL LETTER VE" }, { 0x00C3 , 0x0413, "Г CYRILLIC CAPITAL LETTER GHE" }, { 0x00C4 , 0x0414, "Д CYRILLIC CAPITAL LETTER DE" }, { 0x00C5 , 0x0415, "Е CYRILLIC CAPITAL LETTER IE" }, { 0x00C6 , 0x0416, "Ж CYRILLIC CAPITAL LETTER ZHE" }, { 0x00C7 , 0x0417, "З CYRILLIC CAPITAL LETTER ZE" }, { 0x00C8 , 0x0418, "И CYRILLIC CAPITAL LETTER I" }, { 0x00C9 , 0x0419, "Й CYRILLIC CAPITAL LETTER SHORT I" }, { 0x00CA , 0x041A, "К CYRILLIC CAPITAL LETTER KA" }, { 0x00CB , 0x041B, "Л CYRILLIC CAPITAL LETTER EL" }, { 0x00CC , 0x041C, "М CYRILLIC CAPITAL LETTER EM" }, { 0x00CD , 0x041D, "Н CYRILLIC CAPITAL LETTER EN" }, { 0x00CE , 0x041E, "О CYRILLIC CAPITAL LETTER O" }, { 0x00CF , 0x041F, "П CYRILLIC CAPITAL LETTER PE" }, { 0x00D0 , 0x0420, "Р CYRILLIC CAPITAL LETTER ER" }, { 0x00D1 , 0x0421, "С CYRILLIC CAPITAL LETTER ES" }, { 0x00D2 , 0x0422, "Т CYRILLIC CAPITAL LETTER TE" }, { 0x00D3 , 0x0423, "У CYRILLIC CAPITAL LETTER U" }, { 0x00D4 , 0x0424, "Ф CYRILLIC CAPITAL LETTER EF" }, { 0x00D5 , 0x0425, "Х CYRILLIC CAPITAL LETTER HA" }, { 0x00D6 , 0x0426, "Ц CYRILLIC CAPITAL LETTER TSE" }, { 0x00D7 , 0x0427, "Ч CYRILLIC CAPITAL LETTER CHE" }, { 0x00D8 , 0x0428, "Ш CYRILLIC CAPITAL LETTER SHA" }, { 0x00D9 , 0x0429, "Щ CYRILLIC CAPITAL LETTER SHCHA" }, { 0x00DA , 0x042A, "Ъ CYRILLIC CAPITAL LETTER HARD SIGN" }, { 0x00DB , 0x042B, "Ы CYRILLIC CAPITAL LETTER YERU" }, { 0x00DC , 0x042C, "Ь CYRILLIC CAPITAL LETTER SOFT SIGN" }, { 0x00DD , 0x042D, "Э CYRILLIC CAPITAL LETTER E" }, { 0x00DE , 0x042E, "Ю CYRILLIC CAPITAL LETTER YU" }, { 0x00DF , 0x042F, "Я CYRILLIC CAPITAL LETTER YA" }, { 0x00E0 , 0x0430, "а CYRILLIC SMALL LETTER A" }, { 0x00E1 , 0x0431, "б CYRILLIC SMALL LETTER BE" }, { 0x00E2 , 0x0432, "в CYRILLIC SMALL LETTER VE" }, { 0x00E3 , 0x0433, "г CYRILLIC SMALL LETTER GHE" }, { 0x00E4 , 0x0434, "д CYRILLIC SMALL LETTER DE" }, { 0x00E5 , 0x0435, "е CYRILLIC SMALL LETTER IE" }, { 0x00E6 , 0x0436, "ж CYRILLIC SMALL LETTER ZHE" }, { 0x00E7 , 0x0437, "з CYRILLIC SMALL LETTER ZE" }, { 0x00E8 , 0x0438, "и CYRILLIC SMALL LETTER I" }, { 0x00E9 , 0x0439, "й CYRILLIC SMALL LETTER SHORT I" }, { 0x00EA , 0x043A, "к CYRILLIC SMALL LETTER KA" }, { 0x00EB , 0x043B, "л CYRILLIC SMALL LETTER EL" }, { 0x00EC , 0x043C, "м CYRILLIC SMALL LETTER EM" }, { 0x00ED , 0x043D, "н CYRILLIC SMALL LETTER EN" }, { 0x00EE , 0x043E, "о CYRILLIC SMALL LETTER O" }, { 0x00EF , 0x043F, "п CYRILLIC SMALL LETTER PE" }, { 0x00F0 , 0x0440, "р CYRILLIC SMALL LETTER ER" }, { 0x00F1 , 0x0441, "с CYRILLIC SMALL LETTER ES" }, { 0x00F2 , 0x0442, "т CYRILLIC SMALL LETTER TE" }, { 0x00F3 , 0x0443, "у CYRILLIC SMALL LETTER U" }, { 0x00F4 , 0x0444, "ф CYRILLIC SMALL LETTER EF" }, { 0x00F5 , 0x0445, "х CYRILLIC SMALL LETTER HA" }, { 0x00F6 , 0x0446, "ц CYRILLIC SMALL LETTER TSE" }, { 0x00F7 , 0x0447, "ч CYRILLIC SMALL LETTER CHE" }, { 0x00F8 , 0x0448, "ш CYRILLIC SMALL LETTER SHA" }, { 0x00F9 , 0x0449, "щ CYRILLIC SMALL LETTER SHCHA" }, { 0x00FA , 0x044A, "ъ CYRILLIC SMALL LETTER HARD SIGN" }, { 0x00FB , 0x044B, "ы CYRILLIC SMALL LETTER YERU" }, { 0x00FC , 0x044C, "ь CYRILLIC SMALL LETTER SOFT SIGN" }, { 0x00FD , 0x044D, "э CYRILLIC SMALL LETTER E" }, { 0x00FE , 0x044E, "ю CYRILLIC SMALL LETTER YU" }, { 0x00FF , 0x044F, "я CYRILLIC SMALL LETTER YA" }, { 0x00A1 , 0x0401, "Ё CYRILLIC CAPITAL LETTER IO" }, { 0x00BF , 0x0451, "ё CYRILLIC SMALL LETTER IO" }, { 0x00A8 , 0x2116, "№ NUMERO SIGN" } }; fileWriter(map, sizeof (map) / sizeof(MappingRaw), mapFile); }