コード例 #1
0
ファイル: Program.cs プロジェクト: javierz/PdfTextract
 private static void Write(CObject obj)
 {
     if (obj is CArray)
         Write((CArray)obj);
     else if (obj is CComment)
         Write((CComment)obj);
     else if (obj is CInteger)
         Write((CInteger)obj);
     else if (obj is CName)
         Write((CName)obj);
     else if (obj is CNumber)
         Write((CNumber)obj);
     else if (obj is COperator)
         Write((COperator)obj);
     else if (obj is CReal)
         Write((CReal)obj);
     else if (obj is CSequence)
         Write((CSequence)obj);
     else if (obj is CString)
         Write((CString)obj);
     else
         throw new NotImplementedException(obj.GetType().AssemblyQualifiedName);
 }
コード例 #2
0
ファイル: PDFSharpParser.cs プロジェクト: bosstjann/toxy
 //http://stackoverflow.com/questions/248768/how-do-i-walk-through-tree-of-pdf-objects-in-pdfsharp
 #region CObject Visitor
 private static void ExtractText(CObject obj, StringBuilder target)
 {
     if (obj is CArray)
         ExtractText((CArray)obj, target);
     else if (obj is CComment)
         ExtractText((CComment)obj, target);
     else if (obj is CInteger)
         ExtractText((CInteger)obj, target);
     else if (obj is CName)
         ExtractText((CName)obj, target);
     else if (obj is CNumber)
         ExtractText((CNumber)obj, target);
     else if (obj is COperator)
         ExtractText((COperator)obj, target);
     else if (obj is CReal)
         ExtractText((CReal)obj, target);
     else if (obj is CSequence)
         ExtractText((CSequence)obj, target);
     else if (obj is CString)
         ExtractText((CString)obj, target);
     else
         throw new NotImplementedException(obj.GetType().AssemblyQualifiedName);
 }
コード例 #3
0
        /// <summary>
        /// Implements the copy mechanism of this class.
        /// </summary>
        protected override CObject Copy()
        {
            CObject obj = base.Copy();

            return(obj);
        }
コード例 #4
0
ファイル: CObjects.cs プロジェクト: BackupTheBerlios/zp7-svn
 /// <summary>
 /// Removes the specified value from the sequence.
 /// </summary>
 public void Remove(CObject value)
 {
   this.items.Remove(value);
 }
コード例 #5
0
ファイル: CObjects.cs プロジェクト: BackupTheBerlios/zp7-svn
 /// <summary>
 /// Inserts the specified value in the sequence.
 /// </summary>
 public void Insert(int index, CObject value)
 {
   this.items.Insert(index, value);
 }
コード例 #6
0
ファイル: CObjects.cs プロジェクト: BackupTheBerlios/zp7-svn
 /// <summary>
 /// Returns the index of the specified value in the sequence or -1, if no such value is in the sequence.
 /// </summary>
 public int IndexOf(CObject value)
 {
   return this.items.IndexOf(value);
 }
コード例 #7
0
ファイル: CObjects.cs プロジェクト: BackupTheBerlios/zp7-svn
 /// <summary>
 /// Determines whether the specified value is in the sequence.
 /// </summary>
 public bool Contains(CObject value)
 {
   return this.items.Contains(value);
 }
コード例 #8
0
ファイル: CObjects.cs プロジェクト: BackupTheBerlios/zp7-svn
 /// <summary>
 /// Adds the specified value add the end of the sequence.
 /// </summary>
 public int Add(CObject value)
 {
   return this.items.Add(value);
 }
コード例 #9
0
 public StackItem(CObject value)
 {
   Object = value;
 }