2017-03-03 01:07:14 +01:00
|
|
|
#ifndef NODEPATH_H
|
|
|
|
|
#define NODEPATH_H
|
|
|
|
|
|
2017-03-06 08:49:24 +01:00
|
|
|
#include "String.hpp"
|
2017-03-03 01:07:14 +01:00
|
|
|
|
2017-10-03 16:07:34 +05:30
|
|
|
#include <gdnative/node_path.h>
|
2017-03-03 01:07:14 +01:00
|
|
|
|
|
|
|
|
namespace godot {
|
|
|
|
|
|
2018-11-24 09:09:41 +11:00
|
|
|
class NodePath {
|
2017-03-03 01:07:14 +01:00
|
|
|
godot_node_path _node_path;
|
2018-11-24 09:09:41 +11:00
|
|
|
|
2021-01-07 01:05:12 +00:00
|
|
|
friend class Variant;
|
|
|
|
|
inline explicit NodePath(godot_node_path node_path) {
|
|
|
|
|
_node_path = node_path;
|
|
|
|
|
}
|
|
|
|
|
|
2017-03-03 01:07:14 +01:00
|
|
|
public:
|
2017-03-06 03:30:46 +01:00
|
|
|
NodePath();
|
|
|
|
|
|
2017-04-06 02:32:24 +02:00
|
|
|
NodePath(const NodePath &other);
|
|
|
|
|
|
2018-11-24 09:09:41 +11:00
|
|
|
NodePath(const String &from);
|
2017-04-06 02:32:24 +02:00
|
|
|
|
|
|
|
|
NodePath(const char *contents);
|
2017-03-06 03:30:46 +01:00
|
|
|
|
|
|
|
|
String get_name(const int idx) const;
|
|
|
|
|
|
|
|
|
|
int get_name_count() const;
|
|
|
|
|
|
|
|
|
|
String get_subname(const int idx) const;
|
|
|
|
|
|
|
|
|
|
int get_subname_count() const;
|
|
|
|
|
|
|
|
|
|
bool is_absolute() const;
|
|
|
|
|
|
|
|
|
|
bool is_empty() const;
|
|
|
|
|
|
2019-05-22 11:06:01 +02:00
|
|
|
NodePath get_as_property_path() const;
|
|
|
|
|
|
|
|
|
|
String get_concatenated_subnames() const;
|
|
|
|
|
|
2017-03-06 03:30:46 +01:00
|
|
|
operator String() const;
|
|
|
|
|
|
2018-11-24 09:09:41 +11:00
|
|
|
void operator=(const NodePath &other);
|
2017-04-06 02:32:24 +02:00
|
|
|
|
2018-11-24 09:09:41 +11:00
|
|
|
bool operator==(const NodePath &other);
|
2018-03-02 19:04:57 +01:00
|
|
|
|
2017-03-06 03:30:46 +01:00
|
|
|
~NodePath();
|
2017-03-03 01:07:14 +01:00
|
|
|
};
|
|
|
|
|
|
2018-11-24 09:09:41 +11:00
|
|
|
} // namespace godot
|
2017-03-03 01:07:14 +01:00
|
|
|
|
|
|
|
|
#endif // NODEPATH_H
|