Skip to content

Commit

Permalink
Added support for signed variants of Array2D and Array3D.
Browse files Browse the repository at this point in the history
  • Loading branch information
robertosfield committed Dec 26, 2024
1 parent b468d4c commit 4c7ea0f
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 0 deletions.
6 changes: 6 additions & 0 deletions include/vsg/core/ConstVisitor.h
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,11 @@ namespace vsg
virtual void apply(const block128Array&);

// Array2Ds
virtual void apply(const byteArray2D&);
virtual void apply(const ubyteArray2D&);
virtual void apply(const shortArray2D&);
virtual void apply(const ushortArray2D&);
virtual void apply(const intArray2D&);
virtual void apply(const uintArray2D&);
virtual void apply(const floatArray2D&);
virtual void apply(const doubleArray2D&);
Expand Down Expand Up @@ -298,8 +301,11 @@ namespace vsg
virtual void apply(const block128Array2D&);

// Array3Ds
virtual void apply(const byteArray3D&);
virtual void apply(const ubyteArray3D&);
virtual void apply(const shortArray3D&);
virtual void apply(const ushortArray3D&);
virtual void apply(const intArray3D&);
virtual void apply(const uintArray3D&);
virtual void apply(const floatArray3D&);
virtual void apply(const doubleArray3D&);
Expand Down
6 changes: 6 additions & 0 deletions include/vsg/core/Visitor.h
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,11 @@ namespace vsg
virtual void apply(block128Array&);

// Array2Ds
virtual void apply(byteArray2D&);
virtual void apply(ubyteArray2D&);
virtual void apply(shortArray2D&);
virtual void apply(ushortArray2D&);
virtual void apply(intArray2D&);
virtual void apply(uintArray2D&);
virtual void apply(floatArray2D&);
virtual void apply(doubleArray2D&);
Expand Down Expand Up @@ -298,8 +301,11 @@ namespace vsg
virtual void apply(block128Array2D&);

// Array3Ds
virtual void apply(byteArray3D&);
virtual void apply(ubyteArray3D&);
virtual void apply(shortArray3D&);
virtual void apply(ushortArray3D&);
virtual void apply(intArray3D&);
virtual void apply(uintArray3D&);
virtual void apply(floatArray3D&);
virtual void apply(doubleArray3D&);
Expand Down
24 changes: 24 additions & 0 deletions src/vsg/core/ConstVisitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -327,14 +327,26 @@ void ConstVisitor::apply(const block128Array& value)
//
// Array2Ds
//
void ConstVisitor::apply(const byteArray2D& value)
{
apply(static_cast<const Data&>(value));
}
void ConstVisitor::apply(const ubyteArray2D& value)
{
apply(static_cast<const Data&>(value));
}
void ConstVisitor::apply(const shortArray2D& value)
{
apply(static_cast<const Data&>(value));
}
void ConstVisitor::apply(const ushortArray2D& value)
{
apply(static_cast<const Data&>(value));
}
void ConstVisitor::apply(const intArray2D& value)
{
apply(static_cast<const Data&>(value));
}
void ConstVisitor::apply(const uintArray2D& value)
{
apply(static_cast<const Data&>(value));
Expand Down Expand Up @@ -456,14 +468,26 @@ void ConstVisitor::apply(const block128Array2D& value)
//
// Array3Ds
//
void ConstVisitor::apply(const byteArray3D& value)
{
apply(static_cast<const Data&>(value));
}
void ConstVisitor::apply(const ubyteArray3D& value)
{
apply(static_cast<const Data&>(value));
}
void ConstVisitor::apply(const shortArray3D& value)
{
apply(static_cast<const Data&>(value));
}
void ConstVisitor::apply(const ushortArray3D& value)
{
apply(static_cast<const Data&>(value));
}
void ConstVisitor::apply(const intArray3D& value)
{
apply(static_cast<const Data&>(value));
}
void ConstVisitor::apply(const uintArray3D& value)
{
apply(static_cast<const Data&>(value));
Expand Down
24 changes: 24 additions & 0 deletions src/vsg/core/Visitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -327,14 +327,26 @@ void Visitor::apply(block128Array& value)
//
// Array2Ds
//
void Visitor::apply(byteArray2D& value)
{
apply(static_cast<Data&>(value));
}
void Visitor::apply(ubyteArray2D& value)
{
apply(static_cast<Data&>(value));
}
void Visitor::apply(shortArray2D& value)
{
apply(static_cast<Data&>(value));
}
void Visitor::apply(ushortArray2D& value)
{
apply(static_cast<Data&>(value));
}
void Visitor::apply(intArray2D& value)
{
apply(static_cast<Data&>(value));
}
void Visitor::apply(uintArray2D& value)
{
apply(static_cast<Data&>(value));
Expand Down Expand Up @@ -456,14 +468,26 @@ void Visitor::apply(block128Array2D& value)
//
// Array3Ds
//
void Visitor::apply(byteArray3D& value)
{
apply(static_cast<Data&>(value));
}
void Visitor::apply(ubyteArray3D& value)
{
apply(static_cast<Data&>(value));
}
void Visitor::apply(shortArray3D& value)
{
apply(static_cast<Data&>(value));
}
void Visitor::apply(ushortArray3D& value)
{
apply(static_cast<Data&>(value));
}
void Visitor::apply(intArray3D& value)
{
apply(static_cast<Data&>(value));
}
void Visitor::apply(uintArray3D& value)
{
apply(static_cast<Data&>(value));
Expand Down

0 comments on commit 4c7ea0f

Please sign in to comment.