Problem to access singleton class object.

S

sumit15nov

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
 
V

Victor Bazarov

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
 
F

Fred Zwarts \(KVI\)

wrote in message
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
 
S

sumit15nov

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,997
Messages
2,570,239
Members
46,827
Latest member
DMUK_Beginner

Latest Threads

Top