Logo
Telescience Resource Kit
TReK Python  5.4.0 ART
AndDependency Class Reference

This class determine a parameter's dependency by checking a series of dependencies of which all must be true. More...

Inherits Dependency.

Public Member Functions

Initialize / Finalize

Functions handling class initialization and finalization.

def AndDependency ( Optional[AndDependency] and_dependency=None, Optional[c_void_p] native_ptr=None, is_clone: bool=False -> def ) -> def 
 Class initializer. More...
 
def clone ( -> AndDependency ) -> def 
 Creates a new instance of the object with the same contents.
 
def copy (copy_from: object -> None ) -> def 
 Copies the contents of the provided 'copy_from' AndDependency. More...
 
def load_file (filename: str -> None ) -> def 
 Loads the AndDependency definition from the specified file. More...
 
def save_file (filename: str -> None ) -> def 
 Saves the AndDependency definition to the specified file. More...
 
AndDependency Settings

Functions handling AndDependency Settings.

def add_dependency (dependency: Dependency -> None ) -> def 
 Adds a dependency. More...
 
def check ( -> bool ) -> def 
 Checks for the dependency. More...
 
def clear_all_dependencies ( -> None ) -> def 
 Removes of the dependencies.
 
def get_dependency (index: int -> Union[Dependency, None] ) -> def 
 Gets the dependency at the specified index. More...
 
def get_number_of_dependencies ( -> int ) -> def 
 Gets the number of dependencies. More...
 
def remove_dependency (index: int -> None ) -> def 
 Removes the dependency at the specified index. More...
 
- Public Member Functions inherited from Dependency
def AndDependency ( -> None ) -> def 
 Class initializer. More...
 
def get_type ( -> DependencyType ) -> def 
 Gets the type of Dependency. More...
 
- Public Member Functions inherited from NamedItem
def remove_all_attributes ( -> None ) -> def 
 Removes all attributes.
 
def remove_attribute (name: str -> None ) -> def 
 Removes the attribute by name. More...
 
def __eq__ (named_item: object -> bool ) -> def 
 Equality operator "==". More...
 
def initialize ( -> None ) -> def 
 Initializes the object. More...
 
def add_attribute (name: str, value: str -> None ) -> def 
 Adds an attribute to the item. More...
 
def get_alias ( -> str ) -> def 
 Returns the alias of the item. More...
 
def get_attribute (name: str -> str ) -> def 
 Get the value of the specified attribute. More...
 
def get_attribute_list ( -> list[str] ) -> def 
 Gets a list of the attribute names. More...
 
def get_name ( -> str ) -> def 
 Returns the name of the item. More...
 
def get_long_description ( -> str ) -> def 
 Returns the long description of the item. More...
 
def get_short_description ( -> str ) -> def 
 Returns the short description of the item. More...
 
def get_user_description ( -> str ) -> def 
 Returns the user description of the item. More...
 
def get_owner ( -> str ) -> def 
 Returns the owner of the item. More...
 
def get_path ( -> str ) -> def 
 Returns the path for the item. More...
 
def set_name (name: str -> None ) -> def 
 Sets the name of the item. More...
 
def set_alias (alias: str -> None ) -> def 
 Sets the alias of the item. More...
 
def set_short_description (description: str -> None ) -> def 
 Sets the short description of the item. More...
 
def set_long_description (description: str -> None ) -> def 
 Sets the long description of the item. More...
 
def set_user_description (description: str -> None ) -> def 
 Sets the user description of the item. More...
 
def set_owner (owner: str -> None ) -> def 
 Sets the owner of the item. More...
 
def set_path (path: str -> None ) -> def 
 Sets the path of the item. More...
 

Detailed Description

This class determine a parameter's dependency by checking a series of dependencies of which all must be true.

Constructor & Destructor Documentation

◆ AndDependency()

(and_dependency : Optional[AndDependency]  
native_ptr : Optional[c_void_p]  
is_clone : bool  
) -> def

Class initializer.

Parameters
[in]and_dependencyAndDependency to create a copy (optional). By default, initializes a new instance.
[in]native_ptr(Optional) Internal parameter, do not provide.
[in]is_clone(Optional) Internal parameter, do not provide.

Reimplemented from Dependency.

Member Function Documentation

◆ add_dependency()

(dependency : Dependency ) -> None

Adds a dependency.

Parameters
[in]dependencyThe dependency to add. A copy is made of the object.

◆ check()

() -> bool

Checks for the dependency.

Checks to see if all of the dependency items are true.

◆ copy()

(copy_from : object ) -> None

Copies the contents of the provided 'copy_from' AndDependency.

Parameters
[in]copy_fromAndDependency to copy from.
Exceptions
TypeErrorif 'copy_from' is not a AndDependency.

Reimplemented from NamedItem.

◆ get_dependency()

(index : int ) -> Union[Dependency, None]

Gets the dependency at the specified index.

If successful the method returns the internal dependency at the requested index.

Parameters
[in]indexThe index to retrieve.
Returns
The found dependency or None if not found.

◆ get_number_of_dependencies()

() -> int

Gets the number of dependencies.

Returns
The number of dependencies.

◆ load_file()

(filename : str ) -> None

Loads the AndDependency definition from the specified file.

Reads an XML AndDependency.

Parameters
[in]filenameThe file from which to load the AndDependency object.

◆ remove_dependency()

(index : int ) -> None

Removes the dependency at the specified index.

Parameters
indexThe index to remove.
Exceptions
TrekError15007 - TREK_DATA_DOES_NOT_EXIST

◆ save_file()

(filename : str ) -> None

Saves the AndDependency definition to the specified file.

Writes an XML AndDependency.

Parameters
[in]filenameThe file to save the and dependency object.