Skip to content

Commit

Permalink
publicize
Browse files Browse the repository at this point in the history
  • Loading branch information
James Connolly committed Nov 6, 2024
1 parent dd93732 commit f80ba76
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions pywellen/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ pub fn execute_get_signals(

#[pyclass]
#[derive(Clone)]
struct Hierarchy(pub(crate) Arc<wellen::Hierarchy>);
pub struct Hierarchy(pub(crate) Arc<wellen::Hierarchy>);

#[pymethods]
impl Hierarchy {
Expand All @@ -87,7 +87,7 @@ impl Hierarchy {
}

#[pyclass]
struct Scope(pub(crate) wellen::Scope);
pub struct Scope(pub(crate) wellen::Scope);

#[pymethods]
impl Scope {
Expand Down Expand Up @@ -136,7 +136,7 @@ impl Scope {
}

#[pyclass]
struct ScopeIter(Box<dyn Iterator<Item = Scope> + Send>);
pub struct ScopeIter(Box<dyn Iterator<Item = Scope> + Send>);
#[pymethods]
impl ScopeIter {
fn __iter__(slf: PyRef<'_, Self>) -> PyRef<'_, Self> {
Expand Down Expand Up @@ -164,7 +164,7 @@ impl Var {
}

#[pyclass]
struct VarIter(Box<dyn Iterator<Item = Var> + Send>);
pub struct VarIter(Box<dyn Iterator<Item = Var> + Send>);

#[pymethods]
impl VarIter {
Expand Down Expand Up @@ -201,7 +201,7 @@ impl TimeTable {
}

#[pyclass]
struct Waveform {
pub struct Waveform {
#[pyo3(get)]
hierarchy: Hierarchy,

Expand Down Expand Up @@ -237,7 +237,7 @@ impl Waveform {
time_table: TimeTable(Arc::new(body.time_table)),
})
}
fn get_signal<'py>(&mut self, var: &Var, py: Python<'py>) -> PyResult<Bound<'py, Signal>> {
pub fn get_signal<'py>(&mut self, var: &Var, py: Python<'py>) -> PyResult<Bound<'py, Signal>> {
let mut signal =
self.wave_source
.load_signals(&[var.0.signal_ref()], &self.hierarchy.0, true);
Expand All @@ -252,7 +252,7 @@ impl Waveform {
}

/// Assumes a dotted signal
fn get_signal_from_path<'py>(
pub fn get_signal_from_path<'py>(
&mut self,
abs_hierarchy_path: String,
py: Python<'py>,
Expand All @@ -278,7 +278,7 @@ impl Waveform {

#[pyclass]
#[derive(Clone)]
struct Signal {
pub struct Signal {
signal: Arc<wellen::Signal>,
all_times: TimeTable,
}
Expand Down Expand Up @@ -327,7 +327,7 @@ impl Signal {
}

impl Signal {
fn to_wellen_signal(self) -> Option<wellen::Signal> {
pub fn to_wellen_signal(self) -> Option<wellen::Signal> {
Arc::try_unwrap(self.signal).ok()
}
}
Expand Down Expand Up @@ -394,7 +394,7 @@ pub fn create_wellen_signal(pyinterface: Bound<'_, PyAny>) -> PyResult<wellen::S

#[pyclass]
/// Iterates across all changes -- the returned object is a tuple of (Time, Value)
struct SignalChangeIter {
pub struct SignalChangeIter {
signal: Signal,
offset: usize,
}
Expand Down

0 comments on commit f80ba76

Please sign in to comment.