LinuxMCE Forums
May 19, 2013, 02:48:04 am GMT-1 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Rule #1 - Be Patient - Rule #2 - Don't ask when, if you don't contribute - Rule #3 - You have coding skills - LinuxMCE's small brother is available: http://www.agocontrol.com
 
   Home   Help Search Chat Login Register  
Pages: [1]
  Print  
Author Topic: Can I use patternmatching lib in c++ under LMCE ?  (Read 1207 times)
bulek
Administrator
wants to work for LinuxMCE
*****
Posts: 868

Living with LMCE


View Profile
« on: December 15, 2008, 04:12:13 pm »

Hi,

I'm working on Climate plugin, I think I'm on the right track of implementing system that would give a lot of freedom in determining what is displayed on floorplans for certain devices (see Climate plugin thread on same forum).

For implementation I need some basic pattern matching and substitute features. In c++ it seems that Boost.regex is the answer :
http://www.onlamp.com/pub/a/onlamp/2006/04/06/boostregex.html?page=1

Can I use that or are there any concerns about usage of this additional library?

Thanks in advance,

regards,

Bulek.
Logged

Thanks in advance,

regards,

Bulek.
coley
Guru
****
Posts: 430


View Profile
« Reply #1 on: December 16, 2008, 02:02:12 am »

Do you need all the functionality of this? What are you trying to achieve - I had a quick look at your climate plug-in thread but not at any of the source you were attempting to modify, which files out of interest? Does gnu regex (regex.h) or PCRE even, not give you what you are looking for - possibly not as fast as boost or boost+ but for lightweight pattern matching should be fine.

-Coley.
Logged

tschak909
LinuxMCE God
****
Posts: 5101

DOES work for LinuxMCE.


View Profile
« Reply #2 on: December 16, 2008, 05:02:11 am »

I don't have a problem with this, so long as the license is GPL compatible. Smiley

-Thom
Logged
hari
Administrator
LinuxMCE God
*****
Posts: 2412



View Profile WWW
« Reply #3 on: December 16, 2008, 11:59:43 am »

bulek, no offense, but this is not perl :-)))

br, Hari
Logged

rock your home - http://www.agocontrol.com home automation
bulek
Administrator
wants to work for LinuxMCE
*****
Posts: 868

Living with LMCE


View Profile
« Reply #4 on: December 16, 2008, 02:02:35 pm »

bulek, no offense, but this is not perl :-)))

br, Hari
agree, but once you get used to it, you try to use it every where... Although, if you take a look, those libraries declare their feature ritchness in comparison to Perl regex functionality...

I'll probably get by with some custom string functions, no fear :-) ....

regards,

Bulek.
Logged

Thanks in advance,

regards,

Bulek.
totallymaxed
LinuxMCE God
****
Posts: 4310


View Profile WWW
« Reply #5 on: December 16, 2008, 02:07:20 pm »

Hi,

I'm working on Climate plugin, I think I'm on the right track of implementing system that would give a lot of freedom in determining what is displayed on floorplans for certain devices (see Climate plugin thread on same forum).

For implementation I need some basic pattern matching and substitute features. In c++ it seems that Boost.regex is the answer :
http://www.onlamp.com/pub/a/onlamp/2006/04/06/boostregex.html?page=1

Can I use that or are there any concerns about usage of this additional library?

Thanks in advance,

regards,

Bulek.


Hmmm... I thought you wanted to do this in Perl? So in which case why are you not just using Perl's Perlre regular expression engine?

Andrew
Logged

Andy Herron,
Convergent Home Technologies Ltd
United Kingdom

Dianemo S Now Shipping on Ubuntu 12.04LTS
Build your system on the latest Ubuntu OS Release!

Get a Dianemo S License: http://forum.linuxmce.org/index.php?topic=8880.0
iOS Orbiter: http://wiki.linuxmce.org/index.php/Dianemo_iOS_Orbiter
Follow us on Facebook: https://www.facebook.com/pages/Dianemo-Home-Automation/226019387454465

Sales & Info:
http://www.dianemo.co.uk
bulek
Administrator
wants to work for LinuxMCE
*****
Posts: 868

Living with LMCE


View Profile
« Reply #6 on: December 17, 2008, 07:52:19 am »

Hi,

I'm working on Climate plugin, I think I'm on the right track of implementing system that would give a lot of freedom in determining what is displayed on floorplans for certain devices (see Climate plugin thread on same forum).

For implementation I need some basic pattern matching and substitute features. In c++ it seems that Boost.regex is the answer :
http://www.onlamp.com/pub/a/onlamp/2006/04/06/boostregex.html?page=1

Can I use that or are there any concerns about usage of this additional library?

Thanks in advance,

regards,

Bulek.


Hmmm... I thought you wanted to do this in Perl? So in which case why are you not just using Perl's Perlre regular expression engine?

Andrew
Cause Climate Plugin is in c++ and would like to keep it that way.... I've updated wiki page with this idea and I think I can implement that without regex engine (with few simple parsing functions). I'm more interesting what do you all think about those propositions. Basically they bring two novelties and first one already works beatifully on my floorplans:
- I have full control how and what to display for Climate devices
- I can even replace predefined states (COOL,AUTO;HEAT...) to custom strings (this could even be a way to translate those strings).....

I've updated wiki page with description of what has been done and what are my further propositions:
http://wiki.linuxmce.org/index.php/Climate_Plugin#Description_of_enhanced_710_plugin_and_ability_to_control_displayed_info_on_floorplans

BTW, I'd be happy to hear your discussion about those matters, cause you also seem to be involved with various devices on floorplans.... We also must clear out how to support blinds, drapes, shutters etc... Currently I have them in lighting floorplan as dimmable lights switch - quite a dirty duct tape solution...

Regards,

Bulek.
Logged

Thanks in advance,

regards,

Bulek.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!