The Birdfont Source Code


All Repositories / birdfont.git / blob – RSS feed

Attribute.vala in libbirdxml

This file is a part of the Birdfont project.

Contributing

Send patches or pull requests to johan.mattsson.m@gmail.com.
Clone this repository: git clone https://github.com/johanmattssonm/birdfont.git

Revisions

View the latest version of libbirdxml/Attribute.vala.
Create new paths in pen tool
1 /* 2 Copyright (C) 2014 Johan Mattsson 3 4 This library is free software; you can redistribute it and/or modify 5 it under the terms of the GNU Lesser General Public License as 6 published by the Free Software Foundation; either version 3 of the 7 License, or (at your option) any later version. 8 9 This library is distributed in the hope that it will be useful, but 10 WITHOUT ANY WARRANTY; without even the implied warranty of 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 Lesser General Public License for more details. 13 */ 14 namespace Bird { 15 16 /** 17 * Representation of one XML attribute. 18 */ 19 public class Attribute : GLib.Object { 20 21 public XmlString ns; 22 public XmlString name; 23 public XmlString content; 24 25 public int refcount = 1; 26 27 internal Attribute (XmlString ns, XmlString name, XmlString content) { 28 this.ns = ns; 29 this.name = name; 30 this.content = content; 31 } 32 33 internal Attribute.empty () { 34 this.ns = new XmlString ("", 0); 35 this.name = new XmlString ("", 0); 36 this.content = new XmlString ("", 0); 37 } 38 39 /** 40 * @return namespace part for this attribute. 41 */ 42 public string get_namespace () { 43 return ns.to_string (); 44 } 45 46 /** 47 * @return the name of this attribute. 48 */ 49 public string get_name () { 50 return name.to_string (); 51 } 52 53 /** 54 * @return the value of this attribute. 55 */ 56 public string get_content () { 57 return content.to_string (); 58 } 59 } 60 61 } 62