NO-OP: indent & whitespace
This commit is contained in:
parent
3d98d13760
commit
80f3b54be4
@ -17,8 +17,8 @@
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
#ifndef __libardour_port_engine_shared_h__
|
||||
#define __libardour_port_engine_shared_h__
|
||||
#ifndef _libardour_port_engine_shared_h_
|
||||
#define _libardour_port_engine_shared_h_
|
||||
|
||||
#include <map>
|
||||
#include <set>
|
||||
@ -39,7 +39,6 @@ namespace ARDOUR {
|
||||
class PortEngineSharedImpl;
|
||||
class PortManager;
|
||||
|
||||
|
||||
class LIBARDOUR_API BackendPort
|
||||
{
|
||||
protected:
|
||||
@ -50,22 +49,35 @@ class LIBARDOUR_API BackendPort
|
||||
|
||||
const std::string& name () const { return _name; }
|
||||
const std::string& pretty_name () const { return _pretty_name; }
|
||||
PortFlags flags () const { return _flags; }
|
||||
|
||||
int set_name (const std::string &name) { _name = name; return 0; }
|
||||
int set_pretty_name (const std::string &name) { _pretty_name = name; return 0; }
|
||||
int set_name (const std::string& name)
|
||||
{
|
||||
_name = name;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int set_pretty_name (const std::string& name)
|
||||
{
|
||||
_pretty_name = name;
|
||||
return 0;
|
||||
}
|
||||
|
||||
virtual DataType type () const = 0;
|
||||
|
||||
PortFlags flags () const { return _flags; }
|
||||
bool is_input () const { return flags () & IsInput; }
|
||||
bool is_output () const { return flags () & IsOutput; }
|
||||
bool is_physical () const { return flags () & IsPhysical; }
|
||||
bool is_terminal () const { return flags () & IsTerminal; }
|
||||
bool is_connected () const { return _connections.size () != 0; }
|
||||
|
||||
bool is_connected (const BackendPort* port) const;
|
||||
bool is_physically_connected () const;
|
||||
|
||||
const std::set<BackendPort *>& get_connections () const { return _connections; }
|
||||
const std::set<BackendPort*>& get_connections () const
|
||||
{
|
||||
return _connections;
|
||||
}
|
||||
|
||||
int connect (BackendPort* port);
|
||||
int disconnect (BackendPort* port);
|
||||
@ -156,8 +168,7 @@ class LIBARDOUR_API PortEngineSharedImpl
|
||||
PortEngine::PortHandle add_port (const std::string& shortname, ARDOUR::DataType, ARDOUR::PortFlags);
|
||||
void unregister_ports (bool system_only = false);
|
||||
|
||||
struct SortByPortName
|
||||
{
|
||||
struct SortByPortName {
|
||||
bool operator() (const BackendPort* lhs, const BackendPort* rhs) const
|
||||
{
|
||||
return PBD::naturally_less (lhs->name ().c_str (), rhs->name ().c_str ());
|
||||
@ -169,12 +180,14 @@ class LIBARDOUR_API PortEngineSharedImpl
|
||||
SerializedRCUManager<PortMap> _portmap;
|
||||
SerializedRCUManager<PortIndex> _ports;
|
||||
|
||||
bool valid_port (PortEngine::PortHandle port) const {
|
||||
bool valid_port (PortEngine::PortHandle port) const
|
||||
{
|
||||
boost::shared_ptr<PortIndex> p = _ports.reader ();
|
||||
return std::find (p->begin (), p->end (), static_cast<BackendPort*> (port)) != p->end ();
|
||||
}
|
||||
|
||||
BackendPort* find_port (const std::string& port_name) const {
|
||||
BackendPort* find_port (const std::string& port_name) const
|
||||
{
|
||||
boost::shared_ptr<PortMap> p = _portmap.reader ();
|
||||
PortMap::const_iterator it = p->find (port_name);
|
||||
if (it == p->end ()) {
|
||||
@ -188,4 +201,4 @@ class LIBARDOUR_API PortEngineSharedImpl
|
||||
|
||||
} /* namespace ARDOUR */
|
||||
|
||||
#endif /* __libardour_port_engine_shared_h__ */
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user