Ejemplo n.º 1
0
		public static   void __hx_ctor_haxe_io_BytesInput(global::haxe.io.BytesInput __temp_me292, global::haxe.io.Bytes b, global::haxe.lang.Null<int> pos, global::haxe.lang.Null<int> len)
		{
			unchecked 
			{
				if (global::haxe.lang.Runtime.eq((pos).toDynamic(), (default(global::haxe.lang.Null<int>)).toDynamic())) 
				{
					pos = new global::haxe.lang.Null<int>(new global::haxe.lang.Null<int>(0, true).@value, true);
				}
				
				if (global::haxe.lang.Runtime.eq((len).toDynamic(), (default(global::haxe.lang.Null<int>)).toDynamic())) 
				{
					len = new global::haxe.lang.Null<int>(new global::haxe.lang.Null<int>(( b.length - pos.@value ), true).@value, true);
				}
				
				if (( ( ( pos.@value < 0 ) || ( len.@value < 0 ) ) || ( ( pos.@value + len.@value ) > b.length ) )) 
				{
					throw global::haxe.lang.HaxeException.wrap(global::haxe.io.Error.OutsideBounds);
				}
				
				__temp_me292.b = b.b;
				__temp_me292.pos = pos.@value;
				__temp_me292.len = len.@value;
				__temp_me292.totlen = len.@value;
			}
		}
Ejemplo n.º 2
0
        public static int lastIndexOf(global::System.String me, global::System.String str, global::haxe.lang.Null <int> startIndex)
        {
            unchecked {
                                #line 61 "C:\\HaxeToolkit\\haxe\\std\\cs\\internal\\StringExt.hx"
                int sIndex = ((!(startIndex.hasValue)) ? ((me.Length - 1)) : ((startIndex).@value));
                if ((sIndex >= me.Length))
                {
                                        #line 63 "C:\\HaxeToolkit\\haxe\\std\\cs\\internal\\StringExt.hx"
                    sIndex = (me.Length - 1);
                }
                else if ((sIndex < 0))
                {
                                        #line 65 "C:\\HaxeToolkit\\haxe\\std\\cs\\internal\\StringExt.hx"
                    return(-1);
                }

                                #line 67 "C:\\HaxeToolkit\\haxe\\std\\cs\\internal\\StringExt.hx"
                if ((str.Length == 0))
                {
                                        #line 68 "C:\\HaxeToolkit\\haxe\\std\\cs\\internal\\StringExt.hx"
                    if ((!(startIndex.hasValue) || ((startIndex).@value > me.Length)))
                    {
                                                #line 68 "C:\\HaxeToolkit\\haxe\\std\\cs\\internal\\StringExt.hx"
                        return(me.Length);
                    }
                    else
                    {
                                                #line 68 "C:\\HaxeToolkit\\haxe\\std\\cs\\internal\\StringExt.hx"
                        return((startIndex).@value);
                    }
                }

                                #line 72 "C:\\HaxeToolkit\\haxe\\std\\cs\\internal\\StringExt.hx"
                if (startIndex.hasValue)
                {
                                        #line 76 "C:\\HaxeToolkit\\haxe\\std\\cs\\internal\\StringExt.hx"
                    int d = ((me.Length - sIndex) - str.Length);
                    if ((d < 0))
                    {
                                                #line 78 "C:\\HaxeToolkit\\haxe\\std\\cs\\internal\\StringExt.hx"
                        sIndex += d;
                    }

                                        #line 81 "C:\\HaxeToolkit\\haxe\\std\\cs\\internal\\StringExt.hx"
                    int i = (sIndex + 1);
                    while ((i-- > 0))
                    {
                                                #line 83 "C:\\HaxeToolkit\\haxe\\std\\cs\\internal\\StringExt.hx"
                        bool found = true;
                        {
                                                        #line 84 "C:\\HaxeToolkit\\haxe\\std\\cs\\internal\\StringExt.hx"
                            int _g = 0;
                                                        #line 84 "C:\\HaxeToolkit\\haxe\\std\\cs\\internal\\StringExt.hx"
                            int _g1 = str.Length;
                                                        #line 84 "C:\\HaxeToolkit\\haxe\\std\\cs\\internal\\StringExt.hx"
                            while ((_g < _g1))
                            {
                                                                #line 84 "C:\\HaxeToolkit\\haxe\\std\\cs\\internal\\StringExt.hx"
                                int j = _g++;
                                if ((me[(i + j)] != str[j]))
                                {
                                                                        #line 86 "C:\\HaxeToolkit\\haxe\\std\\cs\\internal\\StringExt.hx"
                                    found = false;
                                    break;
                                }
                            }
                        }

                                                #line 91 "C:\\HaxeToolkit\\haxe\\std\\cs\\internal\\StringExt.hx"
                        if (found)
                        {
                                                        #line 92 "C:\\HaxeToolkit\\haxe\\std\\cs\\internal\\StringExt.hx"
                            return(i);
                        }
                    }

                                        #line 95 "C:\\HaxeToolkit\\haxe\\std\\cs\\internal\\StringExt.hx"
                    return(-1);
                }
                else
                {
                                        #line 97 "C:\\HaxeToolkit\\haxe\\std\\cs\\internal\\StringExt.hx"
                    return(me.LastIndexOf(((string)(str)), ((int)(sIndex)), ((global::System.StringComparison)(global::System.StringComparison.Ordinal))));
                }
            }
                        #line default
        }
Ejemplo n.º 3
0
		public override   object __hx_setField(string field, int hash, object @value, bool handleProperties)
		{
			unchecked 
			{
				switch (hash)
				{
					case 1751303026:
					{
						this.dynamicValue = ((global::alphatab.model.DynamicValue) (@value) );
						return @value;
					}
					
					
					case 67859554:
					{
						this.start = ((int) (global::haxe.lang.Runtime.toInt(@value)) );
						return @value;
					}
					
					
					case 848728090:
					{
						this.crescendo = ((global::alphatab.rendering.glyphs.CrescendoType) (@value) );
						return @value;
					}
					
					
					case 706091227:
					{
						this.tremoloSpeed = new global::haxe.lang.Null<global::alphatab.model.Duration>(global::haxe.lang.Null<object>.ofDynamic<global::alphatab.model.Duration>(@value).@value, true);
						return @value;
					}
					
					
					case 1801219961:
					{
						this.pickStroke = ((global::alphatab.model.PickStrokeType) (@value) );
						return @value;
					}
					
					
					case 233406162:
					{
						this.graceType = ((global::alphatab.model.GraceType) (@value) );
						return @value;
					}
					
					
					case 1594575703:
					{
						this.chordId = global::haxe.lang.Runtime.toString(@value);
						return @value;
					}
					
					
					case 1598475321:
					{
						this.vibrato = ((global::alphatab.model.VibratoType) (@value) );
						return @value;
					}
					
					
					case 1147430701:
					{
						this.whammyBarPoints = ((global::haxe.root.Array<object>) (global::haxe.root.Array<object>.__hx_cast<object>(((global::haxe.root.Array) (@value) ))) );
						return @value;
					}
					
					
					case 438479229:
					{
						this.tupletNumerator = ((int) (global::haxe.lang.Runtime.toInt(@value)) );
						return @value;
					}
					
					
					case 1310257562:
					{
						this.tupletDenominator = ((int) (global::haxe.lang.Runtime.toInt(@value)) );
						return @value;
					}
					
					
					case 1650208238:
					{
						this.brushDuration = ((int) (global::haxe.lang.Runtime.toInt(@value)) );
						return @value;
					}
					
					
					case 1321811028:
					{
						this.brushType = ((global::alphatab.model.BrushType) (@value) );
						return @value;
					}
					
					
					case 1291439277:
					{
						this.text = global::haxe.lang.Runtime.toString(@value);
						return @value;
					}
					
					
					case 5790307:
					{
						this.tap = ((bool) (@value) );
						return @value;
					}
					
					
					case 1280692680:
					{
						this.slap = ((bool) (@value) );
						return @value;
					}
					
					
					case 650430015:
					{
						this.hasRasgueado = ((bool) (@value) );
						return @value;
					}
					
					
					case 5594513:
					{
						this.pop = ((bool) (@value) );
						return @value;
					}
					
					
					case 632389428:
					{
						this.lyrics = ((global::haxe.root.Array<object>) (global::haxe.root.Array<object>.__hx_cast<object>(((global::haxe.root.Array) (@value) ))) );
						return @value;
					}
					
					
					case 1688947841:
					{
						this.fadeIn = ((bool) (@value) );
						return @value;
					}
					
					
					case 1114502602:
					{
						this.dots = ((int) (global::haxe.lang.Runtime.toInt(@value)) );
						return @value;
					}
					
					
					case 638277820:
					{
						this.automations = ((global::haxe.root.Array<object>) (global::haxe.root.Array<object>.__hx_cast<object>(((global::haxe.root.Array) (@value) ))) );
						return @value;
					}
					
					
					case 207609411:
					{
						this.isEmpty = ((bool) (@value) );
						return @value;
					}
					
					
					case 344854356:
					{
						this.duration = ((global::alphatab.model.Duration) (@value) );
						return @value;
					}
					
					
					case 49465911:
					{
						this._maxNote = ((global::alphatab.model.Note) (@value) );
						return @value;
					}
					
					
					case 1942741029:
					{
						this._minNote = ((global::alphatab.model.Note) (@value) );
						return @value;
					}
					
					
					case 533388353:
					{
						this.notes = ((global::haxe.root.Array<object>) (global::haxe.root.Array<object>.__hx_cast<object>(((global::haxe.root.Array) (@value) ))) );
						return @value;
					}
					
					
					case 989275570:
					{
						this.voice = ((global::alphatab.model.Voice) (@value) );
						return @value;
					}
					
					
					case 1041537810:
					{
						this.index = ((int) (global::haxe.lang.Runtime.toInt(@value)) );
						return @value;
					}
					
					
					case 1826654217:
					{
						this.nextBeat = ((global::alphatab.model.Beat) (@value) );
						return @value;
					}
					
					
					case 1739960653:
					{
						this.previousBeat = ((global::alphatab.model.Beat) (@value) );
						return @value;
					}
					
					
					default:
					{
						return base.__hx_setField(field, hash, @value, handleProperties);
					}
					
				}
				
			}
		}
Ejemplo n.º 4
0
 public static void __hx_ctor_alphatab_rendering_glyphs_CircleGlyph(global::alphatab.rendering.glyphs.CircleGlyph __temp_me138, global::haxe.lang.Null <int> x, global::haxe.lang.Null <int> y, double size)
 {
     unchecked
     {
         int __temp_y137 = ((global::haxe.lang.Runtime.eq((y).toDynamic(), (default(global::haxe.lang.Null <int>)).toDynamic())) ? (((int)(0))) : (y.@value));
         int __temp_x136 = ((global::haxe.lang.Runtime.eq((x).toDynamic(), (default(global::haxe.lang.Null <int>)).toDynamic())) ? (((int)(0))) : (x.@value));
         global::alphatab.rendering.Glyph.__hx_ctor_alphatab_rendering_Glyph(__temp_me138, new global::haxe.lang.Null <int>(__temp_x136, true), new global::haxe.lang.Null <int>(__temp_y137, true));
         __temp_me138._size = size;
     }
 }
Ejemplo n.º 5
0
 public static void __hx_ctor_alphatab_rendering_glyphs_NoteHeadGlyph(global::alphatab.rendering.glyphs.NoteHeadGlyph __temp_me170, global::haxe.lang.Null <int> x, global::haxe.lang.Null <int> y, global::alphatab.model.Duration duration, bool isGrace)
 {
     unchecked
     {
         int __temp_y169 = ((global::haxe.lang.Runtime.eq((y).toDynamic(), (default(global::haxe.lang.Null <int>)).toDynamic())) ? (((int)(0))) : (y.@value));
         int __temp_x168 = ((global::haxe.lang.Runtime.eq((x).toDynamic(), (default(global::haxe.lang.Null <int>)).toDynamic())) ? (((int)(0))) : (x.@value));
         global::alphatab.rendering.glyphs.SvgGlyph.__hx_ctor_alphatab_rendering_glyphs_SvgGlyph(__temp_me170, new global::haxe.lang.Null <int>(__temp_x168, true), new global::haxe.lang.Null <int>(__temp_y169, true), __temp_me170.getNoteSvg(duration), ((isGrace) ? (0.7) : (((double)(1)))), ((isGrace) ? (0.7) : (((double)(1)))));
         __temp_me170._isGrace = isGrace;
     }
 }
Ejemplo n.º 6
0
        public override void createPostBeatGlyphs()
        {
            unchecked
            {
                global::alphatab.model.MasterBar __temp_stmt568 = default(global::alphatab.model.MasterBar);
                {
                    global::alphatab.model.Bar _this = this._bar;
                    __temp_stmt568 = ((global::alphatab.model.MasterBar)(_this.track.score.masterBars[_this.index]));
                }

                if ((__temp_stmt568.repeatCount > 0))
                {
                    this.addPostBeatGlyph(new global::alphatab.rendering.glyphs.RepeatCloseGlyph(new global::haxe.lang.Null <int>(this.x, true), new global::haxe.lang.Null <int>(0, true)));
                    global::alphatab.model.MasterBar __temp_stmt574 = default(global::alphatab.model.MasterBar);
                    {
                        global::alphatab.model.Bar _this1 = this._bar;
                        __temp_stmt574 = ((global::alphatab.model.MasterBar)(_this1.track.score.masterBars[_this1.index]));
                    }

                    if ((__temp_stmt574.repeatCount > 2))
                    {
                        int line = default(int);
                        if (((this._bar.index == (this._bar.track.bars.length - 1)) || (this.index == (this.stave.barRenderers.length - 1))))
                        {
                            line = -1;
                        }
                        else
                        {
                            line = -4;
                        }

                        global::haxe.lang.Null <int>     __temp_stmt575 = new global::haxe.lang.Null <int>(this.getTabY(line, new global::haxe.lang.Null <int>(-3, true)), true);
                        global::alphatab.model.MasterBar __temp_stmt576 = default(global::alphatab.model.MasterBar);
                        {
                            global::alphatab.model.Bar _this2 = this._bar;
                            __temp_stmt576 = ((global::alphatab.model.MasterBar)(_this2.track.score.masterBars[_this2.index]));
                        }

                        this.addPostBeatGlyph(new global::alphatab.rendering.glyphs.RepeatCountGlyph(new global::haxe.lang.Null <int>(0, true), __temp_stmt575, ((int)(__temp_stmt576.repeatCount))));
                    }
                }
                else
                {
                    global::alphatab.model.MasterBar __temp_stmt569 = default(global::alphatab.model.MasterBar);
                    {
                        global::alphatab.model.Bar _this3 = this._bar;
                        __temp_stmt569 = ((global::alphatab.model.MasterBar)(_this3.track.score.masterBars[_this3.index]));
                    }

                    if (__temp_stmt569.isDoubleBar)
                    {
                        this.addPostBeatGlyph(new global::alphatab.rendering.glyphs.BarSeperatorGlyph(((global::haxe.lang.Null <int>)(default(global::haxe.lang.Null <int>))), ((global::haxe.lang.Null <int>)(default(global::haxe.lang.Null <int>))), ((global::haxe.lang.Null <bool>)(default(global::haxe.lang.Null <bool>)))));
                        this.addPostBeatGlyph(new global::alphatab.rendering.glyphs.SpacingGlyph(new global::haxe.lang.Null <int>(0, true), new global::haxe.lang.Null <int>(0, true), ((int)((3 * this.stave.staveGroup.layout.renderer.settings.scale))), new global::haxe.lang.Null <bool>(false, true)));
                        this.addPostBeatGlyph(new global::alphatab.rendering.glyphs.BarSeperatorGlyph(((global::haxe.lang.Null <int>)(default(global::haxe.lang.Null <int>))), ((global::haxe.lang.Null <int>)(default(global::haxe.lang.Null <int>))), ((global::haxe.lang.Null <bool>)(default(global::haxe.lang.Null <bool>)))));
                    }
                    else
                    {
                        bool __temp_stmt571  = (this._bar.nextBar == default(global::alphatab.model.Bar));
                        bool __temp_boolv572 = false;
                        if (!(__temp_stmt571))
                        {
                            global::alphatab.model.MasterBar __temp_stmt573 = default(global::alphatab.model.MasterBar);
                            {
                                global::alphatab.model.Bar _this4 = this._bar.nextBar;
                                __temp_stmt573 = ((global::alphatab.model.MasterBar)(_this4.track.score.masterBars[_this4.index]));
                            }

                            __temp_boolv572 = !(__temp_stmt573.isRepeatStart);
                        }

                        bool __temp_stmt570 = (__temp_stmt571 || __temp_boolv572);
                        if (__temp_stmt570)
                        {
                            this.addPostBeatGlyph(new global::alphatab.rendering.glyphs.BarSeperatorGlyph(new global::haxe.lang.Null <int>(0, true), new global::haxe.lang.Null <int>(0, true), new global::haxe.lang.Null <bool>((this._bar.index == (this._bar.track.bars.length - 1)), true)));
                        }
                    }
                }
            }
        }
Ejemplo n.º 7
0
		public virtual   global::haxe.io.Bytes readAll(global::haxe.lang.Null<int> bufsize)
		{
			unchecked 
			{
				if (global::haxe.lang.Runtime.eq((bufsize).toDynamic(), (default(global::haxe.lang.Null<int>)).toDynamic())) 
				{
					bufsize = new global::haxe.lang.Null<int>(new global::haxe.lang.Null<int>(16384, true).@value, true);
				}
				
				global::haxe.io.Bytes buf = global::haxe.io.Bytes.alloc(bufsize.@value);
				global::haxe.io.BytesBuffer total = new global::haxe.io.BytesBuffer();
				try 
				{
					while (true)
					{
						int len = this.readBytes(buf, 0, bufsize.@value);
						if (( len == 0 )) 
						{
							throw global::haxe.lang.HaxeException.wrap(global::haxe.io.Error.Blocked);
						}
						
						{
							if (( ( len < 0 ) || ( len > buf.length ) )) 
							{
								throw global::haxe.lang.HaxeException.wrap(global::haxe.io.Error.OutsideBounds);
							}
							
							( total.b as global::System.IO.Stream ).Write(((byte[]) (buf.b) ), ((int) (0) ), ((int) (len) ));
						}
						
					}
					
				}
				catch (global::System.Exception __temp_catchallException512)
				{
					object __temp_catchall513 = __temp_catchallException512;
					if (( __temp_catchall513 is global::haxe.lang.HaxeException )) 
					{
						__temp_catchall513 = ((global::haxe.lang.HaxeException) (__temp_catchallException512) ).obj;
					}
					
					if (( __temp_catchall513 is global::haxe.io.Eof )) 
					{
						global::haxe.io.Eof e = ((global::haxe.io.Eof) (__temp_catchall513) );
						{
							{
							}
							
						}
						
					}
					 else 
					{
						throw;
					}
					
				}
				
				
				return total.getBytes();
			}
		}
Ejemplo n.º 8
0
		public virtual   void parseNoteProperties(global::haxe.root.Xml node, global::alphatab.model.Note note, string noteId)
		{
			unchecked 
			{
				bool isBended = false;
				global::alphatab.model.BendPoint bendOrigin = default(global::alphatab.model.BendPoint);
				global::haxe.lang.Null<int> bendMiddleValue = default(global::haxe.lang.Null<int>);
				global::haxe.lang.Null<int> bendMiddleOffset1 = default(global::haxe.lang.Null<int>);
				global::haxe.lang.Null<int> bendMiddleOffset2 = default(global::haxe.lang.Null<int>);
				global::alphatab.model.BendPoint bendDestination = default(global::alphatab.model.BendPoint);
				{
					object __temp_iterator438 = node.iterator();
					while (((bool) (global::haxe.lang.Runtime.callField(__temp_iterator438, "hasNext", 407283053, default(global::haxe.root.Array))) ))
					{
						global::haxe.root.Xml c = ((global::haxe.root.Xml) (global::haxe.lang.Runtime.callField(__temp_iterator438, "next", 1224901875, default(global::haxe.root.Array))) );
						if (( c.nodeType == global::haxe.root.Xml.Element )) 
						{
							string _g = c._get_nodeName();
							switch (_g)
							{
								case "Property":
								{
									string name = c.@get("name");
									switch (name)
									{
										case "String":
										{
											note.@string = ( global::Std.parseInt(this.getValue(this.findChildElement(c, "String"))).@value + 1 );
											break;
										}
										
										
										case "Fret":
										{
											note.fret = global::Std.parseInt(this.getValue(this.findChildElement(c, "Fret"))).@value;
											break;
										}
										
										
										case "Tapped":
										{
											this._tappedNotes.@set(noteId, true);
											break;
										}
										
										
										case "HarmonicType":
										{
											global::haxe.root.Xml htype = this.findChildElement(c, "HType");
											if (( htype != default(global::haxe.root.Xml) )) 
											{
												string _g1 = this.getValue(htype);
												switch (_g1)
												{
													case "NoHarmonic":
													{
														note.harmonicType = global::alphatab.model.HarmonicType.None;
														break;
													}
													
													
													case "Natural":
													{
														note.harmonicType = global::alphatab.model.HarmonicType.Natural;
														break;
													}
													
													
													case "Artificial":
													{
														note.harmonicType = global::alphatab.model.HarmonicType.Artificial;
														break;
													}
													
													
													case "Pinch":
													{
														note.harmonicType = global::alphatab.model.HarmonicType.Pinch;
														break;
													}
													
													
													case "Tap":
													{
														note.harmonicType = global::alphatab.model.HarmonicType.Tap;
														break;
													}
													
													
													case "Semi":
													{
														note.harmonicType = global::alphatab.model.HarmonicType.Semi;
														break;
													}
													
													
													case "Feedback":
													{
														note.harmonicType = global::alphatab.model.HarmonicType.Feedback;
														break;
													}
													
													
												}
												
											}
											
											break;
										}
										
										
										case "HarmonicFret":
										{
											global::haxe.root.Xml hfret = this.findChildElement(c, "HFret");
											if (( hfret != default(global::haxe.root.Xml) )) 
											{
												note.harmonicValue = global::Std.parseFloat(this.getValue(hfret));
											}
											
											break;
										}
										
										
										case "PalmMuted":
										{
											if (( this.findChildElement(c, "Enable") != default(global::haxe.root.Xml) )) 
											{
												note.isPalmMute = true;
											}
											
											break;
										}
										
										
										case "Octave":
										{
											note.octave = global::Std.parseInt(this.getValue(this.findChildElement(c, "Number"))).@value;
											break;
										}
										
										
										case "Bended":
										{
											isBended = true;
											break;
										}
										
										
										case "BendOriginValue":
										{
											if (( bendOrigin == default(global::alphatab.model.BendPoint) )) 
											{
												bendOrigin = new global::alphatab.model.BendPoint(((global::haxe.lang.Null<int>) (default(global::haxe.lang.Null<int>)) ), ((global::haxe.lang.Null<int>) (default(global::haxe.lang.Null<int>)) ));
											}
											
											{
												double x = ( global::Std.parseFloat(this.getValue(this.findChildElement(c, "Float"))) * 0.04 );
												bendOrigin.@value = ((int) (x) );
											}
											
											break;
										}
										
										
										case "BendOriginOffset":
										{
											if (( bendOrigin == default(global::alphatab.model.BendPoint) )) 
											{
												bendOrigin = new global::alphatab.model.BendPoint(((global::haxe.lang.Null<int>) (default(global::haxe.lang.Null<int>)) ), ((global::haxe.lang.Null<int>) (default(global::haxe.lang.Null<int>)) ));
											}
											
											{
												double x1 = ( global::Std.parseFloat(this.getValue(this.findChildElement(c, "Float"))) * 0.6 );
												bendOrigin.offset = ((int) (x1) );
											}
											
											break;
										}
										
										
										case "BendMiddleValue":
										{
											double x2 = ( global::Std.parseFloat(this.getValue(this.findChildElement(c, "Float"))) * 0.04 );
											bendMiddleValue = new global::haxe.lang.Null<int>(new global::haxe.lang.Null<int>(((int) (x2) ), true).@value, true);
											break;
										}
										
										
										case "BendMiddleOffset1":
										{
											double x3 = ( global::Std.parseFloat(this.getValue(this.findChildElement(c, "Float"))) * 0.6 );
											bendMiddleOffset1 = new global::haxe.lang.Null<int>(new global::haxe.lang.Null<int>(((int) (x3) ), true).@value, true);
											break;
										}
										
										
										case "BendMiddleOffset2":
										{
											double x4 = ( global::Std.parseFloat(this.getValue(this.findChildElement(c, "Float"))) * 0.6 );
											bendMiddleOffset2 = new global::haxe.lang.Null<int>(new global::haxe.lang.Null<int>(((int) (x4) ), true).@value, true);
											break;
										}
										
										
										case "BendDestinationValue":
										{
											if (( bendDestination == default(global::alphatab.model.BendPoint) )) 
											{
												bendDestination = new global::alphatab.model.BendPoint(new global::haxe.lang.Null<int>(60, true), ((global::haxe.lang.Null<int>) (default(global::haxe.lang.Null<int>)) ));
											}
											
											{
												double x5 = ( global::Std.parseFloat(this.getValue(this.findChildElement(c, "Float"))) * 0.04 );
												bendDestination.@value = ((int) (x5) );
											}
											
											break;
										}
										
										
										case "BendDestinationOffset":
										{
											if (( bendDestination == default(global::alphatab.model.BendPoint) )) 
											{
												bendDestination = new global::alphatab.model.BendPoint(((global::haxe.lang.Null<int>) (default(global::haxe.lang.Null<int>)) ), ((global::haxe.lang.Null<int>) (default(global::haxe.lang.Null<int>)) ));
											}
											
											{
												double x6 = ( global::Std.parseFloat(this.getValue(this.findChildElement(c, "Float"))) * 0.6 );
												bendDestination.offset = ((int) (x6) );
											}
											
											break;
										}
										
										
										case "HopoOrigin":
										{
											if (( this.findChildElement(c, "Enable") != default(global::haxe.root.Xml) )) 
											{
												note.isHammerPullOrigin = true;
											}
											
											break;
										}
										
										
										case "HopoDestination":
										{
											{
											}
											
											break;
										}
										
										
										case "Slide":
										{
											global::haxe.lang.Null<int> slideFlags = global::Std.parseInt(this.getValue(this.findChildElement(c, "Flags")));
											if (( (( slideFlags.@value & 1 )) != 0 )) 
											{
												note.slideType = global::alphatab.model.SlideType.Shift;
											}
											
											if (( (( slideFlags.@value & 2 )) != 0 )) 
											{
												note.slideType = global::alphatab.model.SlideType.Legato;
											}
											
											if (( (( slideFlags.@value & 4 )) != 0 )) 
											{
												note.slideType = global::alphatab.model.SlideType.OutDown;
											}
											
											if (( (( slideFlags.@value & 8 )) != 0 )) 
											{
												note.slideType = global::alphatab.model.SlideType.OutUp;
											}
											
											if (( (( slideFlags.@value & 16 )) != 0 )) 
											{
												note.slideType = global::alphatab.model.SlideType.IntoFromBelow;
											}
											
											if (( (( slideFlags.@value & 32 )) != 0 )) 
											{
												note.slideType = global::alphatab.model.SlideType.IntoFromAbove;
											}
											
											break;
										}
										
										
									}
									
									break;
								}
								
								
							}
							
						}
						
					}
					
				}
				
				if (isBended) 
				{
					if (( bendOrigin == default(global::alphatab.model.BendPoint) )) 
					{
						bendOrigin = new global::alphatab.model.BendPoint(((global::haxe.lang.Null<int>) (default(global::haxe.lang.Null<int>)) ), ((global::haxe.lang.Null<int>) (default(global::haxe.lang.Null<int>)) ));
					}
					
					if (( bendDestination == default(global::alphatab.model.BendPoint) )) 
					{
						bendDestination = new global::alphatab.model.BendPoint(new global::haxe.lang.Null<int>(60, true), ((global::haxe.lang.Null<int>) (default(global::haxe.lang.Null<int>)) ));
					}
					
					global::haxe.root.Array<object> bend = new global::haxe.root.Array<object>();
					bend.push(bendOrigin);
					if (( ( ! (global::haxe.lang.Runtime.eq((bendMiddleOffset1).toDynamic(), (default(global::haxe.lang.Null<int>)).toDynamic())) ) && ( ! (global::haxe.lang.Runtime.eq((bendMiddleValue).toDynamic(), (default(global::haxe.lang.Null<int>)).toDynamic())) ) )) 
					{
						bend.push(new global::alphatab.model.BendPoint(((global::haxe.lang.Null<int>) (bendMiddleOffset1) ), ((global::haxe.lang.Null<int>) (bendMiddleValue) )));
					}
					
					if (( ( ! (global::haxe.lang.Runtime.eq((bendMiddleOffset2).toDynamic(), (default(global::haxe.lang.Null<int>)).toDynamic())) ) && ( ! (global::haxe.lang.Runtime.eq((bendMiddleValue).toDynamic(), (default(global::haxe.lang.Null<int>)).toDynamic())) ) )) 
					{
						bend.push(new global::alphatab.model.BendPoint(((global::haxe.lang.Null<int>) (bendMiddleOffset2) ), ((global::haxe.lang.Null<int>) (bendMiddleValue) )));
					}
					
					if (( ( global::haxe.lang.Runtime.eq((bendMiddleOffset1).toDynamic(), (default(global::haxe.lang.Null<int>)).toDynamic()) && global::haxe.lang.Runtime.eq((bendMiddleOffset2).toDynamic(), (default(global::haxe.lang.Null<int>)).toDynamic()) ) && ( ! (global::haxe.lang.Runtime.eq((bendMiddleValue).toDynamic(), (default(global::haxe.lang.Null<int>)).toDynamic())) ) )) 
					{
						bend.push(new global::alphatab.model.BendPoint(new global::haxe.lang.Null<int>(30, true), ((global::haxe.lang.Null<int>) (bendMiddleValue) )));
					}
					
					bend.push(bendDestination);
					note.bendPoints = bend;
				}
				
			}
		}
