pub struct EcucInstanceReferenceValue(/* private fields */);
Expand description
An EcucInstanceReferenceValue
provides the mechanism to reference an instance of a prototype
Implementations§
Source§impl EcucInstanceReferenceValue
impl EcucInstanceReferenceValue
Sourcepub fn set_definition(
&self,
definition: &EcucInstanceReferenceDef,
) -> Result<(), AutosarAbstractionError>
pub fn set_definition( &self, definition: &EcucInstanceReferenceDef, ) -> Result<(), AutosarAbstractionError>
set the parameter definition reference
Sourcepub fn definition(&self) -> Option<EcucInstanceReferenceDef>
pub fn definition(&self) -> Option<EcucInstanceReferenceDef>
get the parameter definition
This function returns the definition as an EcucParameterDef
enum, which
could contain either an EcucFloatParamDef
or an EcucIntegerParamDef
.
If the definition is not loaded, use definition_ref()
instead.
Sourcepub fn definition_ref(&self) -> Option<String>
pub fn definition_ref(&self) -> Option<String>
get the parameter definition reference as a string
This function is an alternative to definition()
; it is useful when the
referenced definition is not loaded and can’t be resolved.
Sourcepub fn set_target(
&self,
taget_context: &[&Element],
target: &Element,
) -> Result<(), AutosarAbstractionError>
pub fn set_target( &self, taget_context: &[&Element], target: &Element, ) -> Result<(), AutosarAbstractionError>
Set the target of the reference
An instance reference targets a specific instance of a prototype. In order to uniquely identify the target, the target context is required. The target context is a list of elements that are the parent elements of the target element. The instance reference definition specifies which context elements are required.
Sourcepub fn target(&self) -> Option<(Vec<Element>, Element)>
pub fn target(&self) -> Option<(Vec<Element>, Element)>
Get the target of the reference
Returns the targt element of the instance reference, as well as the context elements that are needed to uniquely identify the target.
Sourcepub fn set_index(
&self,
index: Option<u64>,
) -> Result<(), AutosarAbstractionError>
pub fn set_index( &self, index: Option<u64>, ) -> Result<(), AutosarAbstractionError>
set the index of the reference
If the reference definition has requiresIndex
set to true
, then the reference
must have an index. Otherwise the index is meaningless.
Sourcepub fn index(&self) -> Option<u64>
pub fn index(&self) -> Option<u64>
get the index of the reference
If the reference definition has requiresIndex
set to true
, then the reference
must have an index. Otherwise the index is meaningless.
Sourcepub fn set_is_auto_value(
&self,
is_auto_value: Option<bool>,
) -> Result<(), AutosarAbstractionError>
pub fn set_is_auto_value( &self, is_auto_value: Option<bool>, ) -> Result<(), AutosarAbstractionError>
set the isAutoValue flag
If the reference definition has withAuto
set to true
, then the reference is allowed to have an auto value.
Sourcepub fn is_auto_value(&self) -> Option<bool>
pub fn is_auto_value(&self) -> Option<bool>
get the isAutoValue flag
Trait Implementations§
Source§impl Clone for EcucInstanceReferenceValue
impl Clone for EcucInstanceReferenceValue
Source§fn clone(&self) -> EcucInstanceReferenceValue
fn clone(&self) -> EcucInstanceReferenceValue
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for EcucInstanceReferenceValue
impl Debug for EcucInstanceReferenceValue
Source§impl From<EcucInstanceReferenceValue> for Element
impl From<EcucInstanceReferenceValue> for Element
Source§fn from(val: EcucInstanceReferenceValue) -> Self
fn from(val: EcucInstanceReferenceValue) -> Self
Source§impl Hash for EcucInstanceReferenceValue
impl Hash for EcucInstanceReferenceValue
Source§impl TryFrom<Element> for EcucInstanceReferenceValue
impl TryFrom<Element> for EcucInstanceReferenceValue
impl Eq for EcucInstanceReferenceValue
impl StructuralPartialEq for EcucInstanceReferenceValue
Auto Trait Implementations§
impl Freeze for EcucInstanceReferenceValue
impl !RefUnwindSafe for EcucInstanceReferenceValue
impl Send for EcucInstanceReferenceValue
impl Sync for EcucInstanceReferenceValue
impl Unpin for EcucInstanceReferenceValue
impl !UnwindSafe for EcucInstanceReferenceValue
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.