From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,64fe8f87aae99538 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!m71g2000hse.googlegroups.com!not-for-mail From: Maciej Sobczak Newsgroups: comp.lang.ada Subject: Re: How to return an empty aggregate Date: Sun, 6 Apr 2008 13:04:55 -0700 (PDT) Organization: http://groups.google.com Message-ID: <4683ef29-28aa-47a1-9603-114666c15eab@m71g2000hse.googlegroups.com> References: <945217e8-ec37-4a33-9847-28e8e7d55798@59g2000hsb.googlegroups.com> <2c23eecd-d5bf-4320-b0cd-a45b584ddfe3@m36g2000hse.googlegroups.com> <922ed137-6353-4b11-b7cd-03987ef6896b@e39g2000hsf.googlegroups.com> NNTP-Posting-Host: 85.3.234.135 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1207512296 15005 127.0.0.1 (6 Apr 2008 20:04:56 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sun, 6 Apr 2008 20:04:56 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: m71g2000hse.googlegroups.com; posting-host=85.3.234.135; posting-account=bMuEOQoAAACUUr_ghL3RBIi5neBZ5w_S User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13,gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:20851 Date: 2008-04-06T13:04:55-07:00 List-Id: On 6 Kwi, 09:00, george.p...@gmail.com wrote: > You receive the events for logging but you don't want > 5,000,000 records of the same to go in when some device malfunctions. > You rather want first 10, and something stating that this is serious > condition, etc. Is there a way to use stateless adapter or you have to > have a context? There is a way to have a filter Log that feeds its selected output into another Log'Class - and that second Log object can be whatever, including empty null log. Hint: essentially you want some Ada equivalent of the following pipe construct: $ someprogram | head > somefile.log which in some particular case might become just: $ someprogram | head > /dev/null as opposed to direct: $ someprogram > somefile.log or: $ someprogram > /dev/null The presence of "head" filter changes nothing in the applicability of / dev/null - that's why, in Ada terms, it can always have the same implementation: type Null_Log is new Log with null record. -- Maciej Sobczak * www.msobczak.com * www.inspirel.com