Ejemplo n.º 9
0
        public static object @select(global::Array <object> read, global::Array <object> write, global::Array <object> others, global::haxe.lang.Null <double> timeout)
        {
            unchecked {
                                #line 142 "/opt/haxe/std/cs/_std/sys/net/Socket.hx"
                global::haxe.ds.IntMap <object> map = new global::haxe.ds.IntMap <object>();
                                #line 165 "/opt/haxe/std/cs/_std/sys/net/Socket.hx"
                if ((read != null))
                {
                                        #line 165 "/opt/haxe/std/cs/_std/sys/net/Socket.hx"
                    int _g = 0;
                                        #line 165 "/opt/haxe/std/cs/_std/sys/net/Socket.hx"
                    while ((_g < read.length))
                    {
                                                #line 165 "/opt/haxe/std/cs/_std/sys/net/Socket.hx"
                        global::sys.net.Socket s = ((global::sys.net.Socket)(read[_g]));
                                                #line 165 "/opt/haxe/std/cs/_std/sys/net/Socket.hx"
                        ++_g;
                                                #line 165 "/opt/haxe/std/cs/_std/sys/net/Socket.hx"
                        map.@set(s.sock.Handle.ToInt32(), s);
                    }
                }

                                #line 166 "/opt/haxe/std/cs/_std/sys/net/Socket.hx"
                if ((write != null))
                {
                                        #line 166 "/opt/haxe/std/cs/_std/sys/net/Socket.hx"
                    int _g1 = 0;
                                        #line 166 "/opt/haxe/std/cs/_std/sys/net/Socket.hx"
                    while ((_g1 < write.length))
                    {
                                                #line 166 "/opt/haxe/std/cs/_std/sys/net/Socket.hx"
                        global::sys.net.Socket s1 = ((global::sys.net.Socket)(write[_g1]));
                                                #line 166 "/opt/haxe/std/cs/_std/sys/net/Socket.hx"
                        ++_g1;
                                                #line 166 "/opt/haxe/std/cs/_std/sys/net/Socket.hx"
                        map.@set(s1.sock.Handle.ToInt32(), s1);
                    }
                }

                                #line 167 "/opt/haxe/std/cs/_std/sys/net/Socket.hx"
                if ((others != null))
                {
                                        #line 167 "/opt/haxe/std/cs/_std/sys/net/Socket.hx"
                    int _g2 = 0;
                                        #line 167 "/opt/haxe/std/cs/_std/sys/net/Socket.hx"
                    while ((_g2 < others.length))
                    {
                                                #line 167 "/opt/haxe/std/cs/_std/sys/net/Socket.hx"
                        global::sys.net.Socket s2 = ((global::sys.net.Socket)(others[_g2]));
                                                #line 167 "/opt/haxe/std/cs/_std/sys/net/Socket.hx"
                        ++_g2;
                                                #line 167 "/opt/haxe/std/cs/_std/sys/net/Socket.hx"
                        map.@set(s2.sock.Handle.ToInt32(), s2);
                    }
                }

                                #line 170 "/opt/haxe/std/cs/_std/sys/net/Socket.hx"
                global::System.Collections.ArrayList a = new global::System.Collections.ArrayList(((int)((((read == null)) ? (0) : (read.length)))));
                                #line 170 "/opt/haxe/std/cs/_std/sys/net/Socket.hx"
                if ((read != null))
                {
                                        #line 170 "/opt/haxe/std/cs/_std/sys/net/Socket.hx"
                    int _g3 = 0;
                                        #line 170 "/opt/haxe/std/cs/_std/sys/net/Socket.hx"
                    while ((_g3 < read.length))
                    {
                                                #line 170 "/opt/haxe/std/cs/_std/sys/net/Socket.hx"
                        global::sys.net.Socket s3 = ((global::sys.net.Socket)(read[_g3]));
                                                #line 170 "/opt/haxe/std/cs/_std/sys/net/Socket.hx"
                        ++_g3;
                                                #line 170 "/opt/haxe/std/cs/_std/sys/net/Socket.hx"
                        a.Add(((object)(s3.sock)));
                    }
                }

                                #line 170 "/opt/haxe/std/cs/_std/sys/net/Socket.hx"
                global::System.Collections.ArrayList rawRead = a;
                global::System.Collections.ArrayList a1      = new global::System.Collections.ArrayList(((int)((((write == null)) ? (0) : (write.length)))));
                if ((write != null))
                {
                                        #line 171 "/opt/haxe/std/cs/_std/sys/net/Socket.hx"
                    int _g4 = 0;
                                        #line 171 "/opt/haxe/std/cs/_std/sys/net/Socket.hx"
                    while ((_g4 < write.length))
                    {
                                                #line 171 "/opt/haxe/std/cs/_std/sys/net/Socket.hx"
                        global::sys.net.Socket s4 = ((global::sys.net.Socket)(write[_g4]));
                                                #line 171 "/opt/haxe/std/cs/_std/sys/net/Socket.hx"
                        ++_g4;
                                                #line 171 "/opt/haxe/std/cs/_std/sys/net/Socket.hx"
                        a1.Add(((object)(s4.sock)));
                    }
                }

                                #line 170 "/opt/haxe/std/cs/_std/sys/net/Socket.hx"
                global::System.Collections.ArrayList rawWrite = a1;
                                #line 172 "/opt/haxe/std/cs/_std/sys/net/Socket.hx"
                global::System.Collections.ArrayList a2 = new global::System.Collections.ArrayList(((int)((((others == null)) ? (0) : (others.length)))));
                                #line 172 "/opt/haxe/std/cs/_std/sys/net/Socket.hx"
                if ((others != null))
                {
                                        #line 172 "/opt/haxe/std/cs/_std/sys/net/Socket.hx"
                    int _g5 = 0;
                                        #line 172 "/opt/haxe/std/cs/_std/sys/net/Socket.hx"
                    while ((_g5 < others.length))
                    {
                                                #line 172 "/opt/haxe/std/cs/_std/sys/net/Socket.hx"
                        global::sys.net.Socket s5 = ((global::sys.net.Socket)(others[_g5]));
                                                #line 172 "/opt/haxe/std/cs/_std/sys/net/Socket.hx"
                        ++_g5;
                                                #line 172 "/opt/haxe/std/cs/_std/sys/net/Socket.hx"
                        a2.Add(((object)(s5.sock)));
                    }
                }

                                #line 170 "/opt/haxe/std/cs/_std/sys/net/Socket.hx"
                global::System.Collections.ArrayList rawOthers = a2;
                                #line 173 "/opt/haxe/std/cs/_std/sys/net/Socket.hx"
                int microsec = ((!(timeout.hasValue)) ? (-1) : (((int)(((timeout).@value * 1000000)))));
                global::System.Net.Sockets.Socket.Select(((global::System.Collections.IList)(rawRead)), ((global::System.Collections.IList)(rawWrite)), ((global::System.Collections.IList)(rawOthers)), ((int)(microsec)));
                                #line 177 "/opt/haxe/std/cs/_std/sys/net/Socket.hx"
                global::Array <object> a3 = new global::Array <object>(new object[] {});
                                #line 177 "/opt/haxe/std/cs/_std/sys/net/Socket.hx"
                {
                                        #line 177 "/opt/haxe/std/cs/_std/sys/net/Socket.hx"
                    int _g6 = 0;
                                        #line 177 "/opt/haxe/std/cs/_std/sys/net/Socket.hx"
                    int _g7 = rawRead.Count;
                                        #line 177 "/opt/haxe/std/cs/_std/sys/net/Socket.hx"
                    while ((_g6 < _g7))
                    {
                                                #line 177 "/opt/haxe/std/cs/_std/sys/net/Socket.hx"
                        int i = _g6++;
                                                #line 177 "/opt/haxe/std/cs/_std/sys/net/Socket.hx"
                        global::System.Net.Sockets.Socket s6 = ((global::System.Net.Sockets.Socket)(rawRead[i]));
                                                #line 177 "/opt/haxe/std/cs/_std/sys/net/Socket.hx"
                        a3.push(((global::sys.net.Socket)((map.@get(s6.Handle.ToInt32())).@value)));
                    }
                }

                                #line 177 "/opt/haxe/std/cs/_std/sys/net/Socket.hx"
                global::Array <object> tmp = a3;
                global::Array <object> a4  = new global::Array <object>(new object[] {});
                {
                                        #line 178 "/opt/haxe/std/cs/_std/sys/net/Socket.hx"
                    int _g8 = 0;
                                        #line 178 "/opt/haxe/std/cs/_std/sys/net/Socket.hx"
                    int _g9 = rawWrite.Count;
                                        #line 178 "/opt/haxe/std/cs/_std/sys/net/Socket.hx"
                    while ((_g8 < _g9))
                    {
                                                #line 178 "/opt/haxe/std/cs/_std/sys/net/Socket.hx"
                        int i1 = _g8++;
                                                #line 178 "/opt/haxe/std/cs/_std/sys/net/Socket.hx"
                        global::System.Net.Sockets.Socket s7 = ((global::System.Net.Sockets.Socket)(rawWrite[i1]));
                                                #line 178 "/opt/haxe/std/cs/_std/sys/net/Socket.hx"
                        a4.push(((global::sys.net.Socket)((map.@get(s7.Handle.ToInt32())).@value)));
                    }
                }

                                #line 178 "/opt/haxe/std/cs/_std/sys/net/Socket.hx"
                global::Array <object> tmp1 = a4;
                global::Array <object> a5   = new global::Array <object>(new object[] {});
                {
                                        #line 179 "/opt/haxe/std/cs/_std/sys/net/Socket.hx"
                    int _g10 = 0;
                                        #line 179 "/opt/haxe/std/cs/_std/sys/net/Socket.hx"
                    int _g11 = rawOthers.Count;
                                        #line 179 "/opt/haxe/std/cs/_std/sys/net/Socket.hx"
                    while ((_g10 < _g11))
                    {
                                                #line 179 "/opt/haxe/std/cs/_std/sys/net/Socket.hx"
                        int i2 = _g10++;
                                                #line 179 "/opt/haxe/std/cs/_std/sys/net/Socket.hx"
                        global::System.Net.Sockets.Socket s8 = ((global::System.Net.Sockets.Socket)(rawOthers[i2]));
                                                #line 179 "/opt/haxe/std/cs/_std/sys/net/Socket.hx"
                        a5.push(((global::sys.net.Socket)((map.@get(s8.Handle.ToInt32())).@value)));
                    }
                }

                                #line 176 "/opt/haxe/std/cs/_std/sys/net/Socket.hx"
                return(new global::haxe.lang.DynamicObject(new int[] { 1269254998, 1348037855, 1898155939 }, new object[] { tmp, tmp1, a5 }, new int[] {}, new double[] {}));
            }
                        #line default
        }
Ejemplo n.º 10
0
        public virtual void serialize(object v)
        {
            unchecked {
                global::ValueType _g = global::Type.@typeof(v);
                switch (_g.index)
                {
                case 0:
                {
                    this.buf.b.Append(((string)("n")));
                    break;
                }


                case 1:
                {
                    int v1 = ((int)(global::haxe.lang.Runtime.toInt(v)));
                    if ((v1 == 0))
                    {
                        this.buf.b.Append(((string)("z")));
                        return;
                    }

                    this.buf.b.Append(((string)("i")));
                    this.buf.b.Append(((string)(global::Std.@string(v1))));
                    break;
                }


                case 2:
                {
                    double v2 = ((double)(global::haxe.lang.Runtime.toDouble(v)));
                    if (global::System.Double.IsNaN(((double)(v2))))
                    {
                        this.buf.b.Append(((string)("k")));
                    }
                    else if (!(((!(global::System.Double.IsInfinity(((double)(v2)))) && !(global::System.Double.IsNaN(((double)(v2))))))))
                    {
                        this.buf.b.Append(((string)((((v2 < 0)) ? ("m") : ("p")))));
                    }
                    else
                    {
                        this.buf.b.Append(((string)("d")));
                        this.buf.b.Append(((string)(global::Std.@string(v2))));
                    }

                    break;
                }


                case 3:
                {
                    this.buf.b.Append(((string)(((global::haxe.lang.Runtime.toBool((v))) ? ("t") : ("f")))));
                    break;
                }


                case 4:
                {
                    if ((v is global::System.Type))
                    {
                        string className = global::Type.getClassName(((global::System.Type)(v)));
                        this.buf.b.Append(((string)("A")));
                        this.serializeString(className);
                    }
                    else if ((v is global::System.Type))
                    {
                        this.buf.b.Append(((string)("B")));
                        this.serializeString(global::Type.getEnumName(((global::System.Type)(v))));
                    }
                    else
                    {
                        if ((this.useCache && this.serializeRef(v)))
                        {
                            return;
                        }

                        this.buf.b.Append(((string)("o")));
                        this.serializeFields(v);
                    }

                    break;
                }


                case 5:
                {
                    throw global::haxe.lang.HaxeException.wrap("Cannot serialize function");
                }


                case 6:
                {
                    global::System.Type c = ((global::System.Type)(_g.@params[0]));
                    {
                        if (global::haxe.lang.Runtime.refEq(c, typeof(string)))
                        {
                            this.serializeString(global::haxe.lang.Runtime.toString(v));
                            return;
                        }

                        if ((this.useCache && this.serializeRef(v)))
                        {
                            return;
                        }

                        {
                            string _g1 = global::Type.getClassName(c);
                            switch (_g1)
                            {
                            case "Array":
                            {
                                int ucount = 0;
                                this.buf.b.Append(((string)("a")));
                                int l = ((int)(global::haxe.lang.Runtime.toInt(global::haxe.lang.Runtime.getField(v, "length", 520590566, true))));
                                {
                                    int _g11 = 0;
                                    int _g2  = l;
                                    while ((_g11 < _g2))
                                    {
                                        int i = _g11++;
                                        if ((((object)(global::haxe.lang.Runtime.callField(v, "__get", 1915412854, new global::Array <object>(new object[] { i })))) == null))
                                        {
                                            ++ucount;
                                        }
                                        else
                                        {
                                            if ((ucount > 0))
                                            {
                                                if ((ucount == 1))
                                                {
                                                    this.buf.b.Append(((string)("n")));
                                                }
                                                else
                                                {
                                                    this.buf.b.Append(((string)("u")));
                                                    this.buf.b.Append(((string)(global::Std.@string(ucount))));
                                                }

                                                ucount = 0;
                                            }

                                            this.serialize(((object)(global::haxe.lang.Runtime.callField(v, "__get", 1915412854, new global::Array <object>(new object[] { i })))));
                                        }
                                    }
                                }

                                if ((ucount > 0))
                                {
                                    if ((ucount == 1))
                                    {
                                        this.buf.b.Append(((string)("n")));
                                    }
                                    else
                                    {
                                        this.buf.b.Append(((string)("u")));
                                        this.buf.b.Append(((string)(global::Std.@string(ucount))));
                                    }
                                }

                                this.buf.b.Append(((string)("h")));
                                break;
                            }


                            case "Date":
                            {
                                global::Date d = ((global::Date)(v));
                                this.buf.b.Append(((string)("v")));
                                {
                                    global::StringBuf _this = this.buf;
                                    long a = global::System.TimeZone.CurrentTimeZone.ToUniversalTime(((global::System.DateTime)(d.date))).Ticks;
                                    _this.b.Append(((string)(global::Std.@string((((double)(((long)((((long)(a)) - ((long)(global::Date.epochTicks))))))) / ((double)(global::System.TimeSpan.TicksPerMillisecond)))))));
                                }

                                break;
                            }


                            case "List":
                            {
                                this.buf.b.Append(((string)("l")));
                                global::List v3 = ((global::List)(v));
                                {
                                    global::_List.ListNode _g_head = ((global::_List.ListNode)(global::haxe.lang.Runtime.getField(v3, "h", 104, true)));
                                    while ((_g_head != null))
                                    {
                                        object val = global::haxe.lang.Runtime.getField(_g_head, "item", 1170195731, true);
                                        _g_head = ((global::_List.ListNode)(global::haxe.lang.Runtime.getField(_g_head, "next", 1224901875, true)));
                                        object i1 = ((object)(val));
                                        this.serialize(i1);
                                    }
                                }

                                this.buf.b.Append(((string)("h")));
                                break;
                            }


                            case "haxe.ds.IntMap":
                            {
                                this.buf.b.Append(((string)("q")));
                                global::haxe.ds.IntMap v4 = ((global::haxe.ds.IntMap)(v));
                                {
                                    object k = ((object)(new global::haxe.ds._IntMap.IntMapKeyIterator <object>(((global::haxe.ds.IntMap <object>)(global::haxe.ds.IntMap <object> .__hx_cast <object>(((global::haxe.ds.IntMap)(v4))))))));
                                    while (global::haxe.lang.Runtime.toBool(global::haxe.lang.Runtime.callField(k, "hasNext", 407283053, null)))
                                    {
                                        int k1 = ((int)(global::haxe.lang.Runtime.toInt(global::haxe.lang.Runtime.callField(k, "next", 1224901875, null))));
                                        this.buf.b.Append(((string)(":")));
                                        this.buf.b.Append(((string)(global::Std.@string(k1))));
                                        this.serialize(((object)(global::haxe.lang.Runtime.callField(v4, "get", 5144726, new global::Array <object>(new object[] { k1 })))));
                                    }
                                }

                                this.buf.b.Append(((string)("h")));
                                break;
                            }


                            case "haxe.ds.ObjectMap":
                            {
                                this.buf.b.Append(((string)("M")));
                                global::haxe.ds.ObjectMap v5 = ((global::haxe.ds.ObjectMap)(v));
                                {
                                    object k2 = v5.keys();
                                    while (global::haxe.lang.Runtime.toBool(global::haxe.lang.Runtime.callField(k2, "hasNext", 407283053, null)))
                                    {
                                        object k3 = ((object)(global::haxe.lang.Runtime.callField(k2, "next", 1224901875, null)));
                                        this.serialize(k3);
                                        this.serialize(((object)(global::haxe.lang.Runtime.callField(v5, "get", 5144726, new global::Array <object>(new object[] { k3 })))));
                                    }
                                }

                                this.buf.b.Append(((string)("h")));
                                break;
                            }


                            case "haxe.ds.StringMap":
                            {
                                this.buf.b.Append(((string)("b")));
                                global::haxe.ds.StringMap v6 = ((global::haxe.ds.StringMap)(v));
                                {
                                    object k4 = ((object)(new global::haxe.ds._StringMap.StringMapKeyIterator <object>(((global::haxe.ds.StringMap <object>)(global::haxe.ds.StringMap <object> .__hx_cast <object>(((global::haxe.ds.StringMap)(v6))))))));
                                    while (global::haxe.lang.Runtime.toBool(global::haxe.lang.Runtime.callField(k4, "hasNext", 407283053, null)))
                                    {
                                        string k5 = global::haxe.lang.Runtime.toString(global::haxe.lang.Runtime.callField(k4, "next", 1224901875, null));
                                        this.serializeString(k5);
                                        this.serialize(((object)(global::haxe.lang.Runtime.callField(v6, "get", 5144726, new global::Array <object>(new object[] { k5 })))));
                                    }
                                }

                                this.buf.b.Append(((string)("h")));
                                break;
                            }


                            case "haxe.io.Bytes":
                            {
                                global::haxe.io.Bytes v7 = ((global::haxe.io.Bytes)(v));
                                this.buf.b.Append(((string)("s")));
                                {
                                    global::StringBuf _this1 = this.buf;
                                    int x = ((int)(global::System.Math.Ceiling(((double)((((double)((v7.length * 8))) / 6))))));
                                    _this1.b.Append(((string)(global::Std.@string(x))));
                                }

                                this.buf.b.Append(((string)(":")));
                                int i2  = 0;
                                int max = (v7.length - 2);
                                global::haxe.lang.Null <int>[] b64 = global::haxe.Serializer.BASE64_CODES;
                                if ((b64 == null))
                                {
                                    global::haxe.lang.Null <int>[] this1 = new global::haxe.lang.Null <int> [global::haxe.Serializer.BASE64.Length];
                                    b64 = ((global::haxe.lang.Null <int>[])(this1));
                                    {
                                        int _g12 = 0;
                                        int _g3  = global::haxe.Serializer.BASE64.Length;
                                        while ((_g12 < _g3))
                                        {
                                            int i3 = _g12++;
                                            ((global::haxe.lang.Null <int>[])(b64))[i3] = global::haxe.lang.StringExt.charCodeAt(global::haxe.Serializer.BASE64, i3);
                                        }
                                    }

                                    global::haxe.Serializer.BASE64_CODES = b64;
                                }

                                while ((i2 < max))
                                {
                                    int b1 = ((int)(v7.b[i2++]));
                                    int b2 = ((int)(v7.b[i2++]));
                                    int b3 = ((int)(v7.b[i2++]));
                                    this.buf.b.Append(((char)((((global::haxe.lang.Null <int>[])(b64))[(b1 >> 2)]).@value)));
                                    this.buf.b.Append(((char)((((global::haxe.lang.Null <int>[])(b64))[((((b1 << 4) | (b2 >> 4))) & 63)]).@value)));
                                    this.buf.b.Append(((char)((((global::haxe.lang.Null <int>[])(b64))[((((b2 << 2) | (b3 >> 6))) & 63)]).@value)));
                                    this.buf.b.Append(((char)((((global::haxe.lang.Null <int>[])(b64))[(b3 & 63)]).@value)));
                                }

                                if ((i2 == max))
                                {
                                    int b11 = ((int)(v7.b[i2++]));
                                    int b21 = ((int)(v7.b[i2++]));
                                    this.buf.b.Append(((char)((((global::haxe.lang.Null <int>[])(b64))[(b11 >> 2)]).@value)));
                                    this.buf.b.Append(((char)((((global::haxe.lang.Null <int>[])(b64))[((((b11 << 4) | (b21 >> 4))) & 63)]).@value)));
                                    this.buf.b.Append(((char)((((global::haxe.lang.Null <int>[])(b64))[((b21 << 2) & 63)]).@value)));
                                }
                                else if ((i2 == (max + 1)))
                                {
                                    int b12 = ((int)(v7.b[i2++]));
                                    this.buf.b.Append(((char)((((global::haxe.lang.Null <int>[])(b64))[(b12 >> 2)]).@value)));
                                    this.buf.b.Append(((char)((((global::haxe.lang.Null <int>[])(b64))[((b12 << 4) & 63)]).@value)));
                                }

                                break;
                            }


                            default:
                            {
                                if (this.useCache)
                                {
                                    global::haxe.lang.Runtime.callField(this.cache, "pop", 5594513, null);
                                }

                                if (global::Reflect.hasField(v, "hxSerialize"))
                                {
                                    this.buf.b.Append(((string)("C")));
                                    this.serializeString(global::Type.getClassName(c));
                                    if (this.useCache)
                                    {
                                        global::haxe.lang.Runtime.callField(this.cache, "push", 1247875546, new global::Array <object>(new object[] { v }));
                                    }

                                    global::haxe.lang.Runtime.callField(v, "hxSerialize", 336134320, new global::Array <object>(new object[] { this }));
                                    this.buf.b.Append(((string)("g")));
                                }
                                else
                                {
                                    this.buf.b.Append(((string)("c")));
                                    this.serializeString(global::Type.getClassName(c));
                                    if (this.useCache)
                                    {
                                        global::haxe.lang.Runtime.callField(this.cache, "push", 1247875546, new global::Array <object>(new object[] { v }));
                                    }

                                    this.serializeFields(v);
                                }

                                break;
                            }
                            }
                        }
                    }

                    break;
                }


                case 7:
                {
                    global::System.Type e = ((global::System.Type)(_g.@params[0]));
                    {
                        if (this.useCache)
                        {
                            if (this.serializeRef(v))
                            {
                                return;
                            }

                            global::haxe.lang.Runtime.callField(this.cache, "pop", 5594513, null);
                        }

                        this.buf.b.Append(((string)(global::Std.@string(((this.useEnumIndex) ? ("j") : ("w"))))));
                        this.serializeString(global::Type.getEnumName(e));
                        if (this.useEnumIndex)
                        {
                            this.buf.b.Append(((string)(":")));
                            this.buf.b.Append(((string)(global::Std.@string(global::Type.enumIndex(v)))));
                        }
                        else
                        {
                            this.serializeString(global::Type.enumConstructor(v));
                        }

                        this.buf.b.Append(((string)(":")));
                        global::Array arr = global::Type.enumParameters(v);
                        if ((arr != null))
                        {
                            this.buf.b.Append(((string)(global::Std.@string(((int)(global::haxe.lang.Runtime.getField_f(arr, "length", 520590566, true)))))));
                            {
                                int _g4 = 0;
                                while ((global::haxe.lang.Runtime.compare(_g4, ((int)(global::haxe.lang.Runtime.getField_f(arr, "length", 520590566, true)))) < 0))
                                {
                                    object v8 = arr[_g4];
                                    ++_g4;
                                    this.serialize(v8);
                                }
                            }
                        }
                        else
                        {
                            this.buf.b.Append(((string)("0")));
                        }

                        if (this.useCache)
                        {
                            global::haxe.lang.Runtime.callField(this.cache, "push", 1247875546, new global::Array <object>(new object[] { v }));
                        }
                    }

                    break;
                }


                default:
                {
                    throw global::haxe.lang.HaxeException.wrap(global::haxe.lang.Runtime.concat("Cannot serialize ", global::Std.@string(v)));
                }
                }
            }
        }
Ejemplo n.º 11
0
        public virtual global::haxe.io.Bytes readAll(global::haxe.lang.Null <int> bufsize)
        {
            unchecked {
                                #line 107 "/opt/haxe/std/haxe/io/Input.hx"
                if (!(bufsize.hasValue))
                {
                                        #line 111 "/opt/haxe/std/haxe/io/Input.hx"
                    bufsize = new global::haxe.lang.Null <int>(16384, true);
                }

                                #line 114 "/opt/haxe/std/haxe/io/Input.hx"
                global::haxe.io.Bytes       buf   = global::haxe.io.Bytes.alloc((bufsize).@value);
                global::haxe.io.BytesBuffer total = new global::haxe.io.BytesBuffer();
                                #line 117 "/opt/haxe/std/haxe/io/Input.hx"
                try {
                                        #line 117 "/opt/haxe/std/haxe/io/Input.hx"
                    while (true)
                    {
                                                #line 118 "/opt/haxe/std/haxe/io/Input.hx"
                        int len = this.readBytes(buf, 0, (bufsize).@value);
                        if ((len == 0))
                        {
                                                        #line 120 "/opt/haxe/std/haxe/io/Input.hx"
                            throw ((global::System.Exception)(global::haxe.Exception.thrown(global::haxe.io.Error.Blocked)));
                        }

                                                #line 121 "/opt/haxe/std/haxe/io/Input.hx"
                        {
                                                        #line 121 "/opt/haxe/std/haxe/io/Input.hx"
                            if (((len < 0) || (len > buf.length)))
                            {
                                                                #line 121 "/opt/haxe/std/haxe/io/Input.hx"
                                throw ((global::System.Exception)(global::haxe.Exception.thrown(global::haxe.io.Error.OutsideBounds)));
                            }

                                                        #line 121 "/opt/haxe/std/haxe/io/Input.hx"
                            (total.b as global::System.IO.Stream).Write(((byte[])(buf.b)), ((int)(0)), ((int)(len)));
                        }
                    }
                }
                catch (global::System.Exception _g) {
                    {
                        global::haxe.NativeStackTrace.exception = ((global::System.Exception)(((object)(_g))));
                    }

                                        #line 116 "/opt/haxe/std/haxe/io/Input.hx"
                    if ((((object)(global::haxe.Exception.caught(_g).unwrap())) is global::haxe.io.Eof))
                    {
                    }
                    else
                    {
                                                #line 116 "/opt/haxe/std/haxe/io/Input.hx"
                        throw _g;
                    }
                }


                                #line 124 "/opt/haxe/std/haxe/io/Input.hx"
                return(total.getBytes());
            }
                        #line default
        }
Ejemplo n.º 12
0
        public static global::glm.Vec3 @set(global::glm.Vec3 dest, global::haxe.lang.Null <double> x, global::haxe.lang.Null <double> y, global::haxe.lang.Null <double> z)
        {
            double __temp_z47 = ((!(z.hasValue)) ? (((double)(0))) : ((z).@value));
            double __temp_y46 = ((!(y.hasValue)) ? (((double)(0))) : ((y).@value));
            double __temp_x45 = ((!(x.hasValue)) ? (((double)(0))) : ((x).@value));

            dest.x = __temp_x45;
            dest.y = __temp_y46;
            dest.z = __temp_z47;
            return(dest);
        }
Ejemplo n.º 13
0
        public static void __hx_ctor_glm_Vec3(global::glm.Vec3 __hx_this, global::haxe.lang.Null <double> x, global::haxe.lang.Null <double> y, global::haxe.lang.Null <double> z)
        {
            double __temp_z50 = ((!(z.hasValue)) ? (((double)(0))) : ((z).@value));
            double __temp_y49 = ((!(y.hasValue)) ? (((double)(0))) : ((y).@value));
            double __temp_x48 = ((!(x.hasValue)) ? (((double)(0))) : ((x).@value));

            __hx_this.x = __temp_x48;
            __hx_this.y = __temp_y49;
            __hx_this.z = __temp_z50;
        }
Ejemplo n.º 14
0
 public Vec3(global::haxe.lang.Null <double> x, global::haxe.lang.Null <double> y, global::haxe.lang.Null <double> z)
 {
     global::glm.Vec3.__hx_ctor_glm_Vec3(this, x, y, z);
 }
Ejemplo n.º 15
0
		public override   void createPostBeatGlyphs()
		{
			unchecked 
			{
				global::alphatab.model.MasterBar __temp_stmt568 = default(global::alphatab.model.MasterBar);
				{
					global::alphatab.model.Bar _this = this._bar;
					__temp_stmt568 = ((global::alphatab.model.MasterBar) (_this.track.score.masterBars[_this.index]) );
				}
				
				if (( __temp_stmt568.repeatCount > 0 )) 
				{
					this.addPostBeatGlyph(new global::alphatab.rendering.glyphs.RepeatCloseGlyph(new global::haxe.lang.Null<int>(this.x, true), new global::haxe.lang.Null<int>(0, true)));
					global::alphatab.model.MasterBar __temp_stmt574 = default(global::alphatab.model.MasterBar);
					{
						global::alphatab.model.Bar _this1 = this._bar;
						__temp_stmt574 = ((global::alphatab.model.MasterBar) (_this1.track.score.masterBars[_this1.index]) );
					}
					
					if (( __temp_stmt574.repeatCount > 2 )) 
					{
						int line = default(int);
						if (( ( this._bar.index == ( this._bar.track.bars.length - 1 ) ) || ( this.index == ( this.stave.barRenderers.length - 1 ) ) )) 
						{
							line = -1;
						}
						 else 
						{
							line = -4;
						}
						
						global::haxe.lang.Null<int> __temp_stmt575 = new global::haxe.lang.Null<int>(this.getTabY(line, new global::haxe.lang.Null<int>(-3, true)), true);
						global::alphatab.model.MasterBar __temp_stmt576 = default(global::alphatab.model.MasterBar);
						{
							global::alphatab.model.Bar _this2 = this._bar;
							__temp_stmt576 = ((global::alphatab.model.MasterBar) (_this2.track.score.masterBars[_this2.index]) );
						}
						
						this.addPostBeatGlyph(new global::alphatab.rendering.glyphs.RepeatCountGlyph(new global::haxe.lang.Null<int>(0, true), __temp_stmt575, ((int) (__temp_stmt576.repeatCount) )));
					}
					
				}
				 else 
				{
					global::alphatab.model.MasterBar __temp_stmt569 = default(global::alphatab.model.MasterBar);
					{
						global::alphatab.model.Bar _this3 = this._bar;
						__temp_stmt569 = ((global::alphatab.model.MasterBar) (_this3.track.score.masterBars[_this3.index]) );
					}
					
					if (__temp_stmt569.isDoubleBar) 
					{
						this.addPostBeatGlyph(new global::alphatab.rendering.glyphs.BarSeperatorGlyph(((global::haxe.lang.Null<int>) (default(global::haxe.lang.Null<int>)) ), ((global::haxe.lang.Null<int>) (default(global::haxe.lang.Null<int>)) ), ((global::haxe.lang.Null<bool>) (default(global::haxe.lang.Null<bool>)) )));
						this.addPostBeatGlyph(new global::alphatab.rendering.glyphs.SpacingGlyph(new global::haxe.lang.Null<int>(0, true), new global::haxe.lang.Null<int>(0, true), ((int) (( 3 * this.stave.staveGroup.layout.renderer.settings.scale )) ), new global::haxe.lang.Null<bool>(false, true)));
						this.addPostBeatGlyph(new global::alphatab.rendering.glyphs.BarSeperatorGlyph(((global::haxe.lang.Null<int>) (default(global::haxe.lang.Null<int>)) ), ((global::haxe.lang.Null<int>) (default(global::haxe.lang.Null<int>)) ), ((global::haxe.lang.Null<bool>) (default(global::haxe.lang.Null<bool>)) )));
					}
					 else 
					{
						bool __temp_stmt571 = ( this._bar.nextBar == default(global::alphatab.model.Bar) );
						bool __temp_boolv572 = false;
						if ( ! (__temp_stmt571) ) 
						{
							global::alphatab.model.MasterBar __temp_stmt573 = default(global::alphatab.model.MasterBar);
							{
								global::alphatab.model.Bar _this4 = this._bar.nextBar;
								__temp_stmt573 = ((global::alphatab.model.MasterBar) (_this4.track.score.masterBars[_this4.index]) );
							}
							
							__temp_boolv572 =  ! (__temp_stmt573.isRepeatStart) ;
						}
						
						bool __temp_stmt570 = ( __temp_stmt571 || __temp_boolv572 );
						if (__temp_stmt570) 
						{
							this.addPostBeatGlyph(new global::alphatab.rendering.glyphs.BarSeperatorGlyph(new global::haxe.lang.Null<int>(0, true), new global::haxe.lang.Null<int>(0, true), new global::haxe.lang.Null<bool>(( this._bar.index == ( this._bar.track.bars.length - 1 ) ), true)));
						}
						
					}
					
				}
				
			}
		}
Ejemplo n.º 16
0
		public virtual   void parseBeatProperties(global::haxe.root.Xml node, global::alphatab.model.Beat beat)
		{
			unchecked 
			{
				bool isWhammy = false;
				global::alphatab.model.BendPoint whammyOrigin = default(global::alphatab.model.BendPoint);
				global::haxe.lang.Null<int> whammyMiddleValue = default(global::haxe.lang.Null<int>);
				global::haxe.lang.Null<int> whammyMiddleOffset1 = default(global::haxe.lang.Null<int>);
				global::haxe.lang.Null<int> whammyMiddleOffset2 = default(global::haxe.lang.Null<int>);
				global::alphatab.model.BendPoint whammyDestination = default(global::alphatab.model.BendPoint);
				{
					object __temp_iterator435 = node.iterator();
					while (((bool) (global::haxe.lang.Runtime.callField(__temp_iterator435, "hasNext", 407283053, default(global::haxe.root.Array))) ))
					{
						global::haxe.root.Xml c = ((global::haxe.root.Xml) (global::haxe.lang.Runtime.callField(__temp_iterator435, "next", 1224901875, default(global::haxe.root.Array))) );
						if (( c.nodeType == global::haxe.root.Xml.Element )) 
						{
							string _g = c._get_nodeName();
							switch (_g)
							{
								case "Property":
								{
									string name = c.@get("name");
									switch (name)
									{
										case "Brush":
										{
											if (string.Equals(this.getValue(this.findChildElement(c, "Direction")), "Up")) 
											{
												beat.brushType = global::alphatab.model.BrushType.BrushUp;
											}
											 else 
											{
												beat.brushType = global::alphatab.model.BrushType.BrushDown;
											}
											
											break;
										}
										
										
										case "PickStroke":
										{
											if (string.Equals(this.getValue(this.findChildElement(c, "Direction")), "Up")) 
											{
												beat.pickStroke = global::alphatab.model.PickStrokeType.Up;
											}
											 else 
											{
												beat.pickStroke = global::alphatab.model.PickStrokeType.Down;
											}
											
											break;
										}
										
										
										case "Slapped":
										{
											if (( this.findChildElement(c, "Enable") != default(global::haxe.root.Xml) )) 
											{
												beat.slap = true;
											}
											
											break;
										}
										
										
										case "Popped":
										{
											if (( this.findChildElement(c, "Enable") != default(global::haxe.root.Xml) )) 
											{
												beat.pop = true;
											}
											
											break;
										}
										
										
										case "VibratoWTremBar":
										{
											string _g1 = this.getValue(this.findChildElement(c, "Strength"));
											switch (_g1)
											{
												case "Wide":
												{
													beat.vibrato = global::alphatab.model.VibratoType.Wide;
													break;
												}
												
												
												case "Slight":
												{
													beat.vibrato = global::alphatab.model.VibratoType.Slight;
													break;
												}
												
												
											}
											
											break;
										}
										
										
										case "WhammyBar":
										{
											isWhammy = true;
											break;
										}
										
										
										case "WhammyBarExtend":
										{
											{
											}
											
											break;
										}
										
										
										case "WhammyBarOriginValue":
										{
											if (( whammyOrigin == default(global::alphatab.model.BendPoint) )) 
											{
												whammyOrigin = new global::alphatab.model.BendPoint(((global::haxe.lang.Null<int>) (default(global::haxe.lang.Null<int>)) ), ((global::haxe.lang.Null<int>) (default(global::haxe.lang.Null<int>)) ));
											}
											
											{
												double x = ( global::Std.parseFloat(this.getValue(this.findChildElement(c, "Float"))) * 0.04 );
												whammyOrigin.@value = ((int) (x) );
											}
											
											break;
										}
										
										
										case "WhammyBarOriginOffset":
										{
											if (( whammyOrigin == default(global::alphatab.model.BendPoint) )) 
											{
												whammyOrigin = new global::alphatab.model.BendPoint(((global::haxe.lang.Null<int>) (default(global::haxe.lang.Null<int>)) ), ((global::haxe.lang.Null<int>) (default(global::haxe.lang.Null<int>)) ));
											}
											
											{
												double x1 = ( global::Std.parseFloat(this.getValue(this.findChildElement(c, "Float"))) * 0.6 );
												whammyOrigin.offset = ((int) (x1) );
											}
											
											break;
										}
										
										
										case "WhammyBarMiddleValue":
										{
											double x2 = ( global::Std.parseFloat(this.getValue(this.findChildElement(c, "Float"))) * 0.04 );
											whammyMiddleValue = new global::haxe.lang.Null<int>(new global::haxe.lang.Null<int>(((int) (x2) ), true).@value, true);
											break;
										}
										
										
										case "WhammyBarMiddleOffset1":
										{
											double x3 = ( global::Std.parseFloat(this.getValue(this.findChildElement(c, "Float"))) * 0.6 );
											whammyMiddleOffset1 = new global::haxe.lang.Null<int>(new global::haxe.lang.Null<int>(((int) (x3) ), true).@value, true);
											break;
										}
										
										
										case "WhammyBarMiddleOffset2":
										{
											double x4 = ( global::Std.parseFloat(this.getValue(this.findChildElement(c, "Float"))) * 0.6 );
											whammyMiddleOffset2 = new global::haxe.lang.Null<int>(new global::haxe.lang.Null<int>(((int) (x4) ), true).@value, true);
											break;
										}
										
										
										case "WhammyBarDestinationValue":
										{
											if (( whammyDestination == default(global::alphatab.model.BendPoint) )) 
											{
												whammyDestination = new global::alphatab.model.BendPoint(new global::haxe.lang.Null<int>(60, true), ((global::haxe.lang.Null<int>) (default(global::haxe.lang.Null<int>)) ));
											}
											
											{
												double x5 = ( global::Std.parseFloat(this.getValue(this.findChildElement(c, "Float"))) * 0.04 );
												whammyDestination.@value = ((int) (x5) );
											}
											
											break;
										}
										
										
										case "WhammyBarDestinationOffset":
										{
											if (( whammyDestination == default(global::alphatab.model.BendPoint) )) 
											{
												whammyDestination = new global::alphatab.model.BendPoint(((global::haxe.lang.Null<int>) (default(global::haxe.lang.Null<int>)) ), ((global::haxe.lang.Null<int>) (default(global::haxe.lang.Null<int>)) ));
											}
											
											{
												double x6 = ( global::Std.parseFloat(this.getValue(this.findChildElement(c, "Float"))) * 0.6 );
												whammyDestination.offset = ((int) (x6) );
											}
											
											break;
										}
										
										
									}
									
									break;
								}
								
								
							}
							
						}
						
					}
					
				}
				
				if (isWhammy) 
				{
					if (( whammyOrigin == default(global::alphatab.model.BendPoint) )) 
					{
						whammyOrigin = new global::alphatab.model.BendPoint(((global::haxe.lang.Null<int>) (default(global::haxe.lang.Null<int>)) ), ((global::haxe.lang.Null<int>) (default(global::haxe.lang.Null<int>)) ));
					}
					
					if (( whammyDestination == default(global::alphatab.model.BendPoint) )) 
					{
						whammyDestination = new global::alphatab.model.BendPoint(new global::haxe.lang.Null<int>(60, true), ((global::haxe.lang.Null<int>) (default(global::haxe.lang.Null<int>)) ));
					}
					
					global::haxe.root.Array<object> whammy = new global::haxe.root.Array<object>();
					whammy.push(whammyOrigin);
					if (( ( ! (global::haxe.lang.Runtime.eq((whammyMiddleOffset1).toDynamic(), (default(global::haxe.lang.Null<int>)).toDynamic())) ) && ( ! (global::haxe.lang.Runtime.eq((whammyMiddleValue).toDynamic(), (default(global::haxe.lang.Null<int>)).toDynamic())) ) )) 
					{
						whammy.push(new global::alphatab.model.BendPoint(((global::haxe.lang.Null<int>) (whammyMiddleOffset1) ), ((global::haxe.lang.Null<int>) (whammyMiddleValue) )));
					}
					
					if (( ( ! (global::haxe.lang.Runtime.eq((whammyMiddleOffset2).toDynamic(), (default(global::haxe.lang.Null<int>)).toDynamic())) ) && ( ! (global::haxe.lang.Runtime.eq((whammyMiddleValue).toDynamic(), (default(global::haxe.lang.Null<int>)).toDynamic())) ) )) 
					{
						whammy.push(new global::alphatab.model.BendPoint(((global::haxe.lang.Null<int>) (whammyMiddleOffset2) ), ((global::haxe.lang.Null<int>) (whammyMiddleValue) )));
					}
					
					if (( ( global::haxe.lang.Runtime.eq((whammyMiddleOffset1).toDynamic(), (default(global::haxe.lang.Null<int>)).toDynamic()) && global::haxe.lang.Runtime.eq((whammyMiddleOffset2).toDynamic(), (default(global::haxe.lang.Null<int>)).toDynamic()) ) && ( ! (global::haxe.lang.Runtime.eq((whammyMiddleValue).toDynamic(), (default(global::haxe.lang.Null<int>)).toDynamic())) ) )) 
					{
						whammy.push(new global::alphatab.model.BendPoint(new global::haxe.lang.Null<int>(30, true), ((global::haxe.lang.Null<int>) (whammyMiddleValue) )));
					}
					
					whammy.push(whammyDestination);
					beat.whammyBarPoints = whammy;
				}
				
			}
		}
