use ffi::{CPXPARAM_Read_APIEncoding, CPXPARAM_Read_DataCheck};
use crate::parameters::{private, Parameter, ParameterValue};
impl private::Parameter for APIEncoding {}
impl private::Parameter for DataCheck {}
#[derive(Copy, Clone, Debug)]
pub struct APIEncoding(pub &'static str);
impl Parameter for APIEncoding {
fn value(&self) -> ParameterValue {
ParameterValue::String(self.0)
}
fn id(&self) -> u32 {
CPXPARAM_Read_APIEncoding
}
}
#[derive(Copy, Clone, Debug)]
pub enum DataCheck {
Off,
Warning,
Assist,
}
impl Parameter for DataCheck {
fn value(&self) -> ParameterValue {
ParameterValue::Integer(match self {
Self::Off => 0,
Self::Warning => 1,
Self::Assist => 2,
})
}
fn id(&self) -> u32 {
CPXPARAM_Read_DataCheck
}
}