Salut,

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
 
 
	template<class T>
	struct broker
	{
		typedef T typeBroker;
		static std::vector<std::string> extractListBroker(const std::string& broker)
		{
			std::vector<std::string> vec;
 
			if(broker.empty())			
			{
				for(int i=0;i<typeBroker::nbBroker;++i)
					vec.push_back( typeBroker::listBroker[i] );			
			}			
			else
			{
				typedef boost::tokenizer<boost::char_separator<char> > my_tok;
 
				boost::char_separator<char> sep( ";" );
 
				my_tok tok( broker, sep );
 
				for ( my_tok::const_iterator i = tok.begin(); i != tok.end(); ++i )  
					vec.push_back( *i ); 
			} 
			return vec;
		}
 
		std::string brokerToStr(typename typeBroker::BROKER i)
		{
			return typeBroker::listBroker[i];			
		}
	};
 
 
	/* les point d'accés distants sur lesquels on peut traiter (ex: dbln et byln sont traitable sur bridge1) */
	struct brokerDisTradable  : broker<brokerDisTradable>{
		std::vector<std::string> listBroker;
		brokerDisTradable()
		{
			listBroker.push_back("BRIDGE1" );
			listBroker.push_back("BRIDGELONDON" );
			listBroker.push_back("RECY" );
			listBroker.push_back("CURRENEX" );
		}
		static const int nbBroker = 2;
		enum BROKER  { BRIDGE1, BRIDGELONDON, RECY, CURRENEX };
	};
errro : error C2039: 'BROKER' : is not a member of broker_def::brokerDisTradable'

une idée ?

merci!