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)

    It is hardly to be believed how spiritual reflections when mixed with a little physics can hold people’s attention and give them a livelier idea of God than do the often ill-applied examples of his wrath.
    —G.C. (Georg Christoph)