OpenASIP 2.2
Loading...
Searching...
No Matches
ViewBEM.cc
Go to the documentation of this file.
1/*
2 Copyright (c) 2002-2009 Tampere University.
3
4 This file is part of TTA-Based Codesign Environment (TCE).
5
6 Permission is hereby granted, free of charge, to any person obtaining a
7 copy of this software and associated documentation files (the "Software"),
8 to deal in the Software without restriction, including without limitation
9 the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 and/or sell copies of the Software, and to permit persons to whom the
11 Software is furnished to do so, subject to the following conditions:
12
13 The above copyright notice and this permission notice shall be included in
14 all copies or substantial portions of the Software.
15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 DEALINGS IN THE SOFTWARE.
23 */
24/**
25 * @file ViewBEM.cc
26 *
27 * Implements the viewbem application which prints out human readable
28 * information of given binary encoding map.
29 *
30 * @author Lasse Laasonen 2006 (lasse.laasonen-no.spam-tut.fi)
31 * @note rating: red
32 */
33
34#include <iostream>
35#include <string>
36
38
39#include "BEMSerializer.hh"
40#include "BinaryEncoding.hh"
42#include "MoveSlot.hh"
43#include "ImmediateSlotField.hh"
45#include "GuardField.hh"
46#include "DestinationField.hh"
47#include "SourceField.hh"
48#include "GPRGuardEncoding.hh"
49#include "FUGuardEncoding.hh"
51#include "ImmediateEncoding.hh"
52#include "BridgeEncoding.hh"
53#include "NOPEncoding.hh"
54#include "SocketEncoding.hh"
55#include "SocketCodeTable.hh"
56#include "FUPortCode.hh"
57#include "RFPortCode.hh"
58#include "IUPortCode.hh"
59#include "Conversion.hh"
60#include "FileSystem.hh"
61
62using std::cerr;
63using std::cout;
64using std::endl;
65using std::string;
66
67static void
68printBEMInfo(const BinaryEncoding& bem, const std::string& bemFile);
69static void
71static void
73static void
75static void
76printMoveSlot(const MoveSlot& moveSlot);
77static void
78printMoveSlotLayout(const MoveSlot& moveSlot);
79static void
80printGuardFieldEncodings(const MoveSlot& moveSlot);
81static void
82printSlotFieldEncodings(const SlotField& slotField);
83static string
84portCodeBits(const PortCode& code);
85static string
87static string
89static string
91static void
92printSourceFieldEncodings(const MoveSlot& moveSlot);
93static void
95static void
97static void
98printPattern(const std::string& pattern, int times);
99
100
101/**
102 * The main function.
103 */
104int main(int argc, char* argv[]) {
105
107 try {
108 options.parse(argv, argc);
109 } catch (ParserStopRequest const&) {
110 return EXIT_SUCCESS;
111 } catch (const IllegalCommandLine& e) {
112 cerr << e.errorMessage() << endl;
113 return EXIT_FAILURE;
114 }
115
116 string bemFile = options.bemFile();
117 if (bemFile == "") {
119 return EXIT_FAILURE;
120 }
121
122 BEMSerializer serializer;
123 serializer.setSourceFile(bemFile);
124 BinaryEncoding* bem;
125 try {
126 bem = serializer.readBinaryEncoding();
127 } catch (const Exception& e) {
128 cerr << e.errorMessage() << endl;
129 return EXIT_FAILURE;
130 }
131
132 printBEMInfo(*bem, bemFile);
133 delete bem;
134 return EXIT_SUCCESS;
135}
136
137
138/**
139 * Prints information of BEM to standard output.
140 *
141 * @param bem The BEM.
142 * @param bemFile Name of the BEM file.
143 */
144static void
145printBEMInfo(const BinaryEncoding& bem, const std::string& bemFile) {
146
147 cout << "Binary Encoding Map: " << FileSystem::fileOfPath(bemFile)
148 << endl << endl;
149 cout << "X = unused bit" << endl;
150 cout << "I = immediate bit" << endl;
151 cout << "S = socket code bit" << endl;
152 cout << "R = register index bit" << endl << endl;
153
154 cout << "Total instruction width: " << bem.width() << endl << endl;
155
157 cout << endl;
159 cout << endl;
160 for (int i = 0; i < bem.longImmDstRegisterFieldCount(); i++) {
163 cout << endl;
164 }
165 for (int i = 0; i < bem.moveSlotCount(); i++) {
166 MoveSlot& slot = bem.moveSlot(i);
167 printMoveSlot(slot);
168 cout << endl;
169 }
170}
171
172
173/**
174 * Prints the instruction layout of the given BEM.
175 *
176 * @param bem The BEM.
177 */
178static void
180
181 if (bem.childFieldCount() == 0) {
182 return;
183 }
184
185 cout << "|";
186 for (int i = bem.childFieldCount() - 1; i >= 0; i--) {
187 InstructionField& field = bem.childField(i);
188 ImmediateControlField* icField =
189 dynamic_cast<ImmediateControlField*>(&field);
190 MoveSlot* moveSlot = dynamic_cast<MoveSlot*>(&field);
191 ImmediateSlotField* immSlot =
192 dynamic_cast<ImmediateSlotField*>(&field);
193 LImmDstRegisterField* dstRegField =
194 dynamic_cast<LImmDstRegisterField*>(&field);
195
196 if (icField != NULL) {
197 cout << " limm cntrl: " << field.width();
198 } else if (moveSlot != NULL) {
199 cout << " move slot " << moveSlot->name() << ": "
200 << moveSlot->width();
201 } else if (immSlot != NULL) {
202 cout << " limm slot " << immSlot->name() << ": "
203 << immSlot->width();
204 } else {
205 assert(dstRegField != NULL);
206 cout << " dst reg field: " << dstRegField->width();
207 }
208 cout << " |";
209 }
210 cout << endl;
211}
212
213
214/**
215 * Prints information of immediate control field of the given BEM.
216 *
217 * @param bem The BEM.
218 */
219static void
221
222 if (!bem.hasImmediateControlField()) {
223 return;
224 }
225
228 cout << "Immediate Control Field" << endl << endl;
229 cout << "Position: " << icField.bitPosition() << endl;
230 cout << "Width: " << icField.width() << endl;
231 cout << "Encodings:" << endl;
232
233 int encodingWidth = icField.width() - icField.extraBits();
234 string extraBits;
235 for (int i = 0; i < icField.extraBits(); i++) {
236 extraBits.append("X");
237 }
238
239 for (int i = 0; i < icField.templateCount(); i++) {
240 string iTemp = icField.instructionTemplate(i);
241 unsigned int encoding = icField.templateEncoding(iTemp);
242 cout << extraBits << Conversion::toBinary(encoding, encodingWidth)
243 << " : " << iTemp << endl;
244 }
245}
246
247
248/**
249 * Prints information of the given long immediate destination register field.
250 *
251 * @param field The field.
252 */
253static void
255
257 cout << "Long Immediate Destination Register Field" << endl << endl;
258 cout << "Position: " << field.bitPosition() << endl;
259 cout << "Width: " << field.width() << endl << endl;
260
261 cout << "Usage" << endl;
262 for (int i = 0; i < field.instructionTemplateCount(); i++) {
263 string iTemp = field.instructionTemplate(i);
264 string iu = field.immediateUnit(iTemp);
265 cout << iTemp << ": " << iu << endl;
266 }
267}
268
269
270/**
271 * Prints information of the given move slot.
272 *
273 * @param moveSlot The move slot.
274 */
275static void
276printMoveSlot(const MoveSlot& moveSlot) {
277
279 cout << "Move Slot: " << moveSlot.name() << endl << endl;
280 cout << "Position: " << moveSlot.bitPosition() << endl;
281 cout << "Width: " << moveSlot.width() << endl << endl;
282
283 printMoveSlotLayout(moveSlot);
284 cout << endl;
285 printGuardFieldEncodings(moveSlot);
286 cout << endl;
288 cout << endl;
290}
291
292
293/**
294 * Prints the layout of the given move slot.
295 *
296 * @param moveSlot The move slot.
297 */
298static void
300 cout << "|";
301 for (int i = moveSlot.childFieldCount() - 1; i >= 0; i--) {
302 InstructionField& childField = moveSlot.childField(i);
303 GuardField* grdField = dynamic_cast<GuardField*>(&childField);
304 SourceField* srcField = dynamic_cast<SourceField*>(&childField);
305 DestinationField* dstField =
306 dynamic_cast<DestinationField*>(&childField);
307 if (grdField != NULL) {
308 cout << " grd field: " << grdField->width();
309 } else if (srcField != NULL) {
310 cout << " src field: " << srcField->width();
311 } else {
312 assert(dstField != NULL);
313 cout << " dst field: " << dstField->width();
314 }
315 cout << " |";
316 }
317 cout << endl;
318}
319
320
321/**
322 * Prints the encodings of the guard field of the given move slot.
323 *
324 * @param moveSlot The move slot.
325 */
326static void
328
329 if (!moveSlot.hasGuardField()) {
330 return;
331 }
332
333 GuardField& grdField = moveSlot.guardField();
334 int encodingWidth = grdField.width() - grdField.extraBits();
335 string extraBits;
336 for (int i = 0; i < grdField.extraBits(); i++) {
337 extraBits.append("X");
338 }
339
340 cout << "Guard field encodings:" << endl;
341 if (grdField.hasUnconditionalGuardEncoding(false)) {
343 grdField.unconditionalGuardEncoding(false);
344 cout << extraBits
345 << Conversion::toBinary(enc.encoding(), encodingWidth)
346 << " : always-true" << endl;
347 }
348 if (grdField.hasUnconditionalGuardEncoding(true)) {
350 grdField.unconditionalGuardEncoding(true);
351 cout << extraBits
352 << Conversion::toBinary(enc.encoding(), encodingWidth)
353 << " : always-false" << endl;
354 }
355 for (int i = 0; i < grdField.gprGuardEncodingCount(); i++) {
356 GPRGuardEncoding& enc = grdField.gprGuardEncoding(i);
357 cout << extraBits
358 << Conversion::toBinary(enc.encoding(), encodingWidth)
359 << " : ";
360 if (enc.isGuardInverted()) {
361 cout << "inverted ";
362 } else {
363 cout << "non-inverted ";
364 }
365 cout << "GPR " << enc.registerIndex() << " of RF "
366 << enc.registerFile() << endl;
367 }
368 for (int i = 0; i < grdField.fuGuardEncodingCount(); i++) {
369 FUGuardEncoding& enc = grdField.fuGuardEncoding(i);
370 cout << extraBits
371 << Conversion::toBinary(enc.encoding(), encodingWidth) << " : ";
372 if (enc.isGuardInverted()) {
373 cout << "inverted ";
374 } else {
375 cout << "non-inverted ";
376 }
377 cout << "port " << enc.port() << " of FU " << enc.functionUnit()
378 << endl;
379 }
380}
381
382
383/**
384 * Prints the socket and NOP encodings of the given slot field.
385 *
386 * @param slotField The source or destination field.
387 */
388static void
390
391 if (slotField.hasNoOperationEncoding()) {
392 NOPEncoding& enc = slotField.noOperationEncoding();
393 if (slotField.componentIDPosition() == BinaryEncoding::RIGHT) {
394 printPattern("X", slotField.width() - enc.width());
395 if (enc.width()) {
396 cout << Conversion::toBinary(enc.encoding(), enc.width());
397 }
398 } else {
399 printPattern("X", slotField.extraBits());
400 if (enc.width()) {
401 cout << Conversion::toBinary(enc.encoding(), enc.width());
402 }
404 "X",
405 slotField.width() - slotField.extraBits() - enc.width());
406 }
407 cout << " : NOP" << endl;
408 }
409
410 for (int i = 0; i < slotField.socketEncodingCount(); i++) {
411 SocketEncoding& enc = slotField.socketEncoding(i);
412 printPattern("X", slotField.extraBits());
413 if (slotField.componentIDPosition() == BinaryEncoding::RIGHT) {
414 if (enc.hasSocketCodes()) {
415 SocketCodeTable& scTable = enc.socketCodes();
416 printPattern("S", scTable.width());
418 "X",
419 slotField.width() - slotField.extraBits() -
420 scTable.width() - enc.socketIDWidth());
421 } else {
423 "X",
424 slotField.width() - slotField.extraBits() -
425 enc.socketIDWidth());
426 }
427 if (enc.socketIDWidth()) {
428 cout <<
430 }
431 } else {
432 if (enc.socketIDWidth()) {
433 cout <<
435 }
436 if (enc.hasSocketCodes()) {
437 SocketCodeTable& scTable = enc.socketCodes();
439 "X",
440 slotField.width() - slotField.extraBits() -
441 scTable.width() - enc.socketIDWidth());
442 printPattern("S", scTable.width());
443 } else {
445 "X",
446 slotField.width() - slotField.extraBits() - enc.width());
447 }
448 }
449 cout << " : socket " << enc.socketName() << endl;
450
451 if (enc.hasSocketCodes()) {
452 SocketCodeTable& scTable = enc.socketCodes();
453 if (slotField.componentIDPosition() == BinaryEncoding::RIGHT) {
454 for (int i = 0; i < scTable.rfPortCodeCount(); i++) {
455 printPattern(" ", slotField.extraBits());
456 RFPortCode& code = scTable.rfPortCode(i);
457 cout << portCodeBits(code);
458 printPattern(" ", enc.width() - scTable.width());
459 cout << " : " << portCodeDescription(code) << endl;
460 }
461 for (int i = 0; i < scTable.iuPortCodeCount(); i++) {
462 printPattern(" ", slotField.extraBits());
463 IUPortCode& code = scTable.iuPortCode(i);
464 cout << portCodeBits(code);
465 printPattern(" ", enc.width() - scTable.width());
466 cout << " : " << portCodeDescription(code) << endl;
467 }
468 for (int i = 0; i < scTable.fuPortCodeCount(); i++) {
469 printPattern(" ", slotField.extraBits());
470 FUPortCode& code = scTable.fuPortCode(i);
471 cout << portCodeBits(code);
472 printPattern(" ", enc.width() - scTable.width());
473 cout << " : " << portCodeDescription(code) << endl;
474 }
475 } else {
476 for (int i = 0; i < scTable.rfPortCodeCount(); i++) {
477 printPattern(" ", slotField.width() - scTable.width());
478 RFPortCode& code = scTable.rfPortCode(i);
479 cout << portCodeBits(code);
480 cout << " : " << portCodeDescription(code) << endl;
481 }
482 for (int i = 0; i < scTable.iuPortCodeCount(); i++) {
483 printPattern(" ", slotField.width() - scTable.width());
484 IUPortCode& code = scTable.iuPortCode(i);
485 cout << portCodeBits(code);
486 cout << " : " << portCodeDescription(code) << endl;
487 }
488 for (int i = 0; i < scTable.fuPortCodeCount(); i++) {
489 printPattern(" ", slotField.width() - scTable.width());
490 FUPortCode& code = scTable.fuPortCode(i);
491 cout << portCodeBits(code);
492 cout << " : " << portCodeDescription(code) << endl;
493 }
494 }
495 }
496 }
497}
498
499
500/**
501 * Returns the bit string of the given port code.
502 *
503 * @param code The port code.
504 */
505static string
506portCodeBits(const PortCode& code) {
507 string bits;
508 if (code.hasEncoding() && code.encodingWidth()) {
509 bits += Conversion::toBinary(
510 code.encoding(), code.encodingWidth());
511 }
512 int unusedBits = code.parent()->width() - code.width();
513 for (int i = 0; i < unusedBits; i++) {
514 bits.append("X");
515 }
516 for (int i = 0; i < code.indexWidth(); i++) {
517 bits.append("R");
518 }
519 return bits;
520}
521
522
523/**
524 * Returns description of the given port code.
525 *
526 * @param code The port code.
527 */
528static string
530 return "RF: " + code.unitName();
531}
532
533
534/**
535 * Returns description of the given port code.
536 *
537 * @param code The port code.
538 */
539static string
541 return "IU: " + code.unitName();
542}
543
544
545/**
546 * Returns description of the given port code.
547 *
548 * @param code The port code.
549 */
550static string
552 string desc = "FU port: " + code.unitName() + ", " + code.portName();
553 if (code.hasOperation()) {
554 desc.append(", " + code.operationName());
555 }
556 return desc;
557}
558
559
560/**
561 * Prints the encodings of the source field of the given move slot.
562 *
563 * @param moveSlot The move slot.
564 */
565static void
567
568 if (!moveSlot.hasSourceField()) {
569 return;
570 }
571
572 SourceField& srcField = moveSlot.sourceField();
573 cout << "Source field encodings:" << endl;
574 printSlotFieldEncodings(srcField);
575
576 if (srcField.hasImmediateEncoding()) {
577 ImmediateEncoding& enc = srcField.immediateEncoding();
578 printPattern("X", srcField.extraBits());
579 if (srcField.componentIDPosition() == BinaryEncoding::LEFT) {
580 if (enc.encodingWidth()) {
581 cout << Conversion::toBinary(
582 enc.encoding(), enc.encodingWidth());
583 }
585 "X", srcField.width() - srcField.extraBits() - enc.width());
586 printPattern("I", enc.immediateWidth());
587 } else {
588 printPattern("I", enc.immediateWidth());
590 "X", srcField.width() - srcField.extraBits() - enc.width());
591 if (enc.encodingWidth()) {
592 cout << Conversion::toBinary(
593 enc.encoding(), enc.encodingWidth());
594 }
595 }
596 cout << " : short immediate" << endl;
597 }
598
599 for (int i = 0; i < srcField.bridgeEncodingCount(); i++) {
600 BridgeEncoding& enc = srcField.bridgeEncoding(i);
601 printPattern("X", srcField.extraBits());
602 if (srcField.componentIDPosition() == BinaryEncoding::RIGHT) {
604 "X", srcField.width() - srcField.extraBits() - enc.width());
605 cout << Conversion::toBinary(enc.encoding(), enc.width());
606 } else {
607 cout << Conversion::toBinary(enc.encoding(), enc.width());
609 "X", srcField.width() - srcField.extraBits() - enc.width());
610 }
611 cout << " : bridge " << enc.bridgeName() << endl;
612 }
613}
614
615
616/**
617 * Prints the encodings of the destination field of the given move slot.
618 *
619 * @param moveSlot The move slot.
620 */
621static void
623
624 if (!moveSlot.hasDestinationField()) {
625 return;
626 }
627
628 DestinationField& dstField = moveSlot.destinationField();
629 cout << "Destination field encodings:" << endl;
630 printSlotFieldEncodings(dstField);
631}
632
633
634/**
635 * Prints the separator.
636 */
637static void
639 cout << "------------------------------------------------------------"
640 << endl;
641}
642
643
644/**
645 * Prints the given pattern the given times.
646 *
647 * @param pattern The pattern.
648 * @param times Times the pattern is written.
649 */
650static void
651printPattern(const std::string& pattern, int times) {
652 for (int i = 0; i < times; i++) {
653 cout << pattern;
654 }
655}
#define assert(condition)
static MachInfoCmdLineOptions options
Definition MachInfo.cc:46
int main(int argc, char *argv[])
Definition ViewBEM.cc:104
static void printInstructionLayout(const BinaryEncoding &bem)
Definition ViewBEM.cc:179
static void printSlotFieldEncodings(const SlotField &slotField)
Definition ViewBEM.cc:389
static void printBEMInfo(const BinaryEncoding &bem, const std::string &bemFile)
Definition ViewBEM.cc:145
static void printLImmDstRegisterField(const LImmDstRegisterField &field)
Definition ViewBEM.cc:254
static void printSeparator()
Definition ViewBEM.cc:638
static string portCodeBits(const PortCode &code)
Definition ViewBEM.cc:506
static void printGuardFieldEncodings(const MoveSlot &moveSlot)
Definition ViewBEM.cc:327
static void printPattern(const std::string &pattern, int times)
Definition ViewBEM.cc:651
static string portCodeDescription(const RFPortCode &code)
Definition ViewBEM.cc:529
static void printImmediateControlField(const BinaryEncoding &bem)
Definition ViewBEM.cc:220
static void printDestinationFieldEncodings(const MoveSlot &moveSlot)
Definition ViewBEM.cc:622
static void printMoveSlot(const MoveSlot &moveSlot)
Definition ViewBEM.cc:276
static void printMoveSlotLayout(const MoveSlot &moveSlot)
Definition ViewBEM.cc:299
static void printSourceFieldEncodings(const MoveSlot &moveSlot)
Definition ViewBEM.cc:566
BinaryEncoding * readBinaryEncoding()
ImmediateControlField & immediateControlField() const
LImmDstRegisterField & longImmDstRegisterField(int index) const
int moveSlotCount() const
virtual int childFieldCount() const
MoveSlot & moveSlot(int index) const
int longImmDstRegisterFieldCount() const
virtual int width(const TCEString &templateName) const
bool hasImmediateControlField() const
virtual InstructionField & childField(int position) const
std::string bridgeName() const
void parse(char *argv[], int argc)
static std::string toBinary(unsigned int source, unsigned int stringWidth=0)
virtual int width() const
Definition Encoding.cc:130
unsigned int encoding() const
Definition Encoding.cc:108
std::string errorMessage() const
Definition Exception.cc:123
std::string port() const
std::string functionUnit() const
std::string portName() const
std::string operationName() const
bool hasOperation() const
static std::string fileOfPath(const std::string pathName)
int registerIndex() const
std::string registerFile() const
unsigned int encoding() const
bool isGuardInverted() const
FUGuardEncoding & fuGuardEncoding(int index) const
bool hasUnconditionalGuardEncoding(bool inverted) const
int gprGuardEncodingCount() const
UnconditionalGuardEncoding & unconditionalGuardEncoding(bool inverted) const
GPRGuardEncoding & gprGuardEncoding(int index) const
virtual int width() const
int fuGuardEncodingCount() const
unsigned int templateEncoding(const std::string &name) const
std::string instructionTemplate(int index) const
virtual int width() const
virtual int width() const
std::string name() const
virtual int width() const =0
std::string instructionTemplate(int index) const
virtual int width() const
std::string immediateUnit(const std::string &instructionTemplate) const
virtual void printHelp() const
SourceField & sourceField() const
Definition MoveSlot.cc:277
virtual InstructionField & childField(int position) const
Definition MoveSlot.cc:380
DestinationField & destinationField() const
Definition MoveSlot.cc:341
virtual int width() const
Definition MoveSlot.cc:406
std::string name() const
Definition MoveSlot.cc:136
GuardField & guardField() const
Definition MoveSlot.cc:215
bool hasSourceField() const
Definition MoveSlot.cc:264
virtual int childFieldCount() const
Definition MoveSlot.cc:357
bool hasDestinationField() const
Definition MoveSlot.cc:327
bool hasGuardField() const
Definition MoveSlot.cc:202
std::string unitName() const
Definition PortCode.cc:140
bool hasEncoding() const
Definition PortCode.cc:151
int indexWidth() const
Definition PortCode.cc:215
SocketCodeTable * parent() const
Definition PortCode.cc:226
int encodingWidth() const
Definition PortCode.cc:204
int width() const
Definition PortCode.cc:188
unsigned int encoding() const
Definition PortCode.cc:164
virtual int width() const
Definition SlotField.cc:307
SocketEncoding & socketEncoding(int index) const
Definition SlotField.cc:170
bool hasNoOperationEncoding() const
Definition SlotField.cc:267
NOPEncoding & noOperationEncoding() const
Definition SlotField.cc:281
BinaryEncoding::Position componentIDPosition() const
Definition SlotField.cc:296
int socketEncodingCount() const
Definition SlotField.cc:156
FUPortCode & fuPortCode(int index) const
RFPortCode & rfPortCode(int index) const
int fuPortCodeCount() const
IUPortCode & iuPortCode(int index) const
int rfPortCodeCount() const
int iuPortCodeCount() const
virtual int width() const
SocketCodeTable & socketCodes() const
bool hasSocketCodes() const
std::string socketName() const
int socketIDWidth() const
int bridgeEncodingCount() const
virtual int width() const
ImmediateEncoding & immediateEncoding() const
bool hasImmediateEncoding() const
BridgeEncoding & bridgeEncoding(const std::string &bridge) const
void setSourceFile(const std::string &fileName)