Menu

#1 Arrays

open
nobody
None
5
2007-02-23
2007-02-23
No

Template 'createClassForArray' needs to be integrated in generation process. It is intended to be called for each class / struct / primitive that is used somewhere in meta as array.
See tests t14_1 and t15

Discussion

  • Christoph Nenning

    Logged In: YES
    user_id=1568577
    Originator: YES

    There are several possibilities when 'createClassForArray' can be invoked:
    - At the very beginning
    - At the end
    class A {};

    namespace n {
    class A {};
    }

    namespace o {
    namespace n {
    class A {};

    class B {
    public:
    void a(A arr[]) {}
    };
    }

    class A {};

    class B {
    public:
    void a(n::A arr[]) {}
    };
    }

    We have to generate an array-class for o::n::A

     
  • Christoph Nenning

    Logged In: YES
    user_id=1568577
    Originator: YES

    Oops, I accidentally deleted parts of the previous post.

    Of course there are more possibilities to invoke 'createClassForArray', e.g.
    - When the 'a' methods are generated
    - When class o::n::A is generated

    In all four cases we have problems with generating the array-class only once and finding out which A class is used.

     

Log in to post a comment.

MongoDB Logo MongoDB