[mapguide-commits] r10056 - sandbox/adsk/trunk/Common/MdfModel
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Thu Jul 27 03:37:50 PDT 2023
Author: simonliu
Date: 2023-07-27 03:37:49 -0700 (Thu, 27 Jul 2023)
New Revision: 10056
Modified:
sandbox/adsk/trunk/Common/MdfModel/CompositeRule.cpp
sandbox/adsk/trunk/Common/MdfModel/CompositeRule.h
sandbox/adsk/trunk/Common/MdfModel/Rule.cpp
sandbox/adsk/trunk/Common/MdfModel/Rule.h
Log:
Move new Active property from Rule to CompositeRule.
Modified: sandbox/adsk/trunk/Common/MdfModel/CompositeRule.cpp
===================================================================
--- sandbox/adsk/trunk/Common/MdfModel/CompositeRule.cpp 2023-07-27 01:36:54 UTC (rev 10055)
+++ sandbox/adsk/trunk/Common/MdfModel/CompositeRule.cpp 2023-07-27 10:37:49 UTC (rev 10056)
@@ -32,6 +32,7 @@
CompositeRule::CompositeRule()
{
this->m_pSymbolization = NULL;
+ this->m_active = true;
}
//-------------------------------------------------------------------------
@@ -87,3 +88,26 @@
this->m_pSymbolization = NULL;
return pRet;
}
+
+//-------------------------------------------------------------------------
+// PURPOSE: Accessor method for the Active Property defined in this Rule.
+// Indicates whether the Rule is active. Features met the Filter criteria will
+// be stylized if Active is true. Otherwise the features will not be stylized.
+// RETURNS: True if the rule is active. Otherwise false.
+//-------------------------------------------------------------------------
+const bool CompositeRule::GetActive() const
+{
+ return m_active;
+}
+
+//-------------------------------------------------------------------------
+// PURPOSE: Accessor method to the Actvie Property defined in this Rule.
+// Indicates whether the Rule is active. Features met the Filter criteria will
+// be stylized if Active is true. Otherwise the features will not be stylized.
+// PARAMETERS:
+// Input:
+// isActive - The Active boolean value.
+void CompositeRule::SetActive(bool isActive)
+{
+ m_active = isActive;
+}
Modified: sandbox/adsk/trunk/Common/MdfModel/CompositeRule.h
===================================================================
--- sandbox/adsk/trunk/Common/MdfModel/CompositeRule.h 2023-07-27 01:36:54 UTC (rev 10055)
+++ sandbox/adsk/trunk/Common/MdfModel/CompositeRule.h 2023-07-27 10:37:49 UTC (rev 10056)
@@ -43,6 +43,10 @@
void AdoptSymbolization(CompositeSymbolization* compositeSymbolization);
CompositeSymbolization* OrphanSymbolization();
+ // Property: Active
+ const bool GetActive() const;
+ void SetActive(bool isActive);
+
private:
// Hidden copy constructor and assignment operator.
CompositeRule(const CompositeRule&);
@@ -50,6 +54,7 @@
// Data members
CompositeSymbolization* m_pSymbolization;
+ bool m_active;
};
END_NAMESPACE_MDFMODEL
Modified: sandbox/adsk/trunk/Common/MdfModel/Rule.cpp
===================================================================
--- sandbox/adsk/trunk/Common/MdfModel/Rule.cpp 2023-07-27 01:36:54 UTC (rev 10055)
+++ sandbox/adsk/trunk/Common/MdfModel/Rule.cpp 2023-07-27 10:37:49 UTC (rev 10056)
@@ -33,7 +33,6 @@
Rule::Rule()
{
this->m_pLabel = new Label();
- this->m_active = true;
}
//-------------------------------------------------------------------------
@@ -142,26 +141,3 @@
this->m_pLabel = NULL;
return ret;
}
-
-//-------------------------------------------------------------------------
-// PURPOSE: Accessor method for the Active Property defined in this Rule.
-// Indicates whether the Rule is active. Features met the Filter criteria will
-// be stylized if Active is true. Otherwise the features will not be stylized.
-// RETURNS: True if the rule is active. Otherwise false.
-//-------------------------------------------------------------------------
-const bool Rule::GetActive() const
-{
- return m_active;
-}
-
-//-------------------------------------------------------------------------
-// PURPOSE: Accessor method to the Actvie Property defined in this Rule.
-// Indicates whether the Rule is active. Features met the Filter criteria will
-// be stylized if Active is true. Otherwise the features will not be stylized.
-// PARAMETERS:
-// Input:
-// isActive - The Active boolean value.
-void Rule::SetActive(bool isActive)
-{
- m_active = isActive;
-}
Modified: sandbox/adsk/trunk/Common/MdfModel/Rule.h
===================================================================
--- sandbox/adsk/trunk/Common/MdfModel/Rule.h 2023-07-27 01:36:54 UTC (rev 10055)
+++ sandbox/adsk/trunk/Common/MdfModel/Rule.h 2023-07-27 10:37:49 UTC (rev 10056)
@@ -65,9 +65,6 @@
void AdoptLabel(Label* pLabel);
Label* OrphanLabel();
- const bool GetActive() const;
- void SetActive(bool isActive);
-
protected:
// Construction, initialization
// Default constructor is protected to make this class abstract.
@@ -86,9 +83,6 @@
// Label for multivariate theming.
Label* m_pLabel;
-
- // Indicates whether the rule is active.
- bool m_active;
};
typedef MdfOwnerCollection<Rule> RuleCollection;
More information about the mapguide-commits
mailing list