Exemple #1
0
 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);
 }
Exemple #2
0
 //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);
 }
        /// <summary>
        /// Implements the copy mechanism of this class.
        /// </summary>
        protected override CObject Copy()
        {
            CObject obj = base.Copy();

            return(obj);
        }
Exemple #4
0
 /// <summary>
 /// Removes the specified value from the sequence.
 /// </summary>
 public void Remove(CObject value)
 {
   this.items.Remove(value);
 }
Exemple #5
0
 /// <summary>
 /// Inserts the specified value in the sequence.
 /// </summary>
 public void Insert(int index, CObject value)
 {
   this.items.Insert(index, value);
 }
Exemple #6
0
 /// <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);
 }
Exemple #7
0
 /// <summary>
 /// Determines whether the specified value is in the sequence.
 /// </summary>
 public bool Contains(CObject value)
 {
   return this.items.Contains(value);
 }
Exemple #8
0
 /// <summary>
 /// Adds the specified value add the end of the sequence.
 /// </summary>
 public int Add(CObject value)
 {
   return this.items.Add(value);
 }
 public StackItem(CObject value)
 {
   Object = value;
 }