PG_Default_Property_Validator.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  * @file PG_Default_Property_Validator.h
00006  *
00007  * $Id: PG_Default_Property_Validator.h 77001 2007-02-12 07:54:49Z johnnyw $
00008  *
00009  * @author Ossama Othman <ossama@uci.edu>
00010  */
00011 //=============================================================================
00012 
00013 #ifndef TAO_PG_DEFAULT_PROPERTY_VALIDATOR_H
00014 #define TAO_PG_DEFAULT_PROPERTY_VALIDATOR_H
00015 
00016 #include /**/ "ace/pre.h"
00017 
00018 #include "orbsvcs/PortableGroup/portablegroup_export.h"
00019 #include "orbsvcs/PortableGroupC.h"
00020 
00021 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00022 #pragma once
00023 #endif /* ACE_LACKS_PRAGMA_ONCE */
00024 
00025 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00026 
00027 /**
00028  * @class TAO_PG_Default_Property_Validator
00029  *
00030  * @brief Default property validator implementation.
00031  *
00032  * This Property_Validator verifies that all properties defined in the
00033  * PortableGroup IDL module are valid. This property validator can be
00034  * subclassed to validate a different property set.
00035  */
00036 class TAO_PortableGroup_Export TAO_PG_Default_Property_Validator
00037 {
00038 public:
00039 
00040   /// Constructor.
00041   TAO_PG_Default_Property_Validator (void);
00042 
00043   /// Destructor
00044   virtual ~TAO_PG_Default_Property_Validator (void);
00045 
00046   /// Validate the given properties.  Throw an exception when the
00047   /// first invalid property is encountered.  The remaining properties
00048   /// will not be validated.
00049   virtual void validate_property (const PortableGroup::Properties & props);
00050 
00051   /// Validate the given properties/criteria.  All criteria
00052   /// will be validated regardless of whether or not an invalid
00053   /// property was encountered.
00054   virtual void validate_criteria (const PortableGroup::Properties & criteria);
00055 
00056 private:
00057 
00058   /**
00059    * @name Pre-initialize property Names.
00060    *
00061    * These properties are pre-initialized once to reduce property
00062    * validation overhead.  Note that the InitialNumberReplicas and
00063    * MinimumNumberReplicas properties are not validated since there are
00064    * no restrictions imposed by TAO's PortableGroup implementation
00065    * regarding the number of such members.
00066    */
00067   //@{
00068   PortableGroup::Name membership_;
00069   PortableGroup::Name factories_;
00070   //@}
00071 
00072 };
00073 
00074 TAO_END_VERSIONED_NAMESPACE_DECL
00075 
00076 #include /**/ "ace/post.h"
00077 
00078 #endif  /* TAO_PG_PROPERTY_VALIDATOR_H */

Generated on Tue Feb 2 17:49:50 2010 for TAO_PortableGroup by  doxygen 1.4.7