From 1e2bf0858dde8534aef5dc8ce9c4f463bc211cd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Guillemet?= Date: Fri, 2 Aug 2024 12:37:47 +0200 Subject: [PATCH] Make all chrono classes properties inherit from chrono presets --- src/main/java/org/bytedeco/javacpp/chrono/Chrono.java | 3 +++ .../java/org/bytedeco/javacpp/chrono/HighResolutionClock.java | 2 +- .../org/bytedeco/javacpp/chrono/HighResolutionDuration.java | 2 +- .../java/org/bytedeco/javacpp/chrono/HighResolutionTime.java | 2 +- src/main/java/org/bytedeco/javacpp/chrono/Hours.java | 2 +- src/main/java/org/bytedeco/javacpp/chrono/Microseconds.java | 2 +- src/main/java/org/bytedeco/javacpp/chrono/Milliseconds.java | 2 +- src/main/java/org/bytedeco/javacpp/chrono/Minutes.java | 2 +- src/main/java/org/bytedeco/javacpp/chrono/Nanoseconds.java | 2 +- src/main/java/org/bytedeco/javacpp/chrono/Seconds.java | 2 +- src/main/java/org/bytedeco/javacpp/chrono/SecondsDouble.java | 2 +- src/main/java/org/bytedeco/javacpp/chrono/SecondsFloat.java | 2 +- src/main/java/org/bytedeco/javacpp/chrono/SteadyClock.java | 2 +- src/main/java/org/bytedeco/javacpp/chrono/SteadyDuration.java | 2 +- src/main/java/org/bytedeco/javacpp/chrono/SteadyTime.java | 2 +- src/main/java/org/bytedeco/javacpp/chrono/SystemClock.java | 2 +- src/main/java/org/bytedeco/javacpp/chrono/SystemDuration.java | 2 +- src/main/java/org/bytedeco/javacpp/chrono/SystemTime.java | 2 +- src/main/java/org/bytedeco/javacpp/presets/chrono.java | 1 + 19 files changed, 21 insertions(+), 17 deletions(-) diff --git a/src/main/java/org/bytedeco/javacpp/chrono/Chrono.java b/src/main/java/org/bytedeco/javacpp/chrono/Chrono.java index 0d522845..c2eb2304 100644 --- a/src/main/java/org/bytedeco/javacpp/chrono/Chrono.java +++ b/src/main/java/org/bytedeco/javacpp/chrono/Chrono.java @@ -1,4 +1,7 @@ package org.bytedeco.javacpp.chrono; +import org.bytedeco.javacpp.annotation.Properties; + +@Properties(inherit = org.bytedeco.javacpp.presets.chrono.class) public class Chrono { } diff --git a/src/main/java/org/bytedeco/javacpp/chrono/HighResolutionClock.java b/src/main/java/org/bytedeco/javacpp/chrono/HighResolutionClock.java index c8f44d0f..30b314ae 100644 --- a/src/main/java/org/bytedeco/javacpp/chrono/HighResolutionClock.java +++ b/src/main/java/org/bytedeco/javacpp/chrono/HighResolutionClock.java @@ -6,7 +6,7 @@ import org.bytedeco.javacpp.annotation.Name; import org.bytedeco.javacpp.annotation.Properties; -@Name("std::chrono::high_resolution_clock") @Properties(inherit = org.bytedeco.javacpp.presets.javacpp.class) +@Name("std::chrono::high_resolution_clock") @Properties(inherit = org.bytedeco.javacpp.presets.chrono.class) public class HighResolutionClock extends Pointer { static public native @ByVal HighResolutionTime now(); static public native @MemberGetter boolean is_steady(); diff --git a/src/main/java/org/bytedeco/javacpp/chrono/HighResolutionDuration.java b/src/main/java/org/bytedeco/javacpp/chrono/HighResolutionDuration.java index d880dbd9..93b84a00 100644 --- a/src/main/java/org/bytedeco/javacpp/chrono/HighResolutionDuration.java +++ b/src/main/java/org/bytedeco/javacpp/chrono/HighResolutionDuration.java @@ -3,7 +3,7 @@ import org.bytedeco.javacpp.Pointer; import org.bytedeco.javacpp.annotation.*; -@Name("std::chrono::high_resolution_clock::duration") @Properties(inherit = org.bytedeco.javacpp.presets.javacpp.class) +@Name("std::chrono::high_resolution_clock::duration") @Properties(inherit = org.bytedeco.javacpp.presets.chrono.class) public class HighResolutionDuration extends Pointer { public HighResolutionDuration() { allocate(); } private native void allocate(); diff --git a/src/main/java/org/bytedeco/javacpp/chrono/HighResolutionTime.java b/src/main/java/org/bytedeco/javacpp/chrono/HighResolutionTime.java index b21658d2..d00eb132 100644 --- a/src/main/java/org/bytedeco/javacpp/chrono/HighResolutionTime.java +++ b/src/main/java/org/bytedeco/javacpp/chrono/HighResolutionTime.java @@ -3,7 +3,7 @@ import org.bytedeco.javacpp.Pointer; import org.bytedeco.javacpp.annotation.*; -@Name("std::chrono::time_point") @Properties(inherit = org.bytedeco.javacpp.presets.javacpp.class) +@Name("std::chrono::time_point") @Properties(inherit = org.bytedeco.javacpp.presets.chrono.class) public class HighResolutionTime extends Pointer { public HighResolutionTime() { allocate(); } private native void allocate(); diff --git a/src/main/java/org/bytedeco/javacpp/chrono/Hours.java b/src/main/java/org/bytedeco/javacpp/chrono/Hours.java index f8b35bda..a269e44a 100644 --- a/src/main/java/org/bytedeco/javacpp/chrono/Hours.java +++ b/src/main/java/org/bytedeco/javacpp/chrono/Hours.java @@ -3,7 +3,7 @@ import org.bytedeco.javacpp.Pointer; import org.bytedeco.javacpp.annotation.*; -@Name("std::chrono::hours") @Properties(inherit = org.bytedeco.javacpp.presets.javacpp.class) +@Name("std::chrono::hours") @Properties(inherit = org.bytedeco.javacpp.presets.chrono.class) public class Hours extends Pointer { public Hours() { allocate(); } private native void allocate(); diff --git a/src/main/java/org/bytedeco/javacpp/chrono/Microseconds.java b/src/main/java/org/bytedeco/javacpp/chrono/Microseconds.java index 7cf3bb2e..1fe62298 100644 --- a/src/main/java/org/bytedeco/javacpp/chrono/Microseconds.java +++ b/src/main/java/org/bytedeco/javacpp/chrono/Microseconds.java @@ -3,7 +3,7 @@ import org.bytedeco.javacpp.Pointer; import org.bytedeco.javacpp.annotation.*; -@Name("std::chrono::microseconds") @Properties(inherit = org.bytedeco.javacpp.presets.javacpp.class) +@Name("std::chrono::microseconds") @Properties(inherit = org.bytedeco.javacpp.presets.chrono.class) public class Microseconds extends Pointer { public Microseconds() { allocate(); } private native void allocate(); diff --git a/src/main/java/org/bytedeco/javacpp/chrono/Milliseconds.java b/src/main/java/org/bytedeco/javacpp/chrono/Milliseconds.java index 31ddc372..202f412e 100644 --- a/src/main/java/org/bytedeco/javacpp/chrono/Milliseconds.java +++ b/src/main/java/org/bytedeco/javacpp/chrono/Milliseconds.java @@ -3,7 +3,7 @@ import org.bytedeco.javacpp.Pointer; import org.bytedeco.javacpp.annotation.*; -@Name("std::chrono::milliseconds") @Properties(inherit = org.bytedeco.javacpp.presets.javacpp.class) +@Name("std::chrono::milliseconds") @Properties(inherit = org.bytedeco.javacpp.presets.chrono.class) public class Milliseconds extends Pointer { public Milliseconds() { allocate(); } private native void allocate(); diff --git a/src/main/java/org/bytedeco/javacpp/chrono/Minutes.java b/src/main/java/org/bytedeco/javacpp/chrono/Minutes.java index 3ec9caba..5e7c8414 100644 --- a/src/main/java/org/bytedeco/javacpp/chrono/Minutes.java +++ b/src/main/java/org/bytedeco/javacpp/chrono/Minutes.java @@ -3,7 +3,7 @@ import org.bytedeco.javacpp.Pointer; import org.bytedeco.javacpp.annotation.*; -@Name("std::chrono::minutes") @Properties(inherit = org.bytedeco.javacpp.presets.javacpp.class) +@Name("std::chrono::minutes") @Properties(inherit = org.bytedeco.javacpp.presets.chrono.class) public class Minutes extends Pointer { public Minutes() { allocate(); } private native void allocate(); diff --git a/src/main/java/org/bytedeco/javacpp/chrono/Nanoseconds.java b/src/main/java/org/bytedeco/javacpp/chrono/Nanoseconds.java index 462a23e8..acae00d5 100644 --- a/src/main/java/org/bytedeco/javacpp/chrono/Nanoseconds.java +++ b/src/main/java/org/bytedeco/javacpp/chrono/Nanoseconds.java @@ -3,7 +3,7 @@ import org.bytedeco.javacpp.Pointer; import org.bytedeco.javacpp.annotation.*; -@Name("std::chrono::nanoseconds") @Properties(inherit = org.bytedeco.javacpp.presets.javacpp.class) +@Name("std::chrono::nanoseconds") @Properties(inherit = org.bytedeco.javacpp.presets.chrono.class) public class Nanoseconds extends Pointer { public Nanoseconds() { allocate(); } private native void allocate(); diff --git a/src/main/java/org/bytedeco/javacpp/chrono/Seconds.java b/src/main/java/org/bytedeco/javacpp/chrono/Seconds.java index 8c5666cd..6c3099f8 100644 --- a/src/main/java/org/bytedeco/javacpp/chrono/Seconds.java +++ b/src/main/java/org/bytedeco/javacpp/chrono/Seconds.java @@ -3,7 +3,7 @@ import org.bytedeco.javacpp.Pointer; import org.bytedeco.javacpp.annotation.*; -@Name("std::chrono::seconds") @Properties(inherit = org.bytedeco.javacpp.presets.javacpp.class) +@Name("std::chrono::seconds") @Properties(inherit = org.bytedeco.javacpp.presets.chrono.class) public class Seconds extends Pointer { public Seconds() { allocate(); } private native void allocate(); diff --git a/src/main/java/org/bytedeco/javacpp/chrono/SecondsDouble.java b/src/main/java/org/bytedeco/javacpp/chrono/SecondsDouble.java index 912d2575..3f8ab973 100644 --- a/src/main/java/org/bytedeco/javacpp/chrono/SecondsDouble.java +++ b/src/main/java/org/bytedeco/javacpp/chrono/SecondsDouble.java @@ -3,7 +3,7 @@ import org.bytedeco.javacpp.Pointer; import org.bytedeco.javacpp.annotation.*; -@Name("std::chrono::duration") @Properties(inherit = org.bytedeco.javacpp.presets.javacpp.class) +@Name("std::chrono::duration") @Properties(inherit = org.bytedeco.javacpp.presets.chrono.class) public class SecondsDouble extends Pointer { public SecondsDouble() { allocate(); } private native void allocate(); diff --git a/src/main/java/org/bytedeco/javacpp/chrono/SecondsFloat.java b/src/main/java/org/bytedeco/javacpp/chrono/SecondsFloat.java index bdf19178..ae122972 100644 --- a/src/main/java/org/bytedeco/javacpp/chrono/SecondsFloat.java +++ b/src/main/java/org/bytedeco/javacpp/chrono/SecondsFloat.java @@ -3,7 +3,7 @@ import org.bytedeco.javacpp.Pointer; import org.bytedeco.javacpp.annotation.*; -@Name("std::chrono::duration") @Properties(inherit = org.bytedeco.javacpp.presets.javacpp.class) +@Name("std::chrono::duration") @Properties(inherit = org.bytedeco.javacpp.presets.chrono.class) public class SecondsFloat extends Pointer { public SecondsFloat() { allocate(); } private native void allocate(); diff --git a/src/main/java/org/bytedeco/javacpp/chrono/SteadyClock.java b/src/main/java/org/bytedeco/javacpp/chrono/SteadyClock.java index e2a8502c..447f0cec 100644 --- a/src/main/java/org/bytedeco/javacpp/chrono/SteadyClock.java +++ b/src/main/java/org/bytedeco/javacpp/chrono/SteadyClock.java @@ -5,7 +5,7 @@ import org.bytedeco.javacpp.annotation.Name; import org.bytedeco.javacpp.annotation.Properties; -@Name("std::chrono::steady_clock") @Properties(inherit = org.bytedeco.javacpp.presets.javacpp.class) +@Name("std::chrono::steady_clock") @Properties(inherit = org.bytedeco.javacpp.presets.chrono.class) public class SteadyClock extends Pointer { static public native @ByVal SteadyTime now(); } diff --git a/src/main/java/org/bytedeco/javacpp/chrono/SteadyDuration.java b/src/main/java/org/bytedeco/javacpp/chrono/SteadyDuration.java index a95abe15..43adfa4e 100644 --- a/src/main/java/org/bytedeco/javacpp/chrono/SteadyDuration.java +++ b/src/main/java/org/bytedeco/javacpp/chrono/SteadyDuration.java @@ -3,7 +3,7 @@ import org.bytedeco.javacpp.Pointer; import org.bytedeco.javacpp.annotation.*; -@Name("std::chrono::steady_clock::duration") @Properties(inherit = org.bytedeco.javacpp.presets.javacpp.class) +@Name("std::chrono::steady_clock::duration") @Properties(inherit = org.bytedeco.javacpp.presets.chrono.class) public class SteadyDuration extends Pointer { public SteadyDuration() { allocate(); } private native void allocate(); diff --git a/src/main/java/org/bytedeco/javacpp/chrono/SteadyTime.java b/src/main/java/org/bytedeco/javacpp/chrono/SteadyTime.java index b2ec2c24..280ae986 100644 --- a/src/main/java/org/bytedeco/javacpp/chrono/SteadyTime.java +++ b/src/main/java/org/bytedeco/javacpp/chrono/SteadyTime.java @@ -3,7 +3,7 @@ import org.bytedeco.javacpp.Pointer; import org.bytedeco.javacpp.annotation.*; -@Name("std::chrono::time_point") @Properties(inherit = org.bytedeco.javacpp.presets.javacpp.class) +@Name("std::chrono::time_point") @Properties(inherit = org.bytedeco.javacpp.presets.chrono.class) public class SteadyTime extends Pointer { public SteadyTime() { allocate(); } private native void allocate(); diff --git a/src/main/java/org/bytedeco/javacpp/chrono/SystemClock.java b/src/main/java/org/bytedeco/javacpp/chrono/SystemClock.java index 63c0a3ac..a3b1c617 100644 --- a/src/main/java/org/bytedeco/javacpp/chrono/SystemClock.java +++ b/src/main/java/org/bytedeco/javacpp/chrono/SystemClock.java @@ -3,7 +3,7 @@ import org.bytedeco.javacpp.Pointer; import org.bytedeco.javacpp.annotation.*; -@Name("std::chrono::system_clock") @Properties(inherit = org.bytedeco.javacpp.presets.javacpp.class) +@Name("std::chrono::system_clock") @Properties(inherit = org.bytedeco.javacpp.presets.chrono.class) public class SystemClock extends Pointer { static public native @ByVal SystemTime now(); static public native @Cast("time_t") long to_time_t(@Const @ByRef SystemTime t); diff --git a/src/main/java/org/bytedeco/javacpp/chrono/SystemDuration.java b/src/main/java/org/bytedeco/javacpp/chrono/SystemDuration.java index e3b1508e..5c318d54 100644 --- a/src/main/java/org/bytedeco/javacpp/chrono/SystemDuration.java +++ b/src/main/java/org/bytedeco/javacpp/chrono/SystemDuration.java @@ -3,7 +3,7 @@ import org.bytedeco.javacpp.Pointer; import org.bytedeco.javacpp.annotation.*; -@Name("std::chrono::system_clock::duration") @Properties(inherit = org.bytedeco.javacpp.presets.javacpp.class) +@Name("std::chrono::system_clock::duration") @Properties(inherit = org.bytedeco.javacpp.presets.chrono.class) public class SystemDuration extends Pointer { public SystemDuration() { allocate(); } private native void allocate(); diff --git a/src/main/java/org/bytedeco/javacpp/chrono/SystemTime.java b/src/main/java/org/bytedeco/javacpp/chrono/SystemTime.java index 4b388da8..ecaeb378 100644 --- a/src/main/java/org/bytedeco/javacpp/chrono/SystemTime.java +++ b/src/main/java/org/bytedeco/javacpp/chrono/SystemTime.java @@ -3,7 +3,7 @@ import org.bytedeco.javacpp.Pointer; import org.bytedeco.javacpp.annotation.*; -@Name("std::chrono::time_point") @Properties(inherit = org.bytedeco.javacpp.presets.javacpp.class) +@Name("std::chrono::time_point") @Properties(inherit = org.bytedeco.javacpp.presets.chrono.class) public class SystemTime extends Pointer { public SystemTime() { allocate(); } private native void allocate(); diff --git a/src/main/java/org/bytedeco/javacpp/presets/chrono.java b/src/main/java/org/bytedeco/javacpp/presets/chrono.java index 49642fd3..db01d334 100644 --- a/src/main/java/org/bytedeco/javacpp/presets/chrono.java +++ b/src/main/java/org/bytedeco/javacpp/presets/chrono.java @@ -3,6 +3,7 @@ import org.bytedeco.javacpp.annotation.Properties; @Properties( + inherit = javacpp.class, target = "org.bytedeco.javacpp.chrono", global = "org.bytedeco.javacpp.chrono.Chrono" )