LibreOffice Module unodevtools (master) 1
Namespaces | Classes | Typedefs | Functions
skeletonmaker Namespace Reference

Namespaces

namespace  cpp
 
namespace  java
 

Classes

struct  ProgramOptions
 

Typedefs

typedef ::std::map< OString, ::std::vector< OString > > ProtocolCmdMap
 
typedef ::std::vector< unoidl::AccumulationBasedServiceEntity::PropertyAttributeInfo
 

Functions

void printLicenseHeader (std::ostream &o)
 print the standard OpenOffice.org license header More...
 
bool getOutputStream (ProgramOptions const &options, OString const &extension, std::ostream **ppOutputStream, OString &targetSourceFileName, OString &tmpSourceFileName)
 create dependent on the output path, the implementation name and the extension a new output file. More...
 
static bool containsAttribute (AttributeInfo &attributes, OUString const &attrname)
 
static void checkAttributes (rtl::Reference< TypeManager > const &manager, OUString const &name, AttributeInfo &attributes, std::set< OUString > &propinterfaces)
 
void checkType (rtl::Reference< TypeManager > const &manager, OUString const &name, std::set< OUString > &interfaceTypes, std::set< OUString > &serviceTypes, AttributeInfo &properties)
 
void checkDefaultInterfaces (std::set< OUString > &interfaces, const std::set< OUString > &services, std::u16string_view propertyhelper)
 
static bool checkServiceProperties (rtl::Reference< TypeManager > const &manager, OUString const &name)
 
OUString checkPropertyHelper (ProgramOptions const &options, rtl::Reference< TypeManager > const &manager, const std::set< OUString > &services, const std::set< OUString > &interfaces, AttributeInfo &attributes, std::set< OUString > &propinterfaces)
 
static bool checkXComponentSupport (rtl::Reference< TypeManager > const &manager, OUString const &name)
 
bool checkXComponentSupport (rtl::Reference< TypeManager > const &manager, std::set< OUString > &interfaces)
 checks if XComponent have to be supported, if yes it removes it from the supported interfaces list because it becomes implemented by the appropriate helper More...
 
unoidl::AccumulationBasedServiceEntity::Property::Attributes checkAdditionalPropertyFlags (unoidl::InterfaceTypeEntity::Attribute const &attribute)
 
static bool checkAddinType (rtl::Reference< TypeManager > const &manager, std::u16string_view type, bool &bLastAny, bool &bHasXPropertySet, bool bIsReturn)
 
static void checkAddInTypes (rtl::Reference< TypeManager > const &manager, std::u16string_view name, rtl::Reference< unoidl::InterfaceTypeEntity > const &entity)
 
static void generateFunctionParameterMap (std::ostream &o, ProgramOptions const &options, rtl::Reference< TypeManager > const &manager, OUString const &name, ::codemaker::GeneratedTypeSet &generated, bool &bFirst)
 
void generateFunctionParameterMap (std::ostream &o, ProgramOptions const &options, rtl::Reference< TypeManager > const &manager, const std::set< OUString > &interfaces)
 

Typedef Documentation

◆ AttributeInfo

Definition at line 37 of file skeletoncommon.hxx.

◆ ProtocolCmdMap

typedef ::std::map< OString, ::std::vector< OString > > skeletonmaker::ProtocolCmdMap

Definition at line 34 of file skeletoncommon.hxx.

Function Documentation

◆ checkAddinType()

static bool skeletonmaker::checkAddinType ( rtl::Reference< TypeManager > const &  manager,
std::u16string_view  type,
bool &  bLastAny,
bool &  bHasXPropertySet,
bool  bIsReturn 
)
static

◆ checkAddInTypes()

static void skeletonmaker::checkAddInTypes ( rtl::Reference< TypeManager > const &  manager,
std::u16string_view  name,
rtl::Reference< unoidl::InterfaceTypeEntity > const &  entity 
)
static

Definition at line 439 of file skeletoncommon.cxx.

References checkAddinType(), manager, and name.

Referenced by generateFunctionParameterMap().

◆ checkAdditionalPropertyFlags()

unoidl::AccumulationBasedServiceEntity::Property::Attributes skeletonmaker::checkAdditionalPropertyFlags ( unoidl::InterfaceTypeEntity::Attribute const &  attribute)

◆ checkAttributes()

static void skeletonmaker::checkAttributes ( rtl::Reference< TypeManager > const &  manager,
OUString const &  name,
AttributeInfo attributes,
std::set< OUString > &  propinterfaces 
)
static

