Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
71 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
use super::*; | ||
|
||
cpp_class!(pub unsafe struct SBModuleSpec as "SBModuleSpec"); | ||
|
||
unsafe impl Send for SBModuleSpec {} | ||
|
||
impl SBModuleSpec { | ||
pub fn new() -> SBModuleSpec { | ||
cpp!(unsafe [] -> SBModuleSpec as "SBModuleSpec" { return SBModuleSpec(); }) | ||
} | ||
pub fn clear(&self) { | ||
cpp!(unsafe [self as "SBModuleSpec*"] { | ||
self->Clear(); | ||
}) | ||
} | ||
pub fn filespec(&self) -> SBFileSpec { | ||
cpp!(unsafe [self as "SBModuleSpec*"] -> SBFileSpec as "SBFileSpec" { | ||
return self->GetFileSpec(); | ||
}) | ||
} | ||
pub fn set_filespec(&self, filespec: &SBFileSpec) { | ||
cpp!(unsafe [self as "SBModuleSpec*", filespec as "const SBFileSpec*"] { | ||
self->SetFileSpec(*filespec); | ||
}) | ||
} | ||
pub fn platform_filespec(&self) -> SBFileSpec { | ||
cpp!(unsafe [self as "SBModuleSpec*"] -> SBFileSpec as "SBFileSpec" { | ||
return self->GetPlatformFileSpec(); | ||
}) | ||
} | ||
pub fn set_platform_filespec(&self, filespec: &SBFileSpec) { | ||
cpp!(unsafe [self as "SBModuleSpec*", filespec as "const SBFileSpec*"] { | ||
self->SetPlatformFileSpec(*filespec); | ||
}) | ||
} | ||
pub fn symbol_filespec(&self) -> SBFileSpec { | ||
cpp!(unsafe [self as "SBModuleSpec*"] -> SBFileSpec as "SBFileSpec" { | ||
return self->GetSymbolFileSpec(); | ||
}) | ||
} | ||
pub fn set_symbol_filespec(&self, filespec: &SBFileSpec) { | ||
cpp!(unsafe [self as "SBModuleSpec*", filespec as "const SBFileSpec*"] { | ||
self->SetSymbolFileSpec(*filespec); | ||
}) | ||
} | ||
} | ||
|
||
impl IsValid for SBModuleSpec { | ||
fn is_valid(&self) -> bool { | ||
cpp!(unsafe [self as "SBModuleSpec*"] -> bool as "bool" { | ||
return self->IsValid(); | ||
}) | ||
} | ||
} | ||
|
||
impl fmt::Debug for SBModuleSpec { | ||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { | ||
debug_descr(f, |descr| { | ||
cpp!(unsafe [self as "SBModuleSpec*", descr as "SBStream*"] -> bool as "bool" { | ||
return self->GetDescription(*descr); | ||
}) | ||
}) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters