OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimFontProperty.cpp
Go to the documentation of this file.
1 //*******************************************************************
2 // Copyright (C) 2000 ImageLinks Inc.
3 //
4 // License: See top level LICENSE.txt file.
5 //
6 // Author: Garrett Potts
7 //
8 //*************************************************************************
9 // $Id: ossimFontProperty.cpp 9094 2006-06-13 19:12:40Z dburken $
10 #include <sstream>
13 
14 
15 RTTI_DEF1(ossimFontProperty, "ossimFontProperty", ossimProperty);
16 
18  const ossimFontInformation& value)
19  :ossimProperty(name),
20  theValue(value)
21 {
22 
23 }
24 
26  :ossimProperty(rhs),
27  theValue(rhs.theValue)
28 {
29 }
30 
32 {
33 }
34 
36 {
37  return new ossimFontProperty(*this);
38 }
39 
41 {
43 
44  const ossimFontProperty* rhsPtr = dynamic_cast<const ossimFontProperty*>(&rhs);
45  if(rhsPtr)
46  {
47  theValue = rhsPtr->theValue;
48  }
49 
50  return *this;
51 }
52 
54 {
55  bool result = true;
56  ossimKeywordlist kwl;
57 
58  std::istringstream in(value);
59 
60  result = kwl.parseStream(in);
61  if(result)
62  {
63  theValue.loadState(kwl);
64  }
65 
66  return result;
67 }
68 
70 {
72  ossimKeywordlist kwl;
73 
74  theValue.saveState(kwl);
75 
76  kwl.writeToStream(out);
77  valueResult = kwl.toString();
78 }
79 
81 {
82  theValue = fontInfo;
83 }
84 
86 {
87  return theValue;
88 }
virtual bool setValue(const ossimString &value)
void setFontInformation(ossimFontInformation &fontInfo)
std::basic_ostringstream< char > ostringstream
Class for char output memory streams.
Definition: ossimIosFwd.h:35
virtual const ossimProperty & assign(const ossimProperty &rhs)
Represents serializable keyword/value map.
virtual const ossimProperty & assign(const ossimProperty &rhs)
virtual ossimString valueToString() const
ossimFontProperty(const ossimString &name, const ossimFontInformation &value)
bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
Method to the load (recreate) the state of an object from a keyword list.
RTTI_DEF1(ossimFontProperty, "ossimFontProperty", ossimProperty)
virtual void writeToStream(std::ostream &out) const
const ossimFontInformation & getFontInformation() const
bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
Saves the current state of this object.
ossimFontInformation theValue
virtual bool parseStream(ossim::istream &is, bool ignoreBinaryChars)
deprecated method
virtual ossimString toString() const
std::basic_istringstream< char > istringstream
Class for char input memory streams.
Definition: ossimIosFwd.h:32
virtual ossimObject * dup() const