Commit ce898f80 authored by Nicolas Gilmard's avatar Nicolas Gilmard

Add methods for the new tangible object type :BLOB

parent 5a153783
......@@ -90,6 +90,13 @@ public abstract class TuiAdapter {
*/
public abstract Collection<TangibleObject> getActiveObjects();
/**
* Method returning a collection of {@link TangibleObject} (blob) instances held by this.
*
* @return The collection of managed {@link TangibleObject} instances.
*/
public abstract Collection<TangibleObject> getActiveBlobs();
/**
* Method returning the {@link TangibleObject} (cursor) with the given id
*
......@@ -110,6 +117,16 @@ public abstract class TuiAdapter {
*/
public abstract TangibleObject getObject(long id);
/**
* Method returning the {@link TangibleObject} (blob) with the given id
*
* @param id
* of the blob to get
*
* @return The {@link TangibleObject} with objectId = id.
*/
public abstract TangibleObject getBlob(long id);
/**
* create a string representation of a tangible object to the logging mechanism
*
......
......@@ -366,6 +366,21 @@ public class TuioAdapter extends TuiAdapter implements TuioListener {
return objectList;
}
/**
* Method returning a collection of {@link TangibleObject} (blob) instances held by this.
*
* @return The collection of managed {@link TangibleObject} instances.
*/
@Override
public Collection<TangibleObject> getActiveBlobs() {
Vector<TangibleObject> blobList = new Vector<>();
for (TuioBlob blob : client.getTuioBlobList()) {
blobList.add(convertTuioBlobToTangibleObject(blob));
}
return blobList;
}
/**
* Method returning the {@link TangibleObject} (cursor) with the given id
*
......@@ -386,4 +401,14 @@ public class TuioAdapter extends TuiAdapter implements TuioListener {
return convertTuioObjectToTangibleObject(client.getTuioObject(id));
}
/**
* Method returning the {@link TangibleObject} (blob) with the given id
*
* @return The {@link TangibleObject} with objectId = id.
*/
@Override
public TangibleObject getBlob(long id) {
return convertTuioBlobToTangibleObject(client.getTuioBlob(IDMapper.remapTangibleObjectID((int) id)));
}
}
......@@ -312,6 +312,20 @@ public class TangibleApplicationTest {
return null;
}
/** {@inheritDoc} */
@Override
public Collection<TangibleObject> getActiveBlobs() {
// TODO Auto-generated method stub
return null;
}
/** {@inheritDoc} */
@Override
public TangibleObject getBlob(long id) {
// TODO Auto-generated method stub
return null;
}
/*
* /** {@inheritDoc}
*/
......
......@@ -291,6 +291,20 @@ public class TangibleApplicationTest2 {
return null;
}
/** {@inheritDoc} */
@Override
public Collection<TangibleObject> getActiveBlobs() {
// TODO Auto-generated method stub
return null;
}
/** {@inheritDoc} */
@Override
public TangibleObject getBlob(long id) {
// TODO Auto-generated method stub
return null;
}
/*
* /** {@inheritDoc}
*/
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment