}
Book::Book (Book const &s)
+ : Smob<Book> ()
{
paper_ = 0;
header_ = SCM_EOL;
}
Context_def::Context_def (Context_def const &s)
+ : Smob<Context_def> ()
{
context_aliases_ = SCM_EOL;
translator_group_type_ = SCM_EOL;
}
}
-Context::Context (Context const & /* src */)
-{
- assert (false);
-}
-
Scheme_hash_table *
Context::properties_dict () const
{
}
Font_metric::Font_metric (Font_metric const &)
+ : Smob<Font_metric> ()
{
}
}
Grob::Grob (Grob const &s)
+ : Smob<Grob> ()
{
original_ = (Grob *) & s;
virtual ~Context ();
private:
Scheme_hash_table *properties_dict () const;
- Context (Context const &src);
+ Context (Context const &src); // Do not define! Not copyable!
DECLARE_CLASSNAME (Context);
void terminate ();
#include "listener.hh"
#include "stream-event.hh"
+#include "smobs.hh"
class Dispatcher : public Smob<Dispatcher>
{
DECLARE_LISTENER (override);
DECLARE_LISTENER (revert);
public:
- VIRTUAL_COPY_CONSTRUCTOR (Translator_group, Engraver_group);
-
+ DECLARE_CLASSNAME (Engraver_group);
Engraver_group ();
virtual void derived_mark () const;
void do_announces ();
Moment start_mom_;
DECLARE_CLASSNAME (Music_iterator);
- Music_iterator (Music_iterator const &);
+private:
+ Music_iterator (Music_iterator const &); // Do not define! Not copyable!
public:
Moment music_get_length () const;
virtual void derived_mark () const;
private:
- Paper_score (Paper_score const &);
+ Paper_score (Paper_score const &); // Do not define! Not copyable!
};
#endif /* PAPER_SCORE_HH */
class Performer_group : public Translator_group
{
public:
- VIRTUAL_COPY_CONSTRUCTOR (Translator_group, Performer_group);
+ DECLARE_CLASSNAME (Performer_group);
void do_announces ();
virtual void announce_element (Audio_element_info);
class Score_performer : public Performer_group
{
public:
- VIRTUAL_COPY_CONSTRUCTOR (Translator_group, Score_performer);
+ DECLARE_CLASSNAME (Score_performer);
Performance *performance_;
~Score_performer ();
template <class Super>
class Smob1 : public Smob_base<Super>
{
- Smob1 () { } // private constructor: objects don't exist, only
- // "pointers" to them
+ Smob1 (); // Do not define! Not constructible!
+ Smob1 (const Smob1 &); // Do not define! Not copyable!
public:
SCM self_scm () const { return SCM_PACK (this); }
SCM & scm1 () const { return *SCM_SMOB_OBJECT_LOC (self_scm ()); }
template <class Super>
class Smob2 : public Smob_base<Super>
{
- Smob2 () { } // private constructor: objects don't exist, only
- // "pointers" to them
+ Smob2 (); // Do not define! Not constructible!
+ Smob2 (const Smob2 &); // Do not define! Not copyable!
public:
SCM self_scm () const { return SCM_PACK (this); }
SCM & scm1 () const { return *SCM_SMOB_OBJECT_LOC (self_scm ()); }
template <class Super>
class Smob3 : public Smob_base<Super>
{
- Smob3 () { } // private constructor: objects don't exist, only
- // "pointers" to them
+ Smob3 (); // Do not define! Not constructible!
+ Smob3 (const Smob3 &); // Do not define! Not copyable!
public:
SCM self_scm () const { return SCM_PACK (this); }
SCM & scm1 () const { return *SCM_SMOB_OBJECT_LOC (self_scm ()); }
private:
SCM self_scm_;
SCM protection_cons_;
+ Smob (const Smob<Super> &); // Do not define! Not copyable!
+protected:
+ Smob () : self_scm_ (SCM_UNDEFINED), protection_cons_ (SCM_EOL) { };
public:
static size_t free_smob (SCM obj)
{
}
SCM unprotected_smobify_self ()
{
- self_scm_ = SCM_UNDEFINED;
self_scm_ = Smob_base<Super>::register_ptr (static_cast<Super *> (this));
return self_scm_;
}
return self_scm_;
}
void smobify_self () {
- protection_cons_ = SCM_EOL;
self_scm_ = unprotected_smobify_self ();
protect ();
}
class Sources
{
- Sources (Sources const &);
+ Sources (Sources const &); // Do not define! Not copyable!
vector<Source_file *> sourcefiles_;
public:
DECLARE_LISTENER (create_child_translator);
public:
- VIRTUAL_COPY_CONSTRUCTOR (Translator_group, Translator_group);
+ DECLARE_CLASSNAME (Translator_group);
virtual void connect_to_context (Context *c);
virtual void disconnect_from_context ();
}
Lily_parser::Lily_parser (Lily_parser const &src, SCM closures, SCM location)
+ : Smob<Lily_parser> ()
{
lexer_ = 0;
sources_ = src.sources_;
smobify_self ();
}
-Music_iterator::Music_iterator (Music_iterator const &)
-{
- assert (false);
-}
-
Music_iterator::~Music_iterator ()
{
}
}
Output_def::Output_def (Output_def const &s)
+ : Smob<Output_def> ()
{
scope_ = SCM_EOL;
parent_ = 0;
}
Page_marker::Page_marker (Page_marker const &src)
+ : Smob<Page_marker> ()
{
symbol_ = src.symbol_;
permission_ = src.permission_;
paper_systems_ = SCM_BOOL_F;
}
-Paper_score::Paper_score (Paper_score const &s)
- : Music_output (s)
-{
- assert (false);
-}
-
void
Paper_score::derived_mark () const
{
return SCM_BOOL_T;
}
-Prob::Prob (SCM type, SCM immutable_init)
+Prob::Prob (SCM type, SCM immutable_init) : Smob<Prob> ()
{
mutable_property_alist_ = SCM_EOL;
immutable_property_alist_ = immutable_init;
}
Prob::Prob (Prob const &src)
+ : Smob<Prob> ()
{
immutable_property_alist_ = src.immutable_property_alist_;
mutable_property_alist_ = SCM_EOL;
}
Scale::Scale (Scale const &src)
+ : Smob<Scale> ()
{
step_tones_ = src.step_tones_;
smobify_self ();
}
Scheme_hash_table::Scheme_hash_table (Scheme_hash_table const &src)
+ : Smob<Scheme_hash_table> ()
{
hash_tab_ = SCM_EOL;
smobify_self ();
}
Score::Score (Score const &s)
+ : Smob<Score> ()
{
header_ = SCM_EOL;
music_ = SCM_EOL;
path_ = 0;
}
-Sources::Sources (Sources const &)
-{
- assert (false);
-}
-
void
Sources::set_path (File_path *f)
{
init ();
}
-Translator::Translator (Translator const &src)
+Translator::Translator (Translator const &)
+ : Smob<Translator> ()
{
- (void) src;
init ();
}