diff options
author | Elliott Dahle <dedahle@us.ibm.com> | 2014-02-12 16:17:24 -0600 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2014-02-13 13:01:04 -0600 |
commit | ecfc6a3a5aa975d7c72b940f5a5c1d969dfb6712 (patch) | |
tree | fae8b1ef4505bbcb2a0ee2843de724c82da6f6a4 /src/include/usr/targeting/common/predicates | |
parent | 66fdd0c61ee4ed4d3bf8254d03ede6b7fb4601a9 (diff) | |
download | talos-hostboot-ecfc6a3a5aa975d7c72b940f5a5c1d969dfb6712.tar.gz talos-hostboot-ecfc6a3a5aa975d7c72b940f5a5c1d969dfb6712.zip |
Tul63fp failing on istep hb_config_update of istep 0
Change-Id: Ie3b509b31d3067fe34be7930eb4e1beec4d8383b
CQ:SW245920
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/8806
Tested-by: Jenkins Server
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/include/usr/targeting/common/predicates')
-rw-r--r-- | src/include/usr/targeting/common/predicates/predicateisnonfunctional.H | 111 | ||||
-rw-r--r-- | src/include/usr/targeting/common/predicates/predicates.H | 3 |
2 files changed, 113 insertions, 1 deletions
diff --git a/src/include/usr/targeting/common/predicates/predicateisnonfunctional.H b/src/include/usr/targeting/common/predicates/predicateisnonfunctional.H new file mode 100644 index 000000000..86b754741 --- /dev/null +++ b/src/include/usr/targeting/common/predicates/predicateisnonfunctional.H @@ -0,0 +1,111 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/include/usr/targeting/common/predicates/predicateisnonfunctional.H $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* COPYRIGHT International Business Machines Corp. 2014 */ +/* */ +/* p1 */ +/* */ +/* Object Code Only (OCO) source materials */ +/* Licensed Internal Code Source Materials */ +/* IBM HostBoot Licensed Internal Code */ +/* */ +/* The source code for this program is not published or otherwise */ +/* divested of its trade secrets, irrespective of what has been */ +/* deposited with the U.S. Copyright Office. */ +/* */ +/* Origin: 30 */ +/* */ +/* IBM_PROLOG_END_TAG */ +#ifndef __TARGETING_COMMON_PREDICATEISNONFUNCTIONAL_H +#define __TARGETING_COMMON_PREDICATEISNONFUNCTIONAL_H +/** + * @file targeting/common/predicates/predicateisnonfunctional.H + * + * PredicateIsNonFunctional class, used to filter targets for HWP wrapper. + * From the example tutorial page at + * https://w3-connections.ibm.com/wikis/home?lang=en_US#/wiki/Host%20Boot/page/Target%20And%20Attribute%20Usage%20Guide + * : + * Create Custom Predicate + * Take the following predicate "template" and customize to your needs. + * Make sure to: + * 1) Rename the class in the appropriate places + * 2) Implement the operator() function which should return "true" if + * the given Target matches the predicate criteria, false otherwise + * 3) Add any input arguments to the constructor, and any necessary + * private variables to store state + * 4) Implement the destructor, if needed + * 5) Update documentation + * + * See example in src/include/usr/targeting/predicate/predicatectm.H + * (and usr/targeting/predicate/predicatectm.C) + * + */ + + +/******************************************************************************/ +// Includes +/******************************************************************************/ +#include <stdint.h> + +// targeting support. +#include <targeting/common/attributes.H> +#include <targeting/common/entitypath.H> +#include <targeting/common/target.H> +#include <targeting/common/targetservice.H> +#include <targeting/common/iterators/rangefilter.H> +#include <targeting/common/predicates/predicatectm.H> + + +namespace TARGETING +{ + +class PredicateIsNonFunctional : public PredicateBase +{ + +public: + + /** + * @brief Create a predicate to select targets that + * are marked non-functional. + * + * @param[in] i_requirepresent + * Bool indicating whether to select targets which + * are present and non-functional (true)(default), or + * to select all non-functioal targets, regardless of + * present state (false) + */ + PredicateIsNonFunctional(bool i_requirePresent = true); + + + /** + * @brief Destroy the predicate + */ + virtual ~PredicateIsNonFunctional(); + + /** + * @brief returns true if target is marked non-functional + * + * @param[in] i_pTarget + * Handle to the target to perform the predicate check on + * + * @return bool indicating whether target is non-functional or not + */ + bool operator()(const TARGETING::Target* i_pTarget) const ; + +private: + + // Whether to return targets who are present and non-functional (true) + // or to return all non-functional targets, regardless of present state + // (false) + bool iv_requirePresent; + + TARG_DISABLE_COPY_AND_ASSIGNMENT_OPERATORS(PredicateIsNonFunctional); +}; + +}; // end namespace + +#endif // __TARGETING_COMMON_PREDICATEISNONFUNCTIONAL_H diff --git a/src/include/usr/targeting/common/predicates/predicates.H b/src/include/usr/targeting/common/predicates/predicates.H index 8c422b036..b62b9f843 100644 --- a/src/include/usr/targeting/common/predicates/predicates.H +++ b/src/include/usr/targeting/common/predicates/predicates.H @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2012,2013 */ +/* COPYRIGHT International Business Machines Corp. 2012,2014 */ /* */ /* p1 */ /* */ @@ -36,6 +36,7 @@ #include <targeting/common/predicates/predicatehwaschanged.H> #include <targeting/common/predicates/predicatepostfixexpr.H> #include <targeting/common/predicates/predicateattrval.H> +#include <targeting/common/predicates/predicateisnonfunctional.H> // please keep up to date... |