jp.go.aist.rtm.RTC
Class DefaultNumberingPolicy

java.lang.Object
  extended by jp.go.aist.rtm.RTC.DefaultNumberingPolicy
All Implemented Interfaces:
NumberingPolicy

 class DefaultNumberingPolicy
extends java.lang.Object
implements NumberingPolicy

Class for naming policy management when creating objects

This is a class to manage the naming policy when creating objects.


Constructor Summary
DefaultNumberingPolicy()
           Constructor
 
Method Summary
protected  long find(java.lang.Object obj)
           Find the object
 java.lang.String onCreate(RTObject_impl obj)
           Create the name when creating object
 void onDelete(RTObject_impl obj)
           Delete the name when deleting object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultNumberingPolicy

public DefaultNumberingPolicy()
Constructor

Method Detail

onCreate

public java.lang.String onCreate(RTObject_impl obj)
Create the name when creating object

Create the name when creating object. Create the name corresponding to the number of generated instances.

Specified by:
onCreate in interface NumberingPolicy
Parameters:
obj - The target object for the name creation
Returns:
Names of the created object

onDelete

public void onDelete(RTObject_impl obj)
Delete the name when deleting object

Delete the name when deleting object. Substract the generated number of instances when deleting the object.

Specified by:
onDelete in interface NumberingPolicy
Parameters:
obj - The target object for the name delete

find

protected long find(java.lang.Object obj)
             throws java.lang.Exception
Find the object

Find the specified object in the object list and return its index when it is stored.

Parameters:
obj - The target object for the find
Returns:
Object index for storage
Throws:
java.lang.Exception - The object doesn't exist.