Table of Contents Previous Next
Logo
Client-Side Slice-to-C++ Mapping : 6.4 Mapping for Modules
Copyright © 2003-2008 ZeroC, Inc.

6.4 Mapping for Modules

Slice modules map to C++ namespaces. The mapping preserves the nesting of the Slice definitions. For example:
module M1 {
    module M2 {
        // ...
    };
    // ...
};

// ...

module M1 {     // Reopen M1
    // ...
};
This definition maps to the corresponding C++ definition:
namespace M1 {
    namespace M2 {
        // ...
    }
    // ...
}

// ...

namespace M1 {  // Reopen M1
    // ...
}
If a Slice module is reopened, the corresponding C++ namespace is reopened as well.
Table of Contents Previous Next
Logo