Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development
How to change CC on enum
(1/1)
asugix:
the source :
--- Code: ---namespace osg {
class OSG_EXPORT CopyOp
{
public:
enum Options
{
SHALLOW_COPY =0,
DEEP_COPY_OBJECTS = 1<<0,
DEEP_COPY_NODES = 1<<1
};
};
class myObj
{
myObj(const CopyOp& copyop=CopyOp::SHALLOW_COPY);
};
}
--- End code ---
Currently when I type
--- Code: --- new myObj(CopyOp::| )
--- End code ---
There is no suggestion for enum values. But there is the suggestion for enum name.
So, by using aid of CC, I can make code like :
--- Code: ---new myObj(CopyOp::Options.DEEP_COPY_OBJECTS);
--- End code ---
This is work on C#, but not work for C++. How to make CC parse enum values after class name? so the aid like:
--- Code: ---new myObj(CopyOp::DEEP_COPY_OBJECTS);
--- End code ---
Thank you
oBFusCATed:
Currently this is a limitation of the CC and it supports only c++11 strong type like enums.
asugix:
well. The C++11 like enums is better anyway. :-\
oBFusCATed:
If your project and compiler are c++11 ready, yes.
Navigation
[0] Message Index
Go to full version