Ejemplo n.º 17
0
 public static void __hx_ctor_alphatab_rendering_glyphs_DiamondNoteHeadGlyph(global::alphatab.rendering.glyphs.DiamondNoteHeadGlyph __temp_me147, global::haxe.lang.Null <int> x, global::haxe.lang.Null <int> y, bool isGrace)
 {
     unchecked
     {
         int __temp_y146 = ((global::haxe.lang.Runtime.eq((y).toDynamic(), (default(global::haxe.lang.Null <int>)).toDynamic())) ? (((int)(0))) : (y.@value));
         int __temp_x145 = ((global::haxe.lang.Runtime.eq((x).toDynamic(), (default(global::haxe.lang.Null <int>)).toDynamic())) ? (((int)(0))) : (x.@value));
         global::alphatab.rendering.glyphs.SvgGlyph.__hx_ctor_alphatab_rendering_glyphs_SvgGlyph(__temp_me147, new global::haxe.lang.Null <int>(__temp_x145, true), new global::haxe.lang.Null <int>(__temp_y146, true), global::alphatab.rendering.glyphs.MusicFont.NoteHarmonic, ((isGrace) ? (0.7) : (((double)(1)))), ((isGrace) ? (0.7) : (((double)(1)))));
         __temp_me147._isGrace = isGrace;
     }
 }
Ejemplo n.º 18
0
		public static   int doParse(string str, global::haxe.lang.Null<int> p, global::haxe.root.Xml parent)
		{
			unchecked 
			{
				int __temp_p294 = ( (global::haxe.lang.Runtime.eq((p).toDynamic(), (default(global::haxe.lang.Null<int>)).toDynamic())) ? (((int) (0) )) : (p.@value) );
				global::haxe.root.Xml xml = default(global::haxe.root.Xml);
				int state = 1;
				int next = 1;
				string aname = default(string);
				int start = 0;
				int nsubs = 0;
				int nbrackets = 0;
				int c = default(int);
				if (( ((uint) (__temp_p294) ) < str.Length )) 
				{
					c = ((int) (global::haxe.lang.Runtime.toInt(str[__temp_p294])) );
				}
				 else 
				{
					c = -1;
				}
				
				global::haxe.root.StringBuf buf = new global::haxe.root.StringBuf();
				while ( ! ((( c == -1 ))) )
				{
					switch (state)
					{
						case 0:
						{
							switch (c)
							{
								case 10:case 13:case 9:case 32:
								{
									{
									}
									
									break;
								}
								
								
								default:
								{
									state = next;
									continue;
								}
								
							}
							
							break;
						}
						
						
						case 1:
						{
							switch (c)
							{
								case 60:
								{
									state = 0;
									next = 2;
									break;
								}
								
								
								default:
								{
									start = __temp_p294;
									state = 13;
									continue;
								}
								
							}
							
							break;
						}
						
						
						case 13:
						{
							if (( c == 60 )) 
							{
								global::haxe.root.Xml child = global::haxe.root.Xml.createPCData(global::haxe.lang.Runtime.concat(buf.toString(), global::haxe.lang.StringExt.substr(str, start, new global::haxe.lang.Null<int>(( __temp_p294 - start ), true))));
								buf = new global::haxe.root.StringBuf();
								parent.addChild(child);
								nsubs++;
								state = 0;
								next = 2;
							}
							 else 
							{
								if (( c == 38 )) 
								{
									buf.addSub(str, start, new global::haxe.lang.Null<int>(( __temp_p294 - start ), true));
									state = 18;
									next = 13;
									start = ( __temp_p294 + 1 );
								}
								
							}
							
							break;
						}
						
						
						case 17:
						{
							bool __temp_boolv627 = ( c == 93 );
							bool __temp_boolv626 = false;
							bool __temp_boolv625 = false;
							if (__temp_boolv627) 
							{
								int __temp_stmt628 = default(int);
								{
									int index = ( __temp_p294 + 1 );
									__temp_stmt628 = ( (( ((uint) (index) ) < str.Length )) ? (((int) (global::haxe.lang.Runtime.toInt(str[index])) )) : (-1) );
								}
								
								__temp_boolv626 = ( __temp_stmt628 == 93 );
								if (__temp_boolv626) 
								{
									int __temp_stmt629 = default(int);
									{
										int index1 = ( __temp_p294 + 2 );
										__temp_stmt629 = ( (( ((uint) (index1) ) < str.Length )) ? (((int) (global::haxe.lang.Runtime.toInt(str[index1])) )) : (-1) );
									}
									
									__temp_boolv625 = ( __temp_stmt629 == 62 );
								}
								
							}
							
							bool __temp_stmt624 = ( ( __temp_boolv627 && __temp_boolv626 ) && __temp_boolv625 );
							if (__temp_stmt624) 
							{
								global::haxe.root.Xml child1 = global::haxe.root.Xml.createCData(global::haxe.lang.StringExt.substr(str, start, new global::haxe.lang.Null<int>(( __temp_p294 - start ), true)));
								parent.addChild(child1);
								nsubs++;
								__temp_p294 += 2;
								state = 1;
							}
							
							break;
						}
						
						
						case 2:
						{
							switch (c)
							{
								case 33:
								{
									int __temp_stmt630 = default(int);
									{
										int index2 = ( __temp_p294 + 1 );
										__temp_stmt630 = ( (( ((uint) (index2) ) < str.Length )) ? (((int) (global::haxe.lang.Runtime.toInt(str[index2])) )) : (-1) );
									}
									
									if (( __temp_stmt630 == 91 )) 
									{
										__temp_p294 += 2;
										if ( ! (string.Equals(global::haxe.lang.StringExt.substr(str, __temp_p294, new global::haxe.lang.Null<int>(6, true)).ToUpper(), "CDATA[")) ) 
										{
											throw global::haxe.lang.HaxeException.wrap("Expected <![CDATA[");
										}
										
										__temp_p294 += 5;
										state = 17;
										start = ( __temp_p294 + 1 );
									}
									 else 
									{
										int __temp_stmt633 = default(int);
										{
											int index3 = ( __temp_p294 + 1 );
											__temp_stmt633 = ( (( ((uint) (index3) ) < str.Length )) ? (((int) (global::haxe.lang.Runtime.toInt(str[index3])) )) : (-1) );
										}
										
										bool __temp_stmt632 = ( __temp_stmt633 == 68 );
										bool __temp_boolv634 = false;
										if ( ! (__temp_stmt632) ) 
										{
											int __temp_stmt635 = default(int);
											{
												int index4 = ( __temp_p294 + 1 );
												__temp_stmt635 = ( (( ((uint) (index4) ) < str.Length )) ? (((int) (global::haxe.lang.Runtime.toInt(str[index4])) )) : (-1) );
											}
											
											__temp_boolv634 = ( __temp_stmt635 == 100 );
										}
										
										bool __temp_stmt631 = ( __temp_stmt632 || __temp_boolv634 );
										if (__temp_stmt631) 
										{
											if ( ! (string.Equals(global::haxe.lang.StringExt.substr(str, ( __temp_p294 + 2 ), new global::haxe.lang.Null<int>(6, true)).ToUpper(), "OCTYPE")) ) 
											{
												throw global::haxe.lang.HaxeException.wrap("Expected <!DOCTYPE");
											}
											
											__temp_p294 += 8;
											state = 16;
											start = ( __temp_p294 + 1 );
										}
										 else 
										{
											int __temp_stmt638 = default(int);
											{
												int index5 = ( __temp_p294 + 1 );
												__temp_stmt638 = ( (( ((uint) (index5) ) < str.Length )) ? (((int) (global::haxe.lang.Runtime.toInt(str[index5])) )) : (-1) );
											}
											
											bool __temp_stmt637 = ( __temp_stmt638 != 45 );
											bool __temp_boolv639 = false;
											if ( ! (__temp_stmt637) ) 
											{
												int __temp_stmt640 = default(int);
												{
													int index6 = ( __temp_p294 + 2 );
													__temp_stmt640 = ( (( ((uint) (index6) ) < str.Length )) ? (((int) (global::haxe.lang.Runtime.toInt(str[index6])) )) : (-1) );
												}
												
												__temp_boolv639 = ( __temp_stmt640 != 45 );
											}
											
											bool __temp_stmt636 = ( __temp_stmt637 || __temp_boolv639 );
											if (__temp_stmt636) 
											{
												throw global::haxe.lang.HaxeException.wrap("Expected <!--");
											}
											 else 
											{
												__temp_p294 += 2;
												state = 15;
												start = ( __temp_p294 + 1 );
											}
											
										}
										
									}
									
									break;
								}
								
								
								case 63:
								{
									state = 14;
									start = __temp_p294;
									break;
								}
								
								
								case 47:
								{
									if (( parent == default(global::haxe.root.Xml) )) 
									{
										throw global::haxe.lang.HaxeException.wrap("Expected node name");
									}
									
									start = ( __temp_p294 + 1 );
									state = 0;
									next = 10;
									break;
								}
								
								
								default:
								{
									state = 3;
									start = __temp_p294;
									continue;
								}
								
							}
							
							break;
						}
						
						
						case 3:
						{
							if ( ! ((( ( ( ( ( ( ( ( c >= 97 ) && ( c <= 122 ) ) || ( ( c >= 65 ) && ( c <= 90 ) ) ) || ( ( c >= 48 ) && ( c <= 57 ) ) ) || ( c == 58 ) ) || ( c == 46 ) ) || ( c == 95 ) ) || ( c == 45 ) ))) ) 
							{
								if (( __temp_p294 == start )) 
								{
									throw global::haxe.lang.HaxeException.wrap("Expected node name");
								}
								
								xml = global::haxe.root.Xml.createElement(global::haxe.lang.StringExt.substr(str, start, new global::haxe.lang.Null<int>(( __temp_p294 - start ), true)));
								parent.addChild(xml);
								state = 0;
								next = 4;
								continue;
							}
							
							break;
						}
						
						
						case 4:
						{
							switch (c)
							{
								case 47:
								{
									state = 11;
									nsubs++;
									break;
								}
								
								
								case 62:
								{
									state = 9;
									nsubs++;
									break;
								}
								
								
								default:
								{
									state = 5;
									start = __temp_p294;
									continue;
								}
								
							}
							
							break;
						}
						
						
						case 5:
						{
							if ( ! ((( ( ( ( ( ( ( ( c >= 97 ) && ( c <= 122 ) ) || ( ( c >= 65 ) && ( c <= 90 ) ) ) || ( ( c >= 48 ) && ( c <= 57 ) ) ) || ( c == 58 ) ) || ( c == 46 ) ) || ( c == 95 ) ) || ( c == 45 ) ))) ) 
							{
								string tmp = default(string);
								if (( start == __temp_p294 )) 
								{
									throw global::haxe.lang.HaxeException.wrap("Expected attribute name");
								}
								
								tmp = global::haxe.lang.StringExt.substr(str, start, new global::haxe.lang.Null<int>(( __temp_p294 - start ), true));
								aname = tmp;
								if (xml.exists(aname)) 
								{
									throw global::haxe.lang.HaxeException.wrap("Duplicate attribute");
								}
								
								state = 0;
								next = 6;
								continue;
							}
							
							break;
						}
						
						
						case 6:
						{
							switch (c)
							{
								case 61:
								{
									state = 0;
									next = 7;
									break;
								}
								
								
								default:
								{
									throw global::haxe.lang.HaxeException.wrap("Expected =");
								}
								
							}
							
							break;
						}
						
						
						case 7:
						{
							switch (c)
							{
								case 34:case 39:
								{
									state = 8;
									start = __temp_p294;
									break;
								}
								
								
								default:
								{
									throw global::haxe.lang.HaxeException.wrap("Expected \"");
								}
								
							}
							
							break;
						}
						
						
						case 8:
						{
							if (( c == (( (( ((uint) (start) ) < str.Length )) ? (((int) (global::haxe.lang.Runtime.toInt(str[start])) )) : (-1) )) )) 
							{
								string val = global::haxe.lang.StringExt.substr(str, ( start + 1 ), new global::haxe.lang.Null<int>(( ( __temp_p294 - start ) - 1 ), true));
								xml.@set(aname, val);
								state = 0;
								next = 4;
							}
							
							break;
						}
						
						
						case 9:
						{
							__temp_p294 = global::haxe.xml.Parser.doParse(str, new global::haxe.lang.Null<int>(__temp_p294, true), xml);
							start = __temp_p294;
							state = 1;
							break;
						}
						
						
						case 11:
						{
							switch (c)
							{
								case 62:
								{
									state = 1;
									break;
								}
								
								
								default:
								{
									throw global::haxe.lang.HaxeException.wrap("Expected >");
								}
								
							}
							
							break;
						}
						
						
						case 12:
						{
							switch (c)
							{
								case 62:
								{
									if (( nsubs == 0 )) 
									{
										parent.addChild(global::haxe.root.Xml.createPCData(""));
									}
									
									return __temp_p294;
								}
								
								
								default:
								{
									throw global::haxe.lang.HaxeException.wrap("Expected >");
								}
								
							}
							
						}
						
						
						case 10:
						{
							if ( ! ((( ( ( ( ( ( ( ( c >= 97 ) && ( c <= 122 ) ) || ( ( c >= 65 ) && ( c <= 90 ) ) ) || ( ( c >= 48 ) && ( c <= 57 ) ) ) || ( c == 58 ) ) || ( c == 46 ) ) || ( c == 95 ) ) || ( c == 45 ) ))) ) 
							{
								if (( start == __temp_p294 )) 
								{
									throw global::haxe.lang.HaxeException.wrap("Expected node name");
								}
								
								string v = global::haxe.lang.StringExt.substr(str, start, new global::haxe.lang.Null<int>(( __temp_p294 - start ), true));
								if ( ! (string.Equals(v, parent._get_nodeName())) ) 
								{
									throw global::haxe.lang.HaxeException.wrap(global::haxe.lang.Runtime.concat(global::haxe.lang.Runtime.concat("Expected </", parent._get_nodeName()), ">"));
								}
								
								state = 0;
								next = 12;
								continue;
							}
							
							break;
						}
						
						
						case 15:
						{
							bool __temp_boolv644 = ( c == 45 );
							bool __temp_boolv643 = false;
							bool __temp_boolv642 = false;
							if (__temp_boolv644) 
							{
								int __temp_stmt645 = default(int);
								{
									int index7 = ( __temp_p294 + 1 );
									__temp_stmt645 = ( (( ((uint) (index7) ) < str.Length )) ? (((int) (global::haxe.lang.Runtime.toInt(str[index7])) )) : (-1) );
								}
								
								__temp_boolv643 = ( __temp_stmt645 == 45 );
								if (__temp_boolv643) 
								{
									int __temp_stmt646 = default(int);
									{
										int index8 = ( __temp_p294 + 2 );
										__temp_stmt646 = ( (( ((uint) (index8) ) < str.Length )) ? (((int) (global::haxe.lang.Runtime.toInt(str[index8])) )) : (-1) );
									}
									
									__temp_boolv642 = ( __temp_stmt646 == 62 );
								}
								
							}
							
							bool __temp_stmt641 = ( ( __temp_boolv644 && __temp_boolv643 ) && __temp_boolv642 );
							if (__temp_stmt641) 
							{
								parent.addChild(global::haxe.root.Xml.createComment(global::haxe.lang.StringExt.substr(str, start, new global::haxe.lang.Null<int>(( __temp_p294 - start ), true))));
								__temp_p294 += 2;
								state = 1;
							}
							
							break;
						}
						
						
						case 16:
						{
							if (( c == 91 )) 
							{
								nbrackets++;
							}
							 else 
							{
								if (( c == 93 )) 
								{
									nbrackets--;
								}
								 else 
								{
									if (( ( c == 62 ) && ( nbrackets == 0 ) )) 
									{
										parent.addChild(global::haxe.root.Xml.createDocType(global::haxe.lang.StringExt.substr(str, start, new global::haxe.lang.Null<int>(( __temp_p294 - start ), true))));
										state = 1;
									}
									
								}
								
							}
							
							break;
						}
						
						
						case 14:
						{
							bool __temp_boolv649 = ( c == 63 );
							bool __temp_boolv648 = false;
							if (__temp_boolv649) 
							{
								int __temp_stmt650 = default(int);
								{
									int index9 = ( __temp_p294 + 1 );
									__temp_stmt650 = ( (( ((uint) (index9) ) < str.Length )) ? (((int) (global::haxe.lang.Runtime.toInt(str[index9])) )) : (-1) );
								}
								
								__temp_boolv648 = ( __temp_stmt650 == 62 );
							}
							
							bool __temp_stmt647 = ( __temp_boolv649 && __temp_boolv648 );
							if (__temp_stmt647) 
							{
								__temp_p294++;
								string str1 = global::haxe.lang.StringExt.substr(str, ( start + 1 ), new global::haxe.lang.Null<int>(( ( __temp_p294 - start ) - 2 ), true));
								parent.addChild(global::haxe.root.Xml.createProcessingInstruction(str1));
								state = 1;
							}
							
							break;
						}
						
						
						case 18:
						{
							if (( c == 59 )) 
							{
								string s = global::haxe.lang.StringExt.substr(str, start, new global::haxe.lang.Null<int>(( __temp_p294 - start ), true));
								if (( (( (( ((uint) (0) ) < s.Length )) ? (((int) (global::haxe.lang.Runtime.toInt(s[0])) )) : (-1) )) == 35 )) 
								{
									global::haxe.lang.Null<int> i = default(global::haxe.lang.Null<int>);
									if (( (( (( ((uint) (1) ) < s.Length )) ? (((int) (global::haxe.lang.Runtime.toInt(s[1])) )) : (-1) )) == 120 )) 
									{
										i = new global::haxe.lang.Null<int>(global::Std.parseInt(global::haxe.lang.Runtime.concat("0", global::haxe.lang.StringExt.substr(s, 1, new global::haxe.lang.Null<int>(( s.Length - 1 ), true)))).@value, true);
									}
									 else 
									{
										i = new global::haxe.lang.Null<int>(global::Std.parseInt(global::haxe.lang.StringExt.substr(s, 1, new global::haxe.lang.Null<int>(( s.Length - 1 ), true))).@value, true);
									}
									
									{
										object x = new string(((char) (i.@value) ), 1);
										buf.b.Append(((object) (global::Std.@string(x)) ));
									}
									
								}
								 else 
								{
									if ( ! (global::haxe.xml.Parser.escapes.exists(s)) ) 
									{
										buf.b.Append(((object) (global::Std.@string(global::haxe.lang.Runtime.concat(global::haxe.lang.Runtime.concat("&", s), ";"))) ));
									}
									 else 
									{
										object x1 = global::haxe.lang.Runtime.toString(global::haxe.xml.Parser.escapes.@get(s).@value);
										buf.b.Append(((object) (global::Std.@string(x1)) ));
									}
									
								}
								
								start = ( __temp_p294 + 1 );
								state = next;
							}
							
							break;
						}
						
						
					}
					
					{
						int index10 =  ++ __temp_p294;
						if (( ((uint) (index10) ) < str.Length )) 
						{
							c = ((int) (global::haxe.lang.Runtime.toInt(str[index10])) );
						}
						 else 
						{
							c = -1;
						}
						
					}
					
				}
				
				if (( state == 1 )) 
				{
					start = __temp_p294;
					state = 13;
				}
				
				if (( state == 13 )) 
				{
					if (( ( __temp_p294 != start ) || ( nsubs == 0 ) )) 
					{
						parent.addChild(global::haxe.root.Xml.createPCData(global::haxe.lang.Runtime.concat(buf.toString(), global::haxe.lang.StringExt.substr(str, start, new global::haxe.lang.Null<int>(( __temp_p294 - start ), true)))));
					}
					
					return __temp_p294;
				}
				
				throw global::haxe.lang.HaxeException.wrap("Unexpected end");
			}
		}
