Skip to content

Loading…

include: split public and private headers & prototype libsclang interface #703

Merged
merged 10 commits into from

3 participants

@timblechmann

hi all,

i'd like to merge this patch. it does:

  • split the headers into public (in include/) and private (in lang/ or server/).
  • clean up the public interface for libsclang (only expose the SC_TerminalClient class)
  • remove some dead code

jakob, two points for you:

  • i know you have been working on a plugin interface for the language. that should be unrelated to the changes of the libsclang interface, as i've only dealt with the interface, how to use libsclang.

  • i'm not sure what's the best way to incorporate QtCollider::LangClient, but maybe we can simply provide a factory function which returns a TerminalClient *, which could be a QtCollider::LangClient instance.

thoughs?

Signed-off-by: Tim Blechmann tim@klingt.org

@jleben
SuperCollider member

i know you have been working on a plugin interface for the language. that should be unrelated to the changes of the libsclang interface, as i've only dealt with the interface, how to use libsclang.

Not precisely. The plugin interface also modifies the headers affected by this patch, in order to extract a minimal needed subset of API. But that means only an inconvenience and is no big deal to solve, so never mind.

i'm not sure what's the best way to incorporate QtCollider::LangClient, but maybe we can simply provide a factory function which returns a TerminalClient *, which could be a QtCollider::LangClient instance

Sounds good!

@kaoskorobase

fwiw, LanguageClient was meant to be an abstract public interface and should be returned by the factory function, unless it's missing functionality?

@jleben
SuperCollider member

fwiw, LanguageClient was meant to be an abstract public interface and should be returned by the factory function, unless it's missing functionality?

Both LanguageClient and TerminalClient are useful publicly: the latter has additional public interface to be used externally, and would have no sense as a virtual interface of LanguageClient.

@timblechmann

jakob, which parts of SC_TerminalClient do you want to expose publicly? i suppose run or quit would probably make sense? (at least run is used in cmdLineFuncs.cpp)

@timblechmann

also, stefan, why did you expose the symbols? afaict the methods using them could be be hidden in the implementation, so that PyrSymbol could be moved completely out of the public interface

@kaoskorobase

it was meant as an optimization for often sent symbols and i think i've used them in a GUI client once. i think it would be better to hide them and keep PyrSymbol out of the public interface as you say. thanks for this patch, it was long needed ;)

@timblechmann

looking at the code, i'd suggest to move SC_StringBuffer out of the public interface. one cannot use it without compiling the related source file, but it is trivial to use the LanguageClient without ...

@kaoskorobase
@timblechmann

linking to the library is one thing, exporting the symbols of the class is another (atm SC_StringBuffer is not exported). but afaict it does not look too different from a std::string or std::vector

@timblechmann

ok, after exposing run() i think we can even move the SC_TerminalClient out of the public interface. jakob, i've changed the initialization of qtcollider a bit (moving it to the factory). could you double-check if everything is correct?

timblechmann added some commits
@timblechmann timblechmann common: move private headers from include/common to common
Signed-off-by: Tim Blechmann <tim@klingt.org>
098c32b
@timblechmann timblechmann plugin interface: move struct SC_Lock out of the public interface
plugins only acquire the NRT lock, but should to that via the interface
table

Signed-off-by: Tim Blechmann <tim@klingt.org>
55af999
@timblechmann timblechmann scapp: add include dirs for private headers
Signed-off-by: Tim Blechmann <tim@klingt.org>
fa5cf49
@timblechmann timblechmann merged commit 64e78cf into supercollider:master
@2mc 2mc referenced this pull request
Merged

out-comment s_tick #709

@timblechmann timblechmann deleted the timblechmann:topic/public_interface branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 2, 2013
  1. @timblechmann

    include: split public and private headers & prototype libsclang inter…

    timblechmann committed
    …face
    
    Signed-off-by: Tim Blechmann <tim@klingt.org>
Commits on Jan 3, 2013
  1. @timblechmann

    sclang: SC_LanguageClient - move symbols out of the interface

    timblechmann committed
    Signed-off-by: Tim Blechmann <tim@klingt.org>
  2. @timblechmann

    sclang: terminal client - move PyrSymbol out of the interface

    timblechmann committed
    Signed-off-by: Tim Blechmann <tim@klingt.org>
  3. @timblechmann

    sclang: language client - move private members to hidden class

    timblechmann committed
    Signed-off-by: Tim Blechmann <tim@klingt.org>
  4. @timblechmann

    sclang: use SC_APP preprocessor symbol to configure scapp build

    timblechmann committed
    cleans up the initialization code for primitives
    
    Signed-off-by: Tim Blechmann <tim@klingt.org>
  5. @timblechmann
  6. @timblechmann

    sclang: LanguageClient - provide factory function

    timblechmann committed
    Signed-off-by: Tim Blechmann <tim@klingt.org>
  7. @timblechmann

    common: move private headers from include/common to common

    timblechmann committed
    Signed-off-by: Tim Blechmann <tim@klingt.org>
  8. @timblechmann

    plugin interface: move struct SC_Lock out of the public interface

    timblechmann committed
    plugins only acquire the NRT lock, but should to that via the interface
    table
    
    Signed-off-by: Tim Blechmann <tim@klingt.org>
  9. @timblechmann

    scapp: add include dirs for private headers

    timblechmann committed
    Signed-off-by: Tim Blechmann <tim@klingt.org>
Something went wrong with that request. Please try again.