CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: meta classes

  1. #1
    Join Date
    Mar 1999
    Location
    USA
    Posts
    1

    meta classes



    Hi,

    I want to know about meta classes and what are their uses etc.

    Can any one give information about it?

    Thanks in advance,

    siva

  2. #2
    Join Date
    Apr 1999
    Posts
    383

    Re: meta classes



    As I understand it, a meta-class is a class whose instances describe other classes in some way; for example, MFC's CRuntimeClass could be called a meta-class because an instance of CRuntimeClass provides information about it's associated runtime class type.


    I would expect meta-classes to be used to create instances of the classes they describe, or for runtime documentation of classes.


    Java has a class called Class that has an instance for every class or interface loaded into the JVM, and allows you to get details about the class, its type, methods, fields, and inheritance, and to create new instances.


    Dave




  3. #3
    Join Date
    Mar 1999
    Posts
    1

    Re: meta classes



    In addition to what Dave said I give another example for the use of meta classes:

    If you ask your class - during runtime - for the number of it's attributes you

    will have no success (unless you are programming in Smalltalk).

    If you want to program a DataBaseFramework (Obj.Or. access to SQL) you will

    face the problem to generate an SQLquery dynamically for different obj. with

    different attributes for your DB-Ops. Here you need to iterate over all of the

    attributes. A meta class can give you an array with the apropriate attributes,

    everytime you want to generate an SQL.


    bye Bolo

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured