comp.lang.ada
 help / color / mirror / Atom feed
From: "Ioannis Vranos" <ivr@guesswh.at.emails.ru>
Subject: Re: "Ravenscar-like" profile for C/C++
Date: Mon, 26 Apr 2004 04:14:26 +0300
Date: 2004-04-26T04:14:26+03:00	[thread overview]
Message-ID: <c6hnpg$tio$1@ulysses.noc.ntua.gr> (raw)
In-Reply-To: ev7o80lpud3gfmicusomjs5std2a0dimga@4ax.com

"Jack Klein" <jackklein@spamcop.net> wrote in message
news:ev7o80lpud3gfmicusomjs5std2a0dimga@4ax.com...
>
> The phrase you used in the part of your overly long
> pedantic message that I snipped, "mission critical applications", is
> not, never has been, and never will be remotely similar.  In fact, it
> is nothing more than a marketing buzz word.


Why marketing buzz word? You can do something like:


#include <fstream>
#include <string>
#include <cctype>


class DictionaryFileException
{
};


class dictionaryFile
{
 std::ifstream dicFile;
 std::string dicFileName;

public:
 dictionaryFile(const std::string &filePath) throw (DictionaryFileException)
 {
  dicFileName=filePath;
  dicFile.open(filePath.c_str());

  if(dicFile.fail())
     throw DictionaryFileException();

  FileValidation();
 }

 void FileValidation() throw (DictionaryFileException)
 {
  using namespace std;

  char input[256];

  do
  {
   dicFile.get(input,256);

   if(isspace(input[0]) or (input[0]=='\\' and input[1]=='\\'))
    continue;

   else if(!isalpha(input[0]) and !isdigit(input[0]))
    throw DictionaryFileException();

  }while(!dicFile.eof());
 }
};



C++ provides the necessary structures to built very reliable, efficient and
mission critical systems. In the above i define what exceptions are expected
from each member function, and we can also use the Resrource Aquisition is
Initializatization technique which the standard library itself also uses.






Ioannis Vranos




  reply	other threads:[~2004-04-26  1:14 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-25 13:23 "Ravenscar-like" profile for C/C++ Marc Le Roy
2004-04-25 19:43 ` Marc Le Roy
2004-04-25 20:30 ` Jack Klein
     [not found] ` <c6gked$1ha4$1@ulysses.noc.ntua.gr>
2004-04-25 20:31   ` Jack Klein
2004-04-26  1:14     ` Ioannis Vranos [this message]
2004-04-26  5:48       ` Martin Krischik
2004-04-26 11:06         ` Michiel Salters
2004-04-26 11:08           ` Vinzent 'Gadget' Hoefler
2004-04-26 11:13             ` Vinzent 'Gadget' Hoefler
     [not found]             ` <fcaee77e.0405050140.6d3a5b7b@posting.google.com>
     [not found]               ` <p8ih90tob4d617h6tjev9d0jmj20h716lu@jellix.jlfencey.com>
2004-05-05 17:44                 ` Martin Dowie
2004-05-06 17:22                   ` Peter Amey
2004-05-06 21:06                     ` Martin Dowie
2004-05-15  2:27                     ` Alexander Kopilovitch
     [not found] ` <c6gkip$1hhv$1@ulysses.noc.ntua.gr>
     [not found]   ` <408c0ce4$0$15674$626a14ce@news.free.fr>
2004-04-25 20:37     ` Jack Klein
2004-04-26  5:40       ` Martin Krischik
2004-05-05  6:22       ` Craig Carey
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox