summaryrefslogtreecommitdiffstats
path: root/src/libs
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2008-01-01 19:52:36 +0000
committerDavid Robillard <d@drobilla.net>2008-01-01 19:52:36 +0000
commite9b0dd4e63141e79350b675ae5c64d787e3f8856 (patch)
treef4bb1a53538d59122e2ed762704d173df9a41b7a /src/libs
parent4eae343332a4403bd45d3b3035ccbb2a6fe90db9 (diff)
downloadingen-e9b0dd4e63141e79350b675ae5c64d787e3f8856.tar.gz
ingen-e9b0dd4e63141e79350b675ae5c64d787e3f8856.tar.bz2
ingen-e9b0dd4e63141e79350b675ae5c64d787e3f8856.zip
RAUL code cleanup.
git-svn-id: http://svn.drobilla.net/lad/ingen@999 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs')
-rw-r--r--src/libs/engine/GraphObjectImpl.hpp18
-rw-r--r--src/libs/engine/OutputPort.hpp12
-rw-r--r--src/libs/serialisation/Serialiser.hpp21
3 files changed, 26 insertions, 25 deletions
diff --git a/src/libs/engine/GraphObjectImpl.hpp b/src/libs/engine/GraphObjectImpl.hpp
index 8563035b..c48ad049 100644
--- a/src/libs/engine/GraphObjectImpl.hpp
+++ b/src/libs/engine/GraphObjectImpl.hpp
@@ -58,7 +58,7 @@ public:
GraphObject* graph_parent() const { return _parent; }
inline GraphObjectImpl* parent() const { return _parent; }
- const string name() const { return _name; }
+ const std::string name() const { return _name; }
virtual void process(ProcessContext& context) = 0;
@@ -69,10 +69,10 @@ public:
assert(_name.find("/") == string::npos);
}
- void set_variable(const string& key, const Atom& value)
+ void set_variable(const std::string& key, const Atom& value)
{ _variables[key] = value; }
- const Atom& get_variable(const string& key) {
+ const Atom& get_variable(const std::string& key) {
static Atom null_atom;
Variables::iterator i = _variables.find(key);
return (i != _variables.end()) ? (*i).second : null_atom;
@@ -86,24 +86,24 @@ public:
/** Path is dynamically generated from parent to ease renaming */
const Path path() const {
if (_parent == NULL)
- return Path(string("/").append(_name));
+ return Path(std::string("/").append(_name));
else if (_parent->path() == "/")
- return Path(string("/").append(_name));
+ return Path(std::string("/").append(_name));
else
return Path(_parent->path() +"/"+ _name);
}
const_iterator children_begin() const;
const_iterator children_end() const;
- SharedPtr<GraphObject> find_child(const string& name) const;
+ SharedPtr<GraphObject> find_child(const std::string& name) const;
protected:
- GraphObjectImpl(GraphObjectImpl* parent, const string& name, bool polyphonic=false)
+ GraphObjectImpl(GraphObjectImpl* parent, const std::string& name, bool polyphonic=false)
: _parent(parent), _name(name), _polyphonic(polyphonic)
{
assert(parent == NULL || _name.length() > 0);
- assert(_name.find("/") == string::npos);
- assert(path().find("//") == string::npos);
+ assert(_name.find("/") == std::string::npos);
+ assert(path().find("//") == std::string::npos);
}
GraphObjectImpl* _parent;
diff --git a/src/libs/engine/OutputPort.hpp b/src/libs/engine/OutputPort.hpp
index e744b9e6..a184c32b 100644
--- a/src/libs/engine/OutputPort.hpp
+++ b/src/libs/engine/OutputPort.hpp
@@ -40,12 +40,12 @@ namespace Ingen {
class OutputPort : virtual public PortImpl
{
public:
- OutputPort(NodeImpl* parent,
- const string& name,
- uint32_t index,
- uint32_t poly,
- DataType type,
- size_t buffer_size);
+ OutputPort(NodeImpl* parent,
+ const std::string& name,
+ uint32_t index,
+ uint32_t poly,
+ DataType type,
+ size_t buffer_size);
void pre_process(ProcessContext& context);
void post_process(ProcessContext& context);
diff --git a/src/libs/serialisation/Serialiser.hpp b/src/libs/serialisation/Serialiser.hpp
index e14560b7..26439bdf 100644
--- a/src/libs/serialisation/Serialiser.hpp
+++ b/src/libs/serialisation/Serialiser.hpp
@@ -56,21 +56,22 @@ class Serialiser
public:
Serialiser(Redland::World& world);
- void to_file(SharedPtr<GraphObject> object, const string& filename);
+ void to_file(SharedPtr<GraphObject> object, const std::string& filename);
- string to_string(SharedPtr<GraphObject> object,
- const string& base_uri,
- const GraphObject::Variables& extra_rdf);
+ std::string to_string(SharedPtr<GraphObject> object,
+ const std::string& base_uri,
+ const GraphObject::Variables& extra_rdf);
- void start_to_string(const string& base_uri);
- void serialise(SharedPtr<GraphObject> object) throw (std::logic_error);
- void serialise_connection(SharedPtr<Shared::Connection> c) throw (std::logic_error);
- string finish();
+ void start_to_string(const std::string& base_uri);
+ void serialise(SharedPtr<GraphObject> object) throw (std::logic_error);
+ void serialise_connection(SharedPtr<Shared::Connection> c) throw (std::logic_error);
+
+ std::string finish();
private:
enum Mode { TO_FILE, TO_STRING };
- void start_to_filename(const string& filename);
+ void start_to_filename(const std::string& filename);
void setup_prefixes();
@@ -90,7 +91,7 @@ private:
SharedPtr<GraphObject> _root_object;
Mode _mode;
NodeMap _node_map;
- string _base_uri;
+ std::string _base_uri;
Redland::World& _world;
Redland::Model* _model;
};