request for convoluted syntax to automatically generate class names - Programmer

This is a discussion on request for convoluted syntax to automatically generate class names - Programmer ; Hi Experts, I am a Newbie, but pretty comfortable with OO and MFC. My intent is to create class names automatically. I have a class with a bunch of regular data fields, and a statically declared unsigned long object counter ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: request for convoluted syntax to automatically generate class names

  1. request for convoluted syntax to automatically generate class names


    Hi Experts,

    I am a Newbie, but pretty comfortable with OO and MFC.

    My intent is to create class names automatically. I have a class
    with a bunch of regular data fields, and a statically declared
    unsigned long object counter to use as part of the class name:
    --------------------------------------------
    class fdinfo // file or directory information object
    {
    public:
    fdinfo();
    virtual ~fdinfo();
    unsigned long friend inline getnextobjscnt() // Get
    next object counter number
    { return ++objscnt; }
    protected:
    CString filedirname;
    CString dirpath;
    char dirind; // directory or file indicator: 'd' or 'f'
    double filesize;
    CTime lastwritetime;
    boolean trav; // file info object in CList has been
    traveresed. FALSE or TRUE
    private:
    static unsigned long objscnt;
    };
    --------------------------------------------
    I have looked up different implementations of class factories in
    the NGs. The articles have hundreds of lines of code in them; but
    apparently they are according to the authors: 'easy to implement'.

    I just want to use the GetNext() class friend function and
    construct dynamically named classes in tree form. My thinking is that
    they can be stored as class objects in either MFC CList or CMap.

    Any suggestions are welcome. I am using VC6.

    Thank you for your time,
    Feedscrn // feedscrn@yahoo.com (at yahoo).com

  2. Re: request for convoluted syntax to automatically generate classnames

    Oh, by the way. I have seen CTreeCtrl. I want to get an accessible/
    readable tree structure together. Displaying the tree is not primary
    importance. Also, CTreeCtrl seems non-trivial.

    Thanks, Feedscrn

  3. Re: request for convoluted syntax to automatically generate classnames

    continuing thread at NG: microsoft.public.vc.mfc. Thank You.
    Feedscrn

+ Reply to Thread