diff options
Diffstat (limited to 'TAO/orbsvcs/orbsvcs/Trader/Preference_Interpreter.h')
-rw-r--r-- | TAO/orbsvcs/orbsvcs/Trader/Preference_Interpreter.h | 89 |
1 files changed, 0 insertions, 89 deletions
diff --git a/TAO/orbsvcs/orbsvcs/Trader/Preference_Interpreter.h b/TAO/orbsvcs/orbsvcs/Trader/Preference_Interpreter.h deleted file mode 100644 index c9a24c16908..00000000000 --- a/TAO/orbsvcs/orbsvcs/Trader/Preference_Interpreter.h +++ /dev/null @@ -1,89 +0,0 @@ -/* -*- C++ -*- */ - -// ======================================================================== -// $Id$ -// -// = LIBRARY -// orbsvcs -// -// = FILENAME -// Preference_Interpreter.h -// -// = AUTHOR -// Seth Widoff <sbw1@cs.wustl.edu> -// -// ======================================================================== - -#ifndef TAO_PREFERENCE_INTERPRETER_H -#define TAO_PREFERENCE_INTERPRETER_H - -#include "Interpreter.h" -#include "Constraint_Evaluator.h" -#include "Constraint_Validator.h" - -class TAO_Preference_Interpreter : public TAO_Interpreter -// = TITLE -// The TAO_Preference_Interpreter will, given a valid preference -// string and offers, will order the offers based on the offers' -// compliance with the preferences. -// -// = DESCRIPTION -// Each time the order_offer method is invoked, the -// TAO_Preference_Interpreter stores the offer reference in the -// order dictated by its evaluation of the preference string. After -// the TAO_Preference_Interpreter client has finished ordering all -// the offers, it will extract the offers in order using the -// remove_offer method. -{ -public: - - TAO_Preference_Interpreter(CosTradingRepos::ServiceTypeRepository::TypeStruct* ts, - const char* preference, - CORBA::Environment& env) - TAO_THROW_SPEC ((CosTrading::Lookup::IllegalPreference)); - - TAO_Preference_Interpreter(TAO_Constraint_Validator& validator, - const char* preference, - CORBA::Environment& env) - TAO_THROW_SPEC ((CosTrading::Lookup::IllegalPreference)); - - // Parse the preference string, determining first if it's - // valid. Throw an IllegalPreference exception if the preference - // doesn't conform to the BNF grammar for preferences. - - ~TAO_Preference_Interpreter(void); - // Destructor - - void order_offer (CosTrading::OfferId offer_id, - CosTrading::Offer* offer); - - void order_offer (CosTrading::OfferId offer_id, - CosTrading::Offer* offer, - TAO_Constraint_Evaluator& evaluator); - // Evaluate the offer, and order it internally based on the results - // of the evaluation. - - int remove_offer (CosTrading::OfferId& offer_id, - CosTrading::Offer*& offer); - // Remove the next offer. The offer returned will be the next in the - // ordering determined by the preference string. - - int num_offers(void); - // Return the number of offers remaining in the ordering. - -private: - - struct Preference_Info - { - CORBA::Boolean evaluated_; - TAO_Literal_Constraint value_; - CosTrading::OfferId offer_id_; - CosTrading::Offer* offer_; - }; - - typedef ACE_Unbounded_Queue<Preference_Info> Ordered_Offers; - - Ordered_Offers offers_; -}; - -#endif /* TAO_PREFERENCE_INTERPRETER_H */ |