PageRenderTime 15ms CodeModel.GetById 8ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/src/away3d/library/naming/ConflictStrategy.as

http://github.com/away3d/away3d-core-fp11
ActionScript | 38 lines | 9 code | 4 blank | 25 comment | 0 complexity | 402a115d5bfc4a6e611f2d1b78cee6bc MD5 | raw file
 1package away3d.library.naming
 2{
 3	
 4	/**
 5	 * Enumeration class for bundled conflict strategies. Set one of these values (or an
 6	 * instance of a self-defined sub-class of ConflictStrategyBase) to the conflictStrategy
 7	 * property on an AssetLibrary to define how that library resolves naming conflicts.
 8	 *
 9	 * The value of the <code>AssetLibrary.conflictPrecedence</code> property defines which
10	 * of the conflicting assets will get to keep it's name, and which is renamed (if any.)
11	 *
12	 * @see away3d.library.AssetLibrary.conflictStrategy
13	 * @see away3d.library.naming.ConflictStrategyBase
14	 */
15	public class ConflictStrategy
16	{
17		/**
18		 * Specifies that in case of a naming conflict, one of the assets will be renamed and
19		 * a numeric suffix appended to the base name.
20		 */
21		public static const APPEND_NUM_SUFFIX:ConflictStrategyBase = new NumSuffixConflictStrategy();
22		
23		/**
24		 * Specifies that naming conflicts should be ignored. This is not recommended in most
25		 * cases, unless it can be 100% guaranteed that the application does not cause naming
26		 * conflicts in the library (i.e. when an app-level system is in place to prevent this.)
27		 */
28		public static const IGNORE:ConflictStrategyBase = new IgnoreConflictStrategy();
29		
30		/**
31		 * Specifies that an error should be thrown if a naming conflict is discovered. Use this
32		 * to be 100% sure that naming conflicts never occur unnoticed, and when it's undesirable
33		 * to have the library automatically rename assets to avoid such conflicts.
34		 */
35		public static const THROW_ERROR:ConflictStrategyBase = new ErrorConflictStrategy();
36	
37	}
38}