Does not inherit
#include rwsf/tm/TypeManager.h
Class TypeManager loads and stores all types used by the Agent. A type manager initializes itself based on an init file and loads up the types, marshallers, and dependencies for each type specified. This information can then be retrieved later during message creation, parsing, etc. to retrieve variables and other type information.
TypeManager();
Default constructor.
~TypeManager();
Default destructor.
void addDependency(const std::string & fileName, const std::string & libName, const rwsf::XmlName & type);
Adds a dependency on file and library for given type.
void addMarshaller(const rwsf::XmlName & type, rwsf::Marshaller * marshaller);
Adds a XML marshaller for a given type.
void addMessageType(const rwsf::ServiceIdentifier & operation, const rwsf::XmlName & varType);
Adds the given message type for the specified specified operation.
void addReferencedMarshaller(const rwsf::XmlName & type, rwsf::Marshaller * marshaller);
Adds a XML marshaller reference for a given type.
rwsf::Logger getLogger() const;
Returns the logger used by this class.
rwsf::Marshaller * getMarshaller(const rwsf::XmlName & type) const;
Gets the XML marshaller for a given type.
rwsf::XmlName getMessageType(const rwsf::ServiceIdentifier & operation);
Gets the message type of specified operation.
void initialize(rwsf::ConfigurationManager * cm);
Initializes the type manager with the given configuration manager.
void loadSimpleTypes();
Loads simple XSD types into the type manager (string, int, etc.).
void loadTypes(const std::string & fileName, const std::string & libDir);
Loads complex types from the given directory and file.
ServiceVariablePtr newInstance(const rwsf::XmlName & type) const;
Creates an uninitialized ServiceVariable of the correct derived type containing the proper structure for the given xml type.
MessageServiceVariablePtr newMessage(const rwsf::XmlName & type) const;
Creates a MessageServiceVariable for this xml message type, to be used by the message processors or as a new ServiceVariable.
void parseString(const std::string & stringData, const std::string & libDir, const std::string & fileName);
Runs the parser on the given string and loads the types as necessary.
void setLogger(const rwsf::Logger & logger);
Sets the logger to be used by this class.
void unloadTypes(const std::string & fileName);
Unloads the types loaded by the given filename.
© Copyright Rogue Wave Software, Inc. All Rights Reserved. All Rights Reserved. Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. HydraExpress is a trademark of Rogue Wave Software, Inc. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.