Skip to content

Commit

Permalink
generate structs as classes (#29)
Browse files Browse the repository at this point in the history
* generate structs as classes

* forgot a handrolled type
  • Loading branch information
adamhathcock authored Jul 3, 2024
1 parent 242cf50 commit 5109b23
Show file tree
Hide file tree
Showing 49 changed files with 772 additions and 716 deletions.
2 changes: 1 addition & 1 deletion Speckle.Revit2023.Fakes/Enumerables.Plumbing.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public partial class PointIterator
object IEnumerator.Current => throw new System.NotImplementedException();
}

public partial struct CloudPoint
public partial class CloudPoint
{
public static implicit operator XYZ(CloudPoint cp) => new(cp.X, cp.Y, cp.Z);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
namespace Autodesk.Revit.DB;

public partial struct GridNode
public partial class GridNode
{
public GridNode() { }

public GridNode(System.Int32 uIndex, System.Int32 vIndex) => throw new System.NotImplementedException();

public System.Int32 VIndex
public virtual System.Int32 VIndex
{
get => throw new System.NotImplementedException();
set { }
}
public System.Int32 UIndex
public virtual System.Int32 UIndex
{
get => throw new System.NotImplementedException();
set { }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Autodesk.Revit.DB.PointClouds;

public partial struct CloudPoint
public partial class CloudPoint
{
public CloudPoint() { }

Expand Down
2 changes: 1 addition & 1 deletion Speckle.Rhino7.Fakes/IndexPair.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Rhino;

public partial struct IndexPair
public partial class IndexPair
{
int System.Collections.Generic.IList<System.Int32>.this[int x]
{
Expand Down
16 changes: 8 additions & 8 deletions Speckle.Rhino7.Fakes/generated/Rhino.Display.Color4f.s.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Rhino.Display;

public partial struct Color4f : System.Runtime.Serialization.ISerializable
public partial class Color4f : System.Runtime.Serialization.ISerializable
{
public Color4f() { }

Expand All @@ -19,13 +19,13 @@ public static Rhino.Display.Color4f FromArgb(System.Single a, System.Single r, S
public static Rhino.Display.Color4f FromArgb(System.Single a, Rhino.Display.Color4f color) =>
throw new System.NotImplementedException();

public Rhino.Display.Color4f BlendTo(System.Single t, Rhino.Display.Color4f col) =>
public virtual Rhino.Display.Color4f BlendTo(System.Single t, Rhino.Display.Color4f col) =>
throw new System.NotImplementedException();

public static Rhino.Display.Color4f ApplyGamma(Rhino.Display.Color4f col, System.Single gamma) =>
throw new System.NotImplementedException();

public System.Drawing.Color AsSystemColor() => throw new System.NotImplementedException();
public virtual System.Drawing.Color AsSystemColor() => throw new System.NotImplementedException();

void System.Runtime.Serialization.ISerializable.GetObjectData(
System.Runtime.Serialization.SerializationInfo info,
Expand All @@ -44,23 +44,23 @@ public static Rhino.Display.Color4f White
{
get => throw new System.NotImplementedException();
}
public System.Single R
public virtual System.Single R
{
get => throw new System.NotImplementedException();
}
public System.Single G
public virtual System.Single G
{
get => throw new System.NotImplementedException();
}
public System.Single B
public virtual System.Single B
{
get => throw new System.NotImplementedException();
}
public System.Single A
public virtual System.Single A
{
get => throw new System.NotImplementedException();
}
public System.Single L
public virtual System.Single L
{
get => throw new System.NotImplementedException();
}
Expand Down
12 changes: 6 additions & 6 deletions Speckle.Rhino7.Fakes/generated/Rhino.Display.ColorCMYK.s.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Rhino.Display;

public partial struct ColorCMYK
public partial class ColorCMYK
{
public ColorCMYK() { }

Expand Down Expand Up @@ -38,27 +38,27 @@ public static Rhino.Display.ColorCMYK CreateFromLCH(Rhino.Display.ColorLCH lch)
public static Rhino.Display.ColorCMYK CreateFromHSV(Rhino.Display.ColorHSV hsv) =>
throw new System.NotImplementedException();

public System.Double C
public virtual System.Double C
{
get => throw new System.NotImplementedException();
set { }
}
public System.Double M
public virtual System.Double M
{
get => throw new System.NotImplementedException();
set { }
}
public System.Double Y
public virtual System.Double Y
{
get => throw new System.NotImplementedException();
set { }
}
public System.Double K
public virtual System.Double K
{
get => throw new System.NotImplementedException();
set { }
}
public System.Double A
public virtual System.Double A
{
get => throw new System.NotImplementedException();
set { }
Expand Down
12 changes: 6 additions & 6 deletions Speckle.Rhino7.Fakes/generated/Rhino.Display.ColorHSL.s.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Rhino.Display;

public partial struct ColorHSL
public partial class ColorHSL
{
public ColorHSL() { }

Expand Down Expand Up @@ -30,24 +30,24 @@ public static Rhino.Display.ColorHSL CreateFromLCH(Rhino.Display.ColorLCH lch) =
public static Rhino.Display.ColorHSL CreateFromHSV(Rhino.Display.ColorHSV hsv) =>
throw new System.NotImplementedException();

public System.Drawing.Color ToArgbColor() => throw new System.NotImplementedException();
public virtual System.Drawing.Color ToArgbColor() => throw new System.NotImplementedException();

public System.Double H
public virtual System.Double H
{
get => throw new System.NotImplementedException();
set { }
}
public System.Double S
public virtual System.Double S
{
get => throw new System.NotImplementedException();
set { }
}
public System.Double L
public virtual System.Double L
{
get => throw new System.NotImplementedException();
set { }
}
public System.Double A
public virtual System.Double A
{
get => throw new System.NotImplementedException();
set { }
Expand Down
12 changes: 6 additions & 6 deletions Speckle.Rhino7.Fakes/generated/Rhino.Display.ColorHSV.s.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Rhino.Display;

public partial struct ColorHSV
public partial class ColorHSV
{
public ColorHSV() { }

Expand Down Expand Up @@ -30,24 +30,24 @@ public static Rhino.Display.ColorHSV CreateFromLAB(Rhino.Display.ColorLAB lab) =
public static Rhino.Display.ColorHSV CreateFromLCH(Rhino.Display.ColorLCH lch) =>
throw new System.NotImplementedException();

public System.Drawing.Color ToArgbColor() => throw new System.NotImplementedException();
public virtual System.Drawing.Color ToArgbColor() => throw new System.NotImplementedException();

public System.Double H
public virtual System.Double H
{
get => throw new System.NotImplementedException();
set { }
}
public System.Double S
public virtual System.Double S
{
get => throw new System.NotImplementedException();
set { }
}
public System.Double V
public virtual System.Double V
{
get => throw new System.NotImplementedException();
set { }
}
public System.Double A
public virtual System.Double A
{
get => throw new System.NotImplementedException();
set { }
Expand Down
10 changes: 5 additions & 5 deletions Speckle.Rhino7.Fakes/generated/Rhino.Display.ColorLAB.s.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Rhino.Display;

public partial struct ColorLAB
public partial class ColorLAB
{
public ColorLAB() { }

Expand Down Expand Up @@ -30,22 +30,22 @@ public static Rhino.Display.ColorLAB CreateFromLCH(Rhino.Display.ColorLCH lch) =
public static Rhino.Display.ColorLAB CreateFromHSV(Rhino.Display.ColorHSV hsv) =>
throw new System.NotImplementedException();

public System.Double L
public virtual System.Double L
{
get => throw new System.NotImplementedException();
set { }
}
public System.Double A
public virtual System.Double A
{
get => throw new System.NotImplementedException();
set { }
}
public System.Double B
public virtual System.Double B
{
get => throw new System.NotImplementedException();
set { }
}
public System.Double Alpha
public virtual System.Double Alpha
{
get => throw new System.NotImplementedException();
set { }
Expand Down
12 changes: 6 additions & 6 deletions Speckle.Rhino7.Fakes/generated/Rhino.Display.ColorLCH.s.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Rhino.Display;

public partial struct ColorLCH
public partial class ColorLCH
{
public ColorLCH() { }

Expand All @@ -27,24 +27,24 @@ public static Rhino.Display.ColorLCH CreateFromXYZ(Rhino.Display.ColorXYZ xyz) =
public static Rhino.Display.ColorLCH CreateFromLAB(Rhino.Display.ColorLAB lab) =>
throw new System.NotImplementedException();

public void MakePositive() => throw new System.NotImplementedException();
public virtual void MakePositive() => throw new System.NotImplementedException();

public System.Double L
public virtual System.Double L
{
get => throw new System.NotImplementedException();
set { }
}
public System.Double C
public virtual System.Double C
{
get => throw new System.NotImplementedException();
set { }
}
public System.Double H
public virtual System.Double H
{
get => throw new System.NotImplementedException();
set { }
}
public System.Double A
public virtual System.Double A
{
get => throw new System.NotImplementedException();
set { }
Expand Down
20 changes: 10 additions & 10 deletions Speckle.Rhino7.Fakes/generated/Rhino.Display.ColorRGBA.s.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Rhino.Display;

public partial struct ColorRGBA
public partial class ColorRGBA
: System.Runtime.Serialization.ISerializable,
System.IFormattable,
System.IComparable,
Expand Down Expand Up @@ -40,17 +40,17 @@ public static Rhino.Display.ColorRGBA CreateFromLAB(Rhino.Display.ColorLAB lab)
public static Rhino.Display.ColorRGBA CreateFromLCH(Rhino.Display.ColorLCH lch) =>
throw new System.NotImplementedException();

public System.String ToString(System.String format, System.IFormatProvider formatProvider) =>
public virtual System.String ToString(System.String format, System.IFormatProvider formatProvider) =>
throw new System.NotImplementedException();

public System.Int32 CompareTo(Rhino.Display.ColorRGBA other) => throw new System.NotImplementedException();
public virtual System.Int32 CompareTo(Rhino.Display.ColorRGBA other) => throw new System.NotImplementedException();

public System.Boolean EpsilonEquals(Rhino.Display.ColorRGBA other, System.Double epsilon) =>
public virtual System.Boolean EpsilonEquals(Rhino.Display.ColorRGBA other, System.Double epsilon) =>
throw new System.NotImplementedException();

public System.Boolean Equals(Rhino.Display.ColorRGBA other) => throw new System.NotImplementedException();
public virtual System.Boolean Equals(Rhino.Display.ColorRGBA other) => throw new System.NotImplementedException();

public Rhino.Display.ColorRGBA BlendTo(Rhino.Display.ColorRGBA col, System.Double coefficient) =>
public virtual Rhino.Display.ColorRGBA BlendTo(Rhino.Display.ColorRGBA col, System.Double coefficient) =>
throw new System.NotImplementedException();

public static Rhino.Display.ColorRGBA ApplyGamma(Rhino.Display.ColorRGBA col, System.Double gamma) =>
Expand All @@ -63,22 +63,22 @@ System.Runtime.Serialization.StreamingContext context

System.Int32 System.IComparable.CompareTo(System.Object obj) => throw new System.NotImplementedException();

public System.Double R
public virtual System.Double R
{
get => throw new System.NotImplementedException();
set { }
}
public System.Double G
public virtual System.Double G
{
get => throw new System.NotImplementedException();
set { }
}
public System.Double B
public virtual System.Double B
{
get => throw new System.NotImplementedException();
set { }
}
public System.Double A
public virtual System.Double A
{
get => throw new System.NotImplementedException();
set { }
Expand Down
6 changes: 3 additions & 3 deletions Speckle.Rhino7.Fakes/generated/Rhino.Display.ColorStop.s.cs
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
namespace Rhino.Display;

public partial struct ColorStop
public partial class ColorStop
{
public ColorStop() { }

public ColorStop(System.Drawing.Color color, System.Double t) => throw new System.NotImplementedException();

public System.Drawing.Color Color
public virtual System.Drawing.Color Color
{
get => throw new System.NotImplementedException();
set { }
}
public System.Double Position
public virtual System.Double Position
{
get => throw new System.NotImplementedException();
set { }
Expand Down
Loading

0 comments on commit 5109b23

Please sign in to comment.