Exemplo n.º 1
0
Set_List<DataType> &
Set_List<DataType>::operator|=(const Set_List<DataType> &sl)
{
	// insert new elements
	ListIterator<DataType> pli(sl.list);
	for ( ; ! pli.done(); pli++)
	{
		list.insertUnique(pli());
	}
	return(*this);
}
Exemplo n.º 2
0
Set_HashTable<DataType> &
Set_HashTable<DataType>::operator|=(const Set_HashTable<DataType> &sl)
{
	// insert new elements
	HashTable_List_Iterator<DataType> pli(sl.table);
	for ( ; !pli.done(); pli++)
	{
		table.set_insert(pli());
	}
	return(*this);
}
Exemplo n.º 3
0
Set_HashTable<DataType> &
Set_HashTable<DataType>::operator-=(const Set_HashTable<DataType> &sl)
{
	// generate difference
	HashTable_List_Iterator<DataType> pli(sl.table);
	for ( ; !pli.done(); pli++)
	{
		DataType tmp = pli();
		(void)table.set_remove(tmp);
	}
	return(*this);
}
Exemplo n.º 4
0
Set_List<DataType> &
Set_List<DataType>::operator-=(const Set_List<DataType> &sl)
{
	// generate difference
	ListIterator<DataType> pli(sl.list);
	for ( ; ! pli.done(); pli++)
	{
		DataType tmp = pli();
		(void)list.removeUnique(tmp);
	}
	return(*this);
}
Exemplo n.º 5
0
Set_HashTable<DataType> &
Set_HashTable<DataType>::operator&=(const Set_HashTable<DataType> &sl)
{
	// generate intersection
	HashTable_List<DataType> pi(sl.getSize(), sl.getHash());
	HashTable_List_Iterator<DataType> pli(sl.table);
	for ( ; ! pli.done(); pli++)
	{
		if (table.includes(pli()))
		{
			pi.set_insert(pli());
		}
	}
	table = pi;
	return(*this);
}
Exemplo n.º 6
0
Set_List<DataType> &
Set_List<DataType>::operator&=(const Set_List<DataType> &sl)
{
	// generate intersection
	List<DataType> pi;
	ListIterator<DataType> pli(sl.list);
	for ( ; ! pli.done(); pli++)
	{
		if (list.includes(pli()))
		{
			pi.insertUnique(pli());
		}
	}
	list = pi;
	return(*this);
}
Exemplo n.º 7
0
void PhysicalLayerManager ::AddSerial(const std::string& arName, PhysLayerSettings s, SerialSettings aSerial)
{
	IPhysicalLayerAsyncFactory fac = PhysicalLayerFactory::GetSerialAsync(aSerial);
	PhysLayerInstance pli(fac);
	this->AddLayer(arName, s, pli);
}
Exemplo n.º 8
0
void PhysicalLayerManager ::AddTCPv6Server(const std::string& arName, PhysLayerSettings s, const std::string& arEndpoint, boost::uint16_t aPort)
{
	IPhysicalLayerAsyncFactory fac = PhysicalLayerFactory::GetTCPv6ServerAsync(arEndpoint, aPort);
	PhysLayerInstance pli(fac);
	this->AddLayer(arName, s, pli);
}
Exemplo n.º 9
0
void PhysicalLayerManager ::AddPhysicalLayer(const std::string& arName, PhysLayerSettings s, IPhysicalLayerAsync* apPhys)
{
	PhysLayerInstance pli(apPhys);
	this->AddLayer(arName, s, pli);
}
void PhysicalLayerManager ::AddUDPv4Server(const std::string& arName, PhysLayerSettings s, UdpSettings aUdp)
{
	IPhysicalLayerAsyncFactory fac = PhysicalLayerFactory::GetUDPv4ServerAsync(aUdp);
	PhysLayerInstance pli(fac);
	this->AddLayer(arName, s, pli);
}
void PhysicalLayerManager ::AddTCPv6Client(const std::string& arName, PhysLayerSettings s, TcpSettings aTcp)
{
	IPhysicalLayerAsyncFactory fac = PhysicalLayerFactory::GetTCPv6ClientAsync(aTcp);
	PhysLayerInstance pli(fac);
	this->AddLayer(arName, s, pli);
}