/usr/include/tango/w_pipe.h is in libtango-dev 9.2.5a+dfsg1-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 | //===================================================================================================================
//
// file : w_pipe.h
//
// description : Include file for the WPipe class.
//
// project : TANGO
//
// author(s) : E.Taurel
//
// Copyright (C) : 2014,2015
// European Synchrotron Radiation Facility
// BP 220, Grenoble 38043
// FRANCE
//
// This file is part of Tango.
//
// Tango is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Tango is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License along with Tango.
// If not, see <http://www.gnu.org/licenses/>.
//
// $Revision: 27410 $
//
//===================================================================================================================
#ifndef _W_PIPE_H
#define _W_PIPE_H
#include <tango.h>
namespace Tango
{
/**
* This class is a class representing a writable pipe in the TANGO device server pattern. It is an base class.
* It is the a root class for pipe related classes.
*
* $Author: taurel $
* $Revision: 27410 $
*
* @headerfile tango.h
* @ingroup Server
*/
class WPipe: public Pipe
{
public:
/**@name Constructors
* Miscellaneous constructors */
//@{
/**
* Constructs a newly allocated WPipe object.
*
* The default constructor
*/
WPipe():w_ext(new WPipeExt) {}
/**
* Constructs a newly allocated WPipe object from its
* name, its description, its label and its display level
*
* @param na The pipe name
* @param level The pipe display level
*
*/
WPipe(const string &na,const Tango::DispLevel level);
//@}
/**@name Destructor
* Only one desctructor is defined for this class */
//@{
/**
* The object desctructor.
*/
#ifdef HAS_UNIQUE_PTR
virtual ~WPipe() {}
#else
virtual ~WPipe() {delete w_ext;}
#endif
//@}
/**@name Get/Set methods.
* Methods to get the value of the data blob transported by the pipe
*/
//@{
/**
* Get root blob name
*
* Get the root blob name
*
* @return The root blob name
*/
string get_root_blob_name() {return the_blob.get_name();}
//@}
/**@name Extracting data from a WPipe
*/
//@{
#ifdef GEN_DOC
/**
* Extract data from a device pipe
*
* Extracting data from a WPipe instance is simlar to extracting data from a DevicePipeBlob class instance.
* See doc of DevicePipeBlob class extraction methods (DevicePipeBlob::operator>>) to get a complete documentation on
* how to extract data from a WPipe
*
* @param [in] datum The pipe data
* @exception WrongData if requested
*/
WPipe & operator >> (short &datum);
#endif
/**
* Get root blob data element number
*
* Get the root blob data element number
*
* @return The root blob data element number
*/
size_t get_data_elt_nb() {return the_blob.get_data_elt_nb();}
/**
* Get root blob data elements name
*
* Get the root blob data elements name
*
* @return The root blob data elements name
*/
vector<string> get_data_elt_names() {return the_blob.get_data_elt_names();}
/**
* Get root blob data element name
*
* Get the root blob data element name for a single data element
*
* @param [in] ind The data element index within the root blob
* @return The root blob data element name
*/
string get_data_elt_name(size_t ind) {return the_blob.get_data_elt_name(ind);}
/**
* Get root blob data element value type
*
* Get the root blob data element value type for a single data element
*
* @param [in] ind The data element index within the root blob
* @return The blob data element value type
*/
int get_data_elt_type(size_t ind) {return the_blob.get_data_elt_type(ind);}
//@}
/// @privatesection
virtual void write(DeviceImpl *) {}
WPipe &operator[](const string &);
private:
class WPipeExt
{
public:
WPipeExt() {}
};
#ifdef HAS_UNIQUE_PTR
unique_ptr<WPipeExt> w_ext; // Class extension
#else
WPipeExt *w_ext;
#endif
};
template <typename T>
WPipe &operator>>(WPipe &,T &);
template <typename T>
WPipe &operator>>(WPipe &,T *);
template <typename T>
WPipe &operator>>(WPipe &, DataElement<T> &);
} // End of Tango namespace
#endif // _W_PIPE_H
|