Logo Search packages:      
Sourcecode: inkscape version File versions  Download package

Inkscape::XML::SimpleNode Class Reference

#include <simple-node.h>

Inheritance diagram for Inkscape::XML::SimpleNode:

Inkscape::XML::Node Inkscape::GC::Managed< default_scan, default_collect > Inkscape::GC::Anchored Inkscape::XML::CommentNode Inkscape::XML::ElementNode Inkscape::XML::PINode Inkscape::XML::TextNode

List of all members.


Detailed Description

Default implementation of the XML node stored in memory.

See also:
Inkscape::XML::Node

Definition at line 37 of file simple-node.h.


Public Member Functions

unsigned _anchored_refcount () const
void addChild (Node *child, Node *ref)
 Insert another node as a child of this node.
void addListener (NodeEventVector const *vector, void *data)
 Add a set node change callbacks with an associated data.
void addObserver (NodeObserver &observer)
 Add an object that will be notified of the changes to this node.
void addSubtreeObserver (NodeObserver &observer)
 Add an object that will be notified of the changes to this node and its descendants.
void anchor () const
void appendChild (Node *child)
 Append a node as the last child of this node.
gchar const * attribute (gchar const *key) const
 Get the string representation of a node's attribute.
Inkscape::Util::List
< AttributeRecord const > 
attributeList () const
 Get a list of the node's attributes.
void changeOrder (Node *child, Node *ref)
 Move a given node in this node's child order.
unsigned childCount () const
 Get the number of children of this node.
int code () const
 Get the integer code corresponding to the node's name.
gchar const * content () const
 Get the content of a text or comment node.
Document const * document () const
Documentdocument ()
 Get the node's associated document.
Nodeduplicate (Document *doc) const
 Create a duplicate of this node.
Node const * firstChild () const
NodefirstChild ()
 Get the first child of this node.
Node const * lastChild () const
NodelastChild ()
 Get the last child of this node.
bool matchAttributeName (gchar const *partial_name) const
 Check whether this node has any attribute that matches a string.
void mergeFrom (Node const *src, gchar const *key)
 Merge all children of another node with the current.
gchar const * name () const
 Get the name of the element node.
Node const * next () const
Nodenext ()
 Get the next sibling of this node.
Node const * nthChild (unsigned index) const
NodenthChild (unsigned index)
 Get the child of this node with a given index.
void operator delete (void *p)
void * operator new (std::size_t size, ScanPolicy scan=default_scan, CollectionPolicy collect=default_collect) throw (std::bad_alloc)
void * operator new[] (std::size_t size, ScanPolicy scan=default_scan, CollectionPolicy collect=default_collect) throw (std::bad_alloc)
Node const * parent () const
Nodeparent ()
 Get the parent of this node.
unsigned position () const
 Get the index of this node in parent's child order.
void release () const
void removeChild (Node *child)
 Remove a child of this node.
void removeListenerByData (void *data)
 Remove a set of node change callbacks by their associated data.
void removeObserver (NodeObserver &observer)
 Remove an object from the list of observers.
void removeSubtreeObserver (NodeObserver &observer)
 Remove an object from the subtree observers list.
Node const * root () const
Noderoot ()
 Get the root node of this node's document.
void setAttribute (gchar const *key, gchar const *value, bool is_interactive=false)
 Change an attribute of this node.
void setCodeUnsafe (int code)
 Directly set the integer GQuark code for the name of the node.
void setContent (gchar const *value)
 Set the content of a text or comment node.
void setPosition (int pos)
 Set the position of this node in parent's child order.
void synthesizeEvents (NodeObserver &observer)
 Generate a sequence of events corresponding to the state of this node.
void synthesizeEvents (NodeEventVector const *vector, void *data)
 Generate a sequence of events corresponding to the state of this node.
Retrieve information about the node
virtual NodeType type () const =0
 Get the type of the node.

Protected Member Functions

virtual SimpleNode_duplicate (Document *doc) const =0
 SimpleNode (SimpleNode const &repr, Document *document)
 SimpleNode (int code, Document *document)

Private Member Functions

unsigned _childPosition (SimpleNode const &child) const
void _setParent (SimpleNode *parent)
void operator= (Node const &)

Private Attributes

Inkscape::Util::MutableList
< AttributeRecord
_attributes
unsigned _cached_position
bool _cached_positions_valid
unsigned _child_count
Inkscape::Util::ptr_shared< char > _content
Document_document
SimpleNode_first_child
SimpleNode_last_child
int _name
SimpleNode_next
CompositeNodeObserver _observers
SimpleNode_parent
CompositeNodeObserver _subtree_observers

Related Functions

(Note that these are not member functions.)

Inkscape::XML::Nodesp_repr_lookup_child (Inkscape::XML::Node *repr, gchar const *key, gchar const *value)
 Find an element node using an unique attribute.
Inkscape::XML::Nodesp_repr_lookup_name (Inkscape::XML::Node *repr, gchar const *name, gint maxdepth)
 Find an element node with the given name.
Nodenext_node (Node *node)
 Get the next node in sibling order.
Nodeparent_node (Node *node)
 Get the node's parent.
Nodeprevious_node (Node *node)
 Get the previous node in sibling order.

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index