Problem to access singleton class object.

Discussion in 'C++' started by sumit15nov@gmail.com, Aug 8, 2012.

  1. Guest

    Hi,
    I am getting error to access singleton class object
    please check the directory structure -

    /home/user_name/src/component/osim
    /home/user_name/src/oa/hal

    now in this mode class diagram is -
    osimbmsim is inherited from hal
    hal <-- osimbmsim

    there is a "server" class into /src/component/osim

    inside this server i have written a function from where I am trying to get the instance of hal class, (hal is a singleton class) and from this instance I am calling the function of osimbmsim.

    in server class I have included <hal/hal.h> and <osimbmsim.h>, because of this this is not able to find all the included header files in hal.

    please give me some solution , I am trying since last night.

    Thanks for help.
    Sumit
    , Aug 8, 2012
    #1
    1. Advertising

  2. On 8/8/2012 1:27 AM, wrote:
    > Hi,
    > I am getting error to access singleton class object
    > please check the directory structure -
    >
    > /home/user_name/src/component/osim
    > /home/user_name/src/oa/hal


    Looks like two directories with a common root (/home/user_name/src).

    > now in this mode class diagram is -
    > osimbmsim is inherited from hal
    > hal <-- osimbmsim
    >
    > there is a "server" class into /src/component/osim
    >
    > inside this server i have written a function from where I am trying
    > to get the instance of hal class, (hal is a singleton class) and from
    > thisinstance I am calling the function of osimbmsim.
    >
    > in server class I have included <hal/hal.h> and <osimbmsim.h>,
    > because of this this is not able to find all the included header
    > files in hal.
    >
    > please give me some solution , I am trying since last night.


    The beginning of your solution is described in the FAQ. See section 5
    and especially the question (and the answer) 5.8. You can find the FAQ
    list here: http://www.parashift.com/c -faq-lite/

    Also, singletons and ways to implement them are a well-researched topic,
    and you can find plenty of examples on the web. Try www.google.com
    with an appropriate search phrase.

    V
    --
    I do not respond to top-posted replies, please don't ask
    Victor Bazarov, Aug 8, 2012
    #2
    1. Advertising

  3. wrote in message
    news:...
    >
    >Hi,
    >I am getting error to access singleton class object
    >please check the directory structure -
    >
    >/home/user_name/src/component/osim
    >/home/user_name/src/oa/hal
    >
    >now in this mode class diagram is -
    >osimbmsim is inherited from hal
    >hal <-- osimbmsim
    >
    >there is a "server" class into /src/component/osim


    This is not within your directory structure.
    Maybe you should omit the first /
    or use the full directory path /home/user_name/src/component/osim
    Fred Zwarts \(KVI\), Aug 8, 2012
    #3
  4. Guest

    On Wednesday, August 8, 2012 10:57:37 AM UTC+5:30, wrote:
    > Hi,
    >
    > I am getting error to access singleton class object
    >
    > please check the directory structure -
    >
    >
    >
    > /home/user_name/src/component/osim
    >
    > /home/user_name/src/oa/hal
    >
    >
    >
    > now in this mode class diagram is -
    >
    > osimbmsim is inherited from hal
    >
    > hal <-- osimbmsim
    >
    >
    >
    > there is a "server" class into /src/component/osim
    >
    >
    >
    > inside this server i have written a function from where I am trying to get the instance of hal class, (hal is a singleton class) and from this instance I am calling the function of osimbmsim.
    >
    >
    >
    > in server class I have included <hal/hal.h> and <osimbmsim.h>, because of this this is not able to find all the included header files in hal.
    >
    >
    >
    > please give me some solution , I am trying since last night.
    >
    >
    >
    > Thanks for help.
    >
    > Sumit


    Thanks Victor, thanks for the link.
    , Aug 9, 2012
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Proton Projects - Moin

    Singleton - Whether Cloneable overrides Singleton

    Proton Projects - Moin, Mar 26, 2007, in forum: Java
    Replies:
    4
    Views:
    3,246
    Proton Projects - Moin
    Mar 27, 2007
  2. Wilhelm
    Replies:
    1
    Views:
    164
  3. Trans
    Replies:
    12
    Views:
    274
    Robert Klemme
    Sep 14, 2007
  4. Paul McMahon
    Replies:
    3
    Views:
    205
    David A. Black
    Jun 9, 2008
  5. Charles Oliver Nutter

    Singleton methods without the singleton class

    Charles Oliver Nutter, Mar 15, 2010, in forum: Ruby
    Replies:
    4
    Views:
    202
    Charles Oliver Nutter
    Mar 22, 2010
Loading...

Share This Page