Merging the SubLib project with Gnome Subtitles
[gn-sub.git] / src / SubLib / Core / Domain / IncompleteSubtitle.cs
blobe66a010cc4ba385cd9c8f27fa189c6fd5d14edf2
1 /*
2 * This file is part of SubLib.
3 * Copyright (C) 2005-2008 Pedro Castro
5 * SubLib is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * SubLib is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 using System;
22 namespace SubLib.Core.Domain {
24 /// <summary>Represents an incomplete subtitle.</summary>
25 /// <remarks>An incomplete subtitle is characterized by its incomplete text and
26 /// the valid subtitle that precedes it.</remarks>
27 public class IncompleteSubtitle {
28 private int previous = 0;
29 private string text = String.Empty;
31 /// <summary>Initializes a new instance of the <see cref="IncompleteSubtitle" /> class,
32 /// given the index of its preceding valid subtitle and the incomplete text.</summary>
33 /// <param name="previous">The index of the preceding valid subtitle.</param>
34 /// <param name="text">The subtitle's incomplete text.</param>
35 public IncompleteSubtitle (int previous, string text) {
36 this.previous = previous;
37 this.text = text;
40 /// <summary>The index of the preceding valid subtitle.</summary>
41 public int Previous {
42 get { return previous; }
43 set { previous = value; }
46 /// <summary>The incomplete subtitle's text.</summary>
47 public string Text {
48 get { return text; }
49 set { text = value; }
52 public override string ToString(){
53 return "* After " + previous + ": " + text + "\n";