Tasks #304

Wildcard Mechnism for Converter Selection

Added by S. Wrede almost 13 years ago. Updated almost 13 years ago.

Status:ResolvedStart date:05/19/2011
Priority:NormalDue date:
Assignee:J. Wienke% Done:

60%

Category:-
Target version:0.3

Description

This will be useful for
  • writing introspection/logging tools
  • implementation of generic converters (e.g. generic ProtocolBuffer converter)
Affects
  • Java (Johannes)
  • C++ (Jan)
  • Python (Jan)

Associated revisions

Revision 8728a652
Added by J. Moringen almost 13 years ago

Improved flexibility in converter selection mechanism
refs #304
  • src/CMakeLists.txt: added files
    src/rsb/converter/ConverterSelectionStrategy.h,
    src/rsb/converter/PredicateConverterList.h,
    src/rsb/converter/RegexConverterPredicate.cpp,
    src/rsb/converter/RegexConverterPredicate.h and
    src/rsb/converter/UnambiguousConverterMap.h
  • src/rsb/converter/ConverterSelectionStrategy.h: new file; contains
    ConverterSelectionStrategy interface which has been lifted from
    UnambiguousConverterMap
  • src/rsb/converter/PredicateConverterList.h: new file; contains an
    implementation of ConverterSelectionStrategy that uses predicates
    and a chain of responsibility
  • src/rsb/converter/RegexConverterPredicate.{h,cpp}: new files; a
    converter predicate based on regular expression matching against the
    query string
  • src/rsb/converter/UnambiguousConverterMap.h: implements
    ConverterSelectionStrategy
  • test/CMakeLists.txt: added files
    test/rsb/converter/PredicateConverterListTest.cpp and
    test/rsb/converter/RegexConverterPredicateTest.cpp
  • test/rsb/converter/PredicateConverterListTest.cpp: new file; unit
    test for PredicateConverterList
  • test/rsb/converter/RegexConverterPredicateTest.cpp: new file; unit
    test for RegexConverterPredicate

Revision a29fc96b
Added by J. Moringen almost 13 years ago

Added missing RSB_EXPORT in src/rsb/converter/RegexConverterPredicate.h
refs #304
  • src/rsb/converter/RegexConverterPredicate.h: added RSB_EXPORT for
    class RegexConverterPredicate

Revision 7fa3afd5
Added by J. Moringen almost 13 years ago

Added PredicateConverterList in rsb/transport/converter.py
refs #304
  • rsb/transport/converter.py: added class ConverterSelectionStrategy
    which basically acts as an interface for converter selection; added
    class PredicateConverterList which selects converters based on
    predicate on wire-schema names and data-type names
  • test/convertertest.py: added minimalistic test for
    PredicateConverterList

Revision 997d499d
Added by J. Moringen almost 13 years ago

Fixed errors in PredicateConverterList in rsb/transport/converter.py
refs #304
  • rsb/transport/converter.py: fixed some errors in
    ConverterSelectionStrategy
  • test/convertertest.py: added proper tests for
    PredicateConverterList.getConverterFor{WireSchema,DataType}

History

#1 Updated by J. Moringen almost 13 years ago

  • Target version set to 0.3

#2 Updated by J. Moringen almost 13 years ago

  • Subject changed from converter selection with wildcard mechnism to ease introspection and implementation of generic converters to Wildcard Mechnism for Converter Selection

#3 Updated by J. Moringen almost 13 years ago

  • Status changed from New to In Progress
  • Assignee set to J. Moringen

#4 Updated by J. Moringen almost 13 years ago

  • % Done changed from 0 to 40

#5 Updated by J. Moringen almost 13 years ago

  • Description updated (diff)

#6 Updated by J. Moringen almost 13 years ago

  • % Done changed from 40 to 60

#7 Updated by J. Moringen almost 13 years ago

  • Assignee changed from J. Moringen to J. Wienke

#8 Updated by J. Moringen almost 13 years ago

  • Status changed from In Progress to Resolved

Converter mechanism will be revised anyway. Java implementation can wait until then.

Also available in: Atom PDF