Single-serving Visitor Pattern - Usage Examples

Usage Examples

The single-serving visitor is called through the intermediate of static methods.

  • Without parameters:
Element* elem; SingleServingVisitor::apply_to(elem);
  • With parameters:
Element* elem; TYPE param1, param2; SingleServingVisitor::apply_to(elem, param1, param2);
  • Implementation as a singleton:
Element* elem; TYPE param1, param2; SingleServingVisitor::set_param1(param1); SingleServingVisitor::set_param2(param2); SingleServingVisitor::apply_to(elem);

Read more about this topic:  Single-serving Visitor Pattern

Famous quotes containing the words usage and/or examples:

    Girls who put out are tramps. Girls who don’t are ladies. This is, however, a rather archaic usage of the word. Should one of you boys happen upon a girl who doesn’t put out, do not jump to the conclusion that you have found a lady. What you have probably found is a lesbian.
    Fran Lebowitz (b. 1951)

    In the examples that I here bring in of what I have [read], heard, done or said, I have refrained from daring to alter even the smallest and most indifferent circumstances. My conscience falsifies not an iota; for my knowledge I cannot answer.
    Michel de Montaigne (1533–1592)