/usr/include/magics/SymbolItem.h is in libmagics++-dev 2.18.15-5.
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 | /*! \file SymbolItem.h
\brief Definition of the Template class SymbolItem.
Magics Team - ECMWF 2009
Started: Tue 27-Jan-2009
Changes:
*/
#ifndef SymbolItem_H
#define SymbolItem_H
#include "magics.h"
#include "MagFont.h"
#include "ArrowProperties.h"
namespace magics {
class BaseDriver;
class ComplexSymbol;
class GraphicsItem {
public:
GraphicsItem();
virtual ~GraphicsItem();
void x(int x) { x_ = x; }
void y(int y) { y_ = y; }
int x() const { return x_;}
int y() const { return y_; }
virtual void redisplay(const ComplexSymbol&, const BaseDriver&) {}
protected:
//! Method to print string about this class on to a stream of type ostream (virtual).
virtual void print(ostream&) const;
int x_; // relative coordinate to the Symbol parent
int y_;
private:
//! Copy constructor - No copy allowed
GraphicsItem(const GraphicsItem&);
//! Overloaded << operator to copy - No copy allowed
GraphicsItem& operator=(const GraphicsItem&);
// -- Friends
//! Overloaded << operator to call print().
friend ostream& operator<<(ostream& s,const GraphicsItem& p)
{ p.print(s); return s; }
};
class SymbolItem : public GraphicsItem
{
public:
SymbolItem() {}
~SymbolItem() {}
void redisplay(const ComplexSymbol&, const BaseDriver&);
double height() const { return height_; }
void height(double height) { height_ = height; }
const string& symbol() const { return symbol_; }
void symbol(const string& symbol) { symbol_ = symbol; }
const Colour& colour() const { return colour_; }
void colour(const Colour& colour) { colour_ = colour; }
protected:
virtual void print(ostream&) const;
double height_;
string symbol_;
Colour colour_;
};
class TextItem : public GraphicsItem
{
public:
TextItem() {}
~TextItem() {}
void redisplay(const ComplexSymbol&, const BaseDriver&);
const string& text() const { return text_; }
void text(const string& text) { text_ = text; }
MagFont font() const { return font_; }
void font(const MagFont& font) { font_ = font; }
protected:
virtual void print(ostream&) const;
string text_;
MagFont font_;
};
class FlagItem : public GraphicsItem, public ArrowProperties
{
public:
FlagItem() {}
~FlagItem() {}
void redisplay(const ComplexSymbol&, const BaseDriver&);
double length() const { return length_; }
void length(double length) { length_ = length; }
void speed(double speed) { speed_ = speed; }
double speed() const { return speed_; }
void direction(double direction) { direction_ = direction; }
double direction() const { return direction_; }
void convention(FlagConvention convention) { convention_ = convention; }
FlagConvention convention() const { return convention_; }
protected:
virtual void print(ostream&) const;
double length_;
FlagConvention convention_;
double speed_;
double direction_;
};
} // namespace magics
#endif
|