Results 1 to 3 of 3

Thread: [java] access to member in composition

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Posts
    976
    Thanks
    53
    Qt products
    Qt3
    Platforms
    Windows

    Default [java] access to member in composition

    Qt Code:
    1. //a.class
    2. public class A {
    3. private static enum Day { Sun, Mon, Tue }
    4. private B b;
    5. public A (B cb) { b = cb; }
    6. friend B; //exists??
    7. }
    8. //b.class
    9. public class B {
    10. public B () { }
    11. private int DoSomething () {
    12. // here I have to acces to enum Day like switch (Day) ; but from here
    13. }
    14. }
    To copy to clipboard, switch view to plain text mode 
    Does it exists a keyword like "friend" to do this? Or Anyone can suggest me anything better!?

    Furthermore: is it possibile something like C ? (= 0 I mean)
    Qt Code:
    1. private static enum Day { Sun=0, Mon=1, Tue=2 }
    To copy to clipboard, switch view to plain text mode 
    thanks
    Last edited by mickey; 21st June 2008 at 13:51.
    Regards

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.