Atlas  0.7.0
Networking protocol for the Worldforge system.
Atlas::Objects::Factories Class Reference

Public Member Functions

 Factories (const Factories &)=default
 
bool hasFactory (const std::string &name) const
 
Root createObject (const std::string &name) const
 
Root createObject (const Atlas::Message::MapType &msg) const
 
Root createObject (Atlas::Message::MapType &&msg) const
 
Root getDefaultInstance (const std::string &name) const
 
std::list< std::string > getKeys () const
 
int addFactory (const std::string &name, FactoryMethod method, DefaultInstanceMethod defaultInstanceMethod)
 
void installStandardTypes ()
 
std::vector< RootparseListOfObjects (const Atlas::Message::ListType &val) const
 
std::vector< RootparseListOfObjects (Atlas::Message::ListType &&val) const
 

Detailed Description

Definition at line 76 of file Factories.h.

Member Function Documentation

◆ createObject() [1/2]

Root Atlas::Objects::Factories::createObject ( const Atlas::Message::MapType &  msg) const

Creates a new object.

If the map that's supplied can be destroyed, look into using "createObject" with move semantics..

Parameters
msg
Returns

◆ createObject() [2/2]

Root Atlas::Objects::Factories::createObject ( Atlas::Message::MapType &&  msg) const

Creates a new object by supplying a Map which is moved into the resulting object.

Parameters
msg
Returns

Definition at line 74 of file Factories.cpp.

References Atlas::Objects::Factory::classno.

◆ parseListOfObjects()

std::vector< Root > Atlas::Objects::Factories::parseListOfObjects ( const Atlas::Message::ListType &  val) const

Parses the supplied list into a vector of Root objects.

Parameters
val
Returns

Definition at line 151 of file Factories.cpp.

Referenced by Atlas::Objects::Operation::RootOperationData::setArgsAsList().


The documentation for this class was generated from the following files: