Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Quasar

Members
  • Content count

    7785
  • Joined

  • Last visited

About Quasar

  • Rank
    Moderator

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Single Status Update

See all updates by Quasar

  1. Here's a method I worked out for duplicating the semantics of Borland Delphi/C++Builder-style properties under C++11, via the use of lambda functions which capture "this" by-value:

    code:
    Array
    To set one up involves code like this:
    code:
    Array
    This allows expressions such as "bar.SomeProperty = 1;" or "int x = bar.SomeProperty;".

    The usual objection to similar implementations without this-capturing lambdas, which act like anonymous private methods of the containing class, is that the class itself isn't notified of the access to the property object. This design above completely resolves that problem with a minimum requirement for boilerplate.

    BTW, I designed this at work as part of a system that exposes the Borland-specific IBExpress API, for interacting with InterBase compatible libraries such as the open-source Firebird, to other compilers such as Visual C++, freeing it from dependence on the nearly unusable C++Builder IDE.

×