Skip to content

Commit

Permalink
Make all chrono classes properties inherit from chrono presets
Browse files Browse the repository at this point in the history
  • Loading branch information
HGuillemet committed Aug 2, 2024
1 parent 68059f0 commit 1e2bf08
Show file tree
Hide file tree
Showing 19 changed files with 21 additions and 17 deletions.
3 changes: 3 additions & 0 deletions src/main/java/org/bytedeco/javacpp/chrono/Chrono.java
Original file line number Diff line number Diff line change
@@ -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 {
}
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import org.bytedeco.javacpp.Pointer;
import org.bytedeco.javacpp.annotation.*;

@Name("std::chrono::time_point<std::chrono::high_resolution_clock>") @Properties(inherit = org.bytedeco.javacpp.presets.javacpp.class)
@Name("std::chrono::time_point<std::chrono::high_resolution_clock>") @Properties(inherit = org.bytedeco.javacpp.presets.chrono.class)
public class HighResolutionTime extends Pointer {
public HighResolutionTime() { allocate(); }
private native void allocate();
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/bytedeco/javacpp/chrono/Hours.java
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/bytedeco/javacpp/chrono/Minutes.java
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/bytedeco/javacpp/chrono/Nanoseconds.java
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/bytedeco/javacpp/chrono/Seconds.java
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import org.bytedeco.javacpp.Pointer;
import org.bytedeco.javacpp.annotation.*;

@Name("std::chrono::duration<double>") @Properties(inherit = org.bytedeco.javacpp.presets.javacpp.class)
@Name("std::chrono::duration<double>") @Properties(inherit = org.bytedeco.javacpp.presets.chrono.class)
public class SecondsDouble extends Pointer {
public SecondsDouble() { allocate(); }
private native void allocate();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import org.bytedeco.javacpp.Pointer;
import org.bytedeco.javacpp.annotation.*;

@Name("std::chrono::duration<float>") @Properties(inherit = org.bytedeco.javacpp.presets.javacpp.class)
@Name("std::chrono::duration<float>") @Properties(inherit = org.bytedeco.javacpp.presets.chrono.class)
public class SecondsFloat extends Pointer {
public SecondsFloat() { allocate(); }
private native void allocate();
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/bytedeco/javacpp/chrono/SteadyClock.java
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/bytedeco/javacpp/chrono/SteadyTime.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import org.bytedeco.javacpp.Pointer;
import org.bytedeco.javacpp.annotation.*;

@Name("std::chrono::time_point<std::chrono::steady_clock>") @Properties(inherit = org.bytedeco.javacpp.presets.javacpp.class)
@Name("std::chrono::time_point<std::chrono::steady_clock>") @Properties(inherit = org.bytedeco.javacpp.presets.chrono.class)
public class SteadyTime extends Pointer {
public SteadyTime() { allocate(); }
private native void allocate();
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/bytedeco/javacpp/chrono/SystemClock.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/bytedeco/javacpp/chrono/SystemTime.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import org.bytedeco.javacpp.Pointer;
import org.bytedeco.javacpp.annotation.*;

@Name("std::chrono::time_point<std::chrono::system_clock>") @Properties(inherit = org.bytedeco.javacpp.presets.javacpp.class)
@Name("std::chrono::time_point<std::chrono::system_clock>") @Properties(inherit = org.bytedeco.javacpp.presets.chrono.class)
public class SystemTime extends Pointer {
public SystemTime() { allocate(); }
private native void allocate();
Expand Down
1 change: 1 addition & 0 deletions src/main/java/org/bytedeco/javacpp/presets/chrono.java
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down

0 comments on commit 1e2bf08

Please sign in to comment.