◆ checkDefaultInterfaces()

void skeletonmaker::checkDefaultInterfaces ( std::set< OUString > &  interfaces,
const std::set< OUString > &  services,
std::u16string_view  propertyhelper 
)

◆ checkPropertyHelper()

OUString skeletonmaker::checkPropertyHelper ( ProgramOptions const &  options,
rtl::Reference< TypeManager > const &  manager,
const std::set< OUString > &  services,
const std::set< OUString > &  interfaces,
AttributeInfo attributes,
std::set< OUString > &  propinterfaces 
)

◆ checkServiceProperties()

static bool skeletonmaker::checkServiceProperties ( rtl::Reference< TypeManager > const &  manager,
OUString const &  name 
)
static

Definition at line 243 of file skeletoncommon.cxx.

References codemaker::UnoType::AccumulationBasedService, manager, and name.

Referenced by checkPropertyHelper().

◆ checkType()

void skeletonmaker::checkType ( rtl::Reference< TypeManager > const &  manager,
OUString const &  name,
std::set< OUString > &  interfaceTypes,
std::set< OUString > &  serviceTypes,
AttributeInfo properties 
)

◆ checkXComponentSupport() [1/2]

static bool skeletonmaker::checkXComponentSupport ( rtl::Reference< TypeManager > const &  manager,
OUString const &  name 
)
static

◆ checkXComponentSupport() [2/2]

bool skeletonmaker::checkXComponentSupport ( rtl::Reference< TypeManager > const &  manager,
std::set< OUString > &  interfaces 
)

checks if XComponent have to be supported, if yes it removes it from the supported interfaces list because it becomes implemented by the appropriate helper

Parameters
managera type manager
interfacesa list of interfaces which should be implemented
Returns
true if XComponent have to be supported

Definition at line 344 of file skeletoncommon.cxx.

References checkXComponentSupport(), and manager.

◆ containsAttribute()

static bool skeletonmaker::containsAttribute ( AttributeInfo attributes,
OUString const &  attrname 
)
static

Definition at line 82 of file skeletoncommon.cxx.

Referenced by checkAttributes().

◆ generateFunctionParameterMap() [1/2]

void skeletonmaker::generateFunctionParameterMap ( std::ostream &  o,
ProgramOptions const &  options,
rtl::Reference< TypeManager > const &  manager,
const std::set< OUString > &  interfaces 
)

Definition at line 575 of file skeletoncommon.cxx.

References generateFunctionParameterMap(), and manager.

◆ generateFunctionParameterMap() [2/2]

static void skeletonmaker::generateFunctionParameterMap ( std::ostream &  o,
ProgramOptions const &  options,
rtl::Reference< TypeManager > const &  manager,
OUString const &  name,
::codemaker::GeneratedTypeSet generated,
bool &  bFirst 
)
static

◆ getOutputStream()

bool skeletonmaker::getOutputStream ( ProgramOptions const &  options,
OString const &  extension,
std::ostream **  ppOutputStream,
OString &  targetSourceFileName,
OString &  tmpSourceFileName 
)

create dependent on the output path, the implementation name and the extension a new output file.

If output path is equal "stdout" the tool generates the output to standard out.

Parameters
optionsthe program options including the output path and the implementation name
extensionspecifies the file extensions (e.g. .cxx or .java)
ppOutputStreamout parameter returning the output stream
targetSourceFileNameout parameter returning the generated file name constructed on base of the output path, the implementation name and the extension
tmpSourceFileNameout parameter returning the temporary file name based on the output path and a generated temporary file name.
Returns
true if output is generated to standard out or else false

Definition at line 48 of file skeletoncommon.cxx.

References b2u(), FileStream::close(), createFileNameFromType(), FileStream::createTempFile(), FileStream::getName(), getTempDir(), skeletonmaker::ProgramOptions::implname, FileStream::isValid(), and skeletonmaker::ProgramOptions::outputpath.

Referenced by skeletonmaker::cpp::generateCalcAddin(), skeletonmaker::cpp::generateSkeleton(), and skeletonmaker::java::generateSkeleton().

◆ printLicenseHeader()

void skeletonmaker::printLicenseHeader ( std::ostream &  o)

print the standard OpenOffice.org license header

Parameters
ospecifies the output stream
filenamespecifies the source file name

Definition at line 36 of file skeletoncommon.cxx.

Referenced by skeletonmaker::cpp::generateCalcAddin(), skeletonmaker::cpp::generateSkeleton(), and skeletonmaker::java::generateSkeleton().