Announcement

Collapse
No announcement yet.

Translating a C++ class definition to PB

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Translating a C++ class definition to PB

    Translating a C++ class definition to PB:

    Well here is a code I wrote about 10 years ago with VC6...

    //UID Klassendefinition, Klassenname: CUID
    class CUID : public CObject
    {
    // Construction
    public:
    BOOL CurrentChanged();
    long GetErased();
    BOOL Next();
    BOOL First();
    long SetCurrentEntity(unsigned long uid, long ehHint = -1);
    BOOL StoreHandle(unsigned long uid, long eh, BOOL add = TRUE);
    CUID();

    // Implementation
    public:
    virtual ~CUID();

    // Generated message map functions
    private:
    long m_LastErased;
    BOOL m_Changed;
    void SetLastKnown(long eh);
    long GetLastKnown();
    long m_HeaderIndex;
    long RetrieveHandle(unsigned long uid);
    };

    Does anybody of You experienced PB programmers know a way how to manage a replacing function of this class definition?
    I know that PB is not object oriented. So it's not necessary to explain this.
    It would be nice to be able at least to simulate a class function in PB in this case, because the class could perhaps be organized like a UDT structure???

    Norbert
    Norbert Doerre

  • #2
    Aleksandr Dobrev has some interesting things to say on this topic.
    Regards,
    Bob

    Comment


    • #3
      Robert,

      thanks for the hint!!

      I have to try it out before I can say it may be functioning with my special case.
      But I'll give a report if it will do what I want.

      Norbert
      Norbert Doerre

      Comment

      Working...
      X