Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions Reinterop~/MethodsImplementedInCpp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ public static void Generate(CppGenerationContext context, TypeToGenerate item, G
#endif
void* {{createName}}(void* handle) {
const {{wrapperType.GetFullyQualifiedName()}} wrapper{{{objectHandleType.GetFullyQualifiedName()}}(handle)};
return reinterpret_cast<void*>(new {{implType.GetFullyQualifiedName()}}(wrapper));
auto pImpl = new {{implType.GetFullyQualifiedName()}}(wrapper);
pImpl->addReference();
return reinterpret_cast<void*>(pImpl);
}
""",
TypeDefinitionsReferenced: new[]
Expand Down Expand Up @@ -68,7 +70,7 @@ private void CreateImplementation()
#endif
void {{destroyName}}(void* pImpl) {
auto pImplTyped = reinterpret_cast<{{implType.GetFullyQualifiedName()}}*>(pImpl);
delete pImplTyped;
if (pImplTyped) pImplTyped->releaseReference();
}
""",
TypeDefinitionsReferenced: new[]
Expand Down
4 changes: 3 additions & 1 deletion native~/Editor/src/CesiumEditorWindowImpl.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#pragma once

#include "CesiumImpl.h"

#include <DotNet/CesiumForUnity/Cesium3DTileset.h>
#include <DotNet/System/String.h>
#include <DotNet/UnityEngine/GameObject.h>
Expand All @@ -13,7 +15,7 @@ class CesiumEditorWindow;

namespace CesiumForUnityNative {

class CesiumEditorWindowImpl {
class CesiumEditorWindowImpl : public CesiumImpl<CesiumEditorWindowImpl> {

public:
CesiumEditorWindowImpl(
Expand Down
4 changes: 3 additions & 1 deletion native~/Editor/src/CesiumIonSessionImpl.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#pragma once

#include "CesiumImpl.h"

#include <CesiumAsync/AsyncSystem.h>
#include <CesiumAsync/IAssetAccessor.h>
#include <CesiumAsync/SharedFuture.h>
Expand Down Expand Up @@ -33,7 +35,7 @@ class Token;
} // namespace CesiumIonClient

namespace CesiumForUnityNative {
class CesiumIonSessionImpl {
class CesiumIonSessionImpl : public CesiumImpl<CesiumIonSessionImpl> {
public:
CesiumIonSessionImpl(const DotNet::CesiumForUnity::CesiumIonSession& session);
~CesiumIonSessionImpl();
Expand Down
4 changes: 3 additions & 1 deletion native~/Editor/src/IonAssetsTreeViewImpl.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#pragma once

#include "CesiumImpl.h"

#include <CesiumIonClient/Assets.h>

#include <DotNet/CesiumForUnity/IonAssetsColumn.h>
Expand All @@ -15,7 +17,7 @@ class IonAssetsTreeView;

namespace CesiumForUnityNative {

class IonAssetsTreeViewImpl {
class IonAssetsTreeViewImpl : public CesiumImpl<IonAssetsTreeViewImpl> {
public:
IonAssetsTreeViewImpl(
const DotNet::CesiumForUnity::IonAssetsTreeView& treeView);
Expand Down
4 changes: 3 additions & 1 deletion native~/Editor/src/SelectIonTokenWindowImpl.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#pragma once

#include "CesiumImpl.h"

#include <CesiumAsync/AsyncSystem.h>
#include <CesiumIonClient/Token.h>

Expand All @@ -17,7 +19,7 @@ class CesiumIonServer;

namespace CesiumForUnityNative {

class SelectIonTokenWindowImpl {
class SelectIonTokenWindowImpl : public CesiumImpl<SelectIonTokenWindowImpl> {

public:
static CesiumAsync::SharedFuture<std::optional<CesiumIonClient::Token>>
Expand Down
4 changes: 3 additions & 1 deletion native~/Runtime/src/Cesium3DTilesetImpl.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#pragma once

#include "CesiumImpl.h"

#include <Cesium3DTilesSelection/ViewUpdateResult.h>

#include <DotNet/CesiumForUnity/CesiumCreditSystem.h>
Expand All @@ -25,7 +27,7 @@ class Tileset;

namespace CesiumForUnityNative {

class Cesium3DTilesetImpl {
class Cesium3DTilesetImpl : public CesiumImpl<Cesium3DTilesetImpl> {
public:
Cesium3DTilesetImpl(const DotNet::CesiumForUnity::Cesium3DTileset& tileset);
~Cesium3DTilesetImpl();
Expand Down
5 changes: 4 additions & 1 deletion native~/Runtime/src/CesiumBingMapsRasterOverlayImpl.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#pragma once

#include "CesiumImpl.h"

#include <CesiumUtility/IntrusivePointer.h>

namespace DotNet::CesiumForUnity {
Expand All @@ -13,7 +15,8 @@ class BingMapsRasterOverlay;

namespace CesiumForUnityNative {

class CesiumBingMapsRasterOverlayImpl {
class CesiumBingMapsRasterOverlayImpl
: public CesiumImpl<CesiumBingMapsRasterOverlayImpl> {
public:
CesiumBingMapsRasterOverlayImpl(
const DotNet::CesiumForUnity::CesiumBingMapsRasterOverlay& overlay);
Expand Down
4 changes: 3 additions & 1 deletion native~/Runtime/src/CesiumCreditSystemImpl.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#pragma once

#include "CesiumImpl.h"

#include <CesiumUtility/CreditSystem.h>

#include <DotNet/CesiumForUnity/CesiumCredit.h>
Expand All @@ -21,7 +23,7 @@ struct Credit;

namespace CesiumForUnityNative {

class CesiumCreditSystemImpl {
class CesiumCreditSystemImpl : public CesiumImpl<CesiumCreditSystemImpl> {
public:
CesiumCreditSystemImpl(
const DotNet::CesiumForUnity::CesiumCreditSystem& creditSystem);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#pragma once

#include "CesiumImpl.h"

#include <CesiumUtility/IntrusivePointer.h>

namespace DotNet::CesiumForUnity {
Expand All @@ -13,7 +15,8 @@ class DebugColorizeTilesRasterOverlay;

namespace CesiumForUnityNative {

class CesiumDebugColorizeTilesRasterOverlayImpl {
class CesiumDebugColorizeTilesRasterOverlayImpl
: public CesiumImpl<CesiumDebugColorizeTilesRasterOverlayImpl> {
public:
CesiumDebugColorizeTilesRasterOverlayImpl(
const DotNet::CesiumForUnity::CesiumDebugColorizeTilesRasterOverlay&
Expand Down
4 changes: 3 additions & 1 deletion native~/Runtime/src/CesiumEllipsoidImpl.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#pragma once

#include "CesiumImpl.h"

#include <CesiumGeospatial/Ellipsoid.h>

#include <DotNet/Unity/Mathematics/double3.h>
Expand All @@ -12,7 +14,7 @@ class CesiumEllipsoid;

namespace CesiumForUnityNative {

class CesiumEllipsoidImpl {
class CesiumEllipsoidImpl : public CesiumImpl<CesiumEllipsoidImpl> {
public:
CesiumEllipsoidImpl(
const DotNet::CesiumForUnity::CesiumEllipsoid& unityEllipsoid);
Expand Down
5 changes: 4 additions & 1 deletion native~/Runtime/src/CesiumFeatureIdAttributeImpl.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#pragma once

#include "CesiumImpl.h"

#include <CesiumGltf/AccessorUtility.h>

namespace DotNet::CesiumForUnity {
Expand All @@ -12,7 +14,8 @@ struct MeshPrimitive;
} // namespace CesiumGltf

namespace CesiumForUnityNative {
class CesiumFeatureIdAttributeImpl {
class CesiumFeatureIdAttributeImpl
: public CesiumImpl<CesiumFeatureIdAttributeImpl> {
public:
CesiumFeatureIdAttributeImpl(
const DotNet::CesiumForUnity::CesiumFeatureIdAttribute&
Expand Down
5 changes: 4 additions & 1 deletion native~/Runtime/src/CesiumFeatureIdTextureImpl.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#pragma once

#include "CesiumImpl.h"

#include <CesiumGltf/AccessorUtility.h>
#include <CesiumGltf/FeatureIdTextureView.h>

Expand All @@ -19,7 +21,8 @@ struct FeatureIdTexture;
} // namespace CesiumGltf

namespace CesiumForUnityNative {
class CesiumFeatureIdTextureImpl {
class CesiumFeatureIdTextureImpl
: public CesiumImpl<CesiumFeatureIdTextureImpl> {
public:
CesiumFeatureIdTextureImpl(
const DotNet::CesiumForUnity::CesiumFeatureIdTexture& featureIdTexture);
Expand Down
4 changes: 3 additions & 1 deletion native~/Runtime/src/CesiumFeatureImpl.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#pragma once

#include "CesiumImpl.h"

#include <CesiumGltf/PropertyTablePropertyView.h>

#include <DotNet/CesiumForUnity/CesiumMetadataValue.h>
Expand Down Expand Up @@ -44,7 +46,7 @@ using ValueType = swl::variant<
CesiumGltf::PropertyArrayView<bool>,
CesiumGltf::PropertyArrayView<std::string_view>>;

class CesiumFeatureImpl {
class CesiumFeatureImpl : public CesiumImpl<CesiumFeatureImpl> {
public:
CesiumFeatureImpl(const DotNet::CesiumForUnity::CesiumFeature& feature);
~CesiumFeatureImpl();
Expand Down
4 changes: 3 additions & 1 deletion native~/Runtime/src/CesiumGeoreferenceImpl.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#pragma once

#include "CesiumImpl.h"

#include <CesiumGeospatial/LocalHorizontalCoordinateSystem.h>

#include <DotNet/Unity/Mathematics/double3.h>
Expand All @@ -16,7 +18,7 @@ class Transform;
}

namespace CesiumForUnityNative {
class CesiumGeoreferenceImpl {
class CesiumGeoreferenceImpl : public CesiumImpl<CesiumGeoreferenceImpl> {
public:
CesiumGeoreferenceImpl(
const DotNet::CesiumForUnity::CesiumGeoreference& georeference);
Expand Down
5 changes: 4 additions & 1 deletion native~/Runtime/src/CesiumIonRasterOverlayImpl.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#pragma once

#include "CesiumImpl.h"

#include <CesiumUtility/IntrusivePointer.h>

namespace DotNet::CesiumForUnity {
Expand All @@ -13,7 +15,8 @@ class IonRasterOverlay;

namespace CesiumForUnityNative {

class CesiumIonRasterOverlayImpl {
class CesiumIonRasterOverlayImpl
: public CesiumImpl<CesiumIonRasterOverlayImpl> {
public:
CesiumIonRasterOverlayImpl(
const DotNet::CesiumForUnity::CesiumIonRasterOverlay& overlay);
Expand Down
4 changes: 3 additions & 1 deletion native~/Runtime/src/CesiumMetadataImpl.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#pragma once

#include "CesiumImpl.h"

#include <CesiumGltf/AccessorUtility.h>
#include <CesiumGltf/Model.h>

Expand All @@ -21,7 +23,7 @@ class Transform;

namespace CesiumForUnityNative {

class CesiumMetadataImpl {
class CesiumMetadataImpl : public CesiumImpl<CesiumMetadataImpl> {
public:
CesiumMetadataImpl(const DotNet::CesiumForUnity::CesiumMetadata& metadata);
~CesiumMetadataImpl();
Expand Down
5 changes: 4 additions & 1 deletion native~/Runtime/src/CesiumPolygonRasterOverlayImpl.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#pragma once

#include "CesiumImpl.h"

#include <CesiumUtility/IntrusivePointer.h>

#include <DotNet/System/Collections/Generic/List1.h>
Expand All @@ -25,7 +27,8 @@ class CartographicPolygon;

namespace CesiumForUnityNative {

class CesiumPolygonRasterOverlayImpl {
class CesiumPolygonRasterOverlayImpl
: public CesiumImpl<CesiumPolygonRasterOverlayImpl> {
public:
CesiumPolygonRasterOverlayImpl(
const DotNet::CesiumForUnity::CesiumPolygonRasterOverlay& overlay);
Expand Down
5 changes: 4 additions & 1 deletion native~/Runtime/src/CesiumPropertyTablePropertyImpl.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#pragma once

#include "CesiumImpl.h"

#include <any>
#include <cstdint>
#include <unordered_map>
Expand Down Expand Up @@ -43,7 +45,8 @@ class double4x4;

namespace CesiumForUnityNative {

class CesiumPropertyTablePropertyImpl {
class CesiumPropertyTablePropertyImpl
: public CesiumImpl<CesiumPropertyTablePropertyImpl> {
public:
CesiumPropertyTablePropertyImpl(
const DotNet::CesiumForUnity::CesiumPropertyTableProperty& property);
Expand Down
5 changes: 4 additions & 1 deletion native~/Runtime/src/CesiumSimplePlanarEllipsoidCurveImpl.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#pragma once

#include "CesiumImpl.h"

#include <CesiumGeospatial/SimplePlanarEllipsoidCurve.h>

#include <DotNet/CesiumForUnity/CesiumEllipsoid.h>
Expand All @@ -17,7 +19,8 @@ struct double3;

namespace CesiumForUnityNative {

class CesiumSimplePlanarEllipsoidCurveImpl {
class CesiumSimplePlanarEllipsoidCurveImpl
: public CesiumImpl<CesiumSimplePlanarEllipsoidCurveImpl> {
public:
CesiumSimplePlanarEllipsoidCurveImpl(
const DotNet::CesiumForUnity::CesiumSimplePlanarEllipsoidCurve& path);
Expand Down
5 changes: 4 additions & 1 deletion native~/Runtime/src/CesiumTileMapServiceRasterOverlayImpl.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#pragma once

#include "CesiumImpl.h"

#include <CesiumUtility/IntrusivePointer.h>

namespace DotNet::CesiumForUnity {
Expand All @@ -13,7 +15,8 @@ class TileMapServiceRasterOverlay;

namespace CesiumForUnityNative {

class CesiumTileMapServiceRasterOverlayImpl {
class CesiumTileMapServiceRasterOverlayImpl
: public CesiumImpl<CesiumTileMapServiceRasterOverlayImpl> {
public:
CesiumTileMapServiceRasterOverlayImpl(
const DotNet::CesiumForUnity::CesiumTileMapServiceRasterOverlay& overlay);
Expand Down
5 changes: 4 additions & 1 deletion native~/Runtime/src/CesiumWebMapServiceRasterOverlayImpl.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#pragma once

#include "CesiumImpl.h"

#include <CesiumUtility/IntrusivePointer.h>

namespace DotNet::CesiumForUnity {
Expand All @@ -13,7 +15,8 @@ class WebMapServiceRasterOverlay;

namespace CesiumForUnityNative {

class CesiumWebMapServiceRasterOverlayImpl {
class CesiumWebMapServiceRasterOverlayImpl
: public CesiumImpl<CesiumWebMapServiceRasterOverlayImpl> {
public:
CesiumWebMapServiceRasterOverlayImpl(
const DotNet::CesiumForUnity::CesiumWebMapServiceRasterOverlay& overlay);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#pragma once

#include "CesiumImpl.h"

#include <CesiumUtility/IntrusivePointer.h>

namespace DotNet::CesiumForUnity {
Expand All @@ -13,7 +15,8 @@ class WebMapTileServiceRasterOverlay;

namespace CesiumForUnityNative {

class CesiumWebMapTileServiceRasterOverlayImpl {
class CesiumWebMapTileServiceRasterOverlayImpl
: public CesiumImpl<CesiumWebMapTileServiceRasterOverlayImpl> {
public:
CesiumWebMapTileServiceRasterOverlayImpl(
const DotNet::CesiumForUnity::CesiumWebMapTileServiceRasterOverlay&
Expand Down
Loading