Home Help Center

How to make abstract SLICE class

peterlspotpeterlspot Member Peter LauOrganization: SelfProject: Study
Hi,

just wondering if there r ways to make SLICE class as "abstract" so that they can not be instantiated directly.

Seems that there is no "abstract" keywords in SLICE spec, is there any C#/C++ language mapping directives for this purpose?

Thanks & Regards

Comments

  • bernardbernard Jupiter, FLAdministrators, ZeroC Staff Bernard NormierOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Hi Peter,

    The only way to make a Slice class abstract is to add one or more operations to this class, either directly (inside the class), or by inheriting an interface with operations, or another class with operations.

    Best regards,
    Bernard
  • peterlspotpeterlspot Member Peter LauOrganization: SelfProject: Study
    Hi Bernard,
    bernard wrote: »

    The only way to make a Slice class abstract is to add one or more operations to this class, either directly (inside the class), or by inheriting an interface with operations, or another class with operations.

    Thanks very much for the quick follow-up. My SLICE class is data-only, without methods/operations. :-(

    Thanks & Regards,
Sign In or Register to comment.