# shpin.h

Go to the documentation of this file.

    00001 /*
    00002  * SmartHome server: Base of the system
    00003  *
    00004  * Copyright (C) 2010 Daniel Pisi <dan.pisi@gmail.com>
    00005  *
    00006  * This program is free software; you can redistribute it and/or modify it
    00007  * under the terms of version 2 of the GNU General Public License
    00008  * as published by the Free Software Foundation.
    00009  *
    00010  */
    00011
    00018 #ifndef SHPIN_H
    00019 #define SHPIN_H
    00020
    00021 #include <QObject>
    00022 #include <QString>
    00023
    00024 // -----------------------------------------------------------------------------
    00025
    00030 class ShPin
    00031 {
    00032 public:
    00033     enum PinType
    00034     {
    00035         ptUnknown = 0, ptBool, ptInt, ptReal, ptString, ptVariant
    00036     };
    00037
    00038     ShPin();
    00039
    00040     void setObjectId(int id);
    00041     void setSignal(QString signal);
    00042     void setDirection(QString direction);
    00043     void setType(QString type);
    00044
    00045     int     objectId() { return mObjectId; };
    00046     QString signal()   { return mSignal; };
    00047     bool    isInput()  { return mInput; }
    00048     bool    isOutput() { return mOutput; }
    00049     PinType type()     { return mType; }
    00050
    00051 private:
    00052     int     mObjectId;
    00053     QString mSignal;
    00054     bool    mInput, mOutput;
    00055     PinType mType;
    00056 };
    00057 // -----------------------------------------------------------------------------
    00058
    00059 #endif // SHPIN_H

All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends