5 #ifndef FORBCC_INTERFACE_H 6 #define FORBCC_INTERFACE_H 10 #include <templates/ordered_unique_list.hpp> 11 #include <templates/shareable.hpp> 62 void print_skeleton_declaration(
code_ostream &out)
const;
68 void print_static_attributes_definition(
code_ostream &out)
const;
87 std::string name_ptr()
const {
88 return name() +
"_ptr";
92 std::string name_var()
const {
93 return name() +
"_var";
97 std::string name_skeleton()
const {
98 return name() +
"_skeleton";
102 std::string name_enum()
const {
103 return name() +
"_method_codes";
107 std::string codename_ptr()
const {
112 std::string codename_var()
const {
117 std::string codename_skeleton()
const {
124 #endif //FORBCC_INTERFACE_H void print_declaration(code_ostream &out) const override
Prints both stub and skeletons declarations.
Definition: interface.cpp:335
virtual std::string codename() const
Returns the codename of the given entity, which is the name of the entity as seen from the global sco...
Definition: entity.hpp:81
A template that can be used to declare a list of unique ordered items.
Definition: ordered_unique_list.hpp:16
interface & operator=(interface &&)=default
This class supports moving.
interface(const std::shared_ptr< module > &parent, const std::string &name)
Using constructors from superclass.
Definition: interface.hpp:29
interface()
Empty interface, used to preallocate variables in arrays or to use later assignment operator...
Definition: interface.hpp:26
A template that can be used to ease the declaration of a shared_pointer of a given type...
Definition: shareable.hpp:13
std::shared_ptr< entity > parent() const
Returns the parent of the given entity.
Definition: entity.hpp:63
std::string name() const
Returns the name of the given entity.
Definition: entity.hpp:68
This output stream supports indentation of code lines, which are formatted at each std::endl...
Definition: code_ostream.hpp:14
Definition: code_ostream.hpp:11
void print_definition(code_ostream &out) const override
Prints both stub and skeletons definitions, among other utilities.
Definition: interface.cpp:346
Any code entity that should be generated by the compiler: namespaces, classes, structures, methods, variables.
Definition: entity.hpp:18
Defines an interface, which will be converted to stub and skeleton pairs upon generation.
Definition: interface.hpp:20
~interface() override=default
This class is virtual, so it requires a virtual destructor.