|
Telescience Resource Kit
TReK C++
5.4.0 ART
|
This class determine a parameter's dependency a series of dependencies of which all must be true. More...
#include <and_dependency.h>
Inherits trek::Dependency.
Public Member Functions | |
int32_t | LoadFile (const char *filename) |
Loads the AndDependency definition from the specified file. More... | |
int32_t | SaveFile (const char *filename) |
Saves the AndDependency definition to the specified file. More... | |
Constructors, Destructor, and Other Basic Methods | |
AndDependency () | |
Default constructor of the class. | |
AndDependency (AndDependency &input) | |
Copy constructor of the class. | |
virtual | ~AndDependency () |
Class destructor. More... | |
virtual Dependency * | Clone () |
Creates and returns an extact copy of the object. | |
void | operator= (AndDependency &right_side) |
Provides the equal operator. | |
Dependency Methods | |
int32_t | AddDependency (Dependency *item) |
Adds a dependency. More... | |
int32_t | RemoveDependency (uint32_t index) |
Removes the dependency at the specified index. More... | |
void | ClearAllDependencies () |
Removes all of the dependencies. More... | |
uint32_t | GetNumberOfDependencies () |
Gets the number of dependencies. More... | |
int32_t | GetDependency (uint32_t index, Dependency **dep_ptr) |
Gets the dependency at the specified index. More... | |
virtual bool | Check () |
Checks for the dependency. More... | |
virtual int32_t | ConfigureParameter (Packet *input) |
![]() | |
enum dependency_type | GetType () |
Returns an enumeration for the type of dependency. | |
const char * | GetDependencyParameter () |
Returns the parameter to use for the counter. | |
Dependency () | |
Default constructor of the class. | |
Dependency (Dependency &input) | |
Copy constructor of the class. | |
virtual | ~Dependency () |
Class destructor. More... | |
void | operator= (Dependency &right_side) |
Provides the equal operator. | |
virtual void | Init () |
Initializes the object. | |
![]() | |
void | SetName (const char *input_ptr) |
Sets the name of the item. More... | |
void | SetAlias (const char *input) |
Sets the alias of the item. More... | |
void | SetShortDescription (const char *input_ptr) |
Sets the short description of the item. More... | |
void | SetLongDescription (const char *input_ptr) |
Sets the long description of the item. More... | |
void | SetUserDescription (const char *input_ptr) |
Sets the user description of the item. More... | |
void | SetOwner (const char *input_ptr) |
Sets the owner of the item. More... | |
void | SetPath (const char *input_ptr) |
Sets the path for the item. More... | |
const char * | GetName () |
Returns the name of the item. | |
const char * | GetAlias () |
Returns the alias of the item. | |
const char * | GetShortDescription () |
Returns the short description of the item. | |
const char * | GetLongDescription () |
Returns the long description of the item. | |
const char * | GetUserDescription () |
Returns the user description of the item. | |
const char * | GetOwner () |
Returns the owner of the item. | |
const char * | GetPath () |
Returns the path for the item. | |
int32_t | AddAttribute (const char *name, const char *value) |
Adds an attribute to the item. More... | |
void | GetAttributeList (StringArray &attr_array) |
Gets a list of the attribute names. More... | |
int32_t | GetAttribute (const char *name, char *value, uint32_t &value_len) |
Get the value of the specified attribute. More... | |
NamedItem () | |
Default constructor of the class. | |
NamedItem (NamedItem &input) | |
Copy constructor of the class. | |
virtual | ~NamedItem () |
Class destructor. More... | |
void | operator= (NamedItem &right_side) |
Provides the equal operator. | |
bool | operator== (NamedItem &right_side) |
Provides the == operator. | |
This class determine a parameter's dependency a series of dependencies of which all must be true.
|
virtual |
Class destructor.
Removes all resources created with this instance of the class.
int32_t trek::AndDependency::AddDependency | ( | Dependency * | item | ) |
Adds a dependency.
[in] | item | The dependency to add. A copy is made of the object and it is safe to delete the input. |
Example:
|
virtual |
Checks for the dependency.
Checks to see if all of the dependency items are true.
Example:
Implements trek::Dependency.
void trek::AndDependency::ClearAllDependencies | ( | ) |
Removes all of the dependencies.
Example:
int32_t trek::AndDependency::GetDependency | ( | uint32_t | index, |
Dependency ** | dep_ptr | ||
) |
Gets the dependency at the specified index.
If successful the method returns the internal dependency at the requested index. The memory should not be deleted as it is still used by the class.
[in] | index | The index to retreive |
[in] | dep_ptr | The found dependency. Only set if return code indicates success. |
Example:
uint32_t trek::AndDependency::GetNumberOfDependencies | ( | ) |
Gets the number of dependencies.
Example:
int32_t trek::AndDependency::LoadFile | ( | const char * | filename | ) |
Loads the AndDependency definition from the specified file.
Reads an XML format for the AndDependency. It can be written in with SaveFile.
[in] | filename | The file to load the parameter object from. |
Example:
int32_t trek::AndDependency::RemoveDependency | ( | uint32_t | index | ) |
Removes the dependency at the specified index.
[in] | index | The index to remove. |
Example:
int32_t trek::AndDependency::SaveFile | ( | const char * | filename | ) |
Saves the AndDependency definition to the specified file.
Writes an XML format for the AndDependency. It can be read in with LoadFile.
[in] | filename | The file to save the parameter object to. |
Example: