bonjour,
je me retrouve confronter a une erreur dans la quelle je patauge un peu.
avec toute les classes déclarer :
Code : Sélectionner tout - Visualiser dans une fenêtre à part ref class CONNEXION : public AT_COMMAND , public GPIB , public LAN , public RS232 , public USB
et la problème!!!
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6 ref class USB ref class RS232 ref class LAN ref class GPIB ref class AT_COMMAND
si je déclare toutes les classe sans "ref", ca compile mais la je ne peu plus utiliser des types "manager" de la classe System::String mais je doit utiliser de std::string.Error 1 error C2890: 'CONNEXION' : a ref class can only have one non-interface base class c:\_ddm\atop_charact_test_automation\branches\ferez_acita_tlmt4064\code\inci\connexion.h 67
Error 2 error C4368: cannot define 'stringCONNEXIONType' as a member of managed 'CONNEXION': mixed types are not supported c:\_ddm\atop_charact_test_automation\branches\ferez_acita_tlmt4064\code\inci\connexion.h 93
Error 3 error C4368: cannot define 'stringCONNEXIONName' as a member of managed 'CONNEXION': mixed types are not supported c:\_ddm\atop_charact_test_automation\branches\ferez_acita_tlmt4064\code\inci\connexion.h 95
classe RS232:Error 1 error C3265: cannot declare a managed 'systemStringRS232PortName' in an unmanaged 'RS232' c:\_ddm\atop_charact_test_automation\branches\ferez_acita_tlmt4064\code\inci\rs232.h 95
classe Connexion
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49 #ifndef __RS232__ #define __RS232__ class RS232 { /*==============================part of class public===========================*/ public: /*==============================constructor====================================*/ /// <summary>default constructor</summary> /// <returns>objet RS232</returns> /// <example>RS232^ a = gcnew RS232;</example> RS232(void); /*===============================destructor====================================*/ /// <summary>default destructor</summary> /// <returns>none</returns> /// <example>a->~RS232();</example> ~RS232(void); /*==============================public methode=====================================*/ /// <summary>list all COM PORT connected, attention methode static</summary> /// <returns>array System::String^>^ list of the name PORT COM</returns> /// <exceptions>Win32Exception if the port can't return any thing</exceptions> /// <example>array System::String^>^ arraySystemStringListPORTRS232 RS232::arraySystemStringRS232ListAllCOMPORT();</example> static array <System::String^>^ arraySystemStringRS232ListAllCOMPORT(void); /*==============================part of class private==========================*/ private: /*==============================part of class protected========================*/ protected: /// <summary>systemStringRS232PortName is System::String, to define the name of connexion</summary> System::String^ systemStringRS232PortName; /// <summary>systemStringRS232BaudRate is System::String, to define the baud rate of connexion</summary> System::String^ systemStringRS232BaudRate; /// <summary>systemStringRS232ByteSize is System::String, to define the util data of connexion</summary> System::String^ systemStringRS232ByteSize; /// <summary>systemStringRS232Parity is System::String, to define the parity of connexion</summary> System::String^ systemStringRS232Parity; /// <summary>systemStringRS232StopBit is System::String, to define the bit stop of connexion</summary> System::String^ systemStringRS232StopBit; /// <summary>systemStringRS232lowControl is System::String, to define the low control of connexion</summary> System::String^ systemStringRS232lowControl; }; #endif /*__RS232__*/ /*=============================================================================*/ /*EOF*/
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39 #ifndef __CONNEXION__ #define __CONNEXION__ class CONNEXION : public AT_COMMAND , public GPIB , public LAN , public RS232 , public USB { /*==============================part of class public===========================*/ public: /*==============================constructor====================================*/ /// <summary>default constructor</summary> /// <returns>objet CONNEXION</returns> /// <example>CONNEXION* a = new CONNEXION;</example> CONNEXION(void); /// <summary>constructor with 1 parameter</summary> /// <param name = "stringINSTRUMENTNameGiveByUser">string name CONNEXION</param> /// <returns>objet CONNEXION</returns> /// <example>CONNEXION* a = new CONNEXION("my connexion");</example> CONNEXION(std::string stringINSTRUMENTNameGiveByUser); /*===============================destructor====================================*/ /// <summary>default destructor</summary> /// <returns>none</returns> /// <example>delete a;</example> ~CONNEXION(void); /*==============================part of class private==========================*/ private: /*==============================part of class protected========================*/ protected: /// <summary>stringCONNEXIONType is string, to define the type of connexion</summary> std::string stringCONNEXIONType; /// <summary>stringCONNEXIONName is string, to define a name of connexion</summary> std::string stringCONNEXIONName; }; #endif /*__CONNEXION__*/ /*=============================================================================*/ /*EOF*/
Partager