Ejemplo n.º 19
0
        public static int doParse(string str, global::haxe.lang.Null <int> p, global::haxe.root.Xml parent)
        {
            unchecked
            {
                int __temp_p294           = ((global::haxe.lang.Runtime.eq((p).toDynamic(), (default(global::haxe.lang.Null <int>)).toDynamic())) ? (((int)(0))) : (p.@value));
                global::haxe.root.Xml xml = default(global::haxe.root.Xml);
                int    state     = 1;
                int    next      = 1;
                string aname     = default(string);
                int    start     = 0;
                int    nsubs     = 0;
                int    nbrackets = 0;
                int    c         = default(int);
                if ((((uint)(__temp_p294)) < str.Length))
                {
                    c = ((int)(global::haxe.lang.Runtime.toInt(str[__temp_p294])));
                }
                else
                {
                    c = -1;
                }

                global::haxe.root.StringBuf buf = new global::haxe.root.StringBuf();
                while (!(((c == -1))))
                {
                    switch (state)
                    {
                    case 0:
                    {
                        switch (c)
                        {
                        case 10:
                        case 13:
                        case 9:
                        case 32:
                        {
                            {
                            }

                            break;
                        }


                        default:
                        {
                            state = next;
                            continue;
                        }
                        }

                        break;
                    }


                    case 1:
                    {
                        switch (c)
                        {
                        case 60:
                        {
                            state = 0;
                            next  = 2;
                            break;
                        }


                        default:
                        {
                            start = __temp_p294;
                            state = 13;
                            continue;
                        }
                        }

                        break;
                    }


                    case 13:
                    {
                        if ((c == 60))
                        {
                            global::haxe.root.Xml child = global::haxe.root.Xml.createPCData(global::haxe.lang.Runtime.concat(buf.toString(), global::haxe.lang.StringExt.substr(str, start, new global::haxe.lang.Null <int>((__temp_p294 - start), true))));
                            buf = new global::haxe.root.StringBuf();
                            parent.addChild(child);
                            nsubs++;
                            state = 0;
                            next  = 2;
                        }
                        else
                        {
                            if ((c == 38))
                            {
                                buf.addSub(str, start, new global::haxe.lang.Null <int>((__temp_p294 - start), true));
                                state = 18;
                                next  = 13;
                                start = (__temp_p294 + 1);
                            }
                        }

                        break;
                    }


                    case 17:
                    {
                        bool __temp_boolv627 = (c == 93);
                        bool __temp_boolv626 = false;
                        bool __temp_boolv625 = false;
                        if (__temp_boolv627)
                        {
                            int __temp_stmt628 = default(int);
                            {
                                int index = (__temp_p294 + 1);
                                __temp_stmt628 = (((((uint)(index)) < str.Length)) ? (((int)(global::haxe.lang.Runtime.toInt(str[index])))) : (-1));
                            }

                            __temp_boolv626 = (__temp_stmt628 == 93);
                            if (__temp_boolv626)
                            {
                                int __temp_stmt629 = default(int);
                                {
                                    int index1 = (__temp_p294 + 2);
                                    __temp_stmt629 = (((((uint)(index1)) < str.Length)) ? (((int)(global::haxe.lang.Runtime.toInt(str[index1])))) : (-1));
                                }

                                __temp_boolv625 = (__temp_stmt629 == 62);
                            }
                        }

                        bool __temp_stmt624 = ((__temp_boolv627 && __temp_boolv626) && __temp_boolv625);
                        if (__temp_stmt624)
                        {
                            global::haxe.root.Xml child1 = global::haxe.root.Xml.createCData(global::haxe.lang.StringExt.substr(str, start, new global::haxe.lang.Null <int>((__temp_p294 - start), true)));
                            parent.addChild(child1);
                            nsubs++;
                            __temp_p294 += 2;
                            state        = 1;
                        }

                        break;
                    }


                    case 2:
                    {
                        switch (c)
                        {
                        case 33:
                        {
                            int __temp_stmt630 = default(int);
                            {
                                int index2 = (__temp_p294 + 1);
                                __temp_stmt630 = (((((uint)(index2)) < str.Length)) ? (((int)(global::haxe.lang.Runtime.toInt(str[index2])))) : (-1));
                            }

                            if ((__temp_stmt630 == 91))
                            {
                                __temp_p294 += 2;
                                if (!(string.Equals(global::haxe.lang.StringExt.substr(str, __temp_p294, new global::haxe.lang.Null <int>(6, true)).ToUpper(), "CDATA[")))
                                {
                                    throw global::haxe.lang.HaxeException.wrap("Expected <![CDATA[");
                                }

                                __temp_p294 += 5;
                                state        = 17;
                                start        = (__temp_p294 + 1);
                            }
                            else
                            {
                                int __temp_stmt633 = default(int);
                                {
                                    int index3 = (__temp_p294 + 1);
                                    __temp_stmt633 = (((((uint)(index3)) < str.Length)) ? (((int)(global::haxe.lang.Runtime.toInt(str[index3])))) : (-1));
                                }

                                bool __temp_stmt632  = (__temp_stmt633 == 68);
                                bool __temp_boolv634 = false;
                                if (!(__temp_stmt632))
                                {
                                    int __temp_stmt635 = default(int);
                                    {
                                        int index4 = (__temp_p294 + 1);
                                        __temp_stmt635 = (((((uint)(index4)) < str.Length)) ? (((int)(global::haxe.lang.Runtime.toInt(str[index4])))) : (-1));
                                    }

                                    __temp_boolv634 = (__temp_stmt635 == 100);
                                }

                                bool __temp_stmt631 = (__temp_stmt632 || __temp_boolv634);
                                if (__temp_stmt631)
                                {
                                    if (!(string.Equals(global::haxe.lang.StringExt.substr(str, (__temp_p294 + 2), new global::haxe.lang.Null <int>(6, true)).ToUpper(), "OCTYPE")))
                                    {
                                        throw global::haxe.lang.HaxeException.wrap("Expected <!DOCTYPE");
                                    }

                                    __temp_p294 += 8;
                                    state        = 16;
                                    start        = (__temp_p294 + 1);
                                }
                                else
                                {
                                    int __temp_stmt638 = default(int);
                                    {
                                        int index5 = (__temp_p294 + 1);
                                        __temp_stmt638 = (((((uint)(index5)) < str.Length)) ? (((int)(global::haxe.lang.Runtime.toInt(str[index5])))) : (-1));
                                    }

                                    bool __temp_stmt637  = (__temp_stmt638 != 45);
                                    bool __temp_boolv639 = false;
                                    if (!(__temp_stmt637))
                                    {
                                        int __temp_stmt640 = default(int);
                                        {
                                            int index6 = (__temp_p294 + 2);
                                            __temp_stmt640 = (((((uint)(index6)) < str.Length)) ? (((int)(global::haxe.lang.Runtime.toInt(str[index6])))) : (-1));
                                        }

                                        __temp_boolv639 = (__temp_stmt640 != 45);
                                    }

                                    bool __temp_stmt636 = (__temp_stmt637 || __temp_boolv639);
                                    if (__temp_stmt636)
                                    {
                                        throw global::haxe.lang.HaxeException.wrap("Expected <!--");
                                    }
                                    else
                                    {
                                        __temp_p294 += 2;
                                        state        = 15;
                                        start        = (__temp_p294 + 1);
                                    }
                                }
                            }

                            break;
                        }


                        case 63:
                        {
                            state = 14;
                            start = __temp_p294;
                            break;
                        }


                        case 47:
                        {
                            if ((parent == default(global::haxe.root.Xml)))
                            {
                                throw global::haxe.lang.HaxeException.wrap("Expected node name");
                            }

                            start = (__temp_p294 + 1);
                            state = 0;
                            next  = 10;
                            break;
                        }


                        default:
                        {
                            state = 3;
                            start = __temp_p294;
                            continue;
                        }
                        }

                        break;
                    }


                    case 3:
                    {
                        if (!((((((((((c >= 97) && (c <= 122)) || ((c >= 65) && (c <= 90))) || ((c >= 48) && (c <= 57))) || (c == 58)) || (c == 46)) || (c == 95)) || (c == 45)))))
                        {
                            if ((__temp_p294 == start))
                            {
                                throw global::haxe.lang.HaxeException.wrap("Expected node name");
                            }

                            xml = global::haxe.root.Xml.createElement(global::haxe.lang.StringExt.substr(str, start, new global::haxe.lang.Null <int>((__temp_p294 - start), true)));
                            parent.addChild(xml);
                            state = 0;
                            next  = 4;
                            continue;
                        }

                        break;
                    }


                    case 4:
                    {
                        switch (c)
                        {
                        case 47:
                        {
                            state = 11;
                            nsubs++;
                            break;
                        }


                        case 62:
                        {
                            state = 9;
                            nsubs++;
                            break;
                        }


                        default:
                        {
                            state = 5;
                            start = __temp_p294;
                            continue;
                        }
                        }

                        break;
                    }


                    case 5:
                    {
                        if (!((((((((((c >= 97) && (c <= 122)) || ((c >= 65) && (c <= 90))) || ((c >= 48) && (c <= 57))) || (c == 58)) || (c == 46)) || (c == 95)) || (c == 45)))))
                        {
                            string tmp = default(string);
                            if ((start == __temp_p294))
                            {
                                throw global::haxe.lang.HaxeException.wrap("Expected attribute name");
                            }

                            tmp   = global::haxe.lang.StringExt.substr(str, start, new global::haxe.lang.Null <int>((__temp_p294 - start), true));
                            aname = tmp;
                            if (xml.exists(aname))
                            {
                                throw global::haxe.lang.HaxeException.wrap("Duplicate attribute");
                            }

                            state = 0;
                            next  = 6;
                            continue;
                        }

                        break;
                    }


                    case 6:
                    {
                        switch (c)
                        {
                        case 61:
                        {
                            state = 0;
                            next  = 7;
                            break;
                        }


                        default:
                        {
                            throw global::haxe.lang.HaxeException.wrap("Expected =");
                        }
                        }

                        break;
                    }


                    case 7:
                    {
                        switch (c)
                        {
                        case 34:
                        case 39:
                        {
                            state = 8;
                            start = __temp_p294;
                            break;
                        }


                        default:
                        {
                            throw global::haxe.lang.HaxeException.wrap("Expected \"");
                        }
                        }

                        break;
                    }


                    case 8:
                    {
                        if ((c == ((((((uint)(start)) < str.Length)) ? (((int)(global::haxe.lang.Runtime.toInt(str[start])))) : (-1)))))
                        {
                            string val = global::haxe.lang.StringExt.substr(str, (start + 1), new global::haxe.lang.Null <int>(((__temp_p294 - start) - 1), true));
                            xml.@set(aname, val);
                            state = 0;
                            next  = 4;
                        }

                        break;
                    }


                    case 9:
                    {
                        __temp_p294 = global::haxe.xml.Parser.doParse(str, new global::haxe.lang.Null <int>(__temp_p294, true), xml);
                        start       = __temp_p294;
                        state       = 1;
                        break;
                    }


                    case 11:
                    {
                        switch (c)
                        {
                        case 62:
                        {
                            state = 1;
                            break;
                        }


                        default:
                        {
                            throw global::haxe.lang.HaxeException.wrap("Expected >");
                        }
                        }

                        break;
                    }


                    case 12:
                    {
                        switch (c)
                        {
                        case 62:
                        {
                            if ((nsubs == 0))
                            {
                                parent.addChild(global::haxe.root.Xml.createPCData(""));
                            }

                            return(__temp_p294);
                        }


                        default:
                        {
                            throw global::haxe.lang.HaxeException.wrap("Expected >");
                        }
                        }
                    }


                    case 10:
                    {
                        if (!((((((((((c >= 97) && (c <= 122)) || ((c >= 65) && (c <= 90))) || ((c >= 48) && (c <= 57))) || (c == 58)) || (c == 46)) || (c == 95)) || (c == 45)))))
                        {
                            if ((start == __temp_p294))
                            {
                                throw global::haxe.lang.HaxeException.wrap("Expected node name");
                            }

                            string v = global::haxe.lang.StringExt.substr(str, start, new global::haxe.lang.Null <int>((__temp_p294 - start), true));
                            if (!(string.Equals(v, parent._get_nodeName())))
                            {
                                throw global::haxe.lang.HaxeException.wrap(global::haxe.lang.Runtime.concat(global::haxe.lang.Runtime.concat("Expected </", parent._get_nodeName()), ">"));
                            }

                            state = 0;
                            next  = 12;
                            continue;
                        }

                        break;
                    }


                    case 15:
                    {
                        bool __temp_boolv644 = (c == 45);
                        bool __temp_boolv643 = false;
                        bool __temp_boolv642 = false;
                        if (__temp_boolv644)
                        {
                            int __temp_stmt645 = default(int);
                            {
                                int index7 = (__temp_p294 + 1);
                                __temp_stmt645 = (((((uint)(index7)) < str.Length)) ? (((int)(global::haxe.lang.Runtime.toInt(str[index7])))) : (-1));
                            }

                            __temp_boolv643 = (__temp_stmt645 == 45);
                            if (__temp_boolv643)
                            {
                                int __temp_stmt646 = default(int);
                                {
                                    int index8 = (__temp_p294 + 2);
                                    __temp_stmt646 = (((((uint)(index8)) < str.Length)) ? (((int)(global::haxe.lang.Runtime.toInt(str[index8])))) : (-1));
                                }

                                __temp_boolv642 = (__temp_stmt646 == 62);
                            }
                        }

                        bool __temp_stmt641 = ((__temp_boolv644 && __temp_boolv643) && __temp_boolv642);
                        if (__temp_stmt641)
                        {
                            parent.addChild(global::haxe.root.Xml.createComment(global::haxe.lang.StringExt.substr(str, start, new global::haxe.lang.Null <int>((__temp_p294 - start), true))));
                            __temp_p294 += 2;
                            state        = 1;
                        }

                        break;
                    }


                    case 16:
                    {
                        if ((c == 91))
                        {
                            nbrackets++;
                        }
                        else
                        {
                            if ((c == 93))
                            {
                                nbrackets--;
                            }
                            else
                            {
                                if (((c == 62) && (nbrackets == 0)))
                                {
                                    parent.addChild(global::haxe.root.Xml.createDocType(global::haxe.lang.StringExt.substr(str, start, new global::haxe.lang.Null <int>((__temp_p294 - start), true))));
                                    state = 1;
                                }
                            }
                        }

                        break;
                    }


                    case 14:
                    {
                        bool __temp_boolv649 = (c == 63);
                        bool __temp_boolv648 = false;
                        if (__temp_boolv649)
                        {
                            int __temp_stmt650 = default(int);
                            {
                                int index9 = (__temp_p294 + 1);
                                __temp_stmt650 = (((((uint)(index9)) < str.Length)) ? (((int)(global::haxe.lang.Runtime.toInt(str[index9])))) : (-1));
                            }

                            __temp_boolv648 = (__temp_stmt650 == 62);
                        }

                        bool __temp_stmt647 = (__temp_boolv649 && __temp_boolv648);
                        if (__temp_stmt647)
                        {
                            __temp_p294++;
                            string str1 = global::haxe.lang.StringExt.substr(str, (start + 1), new global::haxe.lang.Null <int>(((__temp_p294 - start) - 2), true));
                            parent.addChild(global::haxe.root.Xml.createProcessingInstruction(str1));
                            state = 1;
                        }

                        break;
                    }


                    case 18:
                    {
                        if ((c == 59))
                        {
                            string s = global::haxe.lang.StringExt.substr(str, start, new global::haxe.lang.Null <int>((__temp_p294 - start), true));
                            if ((((((((uint)(0)) < s.Length)) ? (((int)(global::haxe.lang.Runtime.toInt(s[0])))) : (-1))) == 35))
                            {
                                global::haxe.lang.Null <int> i = default(global::haxe.lang.Null <int>);
                                if ((((((((uint)(1)) < s.Length)) ? (((int)(global::haxe.lang.Runtime.toInt(s[1])))) : (-1))) == 120))
                                {
                                    i = new global::haxe.lang.Null <int>(global::Std.parseInt(global::haxe.lang.Runtime.concat("0", global::haxe.lang.StringExt.substr(s, 1, new global::haxe.lang.Null <int>((s.Length - 1), true)))).@value, true);
                                }
                                else
                                {
                                    i = new global::haxe.lang.Null <int>(global::Std.parseInt(global::haxe.lang.StringExt.substr(s, 1, new global::haxe.lang.Null <int>((s.Length - 1), true))).@value, true);
                                }

                                {
                                    object x = new string(((char)(i.@value)), 1);
                                    buf.b.Append(((object)(global::Std.@string(x))));
                                }
                            }
                            else
                            {
                                if (!(global::haxe.xml.Parser.escapes.exists(s)))
                                {
                                    buf.b.Append(((object)(global::Std.@string(global::haxe.lang.Runtime.concat(global::haxe.lang.Runtime.concat("&", s), ";")))));
                                }
                                else
                                {
                                    object x1 = global::haxe.lang.Runtime.toString(global::haxe.xml.Parser.escapes.@get(s).@value);
                                    buf.b.Append(((object)(global::Std.@string(x1))));
                                }
                            }

                            start = (__temp_p294 + 1);
                            state = next;
                        }

                        break;
                    }
                    }

                    {
                        int index10 = ++__temp_p294;
                        if ((((uint)(index10)) < str.Length))
                        {
                            c = ((int)(global::haxe.lang.Runtime.toInt(str[index10])));
                        }
                        else
                        {
                            c = -1;
                        }
                    }
                }

                if ((state == 1))
                {
                    start = __temp_p294;
                    state = 13;
                }

                if ((state == 13))
                {
                    if (((__temp_p294 != start) || (nsubs == 0)))
                    {
                        parent.addChild(global::haxe.root.Xml.createPCData(global::haxe.lang.Runtime.concat(buf.toString(), global::haxe.lang.StringExt.substr(str, start, new global::haxe.lang.Null <int>((__temp_p294 - start), true)))));
                    }

                    return(__temp_p294);
                }

                throw global::haxe.lang.HaxeException.wrap("Unexpected end");
            }
        }
