using namespace anna;
app::Component::Component(const char* className) :
- a_className(className),
+ anna::Component(className),
a_state(State::Stopped) {
Application& app(app::functions::getApp());
}
} else if(Logger::isActive(Logger::Warning) == true) {
string msg(asString());
- msg += " | Not connected to applicatino yet";
+ msg += " | Application already running. You may initialize this component manually (lazy initialization)";
Logger::warning(msg, ANNA_FILE_LOCATION);
}
}
}
void app::Component::addPredecessor(const char* componentName)
-throw() {
+{
const std::string name(componentName);
if((find(begin(), end(), name)) != end())
}
void app::Component::initialize()
-throw(RuntimeException) {
+noexcept(false) {
if(a_state == State::Running)
return;
}
void app::Component::attach()
-throw(RuntimeException) {
+noexcept(false) {
app::functions::getApp().attach(this);
}
std::string app::Component::asString() const
-throw() {
- std::string result("app::Component { Name: ");
- result += a_className;
- result += " | Reference: ";
- result += functions::asHexString(anna_ptrnumber_cast(this));
- return result += " }";
+{
+ return anna::Component::asString();
}
xml::Node* app::Component::asXML(xml::Node* parent) const
-throw() {
- xml::Node* result = parent->createChild("app.Component");
- result->createAttribute("Name", a_className);
- result->createAttribute("Reference", functions::asHexString(anna_ptrnumber_cast(this)));
- return result;
+{
+ return anna::Component::asXML(parent);
}