visitor-pattern
Anonymous or real class definition when using visitor pattern?
When you use the Visitor pattern and you need to get a variable inside visitor method, how to you proceed ?[详细]
2023-04-01 13:18 分类:问答Boost Graph Library: Potential Bug
BGL\'s depth_first_search algorithm sometimes calls back_edge() on visitors even if there are no cycles in the graph. By definition of back edge, and according to Boost\'s DFS Visitor Documentation, t[详细]
2023-03-28 00:56 分类:问答Perl module that works like Data::Dumper but allow data manipulation
Is there a popular Perl module that works like Data::Dumper but allows user to write hook to manipulate the data inside complex structure or object.[详细]
2023-03-27 23:35 分类:问答What's faster: down-cast from virtual base or cross-cast?
This is somewhat hypothetical as I\'m not too worried about performance - just wondering which option is actually the fastest/most efficient in general, or if there is no difference whatsoever.[详细]
2023-03-25 16:34 分类:问答A way to find what a Java object was initialized as instead of declared type?
I don\'t know if I\'m missing something here, but I am having trouble casting an object to its actual, initialized type. Basically, if I create an object with \"SuperClass sc = new SubClass(),\" then[详细]
2023-03-24 02:21 分类:问答DataStructure for implementing something like nested Maps?
I want to have a map that permits a tree-like behaviour. I want to be able to define a Map from string to an object, that can be another map, or a string:[详细]
2023-03-22 11:56 分类:问答How does double dispatch work in Visitor pattern?
I was looking into other questions related to the visitor pattern but couldn\'t understand the implementation of double dispatc开发者_开发问答h in visitor pattern.[详细]
2023-03-21 22:05 分类:问答Access level to elements in visitor pattern
In the visitor pattern, i want the client to only have access to the getters of the elements, while the visitors should have access to getters and setters. How would you implement it?[详细]
2023-03-20 18:01 分类:问答Which technique for breaking out of a 'visitor' loop is easier for compilers to analyze?
I\'m currently generating code intended for a C++ compiler. I\'m generating a class that will take a visitor object, call the accept method on it with several objects. However, I want the visitor to h[详细]
2023-03-18 06:56 分类:问答Visitor: adding more types via inheritance
I want to expand a declared Visitor through inheritance and have the run-time environment search the descendents of the Visitor for the correct method to execute.I can have this in C#, but I\'m lookin[详细]
2023-03-12 21:36 分类:问答