| Methods Index |
CNotifierSubclasses: None
CTdiCommandTranslator can be used as a prototype in a TDI connection to translate commands from the TDI provider to a different set of commands for the TDI dependent. This technique is useful, for example, to use a standard text provider (which supplies TDIClearCmd, TDIReplaceCmd, and TDIAppendCmd) to populate a list view (which expects TDIOptionClearCmd, TDIOptionReplaceCmd, and TDIOptionAppendCmd).
CTdiCommandTranslator* aTranslator = newSee also
CTdiCommandTranslator(aList);
aTranslator -> AddListPopulationTranslations();
CTdiConnection aConnection(
aTextSource,
aList,
aTranslator
);
CTdiConnection usage.
|
|
|
RWGOrderedVector(long)
|
itsFromCommands;
|
RWGOrderedVector(long)
|
itsToCommands;
|
CNotifier*
|
itsTarget;
|
CTdiCommandTranslator(CNotifier* theTarget);
CTdiCommandTranslator(
const CTdiCommandTranslator& theTranslator);
const CTdiCommandTranslator& operator=(
const CTdiCommandTranslator& theTranslator);
virtual ~CTdiCommandTranslator();
virtual void DoUpdateModel(
long theControllerId,
long theCommand,
const CModel* theModel);
void AddTranslation(
long theFromCommand, long theToCommand);
theFromCommand to the theToCommand. When a theFromCommand is received from the TDI provider a theToCommand is sent to the TDI dependent.
void AddListPopulationTranslations();
TDIOptionClearCmd -> TDIClearCmd
TDIOptionReplaceCmd -> TDIReplaceCMD
TDIOptionAppendCmd -> TDIAppendCMD
void AddListSelectionTranslations();
TDIClearCmd -> TDIOptionClearCmd
TDIReplaceCMD -> TDIOptionReplaceCmd
TDIAppendCMD -> TDIOptionAppendCmd