no_user_modify { yylval->num = FANoUserModify; return T_FIELD_ATTRIBUTE; }
no_user_view { yylval->num = FANoUserView; return T_FIELD_ATTRIBUTE; }
deprecated { yylval->num = FADeprecated; return T_FIELD_ATTRIBUTE; }
+get_virtual { yylval->num = FAGetVirtual; return T_FIELD_ATTRIBUTE; }
+set_virtual { yylval->num = FASetVirtual; return T_FIELD_ATTRIBUTE; }
+virtual { yylval->num = FAGetVirtual | FASetVirtual; return T_FIELD_ATTRIBUTE; }
navigation { return T_NAVIGATION; }
validator { return T_VALIDATOR; }
required { return T_REQUIRED; }
/* NotifyField */
m_Header << "public:" << std::endl
- << "\t" << "virtual void NotifyField(int id, const Value& cookie = Empty) override;" << std::endl;
+ << "\t" << "void NotifyField(int id, const Value& cookie = Empty) override;" << std::endl;
m_Impl << "void ObjectImpl<" << klass.Name << ">::NotifyField(int id, const Value& cookie)" << std::endl
<< "{" << std::endl;
prot = "public";
m_Header << prot << ":" << std::endl
- << "\t" << "virtual " << field.Type.GetRealType() << " Get" << field.GetFriendlyName() << "(void) const";
+ << "\t";
+
+ if (field.Attributes & FAGetVirtual || field.PureGetAccessor)
+ m_Header << "virtual ";
+
+ m_Header << field.Type.GetRealType() << " Get" << field.GetFriendlyName() << "(void) const";
if (field.PureGetAccessor) {
m_Header << " = 0;" << std::endl;
prot = "public";
m_Header << prot << ":" << std::endl
- << "\t" << "virtual void Set" << field.GetFriendlyName() << "(" << field.Type.GetArgumentType() << " value, bool suppress_events = false, const Value& cookie = Empty)";
+ << "\t";
+
+ if (field.Attributes & FASetVirtual || field.PureSetAccessor)
+ m_Header << "virtual ";
+
+ m_Header << "void Set" << field.GetFriendlyName() << "(" << field.Type.GetArgumentType() << " value, bool suppress_events = false, const Value& cookie = Empty)";
if (field.PureSetAccessor) {
m_Header << " = 0;" << std::endl;
needs_tracking = true;
- m_Header << "\t" << "virtual void Track" << field.GetFriendlyName() << "(" << field.Type.GetArgumentType() << " oldValue, " << field.Type.GetArgumentType() << " newValue);";
+ m_Header << "\t" << "void Track" << field.GetFriendlyName() << "(" << field.Type.GetArgumentType() << " oldValue, " << field.Type.GetArgumentType() << " newValue);" << std::endl;
m_Impl << "void ObjectImpl<" << klass.Name << ">::Track" << field.GetFriendlyName() << "(" << field.Type.GetArgumentType() << " oldValue, " << field.Type.GetArgumentType() << " newValue)" << std::endl
<< "{" << std::endl;
continue;
m_Header << "public:" << std::endl
- << "\t" << "virtual Object::Ptr Navigate" << field.GetFriendlyName() << "(void) const";
+ << "\t" << "Object::Ptr Navigate" << field.GetFriendlyName() << "(void) const";
if (field.PureNavigateAccessor) {
m_Header << " = 0;" << std::endl;
/* start/stop */
if (needs_tracking) {
- m_Header << "virtual void Start(bool runtimeCreated = false) override;" << std::endl
- << "virtual void Stop(bool runtimeRemoved = false) override;" << std::endl;
+ m_Header << "protected:" << std::endl
+ << "\tvirtual void Start(bool runtimeCreated = false) override;" << std::endl
+ << "\tvirtual void Stop(bool runtimeRemoved = false) override;" << std::endl;
m_Impl << "void ObjectImpl<" << klass.Name << ">::Start(bool runtimeCreated)" << std::endl
<< "{" << std::endl