/**
 * This class provides switch yarn for weaving into objects.  In this manner, it provides aspect-oriented programming services 
 * for objects and classes in JavaScript. 
 * <br><br>
 * <a href="mailto:ehudsons@andrew.cmu.edu">Ellen Hudson-Snyder</a>, 
 * <a href="mailto:evedar@andrew.cmu.edu">Elvin Vedar</a>,
 * <a href="mailto:cbalz@andrew.cmu.edu">Christopher M. Balz</a>.
 * <br><br>CVS Version Info:<br>
 *  $Id: SwitchYarn.js,v 1.3 2005/11/27 16:31:28 cbalz Exp $     
 * <br><br>
 * @object-prop <code>strTargetFunctionName</code> <code>string</code>  The name of the target method on its object.
 * @object-prop <code>funTarget</code> <code>function</code>  The target method itself.
 * @object-prop <code>strfunYarn</code> <code>function</code> OR <code>string</code>   The code, as <code>string</code> or as 
 *                                                                  <code>function</code>, to 
 *                                                                  be woven into a the target method.  If 
 *                                                                  the code is in 
 *                                                                  <code>function</code> form, the top 
 *                                                                  ('function  . . . {') and 
 *                                                                  bottom (including any final 'return') 
 *                                                                  will be removed.
 * @object-prop <code>pStrCase</code> <code>string</code> A string with the code for the <code>case</code> statement to be 
 *                                     inserted into: i.e., <code>" case \"plate\" :  "</code>.  Note that 
 *                                     the existence of this parameter allows the matched <code>case</code> 
 *                                     statement to be changed by the aspect weave operation.
 * @object-prop <code>pRxpCase</code> <code>RegExp</code> A regular expression that matches the <code>case</code> statement to be 
 *                                     inserted into: i.e., <code>/case "plate"\s?:/</code>.
 * @object-prop <code>pStrSwitch</code> <code>string</code> A string with the code for the <code>switch</code> statement to be 
 *                                     inserted into: i.e., <code>" switch (pStrEventType) {"</code>.  This 
 *                                     <code>switch</code> statement currently must exist directly below and
 *                                     nested within the <code>case</code> statement listed above.  Note that 
 *                                     the existence of this parameter allows the matched <code>switch</code> 
 *                                     statement to be changed by the aspect weave operation.
 * @object-prop <code>pRxpCase</code> <code>RegExp</code> A regular expression that matches the <code>switch</code> statement to be 
 *                                     inserted into: i.e., <code>/switch\s*\(pStrEventType\)\s*\{/</code>.  This 
 *                                     <code>switch</code> statement currently must exist directly below and
 *                                     nested within the <code>case</code> statement listed above.  
 */


/**
 * Create a ball of <code>switch</code> statement yarn for an aspect to weave.  
 * An aspect is the central element
 * of a software engineering paradigm, Aspect Oriented Programming, which complements object-oriented
 * software engineering.
 * @param strTargetFunctionName <code>string</code>  The name of the target method on its object.
 * @param funTarget <code>function</code>  The target method itself.
 * @param strfunYarn <code>function</code> OR <code>string</code>   The code, as <code>string</code> or as 
 *                                                                  <code>function</code>, to 
 *                                                                  be woven into a the target method.  If 
 *                                                                  the code is in 
 *                                                                  <code>function</code> form, the top 
 *                                                                  ('function  . . . {') and 
 *                                                                  bottom (including any final 'return') 
 *                                                                  will be removed.
 * @param pStrCase <code>string</code> A string with the code for the <code>case</code> statement to be 
 *                                     inserted into: i.e., <code>" case \"plate\" :  "</code>.  Note that 
 *                                     the existence of this parameter allows the matched <code>case</code> 
 *                                     statement to be changed by the aspect weave operation.
 * @param pRxpCase <code>RegExp</code> A regular expression that matches the <code>case</code> statement to be 
 *                                     inserted into: i.e., <code>/case "plate"\s?:/</code>.
 * @param pStrSwitch <code>string</code> A string with the code for the <code>switch</code> statement to be 
 *                                     inserted into: i.e., <code>" switch (pStrEventType) {"</code>.  This 
 *                                     <code>switch</code> statement currently must exist directly below and
 *                                     nested within the <code>case</code> statement listed above.  Note that 
 *                                     the existence of this parameter allows the matched <code>switch</code> 
 *                                     statement to be changed by the aspect weave operation.
 * @param pRxpCase <code>RegExp</code> A regular expression that matches the <code>switch</code> statement to be 
 *                                     inserted into: i.e., <code>/switch\s*\(pStrEventType\)\s*\{/</code>.  This 
 *                                     <code>switch</code> statement currently must exist directly below and
 *                                     nested within the <code>case</code> statement listed above.  
 */
function SwitchYarn(strTargetFunctionName, funTarget, strFunYarn, pStrCase, pRxpCase, pStrSwitch, pRxpSwitch) {
    this.strTargetFunctionName = strTargetFunctionName; 
    this.funTarget  = funTarget;
    this.strFunYarn = strFunYarn;
    this.strCase    = pStrCase;
    this.rxpCase    = pRxpCase;
    this.strSwitch  = pStrSwitch;
    this.rxpSwitch  = pRxpSwitch;
}