Ejemplo n.º 20
0
        public static int lastIndexOf(global::System.String me, global::System.String str, global::haxe.lang.Null <int> startIndex)
        {
            unchecked {
                int sIndex = ((!(startIndex.hasValue)) ? ((me.Length - 1)) : ((startIndex).@value));
                if ((sIndex >= me.Length))
                {
                    sIndex = (me.Length - 1);
                }
                else if ((sIndex < 0))
                {
                    return(-1);
                }

                if (startIndex.hasValue)
                {
                    int i = (sIndex + 1);
                    while ((i-- > 0))
                    {
                        bool found = true;
                        {
                            int _g  = 0;
                            int _g1 = str.Length;
                            while ((_g < _g1))
                            {
                                int j = _g++;
                                if ((me[(i + j)] != str[j]))
                                {
                                    found = false;
                                    break;
                                }
                            }
                        }

                        if (found)
                        {
                            return(i);
                        }
                    }

                    return(-1);
                }
                else
                {
                    return(me.LastIndexOf(((string)(str)), ((int)(sIndex)), ((global::System.StringComparison)(global::System.StringComparison.Ordinal))));
                }
            }
        }
Ejemplo n.º 21
0
 public static void __hx_ctor_alphatab_rendering_glyphs_effects_TempoGlyph(global::alphatab.rendering.glyphs.effects.TempoGlyph __temp_me251, global::haxe.lang.Null <int> x, global::haxe.lang.Null <int> y, int tempo)
 {
     unchecked
     {
         int __temp_y250 = ((global::haxe.lang.Runtime.eq((y).toDynamic(), (default(global::haxe.lang.Null <int>)).toDynamic())) ? (((int)(0))) : (y.@value));
         int __temp_x249 = ((global::haxe.lang.Runtime.eq((x).toDynamic(), (default(global::haxe.lang.Null <int>)).toDynamic())) ? (((int)(0))) : (x.@value));
         global::alphatab.rendering.Glyph.__hx_ctor_alphatab_rendering_Glyph(__temp_me251, new global::haxe.lang.Null <int>(__temp_x249, true), new global::haxe.lang.Null <int>(__temp_y250, true));
         __temp_me251._tempo = tempo;
     }
 }