C++ Abstract Factory Implementation

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Suresh

    C++ Abstract Factory Implementation

    Hello
    I am hoping someone can give me very needed help. I am wanting some C
    +
    + code for 'C++ Abstract Factory'. I need code to be free. I am been
    learning Design patterns.
    I found some code on web but dont know which is one is ok.



    Loki :in text book
    Download PapaFactory for free. PapaFactory is a header-only C++ library providing three generic abstract factories. The library is licensed under the Boost software license which allows incorporation into propriety software.

    Download Austria for free. The Austria C++ library provides a host of essential C++ tools including but generic factories, smart pointers, logging, unit testing framework and parameters/configuration system. The library will work with both Linux/GCC and win32/MVC++.


    My colleague said I should look at boost library or use a standard
    'factory' in C++. but I cannot find it.
    I have read text book on Design Patterns and understand 'Abstract
    Factory'.

    Much thanks in adnace for help

    Suresh
  • Ian Collins

    #2
    Re: C++ Abstract Factory Implementation

    Suresh wrote:
    Hello
    I am hoping someone can give me very needed help.
    Please stop asking the same question over and over.

    --
    Ian Collins.

    Comment

    • Suresh

      #3
      Re: C++ Abstract Factory Implementation

      On Jul 9, 7:59 am, Ian Collins <ian-n...@hotmail.co mwrote:
      Suresh wrote:
      Hello
      I am hoping someone can give me very needed help.
      >
      Please stop asking the same question over and over.
      >
      --
      Ian Collins.
      I am very apologetic for multiple asking. This was not my intendings.
      It was mistake and I have removed duplications.
      I have decided to use first Papa Factory. It is with very good
      documentation and just few .h files.
      Austria for me now is difficult I not have enough experience. Book by
      Andrei Alexandrecu is too much advanced for now too. But I think Papa
      Factory is no support for multi-thread, but this is fine for now.






      Comment

      • Gianni Mariani

        #4
        Re: C++ Abstract Factory Implementation

        Suresh wrote:
        On Jul 9, 7:59 am, Ian Collins <ian-n...@hotmail.co mwrote:
        >Suresh wrote:
        >>Hello
        >>I am hoping someone can give me very needed help.
        >Please stop asking the same question over and over.
        >>
        >--
        >Ian Collins.
        >
        I am very apologetic for multiple asking. This was not my intendings.
        It was mistake and I have removed duplications.
        I have decided to use first Papa Factory. It is with very good
        documentation and just few .h files.
        Austria for me now is difficult I not have enough experience. Book by
        Andrei Alexandrecu is too much advanced for now too. But I think Papa
        Factory is no support for multi-thread, but this is fine for now.
        You said Austria C++ is difficult ?

        I'd really love to know what you think is difficult. Below is an
        example of a simple no constructor parameters case.

        #include "at_factory .h"

        class Interface {
        };

        int main()
        {
        Interface * n2 = at::FactoryRegi ster< Interface, char >::Create(2)( );
        // n2 should really be an instance of Impl2
        }

        // this below can be in other linked in compile units
        class Impl1 : public Interface {
        };
        AT_MakeFactory0 P( 1, Impl1, Interface, int);

        class Impl2 : public Interface {
        };
        AT_MakeFactory0 P( 2, Impl2, Interface, int);

        Please let me know what is so hard.

        Comment

        • Suresh

          #5
          Re: C++ Abstract Factory Implementation

          On Jul 9, 11:09 pm, Gianni Mariani <gi4nos...@mari ani.wswrote:
          Suresh wrote:
          On Jul 9, 7:59 am, Ian Collins <ian-n...@hotmail.co mwrote:
          Suresh wrote:
          >Hello
          >I am hoping someone can give me very needed help.
          Please stop asking the same question over and over.
          >
          --
          Ian Collins.
          >
          I am very apologetic for multiple asking. This was not my intendings.
          It was mistake and I have removed duplications.
          I have decided to use first Papa Factory. It is with very good
          documentation and just few .h files.
          Austria for me now is difficult  I not have enough experience. Book by
          Andrei Alexandrecu is too much advanced for now too. But I think Papa
          Factory is no support for multi-thread, but this is fine for now.
          >
          You said Austria C++ is difficult ?
          >
          I'd really love to know what you think is difficult.  Below is an
          example of a simple no constructor parameters case.
          >
          #include "at_factory .h"
          >
          class Interface {
          >
          };
          >
          int main()
          {
              Interface * n2 = at::FactoryRegi ster< Interface, char >::Create(2)( );
              // n2 should really be an instance of Impl2
          >
          }
          >
          // this below can be in other linked in compile units
          class Impl1 : public Interface {};
          >
          AT_MakeFactory0 P( 1, Impl1, Interface, int);
          >
          class Impl2 : public Interface {};
          >
          AT_MakeFactory0 P( 2, Impl2, Interface, int);
          >
          Please let me know what is so hard.
          This Library is very powerful but I try to read the documentation but
          is very complicated.
          I do not think I need so powerful Library. Papa Factory is with
          tutorial to make easy everything for beginer.
          And Austria Factory is big because it is so powerful with smart
          pointers.



          Comment

          Working...