|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjp.go.aist.rtm.RTC.FactoryGlobal<ABSTRACTCLASS,IDENTIFIER>
public class FactoryGlobal<ABSTRACTCLASS,IDENTIFIER>
Factory Management class
Nested Class Summary | |
---|---|
(package private) class |
FactoryGlobal.FactoryEntry
Class for creation/destruction interface management |
static class |
FactoryGlobal.ReturnCode
Return code |
Field Summary | |
---|---|
protected java.util.HashMap<IDENTIFIER,FactoryGlobal.FactoryEntry> |
m_creators
Map of FactoryEntry |
protected RtcDeleteFunc |
m_Delete
Interface for component destruction variable |
protected RtcNewFunc |
m_New
Interface for component creation variable |
protected NumberingPolicy |
m_policy
Class for numbering policy (naming policy) management. |
Constructor Summary | |
---|---|
protected |
FactoryGlobal()
FactoryGlobal constructor |
Method Summary | |
---|---|
FactoryGlobal.ReturnCode |
addFactory(IDENTIFIER id,
ObjectCreator creator,
ObjectDestructor destructor)
Resters Factory to the map. |
ABSTRACTCLASS |
createObject(IDENTIFIER id)
Object generation processing |
void |
deleteObject(ABSTRACTCLASS obj)
Deletes the object. This method deletes specified Object. with identifier.} |
void |
deleteObject(IDENTIFIER id,
ABSTRACTCLASS obj)
Deletes the object. |
java.util.Set<IDENTIFIER> |
getIdentifiers()
Returns Identifiers of the map. |
boolean |
hasFactory(IDENTIFIER id)
Checks whether Identifier exists in the map. |
static FactoryGlobal |
instance()
Creates FactoryGlobal. |
FactoryGlobal.ReturnCode |
removeFactory(IDENTIFIER id)
Removes Factory from the map. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected RtcNewFunc m_New
protected RtcDeleteFunc m_Delete
protected NumberingPolicy m_policy
protected java.util.HashMap<IDENTIFIER,FactoryGlobal.FactoryEntry> m_creators
Constructor Detail |
---|
protected FactoryGlobal()
Method Detail |
---|
public static FactoryGlobal instance()
public boolean hasFactory(IDENTIFIER id)
id
-
Identifier
public java.util.Set<IDENTIFIER> getIdentifiers()
public FactoryGlobal.ReturnCode addFactory(IDENTIFIER id, ObjectCreator creator, ObjectDestructor destructor)
id
- Identifiercreator
- creation functiondestructor
- destruction function
public FactoryGlobal.ReturnCode removeFactory(IDENTIFIER id)
id
-
Identifier
public ABSTRACTCLASS createObject(IDENTIFIER id)
This method creates the object with factory specified with identifier.
id
-
Identifier of created object
public void deleteObject(IDENTIFIER id, ABSTRACTCLASS obj)
This method deletes the object with factory specified with identifier.
id
-
Identifier of deleted objectobj
-
Deleteed object.public void deleteObject(ABSTRACTCLASS obj)
obj
-
Deleteed object.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |