Laszlo, Yes. Please add to MdePkg.dec at end of [PcdsFeatureFlag] section.
For the PCD name, the closest existing example in the MdePkg is the following PCD associated with extra checks in the BaseLib linked list APIs. ## If TRUE, a check will be made to see if a specified node is a member of linked list # in the following BaseLib fucntions: GetNextNode(), IsNull(), IsNodeAtEnd(), # SwapListEntries() gEfiMdePkgTokenSpaceGuid.PcdVerifyNodeInList|FALSE|BOOLEAN|0x00000028 Maybe the name should be gEfiMdePkgTokenSpaceGuid.PcdVerifyOrderedCollection or gEfiMdePkgTokenSpaceGuid.PcdValidateOrderedCollection I agree that the token number should be 0x0000002a. Thanks, Mike -----Original Message----- From: Laszlo Ersek [mailto:ler...@redhat.com] Sent: Wednesday, August 06, 2014 11:13 AM To: edk2-devel@lists.sourceforge.net Subject: Re: [edk2] [PATCH v2 1/3] MdePkg: introduce OrderedCollectionLib library class On 08/06/14 19:50, Kinney, Michael D wrote: > Laszlo, > > I do have a suggestion on the Validate() API. > > I recommend you add a Feature Flag PCD to enable/disable API > validation with the default value being FALSE, and the lib instance > can call the internal-only Validate() API after each operation from > within the lib instance itself in all locations you think a > validation is useful based on the Feature Flag PCD being enabled. > This way, when you need to do unit testing, you can enable this > Feature Flag PCD in the DSC file that builds the unit test, so > ASSERT() will be generated if validation fails during the unit test. > This avoids the need to provide Validate() as a public API in any lib > class. Perfect :) I assume I should add this PCD to MdePkg.dec, to the end of the [PcdsFeatureFlag] section. Can you please suggest a name for it? "PcdOrderedCollectionLibValidate" seems reasonable to me. Also, the token 0x0000002a seems unoccupied, can I use that? ## If TRUE, OrderedCollectionLib is instructed to validate the # ORDERED_COLLECTION structure at the end of such operations # (typically structure modifications) that justify validation of the # structure for unit testing purposes. gEfiMdePkgTokenSpaceGuid.PcdOrderedCollectionLibValidate|FALSE|BOOLEAN|0x0000002a Does that look acceptable? Thanks! Laszlo ------------------------------------------------------------------------------ Infragistics Professional Build stunning WinForms apps today! Reboot your WinForms applications with our WinForms controls. Build a bridge from your legacy apps to the future. http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk _______________________________________________ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel ------------------------------------------------------------------------------ Infragistics Professional Build stunning WinForms apps today! Reboot your WinForms applications with our WinForms controls. Build a bridge from your legacy apps to the future. http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk _______________________________________________ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel