last works ...
This commit is contained in:
@@ -375,6 +375,16 @@ class XCBaseObject : public CChartObject
|
||||
mObjName = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Destroy ...
|
||||
*/
|
||||
void virtual Destroy()
|
||||
{
|
||||
//
|
||||
Detach();
|
||||
Delete();
|
||||
}
|
||||
|
||||
//
|
||||
private:
|
||||
//
|
||||
@@ -1666,6 +1676,20 @@ class XCPivotAnalysisObject : public XCBaseObject
|
||||
return X_PIVOT_OBJ;
|
||||
}
|
||||
|
||||
/**
|
||||
* Destroy ...
|
||||
*/
|
||||
void virtual Destroy()
|
||||
{
|
||||
//
|
||||
Detach();
|
||||
Delete();
|
||||
|
||||
//
|
||||
DestroyObject(mSupportBox);
|
||||
DestroyObject(mResistanceBox);
|
||||
}
|
||||
|
||||
//
|
||||
// Styling ...
|
||||
|
||||
@@ -2082,4 +2106,83 @@ class XCPivotAnalysisObject : public XCBaseObject
|
||||
XCBoxObject *mResistanceBox;
|
||||
};
|
||||
|
||||
//
|
||||
// Extensions ...
|
||||
|
||||
/**
|
||||
* Add all Items of Specified CArrayObj into another ...
|
||||
*
|
||||
* @param source: CArrayObj, pointer refrence Specified Data Source ...
|
||||
* @param dest: CArrayObj, pointer refrence Specified Destination of Adding ...
|
||||
*/
|
||||
void AddObjects(
|
||||
CArrayObj *&source,
|
||||
CArrayObj &dest //
|
||||
)
|
||||
{
|
||||
//
|
||||
bool has = source != NULL &&
|
||||
source.Total() > 0;
|
||||
if (!has)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
for (int i = 0; i < source.Total(); i++)
|
||||
{
|
||||
dest.Add(source.At(i));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Destroy Object if Exists ...
|
||||
*
|
||||
* @param object: pointer refrence to Destroy ...
|
||||
*/
|
||||
void DestroyObject(XCBoxObject *&object) {
|
||||
//
|
||||
// Validate ...
|
||||
bool has = object != NULL;
|
||||
if (!has) {
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
object.Destroy();
|
||||
|
||||
//
|
||||
object.Detach();
|
||||
object.Delete();
|
||||
|
||||
//
|
||||
delete object;
|
||||
ZeroMemory(object);
|
||||
}
|
||||
|
||||
/**
|
||||
* Destroy Object if Exists ...
|
||||
*
|
||||
* @param object: pointer refrence to Destroy ...
|
||||
*/
|
||||
void DestroyObject(XCPivotAnalysisObject *&object) {
|
||||
//
|
||||
// Validate ...
|
||||
bool has = object != NULL;
|
||||
if (!has) {
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
object.Destroy();
|
||||
|
||||
//
|
||||
object.Detach();
|
||||
object.Delete();
|
||||
|
||||
//
|
||||
delete object;
|
||||
ZeroMemory(object);
|
||||
}
|
||||
|
||||
//
|
||||
Reference in New Issue
Block a user