Home » Community » Coffee corner » c++ standard read-only property flag would be handy
c++ standard read-only property flag would be handy [message #49066] |
Tue, 12 December 2017 11:59  |
luoganda
Messages: 214 Registered: November 2016
|
Experienced Member |
|
|
for c/c++ language usually set/get are needed for properties,
using public_read section or flag would be useful for
properties, so there are not unneded code, eg:
class Class{
public:
//accessed and modifiable by any
int someProp;
//this would be non-modifiable in outer usage
public_read:
int somePropX;
//or
int public_read somePropX;
//or
public_read int somePropX;
//or something...
};
for compilers that would not implement this,
just "unsafe" public: would be used instead.
|
|
|
Goto Forum:
Current Time: Tue Jun 03 02:52:28 CEST 2025
Total time taken to generate the page: 0.02950 seconds
|