Port_type

Template class for creating a class which gives data_pack_type

[ libohymos | Source | Keywords | Summary | Ancestors | All Members | Descendants ]

Quick Index

DESCRIPTION

Class Summary

template <class T>
class Port_type
{

public:
Port_type(void) ;
~Port_type(void) ;
protected:
static char* data_pack_type;
}; // Port_type

Back to the top of Port_type


DESCRIPTION

Template class Port_type< T> has character string "data_pack_type" as a data member in which the name of datapack type will be stored.

テンプレートクラス Port_type< T> は、datapack の型名を格納する変 数data_pack_type をデータメンバとするクラスです。

端子 (Port) の型をその端子が取りあつかう datapack の型名で表します。

Template classes Send< T>, Receive< T>, ReceiveNointp< T>, Relay< T>, I_file< T>, O_file< T> will be derived using multi-inheritance from this class Port_type< T> and Receive_port, Send_port, Relay_port, Input_file, Output_file, respectively. For example, Send< T> will be derived from Send< T> and Send_port.

テンプレータクラス Send< T>, Receive< T>, ReceiveNointp< T>, Relay< T>, I_file< T>, O_file< T> が、それぞれ、 Receive_port, Send_port, Relay_port, Input_file, Output_file と このテンプレートクラス Port_type< T> とを多重継承して作成 されます。

例えば、Send< T> は、Send_port とPort_type< T> とを多重継承して作成されます。

    Object <-- Port <-- Sender_port <-- Send_port <--+-- Send<T>
                                                     |
                                     Port_type<T> <--+

In Receive< T>, Send< T>, Relay< T>, ..., the pure virtual function Data_pack_type(void) declared in class Port will be implemented so it returns Port_type< T>::data_pack_type.

This implementation of Data_pack_type makes certain that all the ports Receive< T>, Send< T>, ... which treat the same data type Data< T> returns the same string.

実際に使われることになる基本的な端子型 Port_type< double>, Port_type< int>, Port_type< long>, Port_type< OHymosString> は、p_itmp.cc で、instantiate されます。すなわち、 p_itmp.cc の中に

      template class Port_type<double>;
      template class Port_type<float>;
      template class Port_type<int>;
      template class Port_type<long>;
      template class Port_type<OHyMosString>;
      char* Port_type<double>::data_pack_type = "double";
      char* Port_type<float>::data_pack_type = "float";
      char* Port_type<int>::data_pack_type = "int";
      char* Port_type<long>::data_pack_type = "long";
      char* Port_type<OHyMosString>::data_pack_type = "OHyMosString";

と記述してあります。

Back to the top of Port_type


char* data_pack_type;

Data member. Name of the datapack type

  static char* data_pack_type;

Back to the top of Port_type


Port_type(void) ;

Constructor

  Port_type(void)   
;

Function is currently defined inline.


Back to the top of Port_type


~Port_type(void) ;

Destructor

  ~Port_type(void)   
;

Function is currently defined inline.


Back to the top of Port_type


All Members

public:
protected:
static char* data_pack_type;

Back to the top of Port_type


Ancestors

Class does not inherit from any other class.

Back to the top of Port_type


Descendants

Back to the top of Port_type


Generated from source by the Cocoon utilities on Sun Sep 3 22:52:04 2000 .

Report problems to jkotula@stratasys.com