A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/bytedeco/javacpp/issues/478 below:

Problem with instantiating templates · Issue #478 · bytedeco/javacpp · GitHub

Following preset code attempts to create an instance of a template:

new Info("Spinnaker::GenApi::IEnumerationT<Spinnaker::InterfaceTypeEnum>").pointerTypes("EInterfaceType").define()

Usage of the template in the generated Java code is correctly replaced with EInterfaceType. However, the there is no Java class generated to instantiate the template.

Note that template is in the namespace Spinnaker::GenApi. The template parameter is in the namespace Spinnaker. There is a separate preset for each namespace.

Simplified preset class for GenApi

@Properties(inherit = GenICam.class,
        target = "org.bytedeco.spinnaker.GenApi",
        global = "org.bytedeco.spinnaker.global.GenApi", ...)
public class GenApi implements InfoMapper { ... }

Simplified preset class for Spinnaker

@Properties(inherit = GenApi.class,
        target = "org.bytedeco.spinnaker.Spinnaker",
        global = "org.bytedeco.spinnaker.global.Spinnaker", ...)
public class Spinnaker implements InfoMapper { 
    public void map(InfoMap infoMap) {
        infoMap.put(new Info("Spinnaker::GenApi::IEnumerationT<Spinnaker::InterfaceTypeEnum>")
                           .pointerTypes("EInterfaceType").define())
...
}

Simplified C++ definition of the IEnumerationT:

namespace Spinnaker
{
    namespace GenApi
    {
        template <typename EnumT>
        interface SPINNAKER_API_ABSTRACT IEnumerationT : virtual public IEnumeration, virtual public IEnumReference
        {
          ... 
        }
    }
}

Definition of InterfaceTypeEnum:

namespace Spinnaker
{
	enum InterfaceTypeEnum	/*!< Transport layer type of the interface.*/
	{
		InterfaceType_GigEVision,	/*!< GigE Vision*/
		InterfaceType_CameraLink,	/*!< Camera Link*/
		InterfaceType_CameraLinkHS,	/*!< Camera Link High Speed*/
		InterfaceType_CoaXPress,	/*!< CoaXPress*/
		InterfaceType_USB3Vision,	/*!< USB3 Vision*/
		InterfaceType_Custom,	/*!< Custom transport layer*/
		NUMINTERFACETYPE
	}
...
}

Need to figure out some way to force the instantiation of that template.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4