E D R , A S I H C RSS

BackLinks search for "no"

BackLinks of no


Search BackLinks only
Display context of search results
Case-sensitive searching
  • Gof/FactoryMethod
         == Also Known As : 비슷한, 혹은 동일한 역할을 하는 용어 ==
         A potential disadvantage of factory methods is that clients might have to subclass the Creator class just to create a particular ConcreteProduct object. Subclassing is fine when the client has to subclass the Creator class anyway, but otherwise the client now must deal with another point of evolution.
          4. Using templates to avoid subclassing. As we've mentioned, another potential problem with factory methods is that they might force you to subclass just to create the appropriate Product objects. Another way to get around this in C++ is to provide a template subclass of Creator that's parameterized by the Product
         With this template, the client supplies just the product class?no subclassing of Creator is required.
         Now we can rewrite CreateMaze to use these factory methods:
          r1->SetSide(North, MakeWall());
          r2->SetSide(North, MakeWall());
         == Known Uses ==
         The Orbix ORB system from IONA Technologies [ION94] uses Factory Method to generate an appropriate type of proxy (see Proxy (207)) when an object requests a reference to a remote object. Factory Method makes it easy to replace the default proxy with one that uses client-side caching, for example.
Found 1 matching page out of 7540 total pages

You can also click here to search title.

Valid XHTML 1.0! Valid CSS! powered by MoniWiki
Processing time 0.0065 sec