visitor-pattern
C++ template metaprogramming to create a boost::variant from a shared_ptr and a boost::static_visitor
As a personal exercise, I want to implement the visitor pattern using shared_ptr.I am familiar with Robert Martin\'s acyclic visitor paper but find the intrusive nature of the virtual accept() and nec[详细]
2023-01-15 23:50 分类:问答Is the Visitor Pattern the fastest way to differentiate parameter types in C++?
Is the Visitor Pattern the fastest way to accomplish method parameter type identification (effectively single dispatch on a parameter, not a member\'s class) in C++?I might know the exact method(s) I[详细]
2023-01-13 17:40 分类:问答Implementing visitor pattern on aggregate objects
I\'m struggling with applying the visitor pattern on some objects that have scalar members and at the same time aggregate members (collections).[详细]
2023-01-13 06:21 分类:问答question about virtual methods in java
Put simply: I want the following code to print \"sub\": Element e = new SubElement(); print(e); ... private static void print(Element e) {[详细]
2023-01-12 23:28 分类:问答Java object graph visitor library
Do you know a good java object graph visitor library? I want to visit an object and its sub components and perform some actions when some conditions are matched.[详细]
2023-01-09 14:53 分类:问答How do you separate visitors to two intro pages to compare amt of registration per visitor?
I am making a site that depend on users to register to be able to play my online game. If they don\'t login they only get to see the intro page.[详细]
2023-01-09 04:57 分类:问答How Visitor Pattern avoid downcasting
can anyone show example code before an开发者_开发技巧d after to avoid down casting for visitor pattern code ?[详细]
2023-01-07 22:51 分类:问答What is Single and Double Dispatch?
i have wrote the visitor pattern as follow but i don\'t understand what is single and double dispatch.[详细]
2023-01-07 19:25 分类:问答Visitor pattern lacking parameters
I\'m sure this must be a common problem with the Visitor pattern, so thought I\'d see if there is a standard solution.[详细]
2023-01-05 15:17 分类:问答Java abstract visitor - guarantueed to succeed? If so, why?
I was dealing with hibernate, trying to figure out the run-time class behind proxied instances by using the visitor pattern. I then came up with an AbstractVisitable approach, but I wonder if it will[详细]
2023-01-03 15:07 分类:问答