从Ada程序到C ++程序的管道传输 [英] Piping to/from Ada program to a C++ program

查看:59
本文介绍了从Ada程序到C ++程序的管道传输的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我以前在C/C ++中使用过管道,但是我正在使用一些旧式Ada代码设置管道...但是,我仍然与Ada处于学习"阶段,但我仍然有很多事情不做.还不知道.

I have used pipes in C/C++ before but I'm working on setting up a pipe in some legacy Ada code...however I am still in the "learning" phase with Ada and there's a lot I still don't yet know.

话虽这么说,我一直在努力弄清Ada中的管道是如何设置和安装的.如何去使用它们.到目前为止,我只发现了这些文章:

That being said, I've been trying to figure out how pipes in Ada are setup & how to go about using them. I've only found these articles thus far:

  1. 用于Unix子进程和管道的Ada 95厚绑定
  2. 包装:Util.Pipes
  3. 管道-ada-util .
  1. A Thick Ada 95 Binding for Unix Child Processes and Pipes
  2. Package: Util.Pipes
  3. Pipes - ada-util.

不要误会我,他们拥有很多知识,但是1适用于Ada95(我有能力编译到Ada05),2仅列出了功能,& 3的解释方式很少.

Don't get me wrong they have a lot of good knowledge in them, but 1 is geared towards Ada95 (I have the ability to compile up to Ada05), 2 just lists the functions, & 3 offers little in the way of explanation.

有人知道Ada管道的教程吗?或者更好的是,有人可以举一个简单的例子说明如何在Ada中实现一个简单管道吗?

Does anyone know of a tutorial for Ada pipes? Or better yet, could someone give a quick example of how to implement a simple pipe in Ada?

我意识到这不是最理想的问题,但是我已经用完了"Google Combinations" ...

I realize that this is not the most ideal question to ask, but I'm running out of "Google Combinations"...

推荐答案

您可能对Streams更加感兴趣- http://en.wikibooks.org/wiki/Ada_Programming/Input_Output/Stream_Tutorial

You might be more interested in Streams -- http://en.wikibooks.org/wiki/Ada_Programming/Input_Output/Stream_Tutorial

尤其是,如果您制作了将流绑定到管道的程序包,则可以使用Type_Name'Read(stream,object)& Type_Name'Write(stream,object).

Especially since, if you make a package that binds a stream to a pipe you get free access with Type_Name'Read( stream, object ) & Type_Name'Write( stream, object ).

这篇关于从Ada程序到C ++程序的管道传输的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