last ...
This commit is contained in:
@@ -2379,6 +2379,127 @@ struct XPatternAnalysis
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Extract All Exists Patterns Pivots ...
|
||||
*
|
||||
* @param dest: XBoxZone, collection reference to holds Extracted Patterns ...
|
||||
* @param forDir: ENUM_X_DIRECTION, Specified Direction of Extractions ...
|
||||
*
|
||||
* @return ( int )
|
||||
*/
|
||||
int GetPatterns(
|
||||
XBoxZone &dest[],
|
||||
ENUM_X_DIRECTION forDir = X_DIRECTION_NONE //
|
||||
)
|
||||
{
|
||||
//
|
||||
int result = 0;
|
||||
|
||||
//
|
||||
// Prepare ...
|
||||
XClean(dest);
|
||||
|
||||
//
|
||||
// Validate ...
|
||||
bool has = IsValid() &&
|
||||
HasChild(patterns);
|
||||
if (!has)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// Do ...
|
||||
XOHCL iBar;
|
||||
XPivot iPivot;
|
||||
XBoxZone iZone;
|
||||
int count = ArraySize(patterns);
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
//
|
||||
has = GetPattern(iBar, iPivot, iZone, patterns[i], forDir);
|
||||
if (has)
|
||||
{
|
||||
AddIfNotExists(iZone, dest);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
result = ArraySize(dest);
|
||||
|
||||
//
|
||||
// Cleanup ...
|
||||
iBar.Clean();
|
||||
iZone.Clean();
|
||||
iPivot.Clean();
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Extract All Exists Patterns Pivots ...
|
||||
*
|
||||
* @param dest: XPivot, collection reference to holds Extracted Patterns ...
|
||||
* @param zones: XBoxZone, collection reference to holds Extracted Patterns ...
|
||||
* @param forDir: ENUM_X_DIRECTION, Specified Direction of Extractions ...
|
||||
*
|
||||
* @return ( int )
|
||||
*/
|
||||
int GetPatterns(
|
||||
XPivot &dest[],
|
||||
XBoxZone &zones[],
|
||||
ENUM_X_DIRECTION forDir = X_DIRECTION_NONE //
|
||||
)
|
||||
{
|
||||
//
|
||||
int result = 0;
|
||||
|
||||
//
|
||||
// Prepare ...
|
||||
XClean(dest);
|
||||
XClean(zones);
|
||||
|
||||
//
|
||||
// Validate ...
|
||||
bool has = IsValid() &&
|
||||
HasChild(patterns);
|
||||
if (!has)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// Do ...
|
||||
XOHCL iBar;
|
||||
XPivot iPivot;
|
||||
XBoxZone iZone;
|
||||
int count = ArraySize(patterns);
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
//
|
||||
has = GetPattern(iBar, iPivot, iZone, patterns[i], forDir);
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
AddIfNotExists(iPivot, dest);
|
||||
AddIfNotExists(iZone, zones);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
result = ArraySize(dest);
|
||||
|
||||
//
|
||||
// Cleanup ...
|
||||
iBar.Clean();
|
||||
iZone.Clean();
|
||||
iPivot.Clean();
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user