Skip to content

InscoperAPI/API/Base/Config/ConnectionConfig.h

Namespaces

Name
Inscoper
Inscoper namespace.

Classes

Name
class Inscoper::ConnectionConfig
Base class for connection configuration.

Source code

#ifndef CONNECTIONCONFIG_H
#define CONNECTIONCONFIG_H

#include <Base/Box/EConnectionType.h>
#include <Shared/XML/XMLNode.h>

#include <memory>

namespace Inscoper {

class INSCOPER_EXPORT ConnectionConfig {
public:
#ifndef SWIG
  ConnectionConfig(ConnectionConfig const &) = delete;
  ConnectionConfig(ConnectionConfig &&) = delete;
  ConnectionConfig &operator=(ConnectionConfig const &) = delete;
  ConnectionConfig &operator=(ConnectionConfig &&) = delete;
#endif

  ConnectionConfig() : _tag(0) {
  }

  explicit ConnectionConfig(unsigned char tag) : _tag(tag) {
  }

  virtual ~ConnectionConfig() {
  }

  virtual void fromXML(Inscoper::XMLNode &connectionNode) INSCOPER_EXCEPTION;

  virtual void toXML(Inscoper::XMLNode &xmlParent) INSCOPER_EXCEPTION;

  virtual Inscoper::EConnectionType getType();

  unsigned short getTag() const {
    return _tag;
  }

  void setTag(unsigned short tag) {
    _tag = tag;
  }

private:
  unsigned short _tag;
};

typedef std::shared_ptr<ConnectionConfig> ConnectionConfigPtr;

} // namespace Inscoper

#endif // CONNECTIONCONFIG_H

Updated on 2026-09-03 at 12:14:17 +0200